Results 1 to 3 of 3
  1. #1
    ExDamage's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0

    C++ errors need help...

    Hello MPGH i work with C++ and im ok with fixing issuse but same time learning. i came with an error with a project my friend gave me and seem cant find his issuse.

    Error 1 error C2664: 'LoadLibraryW' : cannot convert parameter 1 from 'const char [11]' to 'LPCWSTR'
    Error 2 error C2664: 'PlaySoundW' : cannot convert parameter 1 from 'const char [11]' to 'LPCWSTR'
    Error 3 error C2664: 'SetConsoleTitleW' : cannot convert parameter 1 from 'const char [37]' to 'LPCWSTR'


    Error1 code:
    Code:
    return;
        HMODULE library = ::LoadLibrary("dwmapi.dll");
        bool result = false;
    
        if (library)
        {
            DwmEnableComposition_t func = (DwmEnableComposition_t)GetProcAddress(library, "DwmEnableComposition");
    
            if (func)
            {
                BOOL enabled = FALSE;
                func(DWM_EC_DISABLECOMPOSITION);
            }
        }
    }
    Error2 code:
    Code:
    bool SetAchievement( const char *pchName ) {
            Logger("ISteamUserStats006", "SetAchievement");
            Logger("ISteamUserStats006", (char*)pchName);
    
            if (StatBackend::GetInt(pchName) == 0) {
                PlaySound("miscom.wav", NULL, SND_ASYNC | SND_FILENAME);
            }
    
            Logger("ISteamUserStats006", "SetAchievement_doing");
    
            StatBackend::Set(pchName, 1);
    
            return true;
        }
    Error3 code:
    Code:
    int DOinit(void *unused)
    {
        unused=0;            //
            AllocConsole() ;
            AttachConsole( GetCurrentProcessId() );
            freopen( "CON", "w", stdout ) ;
            SetConsoleTitle( "API Debug Console" );
        return 0;
    }









    forgot to change Character set to muit byte
    Last edited by ExDamage; 08-06-2014 at 01:00 AM.

  2. #2
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,721
    My Mood
    Cheerful
    So, this is solved, right?

  3. #3
    ExDamage's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    yes it is, u can remove it

Similar Threads

  1. [Help Request] CFEU error, need help!
    By XXkillerFin1 in forum CrossFire Help
    Replies: 8
    Last Post: 11-04-2013, 12:53 PM
  2. [Help Request] X-trap error, NEED HELP! <3
    By zackie_2010 in forum CrossFire Help
    Replies: 6
    Last Post: 07-19-2013, 05:16 PM
  3. [Help Request] Xigncode Error - Need help !!!!
    By chrissmith99 in forum Alliance of Valiant Arms (AVA) Help
    Replies: 2
    Last Post: 06-24-2013, 05:09 PM
  4. [Help Request] .erl files error, need help :x
    By xFishFace in forum Alliance of Valiant Arms (AVA) Help
    Replies: 0
    Last Post: 07-19-2012, 09:29 AM
  5. [Help Request] Mw2_liberation error. Need help [Pics incluided]
    By lasagne93 in forum Call of Duty Modern Warfare 2 Help
    Replies: 16
    Last Post: 11-17-2011, 11:36 AM