Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C++]C# to C++

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Thu Jan 24, 2008 11:29 am    Post subject: [C++]C# to C++ Reply with quote

I just got this code from a friend and he programs in C#. Can someone translate it into C++ code, or as much of it as possible.

Code:

//This is the address to be checked
readonly IntPtr CHECK_ADDRESS = (IntPtr)0x80D4AD;

//define a process to be equal to Test.exe and then just write to its handle
Process p=Process::GetProcessesByName("Test.exe")[0];
::ReadProcessMemory(p.Handle,blah...)

//Checks address
if (BitConverter.ToInt32(pKernel.ReadProcessMemory(CHECK_ADDRESS, 4), 0) == 1)

_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Thu Jan 24, 2008 12:57 pm    Post subject: Reply with quote

Yea, "a friend"...
First of all we gotta see whats in pKernel.cs and convert everything from there to C++.
Then, if you use C++.NET, you can use the Process p = ... the way it is.
I don't know much C++, but I don't think there's IntPtr in it. try dword for the address.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Thu Jan 24, 2008 1:25 pm    Post subject: Reply with quote

IntPtr is a Pointer or Handle in C# so using HINSTANCE, HMODULE, HWND, etc. is all part of IntPtr in C++

first part:

Code:
DWORD CHECK_ADDRESS = (DWORD*)0x80D4AD;


second part: (credits to Wiicaan For this fucntion)

Code:

... windows/etc declarations ...
#include <tlhelp32.h>
#include <tchar.h>

PROCESSENTRY32 pe32;

BOOL GetProcessInfo(PROCESSENTRY32* pe)
{
   PROCESSENTRY32 proc32;
   HANDLE hSnapshot = NULL;

   hSnapshot = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
   proc32.dwSize = sizeof( PROCESSENTRY32 );
   if( Process32First( hSnapshot, &proc32 ) )
   {
      do{
         if( _tcscmp( _tcslwr( proc32.szExeFile ), TEXT("test.exe") ) == 0 )
         {
            CloseHandle( hSnapshot );
            memcpy( pe, &proc32, sizeof(PROCESSENTRY32) );
            return TRUE;
         }
      }while( Process32Next( hSnapshot, &proc32 ) );
   }
   return FALSE;
}


ReadProcessMemory: (Proc ID = pe32.th32ProcessID using function above)
Code:
BYTE* szBuffer;
BOOL ReadMemory( DWORD ProcID )
{
   HANDLE hHandle = OpenProcess( PROCESS_ALL_ACCESS, FALSE, ProcID );
   if ( hHandle == NULL )
   {
      MessageBox( NULL, TEXT("No handle found"), TEXT("Error"), MB_OK + MB_ICONERROR );
      return 0;
   }
   else
      ReadProcessMemory( hHandle, (BYTE*)0x80D4AD, szBuffer, sizeof(szBuffer), 0 );

   return FALSE;
}


i didnt test the function above so iunno if it works, i just threw it together.. Razz

_________________


Last edited by lurc on Fri Jan 25, 2008 12:59 pm; edited 3 times in total
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Thu Jan 24, 2008 2:17 pm    Post subject: Reply with quote

Symbol wrote:
Yea, "a friend"...
First of all we gotta see whats in pKernel.cs and convert everything from there to C++.
Then, if you use C++.NET, you can use the Process p = ... the way it is.
I don't know much C++, but I don't think there's IntPtr in it. try dword for the address.


I'm guessing pKernel.cs contains imports for the unamnaged API used.
Back to top
View user's profile Send private message MSN Messenger
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Thu Jan 24, 2008 3:05 pm    Post subject: Reply with quote

Code:

C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(30) : error C2146: syntax error : missing ';' before identifier 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(30) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(30) : error C2146: syntax error : missing ';' before identifier 'CreateToolhelp32Snapshot'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(30) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(31) : error C2065: 'DWORD' : undeclared identifier
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(31) : error C2146: syntax error : missing ')' before identifier 'dwFlags'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(31) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(33) : error C2059: syntax error : ')'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(64) : error C2146: syntax error : missing ';' before identifier 'dwSize'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(64) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(64) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(65) : error C2146: syntax error : missing ';' before identifier 'th32ProcessID'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(65) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(65) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(66) : error C2146: syntax error : missing ';' before identifier 'th32HeapID'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(66) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(66) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(67) : error C2146: syntax error : missing ';' before identifier 'dwFlags'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(67) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(67) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(79) : error C2146: syntax error : missing ';' before identifier 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(79) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(79) : error C2146: syntax error : missing ';' before identifier 'Heap32ListFirst'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(79) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(79) : error C2086: 'int WINAPI' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(30) : see declaration of 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(80) : error C2146: syntax error : missing ')' before identifier 'hSnapshot'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(80) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(82) : error C2059: syntax error : ')'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(86) : error C2146: syntax error : missing ';' before identifier 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(86) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(86) : error C2086: 'int BOOL' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(78) : see declaration of 'BOOL'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(86) : error C2146: syntax error : missing ';' before identifier 'Heap32ListNext'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(86) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(86) : error C2086: 'int WINAPI' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(30) : see declaration of 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(87) : error C2146: syntax error : missing ')' before identifier 'hSnapshot'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(87) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(89) : error C2059: syntax error : ')'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(93) : error C2146: syntax error : missing ';' before identifier 'dwSize'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(93) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(93) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(94) : error C2146: syntax error : missing ';' before identifier 'hHandle'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(94) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(94) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(95) : error C2146: syntax error : missing ';' before identifier 'dwAddress'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(95) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(95) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(96) : error C2146: syntax error : missing ';' before identifier 'dwBlockSize'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(96) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(96) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(97) : error C2146: syntax error : missing ';' before identifier 'dwFlags'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(97) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(97) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(98) : error C2146: syntax error : missing ';' before identifier 'dwLockCount'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(98) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(98) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(99) : error C2146: syntax error : missing ';' before identifier 'dwResvd'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(99) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(99) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(100) : error C2146: syntax error : missing ';' before identifier 'th32ProcessID'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(100) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(100) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(101) : error C2146: syntax error : missing ';' before identifier 'th32HeapID'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(101) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(101) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(114) : error C2146: syntax error : missing ';' before identifier 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(114) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(114) : error C2086: 'int BOOL' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(78) : see declaration of 'BOOL'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(114) : error C2146: syntax error : missing ';' before identifier 'Heap32First'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(114) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(114) : error C2086: 'int WINAPI' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(30) : see declaration of 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(116) : error C2061: syntax error : identifier 'DWORD'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(118) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(122) : error C2146: syntax error : missing ';' before identifier 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(122) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(122) : error C2086: 'int BOOL' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(78) : see declaration of 'BOOL'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(122) : error C2146: syntax error : missing ';' before identifier 'Heap32Next'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(122) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(122) : error C2086: 'int WINAPI' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(30) : see declaration of 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(124) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(128) : error C2146: syntax error : missing ';' before identifier 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(128) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(128) : error C2086: 'int BOOL' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(78) : see declaration of 'BOOL'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(128) : error C2146: syntax error : missing ';' before identifier 'Toolhelp32ReadProcessMemory'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(128) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(128) : error C2086: 'int WINAPI' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(30) : see declaration of 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(129) : error C2065: 'DWORD' : undeclared identifier
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(129) : error C2146: syntax error : missing ')' before identifier 'th32ProcessID'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(129) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(134) : error C2059: syntax error : ')'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(140) : error C2146: syntax error : missing ';' before identifier 'dwSize'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(140) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(140) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(141) : error C2146: syntax error : missing ';' before identifier 'cntUsage'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(141) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(141) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(142) : error C2146: syntax error : missing ';' before identifier 'th32ProcessID'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(142) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(142) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(143) : error C2146: syntax error : missing ';' before identifier 'th32DefaultHeapID'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(143) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(143) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(144) : error C2146: syntax error : missing ';' before identifier 'th32ModuleID'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(144) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(144) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(145) : error C2146: syntax error : missing ';' before identifier 'cntThreads'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(145) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(145) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(146) : error C2146: syntax error : missing ';' before identifier 'th32ParentProcessID'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(146) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(146) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(147) : error C2146: syntax error : missing ';' before identifier 'pcPriClassBase'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(147) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(147) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(148) : error C2146: syntax error : missing ';' before identifier 'dwFlags'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(148) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(148) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(149) : error C2146: syntax error : missing ';' before identifier 'szExeFile'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(149) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(149) : error C2065: 'MAX_PATH' : undeclared identifier
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(149) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(156) : error C2146: syntax error : missing ';' before identifier 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(156) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(156) : error C2086: 'int BOOL' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(78) : see declaration of 'BOOL'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(156) : error C2146: syntax error : missing ';' before identifier 'Process32FirstW'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(156) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(156) : error C2086: 'int WINAPI' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(30) : see declaration of 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(157) : error C2146: syntax error : missing ')' before identifier 'hSnapshot'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(157) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(159) : error C2059: syntax error : ')'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(163) : error C2146: syntax error : missing ';' before identifier 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(163) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(163) : error C2086: 'int BOOL' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(78) : see declaration of 'BOOL'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(163) : error C2146: syntax error : missing ';' before identifier 'Process32NextW'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(163) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(163) : error C2086: 'int WINAPI' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(30) : see declaration of 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(164) : error C2146: syntax error : missing ')' before identifier 'hSnapshot'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(164) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(166) : error C2059: syntax error : ')'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(170) : error C2146: syntax error : missing ';' before identifier 'dwSize'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(170) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(170) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(171) : error C2146: syntax error : missing ';' before identifier 'cntUsage'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(171) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(171) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(172) : error C2146: syntax error : missing ';' before identifier 'th32ProcessID'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(172) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(172) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(173) : error C2146: syntax error : missing ';' before identifier 'th32DefaultHeapID'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(173) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(173) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(174) : error C2146: syntax error : missing ';' before identifier 'th32ModuleID'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(174) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(174) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(175) : error C2146: syntax error : missing ';' before identifier 'cntThreads'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(175) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(175) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(176) : error C2146: syntax error : missing ';' before identifier 'th32ParentProcessID'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(176) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(176) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(177) : error C2146: syntax error : missing ';' before identifier 'pcPriClassBase'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(177) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(177) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(178) : error C2146: syntax error : missing ';' before identifier 'dwFlags'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(178) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(178) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(179) : error C2146: syntax error : missing ';' before identifier 'szExeFile'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(179) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(179) : error C2065: 'MAX_PATH' : undeclared identifier
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(179) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(186) : error C2146: syntax error : missing ';' before identifier 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(186) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(186) : error C2086: 'int BOOL' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(78) : see declaration of 'BOOL'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(186) : error C2146: syntax error : missing ';' before identifier 'Process32First'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(186) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(186) : error C2086: 'int WINAPI' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(30) : see declaration of 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(187) : error C2146: syntax error : missing ')' before identifier 'hSnapshot'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(187) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(189) : error C2059: syntax error : ')'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(193) : error C2146: syntax error : missing ';' before identifier 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(193) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(193) : error C2086: 'int BOOL' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(78) : see declaration of 'BOOL'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(193) : error C2146: syntax error : missing ';' before identifier 'Process32Next'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(193) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(193) : error C2086: 'int WINAPI' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(30) : see declaration of 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(194) : error C2146: syntax error : missing ')' before identifier 'hSnapshot'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(194) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(196) : error C2059: syntax error : ')'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(210) : error C2146: syntax error : missing ';' before identifier 'dwSize'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(210) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(210) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(211) : error C2146: syntax error : missing ';' before identifier 'cntUsage'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(211) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(211) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(212) : error C2146: syntax error : missing ';' before identifier 'th32ThreadID'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(212) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(212) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(213) : error C2146: syntax error : missing ';' before identifier 'th32OwnerProcessID'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(213) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(213) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(214) : error C2146: syntax error : missing ';' before identifier 'tpBasePri'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(214) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(214) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(215) : error C2146: syntax error : missing ';' before identifier 'tpDeltaPri'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(215) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(215) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(216) : error C2146: syntax error : missing ';' before identifier 'dwFlags'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(216) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(216) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(223) : error C2146: syntax error : missing ';' before identifier 'WINAPI'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(223) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(223) : error C2086: 'int BOOL' : redefinition
        C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(78) : see declaration of 'BOOL'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(223) : error C2146: syntax error : missing ';' before identifier 'Thread32First'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(223) : fatal error C1003: error count exceeds 100; stopping compilation

_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Thu Jan 24, 2008 4:14 pm    Post subject: Reply with quote

what the... FUCK!?
mine compiles fine... what compiler are u using? Visual C++ Express?

_________________
Back to top
View user's profile Send private message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Thu Jan 24, 2008 4:17 pm    Post subject: Reply with quote

Yes, here is my code.

Code:

#include <tlhelp32.h>
#include <tchar.h>

DWORD CHECK_ADDRESS = (DWORD*)0x80D4AD;

PROCESSENTRY32 pe32;

BOOL GetProcessInfo(PROCESSENTRY32* pe)
{
   PROCESSENTRY32 proc32;
   HANDLE hSnapshot = NULL;

   hSnapshot = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
   proc32.dwSize = sizeof( PROCESSENTRY32 );
   if( Process32First( hSnapshot, &proc32 ) )
   {
      do{
         if( _tcscmp( _tcslwr( proc32.szExeFile ), TEXT("test.exe") ) == 0 )
         {
            CloseHandle( hSnapshot );
            memcpy( pe, &proc32, sizeof(PROCESSENTRY32) );
            return TRUE;
         }
      }while( Process32Next( hSnapshot, &proc32 ) );
   }
   return FALSE;
}
BYTE* szBuffer;
BOOL ReadMemory( DWORD ProcID )
{
   HANDLE hHandle = OpenProcess( PROCESS_ALL_ACCESS, FALSE, ProcID );
   if ( hHandle = NULL )
   {
      MessageBox( NULL, TEXT("No handle found"), TEXT("Error"), MB_OK + MB_ICONERROR );
      return 0;
   }
   else
      ReadProcessMemory( hHandle, (BYTE*)0x80D4AD, szBuffer, sizeof(szBuffer), 0 );

   return FALSE;
}
int main()
{
return 0;
}

_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Thu Jan 24, 2008 4:58 pm    Post subject: Reply with quote

Code:
#include <windows.h>


you forgot to declare windows.h... its like the first thing u usually #include when ur doing a Win32 project... try that?


Edit: btw, i forgot to close the handle on my function

updated one:

Code:
BYTE* szBuffer;

BOOL ReadMemory( DWORD ProcID )
{
   HANDLE hHandle = OpenProcess( PROCESS_ALL_ACCESS, FALSE, ProcID );
   if ( hHandle = NULL )
   {
      MessageBox( NULL, L"No handle found", L"Error", MB_OK + MB_ICONERROR );
      return 0;
   }
   ReadProcessMemory( hHandle, (BYTE*)0x80D4AD, szBuffer, sizeof(szBuffer), 0 );
   CloseHandle( hHandle );
   return FALSE;
}

_________________
Back to top
View user's profile Send private message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Thu Jan 24, 2008 6:44 pm    Post subject: Reply with quote

Now I get 128 errors less. Very Happy

Code:
------ Build started: Project: Test, Configuration: Debug Win32 ------
Compiling...
Test.cpp
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(222) : error C2059: syntax error : ';'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\tlhelp32.h(226) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
.\Test.cpp(6) : error C2440: 'initializing' : cannot convert from 'DWORD *' to 'DWORD'
        There is no context in which this conversion is possible
Build log was saved at "file://c:\Documents and Settings\Computer\Desktop\C++ Projects\Test\Test\Debug\BuildLog.htm"
Test - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Code:
#include <windows.h>
#include <tchar.h>
#include <tlhelp32.h>

DWORD CHECK_ADDRESS = (DWORD*)0x80D4AD;

PROCESSENTRY32 pe32;

BOOL GetProcessInfo(PROCESSENTRY32* pe)
{
   PROCESSENTRY32 proc32;
   HANDLE hSnapshot = NULL;

   hSnapshot = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
   proc32.dwSize = sizeof( PROCESSENTRY32 );
   if( Process32First( hSnapshot, &proc32 ) )
   {
      do{
         if( _tcscmp( _tcslwr( proc32.szExeFile ), TEXT("test.exe") ) == 0 )
         {
            CloseHandle( hSnapshot );
            memcpy( pe, &proc32, sizeof(PROCESSENTRY32) );
            return TRUE;
         }
      }while( Process32Next( hSnapshot, &proc32 ) );
   }
   return FALSE;
}
BYTE* szBuffer;

BOOL ReadMemory( DWORD ProcID )
{
   HANDLE hHandle = OpenProcess( PROCESS_ALL_ACCESS, FALSE, ProcID );
   if ( hHandle = NULL )
   {
      MessageBox( NULL, L"No handle found", L"Error", MB_OK + MB_ICONERROR );
      return 0;
   }
   ReadProcessMemory( hHandle, (BYTE*)0x80D4AD, szBuffer, sizeof(szBuffer), 0 );
   CloseHandle( hHandle );
   return FALSE;
}
int main()
{
return 0;
}

_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Thu Jan 24, 2008 7:59 pm    Post subject: Reply with quote

To start, remove this line:

Code:
DWORD CHECK_ADDRESS = (DWORD*)0x80D4AD;


You aren't using it, so it's not needed, and you aren't initializing it correctly anyway.

As for your other two errors, I can't really say what those are as your tlhelp32 might be different then mine. Care to paste the lines it's saying the errors are happening on inside that file? Just double click the error and it will open the header to that line.

If you can paste about 5 lines above and below the error (include the error line too please) which should help us see what might be causing the issue a little more easily.

Edit: What version of Visual Studio are you using? And is it the full version or express?

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Fri Jan 25, 2008 2:14 pm    Post subject: Reply with quote

Wiccaan wrote:
To start, remove this line:

Code:
DWORD CHECK_ADDRESS = (DWORD*)0x80D4AD;


You aren't using it, so it's not needed, and you aren't initializing it correctly anyway.

As for your other two errors, I can't really say what those are as your tlhelp32 might be different then mine. Care to paste the lines it's saying the errors are happening on inside that file? Just double click the error and it will open the header to that line.

If you can paste about 5 lines above and below the error (include the error line too please) which should help us see what might be causing the issue a little more easily.

Edit: What version of Visual Studio are you using? And is it the full version or express?


Code:

BOOL
WINAPI;
Heap32First(
    LPHEAPENTRY32 lphe,
    DWORD th32ProcessID,
    ULONG_PTR th32HeapID
    );

BOOL
WINAPI;
Heap32Next(
    LPHEAPENTRY32 lphe
    );


I'm using Visual C++ Express 2008.

EDIT

I fixed my tlhelp32 and I removed the messagebox thingy and it worked fine.

_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites