I can't get it to compile. I have the SDK installed and it is the top of the list on include paths.
I keep getting these errors no matter what I do.
testlauncher.cpp(12) : error C2065: 'CreateMailSlot' : undeclared identifier
testlauncher.cpp(12) : error C2440: '=' : cannot convert from 'int' to 'void *'
here is the code:
Code:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winbase.h>
#include "..\testdll\testdll.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
HANDLE MailSlot;
MailSlot=CreateMailSlot("\\\\.\\mailslot\\DLLTALK",0,0);
InstallHook();
// MessageBox( NULL, "Hook instaled", "TestLauncher", MB_OK );
int result=0;
char buffer[255];
unsigned long bytesread;
while(result != 1)
{
ReadFile(MailSlot,&buffer,250,&bytesread,NULL);
result=MessageBox(NULL,buffer,"Captured Text",MB_OKCANCEL);
}
RemoveHook();
CloseHandle(MailSlot);
return 0;
}