void CGetSelfnameDlg::OnButton1()
{
//HANDLE hThread;
char szLibPath [_MAX_PATH];
//void* pLibRemote = 0; // the address (in the remote process) where
// szLibPath will be copied to;
//DWORD hLibModule = 0; // base adress of loaded module (==HMODULE);
//HMODULE hKernel32 = ::GetModuleHandle("Kernel32");
// Get full path of "LibSpy.dll"
if( !GetModuleFileName( ::AfxGetApp()->m_hInstance,szLibPath,_MAX_PATH) )
return;
//IDC_EDIT1
this->SetDlgItemText(IDC_EDIT1,szLibPath);
strcpy( strstr(szLibPath,".exe"),".dll" );
//IDC_EDIT2
this->SetDlgItemText(IDC_EDIT2,szLibPath);
}