m4dEngi / open-steamworks

Open Steamworks is a set of reverse engineered headers for the Valve's Steam Client
40 stars 11 forks source link

IClientShortcuts breaks ESP #3

Closed T-Maxxx closed 6 years ago

T-Maxxx commented 6 years ago

Hi. Nice fork ;D [Windows, Stable Steam]

Unfortunately, met situation where I can not use IClientShortcuts interface in my program. Calling any function from it will cause next error: image

The code is:

auto pClientShortcuts = (IClientShortcuts*)pClientEngine->GetIClientApps(hPipe, hUser, CLIENTSHORTCUTS_INTERFACE_VERSION);
    if (!pClientShortcuts)
    {
        cerr << "Unable to get Steam Client Shortcuts Interface" << endl;
        pClientEngine->ReleaseUser(hPipe, hUser);
        pClientEngine->BReleaseSteamPipe(hPipe);
        pClientEngine->BShutdownIfAllPipesClosed();
        return 1;
    }

    //AppId_t appID = parentID;
    AppId_t appID = pClientShortcuts->GetUniqueLocalAppId();

The call always returns (uint)(-1) value no matter if I have launched my app through Steam shortcut or directly using EXE. Interface class seems correct according to latest steamclient.dll and steamclient.dylib. (I meant position of virtual functions in steamclient's maps and in interface class).

Thank you.

Ne3tCode commented 6 years ago

Try to call GetIClientShortcuts instead of GetIClientApps ;)

m4dEngi commented 6 years ago

So in fact you were calling GetAppData on IClientApps with no arguments and ended up with corrupted stack.

T-Maxxx commented 6 years ago

OMG guys I didn't even noticed that. You rock! 🥇 I'm sure this was because I have copied a lot of blocks like that with changing member and interface version!