Compiler C2664 error (Different)

Discussion in 'C Programming' started by Blizzard, Nov 14, 2008.

  1. Blizzard

    Blizzard

    Joined:
    Nov 14, 2008
    Messages:
    1
    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);
     
    Blizzard, Nov 14, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Harrison
    Replies:
    1
    Views:
    14,962
    Tim Mierzejewski
    Jun 25, 2003
  2. Suzanne
    Replies:
    0
    Views:
    1,018
    Suzanne
    Jun 25, 2003
  3. Jack Klein
    Replies:
    0
    Views:
    2,684
    Jack Klein
    Jun 25, 2003
  4. David Hoffman

    Compile error C2664 - Why??

    David Hoffman, Oct 11, 2003, in forum: C++
    Replies:
    4
    Views:
    3,672
    David Hoffman
    Oct 12, 2003
  5. mkarja

    Compiler error C2664

    mkarja, Feb 6, 2005, in forum: C++
    Replies:
    1
    Views:
    1,658
    David Lindauer
    Feb 6, 2005
Loading...

Share This Page