Advertisement
Guest User

Untitled

a guest
May 19th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.18 KB | None | 0 0
  1.         if(wxIsPlatform64Bit())
  2.         {
  3.             HANDLE hModuleSnap = INVALID_HANDLE_VALUE;
  4.             MODULEENTRY32 me64;
  5.  
  6.             hModuleSnap = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE32 , gamePID );
  7.             if( hModuleSnap == INVALID_HANDLE_VALUE )
  8.                 return 1;
  9.  
  10.             me64.dwSize = sizeof( MODULEENTRY32 );
  11.  
  12.             if( !Module32First( hModuleSnap, &me64 ) )
  13.             {
  14.                 CloseHandle( hModuleSnap );
  15.                 return 2;
  16.             }
  17.  
  18.             do
  19.             {
  20.                 MyFile = new wxFileName(me64.szExePath);
  21.                 MyMD5->SetFile(*MyFile);
  22.                 MySHA1->SetFile(*MyFile);
  23.                 wxMessageBox(wxString::Format(wxT("%s"),me64.szModule) + wxT("|") + MyMD5->GetDigest() + wxT("|") + MySHA1->GetDigest() + wxT(";"));
  24.                 //HookGlob.ClientHooks.Append(wxString::Format(wxT("%s"),me32.szModule) + wxT("|") + MyMD5->GetDigest() + wxT(";"));
  25.                 delete(MyFile);
  26.             }
  27.             while( Module32Next( hModuleSnap, &me64 ) );
  28.            
  29.             delete(MyMD5);
  30.             delete(MySHA1);
  31.  
  32.             CloseHandle( hModuleSnap );
  33.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement