Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Trying to attach dll

$
0
0
I've read that dll's should be called automaticaly, when .exe file, placed in the same folder is called. So I made simple code ( to be sure that dll is attached ):

#include	"Windows.h"

BOOL WINAPI	DllMain ( HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpReserved )
{
	switch ( fdwReason )
	{
	case DLL_PROCESS_ATTACH:
		{
			MessageBox ( 0, L"test 123", L"test", MB_OK | MB_ICONQUESTION );
			break;
		}
	case DLL_PROCESS_DETACH:
		{
			break;
		}
	}
	return TRUE;
}

But I get no message. Any ideas?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>