Hello. For some reason i tried re-compiling some of my old projects and I keep getting error C2664 and I don't understand why. I tried fixing it and failed. If anyone can help please leave your X-fire if you can help.
JUST FIXING THE ERROR.
I don't need answers like "Learn C++"
All I need are some help. If you have xfire leave it in your msg thanks!
Exacts are.....
First one
1>c:\documents and settings\owner\desktop\hooking\uber\uber\uber.cpp( 140) : error C2664: 'GetModuleHandleW' : cannot convert parameter 1 from 'const char [9]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
It goes to this when i double click it
BYTE Unhook[5] = {0x8B,0xFF,0x55,0x8B,0xEC};//Original Function Bytes.
hand1 = GetCurrentProcess();
DWORD dwmodualBase=(DWORD)GetModuleHandleW("d3d8.dll");
end = 0x6d9d93a0;
dip = 0x6d9d73a0;
svp = 0x6d9d5b90;
sss = 0x6d9d6760;
Second one
1>c:\documents and settings\owner\desktop\hooking\uber\uber\uber.cpp( 413) : error C2664: 'GetModuleFileNameW' : cannot convert parameter 2 from 'char [320]' to 'LPWCH'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
When i double click this one it brings me to
//=========Log==========================//
GetModuleFileName(hModule, dlldir, 512);
for(int i = strlen(dlldir); i > 0; i--) { if(dlldir == '\\') { dlldir[i+1] = 0; break; } }
ofile.open(GetDirectoryFile("log.txt"), ios::app);
JUST FIXING THE ERROR.
I don't need answers like "Learn C++"
All I need are some help. If you have xfire leave it in your msg thanks!
Exacts are.....
First one
1>c:\documents and settings\owner\desktop\hooking\uber\uber\uber.cpp( 140) : error C2664: 'GetModuleHandleW' : cannot convert parameter 1 from 'const char [9]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
It goes to this when i double click it
BYTE Unhook[5] = {0x8B,0xFF,0x55,0x8B,0xEC};//Original Function Bytes.
hand1 = GetCurrentProcess();
DWORD dwmodualBase=(DWORD)GetModuleHandleW("d3d8.dll");
end = 0x6d9d93a0;
dip = 0x6d9d73a0;
svp = 0x6d9d5b90;
sss = 0x6d9d6760;
Second one
1>c:\documents and settings\owner\desktop\hooking\uber\uber\uber.cpp( 413) : error C2664: 'GetModuleFileNameW' : cannot convert parameter 2 from 'char [320]' to 'LPWCH'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
When i double click this one it brings me to
//=========Log==========================//
GetModuleFileName(hModule, dlldir, 512);
for(int i = strlen(dlldir); i > 0; i--) { if(dlldir == '\\') { dlldir[i+1] = 0; break; } }
ofile.open(GetDirectoryFile("log.txt"), ios::app);