case DLL_PROCESS_ATTACH: { TCHAR szPath[MAX_PATH]; if( !GetModuleFileName( NULL, szPath, MAX_PATH ) ) { return FALSE; } char c[256]={0}; _splitpath(szPath,NULL,NULL,c,NULL); if(strcmpi(c,"notepad")!=0) { MessageBox(0,"Debug",0,0); } return true; }