![]() |
(noob) calling a function in a DLL
jeez this is really driving me nuts
Not two DLL tutorials on the net say the same thing, wtf? I need for my work to build a DLL in MSVC that exports a function and an executable in MSVC too that will call this function in the DLL. I have made a simple DLL that has 2 functions and looks like this: Code:
int WINAPI DllMain (HINSTANCE hinstDLL, unsigned long fdwReason, void *lpvReserved) Code:
LIBRARY in_cms Now when I try to load it and call it in my main project executable... (here's the WinMain function of this executable) Code:
typedef void (*IN_PLUGINAPI) (char *input_pathname, block_t *output_blocks); What am I doing wrong ??? :'( |
Re: (noob) calling a function in a DLL
meh, I think I've found it :)
I must export the function this way instead: Code:
#define DLLEXPORT extern "C" __declspec (dllexport) |
All times are GMT +2. The time now is 03:40. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.