Compiler C2664 error (Different)

Joined
Nov 14, 2008
Messages
1
Reaction score
0
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);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top