I am trying to write a dll file with visual studio 2008 and i am having a problem. here is the source code for the dll:
i cant seem to get this dll function to work though. I dont have any build errors or anything but i cant get the dll to load into my liberty basic project for some reason i keep getting a dll load error. I know that i am supposed to use a .def file but i cant seem to figure out how to use it with visual studio 2008. Im really messed up here.Code:#include <windows.h> #include <winsock.h> BOOL WINAPI DllMain (HANDLE hModule, DWORD dwFunction, LPVOID lpNot) { return TRUE; } long _stdcall add_num (long a, long b) { return ((long)(a+b)); }