Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // steam_api_emu.cpp : Defines the entry point for the DLL application.
- //
- #include "stdafx.h"
- #include "SteamclientAPI.h"
- #include "SteamAPI.h"
- #include "CAppTools.h"
- class CSteamUser012 : public ISteamUser012
- {
- public:
- HSteamUser GetHSteamUser()
- {
- GApp.AddToLogFileA( "ISteamUser.log", "GetHSteamUser" );
- return NULL;
- }
- bool LoggedOn()
- {
- GApp.AddToLogFileA( "ISteamUser.log", "LoggedOn" );
- return true;
- }
- CSteamID GetSteamID()
- {
- GApp.AddToLogFileA( "ISteamUser.log", "GetSteamID" );
- return CSteamID( 33068178, k_EUniversePublic, k_EAccountTypeIndividual );
- }
- int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure )
- {
- GApp.AddToLogFileA( "ISteamUser.log", "InitiateGameConnection" );
- return 1;
- }
- void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer )
- {
- GApp.AddToLogFileA( "ISteamUser.log", "TerminateGameConnection" );
- //
- }
- void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo )
- {
- GApp.AddToLogFileA( "ISteamUser.log", "TrackAppUsageEvent" );
- //
- }
- bool GetUserDataFolder( char *pchBuffer, int cubBuffer )
- {
- GApp.AddToLogFileA( "ISteamUser.log", "GetUserDataFolder" );
- strcpy( pchBuffer, GApp.GetDirectoryFileA( "steam_data" ) );
- return true;
- }
- void StartVoiceRecording( )
- {
- GApp.AddToLogFileA( "ISteamUser.log", "StartVoiceRecording" );
- }
- void StopVoiceRecording( )
- {
- GApp.AddToLogFileA( "ISteamUser.log", "StopVoiceRecording" );
- }
- EVoiceResult GetCompressedVoice( void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten )
- {
- GApp.AddToLogFileA( "ISteamUser.log", "GetCompressedVoice" );
- return k_EVoiceResultOK;
- }
- EVoiceResult DecompressVoice( void *pCompressed, uint32 cbCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten )
- {
- GApp.AddToLogFileA( "ISteamUser.log", "DecompressVoice" );
- return k_EVoiceResultOK;
- }
- HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket )
- {
- GApp.AddToLogFileA( "ISteamUser.log", "GetAuthSessionTicket" );
- return 0;
- }
- EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID )
- {
- GApp.AddToLogFileA( "ISteamUser.log", "BeginAuthSession" );
- return k_EBeginAuthSessionResultOK;
- }
- void EndAuthSession( CSteamID steamID )
- {
- GApp.AddToLogFileA( "ISteamUser.log", "EndAuthSession" );
- }
- void CancelAuthTicket( HAuthTicket hAuthTicket )
- {
- GApp.AddToLogFileA( "ISteamUser.log", "CancelAuthTicket" );
- }
- uint32 UserHasLicenseForApp( CSteamID steamID, AppId_t appID )
- {
- GApp.AddToLogFileA( "ISteamUser.log", "UserHasLicenseForApp" );
- return 1;
- }
- };
- //class CSteamUser012 : public ISteamUser012
- class CSteamRemoteStorage002 : public ISteamRemoteStorage002
- {
- public:
- bool FileWrite( const char *pchFile, const void *pvData, int32 cubData )
- {
- GApp.AddToLogFileA( "ISteamRemoteStorage.log", "FileWrite( %s )", pchFile );
- return true;
- }
- int32 GetFileSize( const char *pchFile )
- {
- GApp.AddToLogFileA( "ISteamRemoteStorage.log", "GetFileSize( %s )", pchFile );
- //get file size of something? fuck nigger.
- return 0;
- }
- int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead )
- {
- GApp.AddToLogFileA( "ISteamRemoteStorage.log", "FileRead( %s )", pchFile );
- return 0;
- }
- bool FileExists( const char *pchFile )
- {
- GApp.AddToLogFileA( "ISteamRemoteStorage.log", "FileExists( %s )", pchFile );
- return false;
- }
- int32 GetFileCount()
- {
- GApp.AddToLogFileA( "ISteamRemoteStorage.log", "GetFileCount" );
- return 0;
- }
- const char *GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes )
- {
- GApp.AddToLogFileA( "ISteamRemoteStorage.log", "GetFileNameAndSize" );
- *pnFileSizeInBytes = 0;
- return "";
- }
- bool GetQuota( int32 *pnTotalBytes, int32 *puAvailableBytes )
- {
- GApp.AddToLogFileA( "ISteamRemoteStorage.log", "GetQuota" );
- *pnTotalBytes = 0x10000000;
- *puAvailableBytes = 0x10000000;
- return true;
- }
- };
- class CSteamFriends005 : public ISteamFriends005
- {
- public:
- const char *GetPersonaName()
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "GetPersonaName" );
- return "s0beit";
- }
- void SetPersonaName( const char *pchPersonaName )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "SetPersonaName( %s )", pchPersonaName );
- }
- EPersonaState GetPersonaState()
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "GetPersonaState" );
- return k_EPersonaStateOnline;
- }
- int GetFriendCount( int iFriendFlags )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "GetFriendCount" );
- return 0;
- }
- CSteamID GetFriendByIndex( int iFriend, int iFriendFlags )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "GetFriendByIndex" );
- return CSteamID();
- }
- EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "GetFriendRelationship" );
- return k_EFriendRelationshipNone;
- }
- EPersonaState GetFriendPersonaState( CSteamID steamIDFriend )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "GetFriendPersonaState" );
- return k_EPersonaStateOffline;
- }
- const char *GetFriendPersonaName( CSteamID steamIDFriend )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "GetFriendPersonaName" );
- return "UnknownFriend";
- }
- int GetFriendAvatar( CSteamID steamIDFriend, int eAvatarSize )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "GetFriendAvatar" );
- return 0;
- }
- bool GetFriendGamePlayed( CSteamID steamIDFriend, FriendGameInfo_t *pFriendGameInfo )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "GetFriendGamePlayed" );
- return false;
- }
- const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "GetFriendPersonaNameHistory" );
- return "";
- }
- bool HasFriend( CSteamID steamIDFriend, int iFriendFlags )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "HasFriend" );
- return false;
- }
- int GetClanCount()
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "GetClanCount" );
- return 0;
- }
- CSteamID GetClanByIndex( int iClan )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "GetClanByIndex" );
- return CSteamID();
- }
- const char *GetClanName( CSteamID steamIDClan )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "GetClanName" );
- return "myg0t";
- }
- int GetFriendCountFromSource( CSteamID steamIDSource )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "GetFriendCountFromSource" );
- return 0;
- }
- CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "GetFriendFromSourceByIndex" );
- return CSteamID();
- }
- bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "IsUserInSource" );
- return false;
- }
- void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "SetInGameVoiceSpeaking" );
- }
- void ActivateGameOverlay( const char *pchDialog )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "ActivateGameOverlay" );
- }
- void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "ActivateGameOverlayToUser" );
- }
- void ActivateGameOverlayToWebPage( const char *pchURL )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "ActivateGameOverlayToWebPage" );
- }
- void ActivateGameOverlayToStore( AppId_t nAppID )
- {
- GApp.AddToLogFileA( "ISteamFriends005.log", "ActivateGameOverlayToStore" );
- }
- };
- CSteamUser012* g_pSteamUserEmu = new CSteamUser012;
- CSteamRemoteStorage002* g_pSteamRemoteStorageEmu = new CSteamRemoteStorage002;
- CSteamFriends005* g_pSteamFriendsEmu = new CSteamFriends005;
- extern "C"
- {
- __declspec(dllexport) HSteamPipe __cdecl GetHSteamPipe()
- {
- GApp.AddToLogFileA( "steam_emu.log", "GetHSteamPipe" );
- return NULL;
- }
- __declspec(dllexport) HSteamUser __cdecl GetHSteamUser()
- {
- GApp.AddToLogFileA( "steam_emu.log", "GetHSteamUser" );
- return NULL;
- }
- __declspec(dllexport) HSteamPipe __cdecl SteamAPI_GetHSteamPipe()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamAPI_GetHSteamPipe" );
- return NULL;
- }
- __declspec(dllexport) HSteamUser __cdecl SteamAPI_GetHSteamUser()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamAPI_GetHSteamUser" );
- return NULL;
- }
- __declspec(dllexport) const char *__cdecl SteamAPI_GetSteamInstallPath()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamAPI_GetSteamInstallPath" );
- return NULL;
- }
- __declspec(dllexport) bool __cdecl SteamAPI_Init()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamAPI_Init" );
- return true;
- }
- __declspec(dllexport) bool __cdecl SteamAPI_InitSafe()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamAPI_InitSafe" );
- return true;
- }
- __declspec(dllexport) void __cdecl SteamAPI_RegisterCallResult( CCallbackBase* pResult, SteamAPICall_t APICall )
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamAPI_RegisterCallResult" );
- //
- }
- __declspec(dllexport) void __cdecl SteamAPI_RegisterCallback( CCallbackBase *pCallback, int iCallback )
- {
- g_Logging.AddToLogFileA( "steam_emu.log", "SteamAPI_RegisterCallback for call type %d", iCallback );
- Callbacks::Register(pCallback, iCallback);
- //
- }
- __declspec(dllexport) void __cdecl SteamAPI_RunCallbacks()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamAPI_RunCallbacks" );
- //
- }
- __declspec(dllexport) void __cdecl SteamAPI_SetMiniDumpComment( const char *pchMsg )
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamAPI_SetMiniDumpComment" );
- //
- }
- __declspec(dllexport) bool __cdecl SteamAPI_SetTryCatchCallbacks( bool bUnknown )
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamAPI_SetTryCatchCallbacks" );
- return bUnknown;
- }
- __declspec(dllexport) void __cdecl SteamAPI_Shutdown()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamAPI_Shutdown" );
- //
- }
- __declspec(dllexport) void __cdecl SteamAPI_UnregisterCallResult( CCallbackBase* pResult, SteamAPICall_t APICall )
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamAPI_UnregisterCallResult" );
- //
- }
- __declspec(dllexport) void __cdecl SteamAPI_UnregisterCallback( CCallbackBase *pCallback, int iCallback )
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamAPI_UnregisterCallback" );
- //
- }
- __declspec(dllexport) void __cdecl SteamAPI_WriteMiniDump( uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID )
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamAPI_WriteMiniDump" );
- //
- }
- __declspec(dllexport) void* __cdecl SteamApps()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamApps" );
- return NULL;
- }
- __declspec(dllexport) void* __cdecl SteamClient()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamClient" );
- return NULL;
- }
- __declspec(dllexport) void* __cdecl SteamContentServer()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamContentServer" );
- return NULL;
- }
- __declspec(dllexport) void* __cdecl SteamContentServerUtils()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamContentServerUtils" );
- return NULL;
- }
- __declspec(dllexport) bool __cdecl SteamContentServer_Init( unsigned int uLocalIP, unsigned short usPort )
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamContentServer_Init" );
- return NULL;
- }
- __declspec(dllexport) void __cdecl SteamContentServer_RunCallbacks()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamContentServer_RunCallbacks" );
- //
- }
- __declspec(dllexport) void __cdecl SteamContentServer_Shutdown()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamContentServer_Shutdown" );
- //
- }
- __declspec(dllexport) void* __cdecl SteamFriends()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamFriends" );
- return g_pSteamFriendsEmu;
- }
- __declspec(dllexport) void* __cdecl SteamGameServer()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamGameServer" );
- return NULL;
- }
- __declspec(dllexport) void* __cdecl SteamGameServerUtils()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamGameServerUtils" );
- return NULL;
- }
- __declspec(dllexport) bool __cdecl SteamGameServer_BSecure()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamGameServer_BSecure" );
- return true;
- }
- __declspec(dllexport) HSteamPipe __cdecl SteamGameServer_GetHSteamPipe()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamGameServer_GetHSteamPipe" );
- return NULL;
- }
- __declspec(dllexport) HSteamUser __cdecl SteamGameServer_GetHSteamUser()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamGameServer_GetHSteamUser" );
- return NULL;
- }
- __declspec(dllexport) int32 __cdecl SteamGameServer_GetIPCCallCount()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamGameServer_GetIPCCallCount" );
- return NULL;
- }
- __declspec(dllexport) uint64 __cdecl SteamGameServer_GetSteamID()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamGameServer_GetSteamID" );
- return NULL;
- }
- __declspec(dllexport) bool __cdecl SteamGameServer_Init( uint32 unIP, uint16 usPort, uint16 usGamePort, EServerMode eServerMode, int nGameAppId, const char *pchGameDir, const char *pchVersionString )
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamGameServer_Init" );
- return true;
- }
- __declspec(dllexport) bool __cdecl SteamGameServer_InitSafe( uint32 unIP, uint16 usPort, uint16 usGamePort, EServerMode eServerMode, int nGameAppId, const char *pchGameDir, const char *pchVersionString, unsigned long dongs )
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamGameServer_InitSafe" );
- return true;
- }
- __declspec(dllexport) void __cdecl SteamGameServer_RunCallbacks()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamGameServer_RunCallbacks" );
- //
- }
- __declspec(dllexport) void __cdecl SteamGameServer_Shutdown()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamGameServer_Shutdown" );
- //
- }
- __declspec(dllexport) void* __cdecl SteamMasterServerUpdater()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamMasterServerUpdater" );
- return NULL;
- }
- __declspec(dllexport) void* __cdecl SteamMatchmaking()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamMatchmaking" );
- return NULL;
- }
- __declspec(dllexport) void* __cdecl SteamMatchmakingServers()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamMatchmakingServers" );
- return NULL;
- }
- __declspec(dllexport) void* __cdecl SteamNetworking()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamNetworking" );
- return NULL;
- }
- __declspec(dllexport) void* __cdecl SteamRemoteStorage()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamRemoteStorage" );
- return g_pSteamRemoteStorageEmu;
- }
- __declspec(dllexport) void* __cdecl SteamUser()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamUser" );
- return g_pSteamUserEmu;
- }
- __declspec(dllexport) void* __cdecl SteamUserStats()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamUserStats" );
- return NULL;
- }
- __declspec(dllexport) void* __cdecl SteamUtils()
- {
- GApp.AddToLogFileA( "steam_emu.log", "SteamUtils" );
- return NULL;
- }
- __declspec(dllexport) HSteamUser __cdecl Steam_GetHSteamUserCurrent()
- {
- GApp.AddToLogFileA( "steam_emu.log", "Steam_GetHSteamUserCurrent" );
- return NULL;
- }
- __declspec(dllexport) void __cdecl Steam_RegisterInterfaceFuncs( void *hModule )
- {
- GApp.AddToLogFileA( "steam_emu.log", "Steam_RegisterInterfaceFuncs" );
- //
- }
- __declspec(dllexport) void __cdecl Steam_RunCallbacks( HSteamPipe hSteamPipe, bool bGameServerCallbacks )
- {
- GApp.AddToLogFileA( "steam_emu.log", "Steam_RunCallbacks" );
- //
- }
- __declspec(dllexport) void *g_pSteamClientGameServer = NULL;
- }
- BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
- {
- if( ul_reason_for_call == DLL_PROCESS_ATTACH )
- {
- GApp.BaseUponModule( hModule );
- GApp.AddToLogFileA( "steam_emu.log", "Attached to process!" );
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment