I'm currently developing a DLL in Visual Studio.net which will act as a password filter for the LSASS.exe process. I'm trying to test it using a small program, but the program is crashing. As this is my first time writing a DLL I'm a bit confused as to how to actually invoke a function called 'PasswordFilter' from the DLL. Could anyone help me, and also explain what the difference between _cdecl and _stdcall declarations is?
// Test.cpp : Defines the entry point for the console application.
#define DLL "Password.dll"
typedef VOID (*MYPROC)(LPTSTR);
int main(int argc, char * argv)
BOOL test = false;
if((hmod = LoadLibrary(DLL))==NULL)
printf("problem loading library");
printf("the library, %s , loaded correctly",DLL);
void(*dll_fn)() = ( (*)())GetProcAddress(hmod, "PasswordFilter");// Get the address of the function to call