Stránka 1 z 1

C++ DLL library export funkci

Napsal: 05 srp 2013 20:05
od hacesoft
Dobry den,
jak mam exportovat funkci v DLL, kdyz ju mam uzavrenou v namespace.

Kód: Vybrat vše

namespace wwio_USB2LPT {

   void WINAPI WriteData(BYTE a, BYTE b) {
       .....

      }

}


a v hlavickovem souboru definuji toto:

Kód: Vybrat vše

DllExport void WINAPI wwio_USB2LPT::WriteData(BYTE a, BYTE b);


a hlasi to ze takto to bejt nemuze.

Dokazete nekdo poradit?

Dekuji.

Re: C++ DLL library export funkci

Napsal: 06 srp 2013 18:12
od hacesoft
Tak jse to uz nasel. Kdyby to nekoho zajimalo tak se to dela takto:

namespace wwio_USB2LPT{
DllExport void WINAPI WriteData(BYTE a, BYTE b);
}