If Steam is running as a normal user and the game is launched "as administrator" (or vice versa), Windows considers them separate processes with different permission levels. The Steam API's inter-process communication fails because the two processes cannot talk to each other.
In Steam, go to Settings > In-Game and ensure "Enable the Steam Overlay while in-game" is checked. Summary of Fixes Key Takeaway Launch via Steam Do not run Oneshot.exe directly. Restart Steam Fixes temporary API disconnection. Run as Admin Fixes permission issues. Verify Files Fixes corrupted game installation. could not initialize steamworks api oneshot
: Implement proper error handling when initializing the Steamworks API. Valve provides a set of callback functions that can help diagnose initialization issues. If Steam is running as a normal user