m4dengi / open-steamworks Goto Github PK
View Code? Open in Web Editor NEWThis project forked from steamre/open-steamworks
Open Steamworks is a set of reverse engineered headers for the Valve's Steam Client
This project forked from steamre/open-steamworks
Open Steamworks is a set of reverse engineered headers for the Valve's Steam Client
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:
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.
I want the bot to go online. Saw similar code in many examples. But it does not work. What am I missing? Thank.
`void TestClient::OnLoggedOnManual(SteamServersConnected_t* cbMsg)
{
printf("TestClient::OnLoggedOnManual Logged in\n");
EPersonaState state = m_pClientFriends->GetPersonaState();
if (state != k_EPersonaStateOnline)
{
m_pClientFriends->SetPersonaState(k_EPersonaStateOnline);
printf("Online\n");
}
}`
Looks like the only actively changing part of steam client nowadays is vr/controller related interfaces. And that part almost completely missing/outdated here. And my dev skills atm are too low to fix that on my own.
Logging in using SetLoginInformation and SetTwoFactorCode followed with the LogIn call works fine, but it doesn't save the password.
I'm assuming since the client log says "Using JWT" with the official client and "Using credential pair" with my client, it doesn't send the required protobufs itself, and I can't send them through SharedConnection. Am I missing something?
How I'm doing it right now:
https://steamcommunity.com/login/getrsakey?username=
CAuthentication_BeginAuthSessionViaCredentials_Request
ClientUser->EConnect()
SendMessageAndAwaitResponse
How can I use SharedConnection successfully? And is it possible to get the response data?
Steam4net client bindings outdated
Hello,
I've been trying to get the test client to run before I start programming my app with open-steamworks, however, I've run into a problem.
The test client and the library compiles just fine on Linux, however it seems that for some reason, trying to login returns an "EResult 3". Looking through the code, "EResult 3" is returned when the client can't connect to the internet.
k_EResultNoConnection = 3, // no/failed network connection
I though it was a firewall problem at first but since I don't have one installed it shouldn't be an issue. Although the logs do raise a problem, that is:
/home/<username>/.steam/sdk32//../ubuntu12_32/gldriverquery: error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory
I think that might be the problem. How would I go about fixing that ?
Thanks in advance for the reply !
PS: Here are some specs for my system if it helps
OS: Arch Linux x86_64
Kernel: 5.19.12-arch1-1
Shell: bash 5.1.16
Resolution: 1920x1080
DE: Plasma 5.25.5
WM: KWin
Terminal: konsole
CPU: Intel i5-3570 (4) @ 4.000GHz
GPU: NVIDIA GeForce GTX 650 Ti Boost
Memory: 3573MiB / 7903MiB
Hello, I would like to start by saying nice fork, thanks for keeping it up to date.
The issue i'm currently facing is that i can't get IClientUser::SpawnProcess
to work for the life of me.
If anyone can please look at my code and tell my what I did wrong, or what I'm missing, please tell me.
IClientShortcuts* clientShortcuts = m_clientEngine->GetIClientShortcuts(hSteamUser, hSteamPipe);
uint32_t appId = clientShortcuts->GetUniqueLocalAppId();
uint32_t parentAppId = 243750;
uint64_t gameId = 0xD8A9994402000000 | parentAppId; // 'cfx' crc32 + shortcut
std::cout << "[parent] " << appId << ' ' << parentAppId << ' ' << gameId << std::endl;
IClientApps* clientApps = m_clientEngine->GetIClientApps(hSteamUser, hSteamPipe);
KeyValuesBuilder builder;
builder.PackString("name", "Muck.NET");
builder.PackUint64("gameid", gameId);
builder.PackString("installed", "1");
builder.PackString("gamedir", "cfx");
builder.PackString("serverbrowsername", "lovely!");
builder.PackEnd();
std::string str = builder.GetString();
bool ok = clientApps->SetLocalAppConfig(appId, (uint8_t*)str.c_str(), str.size());
if (ok)
{
std::cout << "[parent] " << "Config Set OK" << std::endl;
IClientUtils* clientUtils = m_clientEngine->GetIClientUtils(hSteamPipe);
// set pipe appid
clientUtils->SetAppIDForCurrentPipe(parentAppId, false);
std::cout << "[parent] " << "AppId set for current pipe" << std::endl;
IClientUser* clientUser = m_clientEngine->GetIClientUser(hSteamUser, hSteamPipe);
wchar_t directory[MAX_PATH];
GetCurrentDirectoryW(sizeof(directory), directory);
std::wstring process(directory);
process.append(L"\\Test Platform.exe");
std::wstringstream cmdwss;
cmdwss << '"' << process << "\" child " << parent_parentPID;
std::wstring cmd = cmdwss.str();
std::wcout << "[parent] " << directory << std::endl;
std::wcout << "[parent] " << process.c_str() << std::endl;
std::wcout << "[parent] " << cmd.c_str() << std::endl;
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t> converter;
if(clientUser->SpawnProcess(converter.to_bytes(process).c_str(), converter.to_bytes(cmd).c_str(), converter.to_bytes(directory).c_str(), &gameId, "Muck.NET", 0, 0, 0))
std::cout << "[parent] " << "Process Spawned" << std::endl;
else {
std::cout << "[parent] " << "SpawnProcess returned false" << std::endl;
}
}
This code is mostly copied from the FiveM repository, here
Thanks to anyone reading and trying to help me.
It should be possible to auto-update these headers with your other project, steamworks_dumper. This will fix the headers breaking as the client updates. I've written OSWUpdater for OpenSteamClient, so if you need inspiration feel free to take it from there (I wouldn't copy paste the code though, it's pretty terribly written).
I've also forked the steamworks_dumper repo and made it dump IPC function info, which is really useful when typing the functions.
Example output available here
Deadlocks everywhere. Whole thing is a mess.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.