Initial Commit with Data

Signed-off-by: Michael Fabian Dirks <michael.dirks@realitybends.de>
This commit is contained in:
Michael Fabian Dirks
2015-05-10 17:31:34 +02:00
commit b641313a75
46 changed files with 167364 additions and 0 deletions
+109
View File
@@ -0,0 +1,109 @@
// Original Code by Noodoby<http://www.blitzforum.de/forum/viewtopic.php?t=31651>
// Modified Code by Xaymar<http://project-kube.de>
#include "BlitzPointer.h"
DLL_EXPORT uint32_t BlitzPointer_GetReturnAddress() {
unsigned int StackPointer, ReturnAddress;
__asm { //ASM. Do touch if suicidal.
mov StackPointer, esp // Store current Stack Pointer
mov esp, ebp // On X86, EBP[0] is our own function and EBP[1] is the return address.
add esp, 4 // Which means that we can just take it from there into our own variable.
pop ReturnAddress // Just like this.
mov esp, [StackPointer] // And then reset the Stack Pointer.
}
return ReturnAddress;
}
DLL_EXPORT uint32_t BlitzPointer_GetFunctionPointer() {
unsigned int StackPointer, ReturnAddress;
__asm { //ASM. Do touch if suicidal.
mov StackPointer, esp // Store current Stack Pointer
mov esp, ebp // On X86, EBP[0] is our own function and EBP[1] is the return address.
add esp, 4 // Which means that we can just take it from there into our own variable.
pop ReturnAddress // Just like this.
mov esp, [StackPointer] // And then reset the Stack Pointer.
}
// let's look backwards in memory for the function signature (0x53 0x56 0x57 0x55 0x89 0xE5) for at most one megabyte.
uint8_t* startPtr = (uint8_t*)ReturnAddress;
uint8_t* endPtr = (uint8_t*)(ReturnAddress - 1048576);
for (uint8_t* curPtr = startPtr; curPtr != endPtr; curPtr--) {
if (*(curPtr) == 0x53) // push ebx
if (*(curPtr+1) == 0x56) // push esi
if (*(curPtr+2) == 0x57) // push edi
if (*(curPtr+3) == 0x55) // push ebp
if (*(curPtr + 4) == 0x89 && *(curPtr +5) == 0xE5) // mov ebp,esp
return (uint32_t)curPtr;
}
return 0;
}
DLL_EXPORT uint32_t BlitzPointer_CallFunction0(uint32_t fpFunctionPointer) {
uint32_t returnvalue;
__asm {
call dword ptr[fpFunctionPointer]
mov[returnvalue], eax
}
return returnvalue;
}
DLL_EXPORT uint32_t BlitzPointer_CallFunction1(uint32_t fpFunctionPointer, uint32_t p1) {
uint32_t returnvalue;
__asm {
sub esp, 0x4
mov eax, [p1]
mov[esp], eax
call dword ptr[fpFunctionPointer]
mov[returnvalue], eax
}
return returnvalue;
}
DLL_EXPORT uint32_t BlitzPointer_CallFunction2(uint32_t fpFunctionPointer, uint32_t p1, uint32_t p2) {
uint32_t returnvalue;
__asm {
sub esp, 0x8
mov eax, [p2]
mov[esp+4], eax
mov eax, [p1]
mov[esp], eax
call dword ptr[fpFunctionPointer]
mov[returnvalue], eax
}
return returnvalue;
}
DLL_EXPORT uint32_t BlitzPointer_CallFunction3(uint32_t fpFunctionPointer, uint32_t p1, uint32_t p2, uint32_t p3) {
uint32_t returnvalue;
__asm {
sub esp, 0xC
mov eax, [p3]
mov[esp + 8], eax
mov eax, [p2]
mov[esp + 4], eax
mov eax, [p1]
mov[esp], eax
call dword ptr[fpFunctionPointer]
mov[returnvalue], eax
}
return returnvalue;
}
DLL_EXPORT uint32_t BlitzPointer_CallFunction4(uint32_t fpFunctionPointer, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4) {
uint32_t returnvalue;
__asm {
sub esp, 0x10
mov eax, [p4]
mov[esp + 12], eax
mov eax, [p3]
mov[esp + 8], eax
mov eax, [p2]
mov[esp + 4], eax
mov eax, [p1]
mov[esp], eax
call dword ptr[fpFunctionPointer]
mov[returnvalue], eax
}
return returnvalue;
}
+9
View File
@@ -0,0 +1,9 @@
#include "dllmain.h"
DLL_EXPORT uint32_t BlitzPointer_GetReturnAddress();
DLL_EXPORT uint32_t BlitzPointer_GetFunctionPointer();
DLL_EXPORT uint32_t BlitzPointer_CallFunction0(uint32_t fpFunctionPointer);
DLL_EXPORT uint32_t BlitzPointer_CallFunction1(uint32_t fpFunctionPointer, uint32_t p1);
DLL_EXPORT uint32_t BlitzPointer_CallFunction2(uint32_t fpFunctionPointer, uint32_t p1, uint32_t p2);
DLL_EXPORT uint32_t BlitzPointer_CallFunction3(uint32_t fpFunctionPointer, uint32_t p1, uint32_t p2, uint32_t p3);
DLL_EXPORT uint32_t BlitzPointer_CallFunction4(uint32_t fpFunctionPointer, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4);
+149
View File
@@ -0,0 +1,149 @@
;----------------------------------------------------------------
;-- Enumerations
;----------------------------------------------------------------
Const EResultOK = 1; ; success
Const EResultFail = 2; ; generic failure
Const EResultNoConnection = 3; ; no/failed network connection
Const EResultInvalidPassword = 5; ; password/ticket is invalid
Const EResultLoggedInElsewhere = 6; ; same user logged in elsewhere
Const EResultInvalidProtocolVer = 7; ; protocol version is incorrect
Const EResultInvalidParam = 8; ; a parameter is incorrect
Const EResultFileNotFound = 9; ; file was not found
Const EResultBusy = 10; ; called method busy - action not taken
Const EResultInvalidState = 11; ; called object was in an invalid state
Const EResultInvalidName = 12; ; name is invalid
Const EResultInvalidEmail = 13; ; email is invalid
Const EResultDuplicateName = 14; ; name is not unique
Const EResultAccessDenied = 15; ; access is denied
Const EResultTimeout = 16; ; operation timed out
Const EResultBanned = 17; ; VAC2 banned
Const EResultAccountNotFound = 18; ; account not found
Const EResultInvalidSteamID = 19; ; steamID is invalid
Const EResultServiceUnavailable = 20; ; The requested service is currently unavailable
Const EResultNotLoggedOn = 21; ; The user is not logged on
Const EResultPending = 22; ; Request is pending (may be in process; or waiting on third party)
Const EResultEncryptionFailure = 23; ; Encryption or Decryption failed
Const EResultInsufficientPrivilege = 24; ; Insufficient privilege
Const EResultLimitExceeded = 25; ; Too much of a good thing
Const EResultRevoked = 26; ; Access has been revoked (used for revoked guest passes)
Const EResultExpired = 27; ; License/Guest pass the user is trying to access is expired
Const EResultAlreadyRedeemed = 28; ; Guest pass has already been redeemed by account; cannot be acked again
Const EResultDuplicateRequest = 29; ; The request is a duplicate and the action has already occurred in the past; ignored this time
Const EResultAlreadyOwned = 30; ; All the games in this guest pass redemption request are already owned by the user
Const EResultIPNotFound = 31; ; IP address not found
Const EResultPersistFailed = 32; ; failed to write change to the data store
Const EResultLockingFailed = 33; ; failed to acquire access lock for this operation
Const EResultLogonSessionReplaced = 34;
Const EResultConnectFailed = 35;
Const EResultHandshakeFailed = 36;
Const EResultIOFailure = 37;
Const EResultRemoteDisconnect = 38;
Const EResultShoppingCartNotFound = 39; ; failed to find the shopping cart requested
Const EResultBlocked = 40; ; a user didn't allow it
Const EResultIgnored = 41; ; target is ignoring sender
Const EResultNoMatch = 42; ; nothing matching the request found
Const EResultAccountDisabled = 43;
Const EResultServiceReadOnly = 44; ; this service is not accepting content changes right now
Const EResultAccountNotFeatured = 45; ; account doesn't have value; so this feature isn't available
Const EResultAdministratorOK = 46; ; allowed to take this action; but only because requester is admin
Const EResultContentVersion = 47; ; A Version mismatch in content transmitted within the Steam protocol.
Const EResultTryAnotherCM = 48; ; The current CM can't service the user making a request; user should try another.
Const EResultPasswordRequiredToKickSession = 49;; You are already logged in elsewhere; this cached credential login has failed.
Const EResultAlreadyLoggedInElsewhere = 50; ; You are already logged in elsewhere; you must wait
Const EResultSuspended = 51; ; Long running operation (content download) suspended/paused
Const EResultCancelled = 52; ; Operation canceled (typically by user: content download)
Const EResultDataCorruption = 53; ; Operation canceled because data is ill formed or unrecoverable
Const EResultDiskFull = 54; ; Operation canceled - not enough disk space.
Const EResultRemoteCallFailed = 55; ; an remote call or IPC call failed
Const EResultPasswordUnset = 56; ; Password could not be verified as it's unset server side
Const EResultExternalAccountUnlinked = 57; ; External account (PSN; Facebook...) is not linked to a Steam account
Const EResultPSNTicketInvalid = 58; ; PSN ticket was invalid
Const EResultExternalAccountAlreadyLinked = 59; ; External account (PSN; Facebook...) is already linked to some other account; must explicitly request to replace/delete the link first
Const EResultRemoteFileConflict = 60; ; The sync cannot resume due to a conflict between the local and remote files
Const EResultIllegalPassword = 61; ; The requested new password is not legal
Const EResultSameAsPreviousValue = 62; ; new value is the same as the old one ( secret question and answer )
Const EResultAccountLogonDenied = 63; ; account login denied due to 2nd factor authentication failure
Const EResultCannotUseOldPassword = 64; ; The requested new password is not legal
Const EResultInvalidLoginAuthCode = 65; ; account login denied due to auth code invalid
Const EResultAccountLogonDeniedNoMail = 66; ; account login denied due to 2nd factor auth failure - and no mail has been sent
Const EResultHardwareNotCapableOfIPT = 67; ;
Const EResultIPTInitError = 68; ;
Const EResultParentalControlRestricted = 69; ; operation failed due to parental control restrictions for current user
Const EResultFacebookQueryError = 70; ; Facebook query returned an error
Const EResultExpiredLoginAuthCode = 71; ; account login denied due to auth code expired
Const EResultIPLoginRestrictionFailed = 72;
Const EResultAccountLockedDown = 73;
Const EResultAccountLogonDeniedVerifiedEmailRequired = 74;
Const EResultNoMatchingURL = 75;
Const EResultBadResponse = 76; ; parse failure; missing field; etc.
Const EResultRequirePasswordReEntry = 77; ; The user cannot complete the action until they re-enter their password
Const EResultValueOutOfRange = 78; ; the value entered is outside the acceptable range
Const EResultUnexpectedError = 79; ; something happened that we didn't expect to ever happen
Const EResultDisabled = 80; ; The requested service has been configured to be unavailable
Const EResultInvalidCEGSubmission = 81; ; The set of files submitted to the CEG server are not valid !
Const EResultRestrictedDevice = 82; ; The device being used is not allowed to perform this action
Const EResultRegionLocked = 83; ; The action could not be complete because it is region restricted
Const EResultRateLimitExceeded = 84; ; Temporary rate limit exceeded; try again later; different from k_EResultLimitExceeded which may be permanent
Const EResultAccountLoginDeniedNeedTwoFactor = 85; ; Need two-factor code to login
Const EResultItemDeleted = 86; ; The thing we're trying to access has been deleted
Const EResultAccountLoginDeniedThrottle = 87; ; login attempt failed; try to throttle response to possible attacker
Const EResultTwoFactorCodeMismatch = 88; ; two factor code mismatch
Const EResultTwoFactorActivationCodeMismatch = 89; ; activation code for two-factor didn't match
Const EResultAccountAssociatedToMultiplePartners = 90; ; account has been associated with multiple partners
Const EResultNotModified = 91; ; data not modified
Const EResultNoMobileDevice = 92; ; the account does not have a mobile device associated with it
Const EResultTimeNotSynced = 93; ; the time presented is out of range or tolerance
Const EResultSmsCodeFailed = 94; ; SMS code failure (no match; none pending; etc.)
Const EResultAccountLimitExceeded = 95; ; Too many accounts access this resource
Const EResultAccountActivityLimitExceeded = 96; ; Too many changes to this account
Const EResultPhoneActivityLimitExceeded = 97; ; Too many changes to this phone
Const EVoiceResultOK = 0;
Const EVoiceResultNotInitialized = 1;
Const EVoiceResultNotRecording = 2;
Const EVoiceResultNoData = 3;
Const EVoiceResultBufferTooSmall = 4;
Const EVoiceResultDataCorrupted = 5;
Const EVoiceResultRestricted = 6;
Const EVoiceResultUnsupportedCodec = 7;
Const EVoiceResultReceiverOutOfDate = 8;
Const EVoiceResultReceiverDidNotAnswer = 9;
Const EDenyInvalid = 0;
Const EDenyInvalidVersion = 1;
Const EDenyGeneric = 2;
Const EDenyNotLoggedOn = 3;
Const EDenyNoLicense = 4;
Const EDenyCheater = 5;
Const EDenyLoggedInElseWhere = 6;
Const EDenyUnknownText = 7;
Const EDenyIncompatibleAnticheat = 8;
Const EDenyMemoryCorruption = 9;
Const EDenyIncompatibleSoftware = 10;
Const EDenySteamConnectionLost = 11;
Const EDenySteamConnectionError = 12;
Const EDenySteamResponseTimedOut = 13;
Const EDenySteamValidationStalled = 14;
Const EDenySteamOwnerLeftGuestUser = 15;
Const EBeginAuthSessionResultOK = 0; ; Ticket is valid for this game and this steamID.
Const EBeginAuthSessionResultInvalidTicket = 1; ; Ticket is not valid.
Const EBeginAuthSessionResultDuplicateRequest = 2; ; A ticket has already been submitted for this steamID
Const EBeginAuthSessionResultInvalidVersion = 3; ; Ticket is from an incompatible interface version
Const EBeginAuthSessionResultGameMismatch = 4; ; Ticket is not for this game
Const EBeginAuthSessionResultExpiredTicket = 5; ; Ticket has expired
Const EAuthSessionResponseOK = 0; ; Steam has verified the user is online; the ticket is valid and ticket has not been reused.
Const EAuthSessionResponseUserNotConnectedToSteam = 1; ; The user in question is not connected to steam
Const EAuthSessionResponseNoLicenseOrExpired = 2; ; The license has expired.
Const EAuthSessionResponseVACBanned = 3; ; The user is VAC banned for this game.
Const EAuthSessionResponseLoggedInElseWhere = 4; ; The user account has logged in elsewhere and the session containing the game instance has been disconnected.
Const EAuthSessionResponseVACCheckTimedOut = 5; ; VAC has been unable to perform anti-cheat checks on this user
Const EAuthSessionResponseAuthTicketCanceled = 6; ; The ticket has been canceled by the issuer
Const EAuthSessionResponseAuthTicketInvalidAlreadyUsed = 7; ; This ticket has already been used; it is not valid.
Const EAuthSessionResponseAuthTicketInvalid = 8; ; This ticket is not from a user instance currently connected to steam.
Const EAuthSessionResponsePublisherIssuedBan = 9; ; The user is banned for this game. The ban came via the web api and not VAC
Const EUserHasLicenseResultHasLicense = 0; ; User has a license for specified app
Const EUserHasLicenseResultDoesNotHaveLicense = 1; ; User does not have a license for the specified app
Const EUserHasLicenseResultNoAuth = 2; ; User has not been authenticated
File diff suppressed because it is too large Load Diff
+156
View File
@@ -0,0 +1,156 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{805CB1EB-82F0-405E-AC0B-03FBE82CC77D}</ProjectGuid>
<RootNamespace>BlitzSteam</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)\Build\$(ProjectName)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\Intermediate\$(ProjectName)\$(Configuration)\</IntDir>
<TargetExt>.dll</TargetExt>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)\Build\$(ProjectName)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\Intermediate\$(ProjectName)\$(Configuration)\</IntDir>
<TargetExt>.dll</TargetExt>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>
</SDLCheck>
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);D:\Projects\Cpp\#Libraries\Steamworks SDK\public</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<BufferSecurityCheck>false</BufferSecurityCheck>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<StructMemberAlignment>4Bytes</StructMemberAlignment>
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
<CompileAsManaged>false</CompileAsManaged>
<CompileAsWinRT>false</CompileAsWinRT>
<MultiProcessorCompilation>false</MultiProcessorCompilation>
<FunctionLevelLinking>false</FunctionLevelLinking>
<FloatingPointExceptions>
</FloatingPointExceptions>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<OpenMPSupport>false</OpenMPSupport>
<ForcedIncludeFiles>dllmain.h</ForcedIncludeFiles>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<Version>1.0</Version>
<AdditionalLibraryDirectories>D:\Projects\Cpp\#Libraries\Steamworks SDK\redistributable_bin</AdditionalLibraryDirectories>
<AdditionalDependencies>steam_api.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>
</LinkTimeCodeGeneration>
<OptimizeReferences>
</OptimizeReferences>
<LinkStatus>
</LinkStatus>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Full</Optimization>
<FunctionLevelLinking>false</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);D:\Projects\Cpp\#Libraries\Steamworks SDK\public</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
<StructMemberAlignment>4Bytes</StructMemberAlignment>
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
<CompileAsManaged>false</CompileAsManaged>
<CompileAsWinRT>false</CompileAsWinRT>
<MultiProcessorCompilation>false</MultiProcessorCompilation>
<FloatingPointExceptions>
</FloatingPointExceptions>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<OpenMPSupport>false</OpenMPSupport>
<ForcedIncludeFiles>dllmain.h</ForcedIncludeFiles>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
</ClCompile>
<Link>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<Version>1.0</Version>
<AdditionalLibraryDirectories>D:\Projects\Cpp\#Libraries\Steamworks SDK\redistributable_bin</AdditionalLibraryDirectories>
<AdditionalDependencies>steam_api.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<LinkStatus>
</LinkStatus>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="BlitzPointer.cpp" />
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="Steam.cpp" />
<ClCompile Include="SteamClient.cpp" />
<ClCompile Include="SteamUser.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="BlitzPointer.h" />
<ClInclude Include="dllmain.h" />
</ItemGroup>
<ItemGroup>
<None Include="BlitzSteam.bb">
<Link>BlitzSteam.bb</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="BlitzSteam.decls">
<Link>BlitzSteam.decls</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
+44
View File
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source">
<UniqueIdentifier>{5016ba8f-d781-40f4-9904-56cc2ce9a588}</UniqueIdentifier>
</Filter>
<Filter Include="Source\Wrapper">
<UniqueIdentifier>{8f00e86e-e1bc-499e-8b2c-da93e9e8f287}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="Steam.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="SteamClient.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="SteamUser.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="BlitzPointer.cpp">
<Filter>Source</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="dllmain.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="BlitzPointer.h">
<Filter>Source</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="BlitzSteam.decls">
<Filter>Source</Filter>
</None>
<None Include="BlitzSteam.bb">
<Filter>Source</Filter>
</None>
</ItemGroup>
</Project>
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
+32
View File
@@ -0,0 +1,32 @@
#include "dllmain.h"
#include "BlitzPointer.h"
class BlitzSteamCallback : CCallbackBase {
public:
uint32_t blitzFunctionPointer;
virtual void Run(void *pvParam) {
BlitzPointer_CallFunction1((uint32_t)blitzFunctionPointer, (uint32_t)pvParam);
}
virtual void Run(void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall) {
BlitzPointer_CallFunction4((uint32_t)blitzFunctionPointer, (uint32_t)pvParam, bIOFailure, (uint32_t)(hSteamAPICall & 0xFFFFFFFF), (uint32_t)(hSteamAPICall >> 32));
}
virtual int GetCallbackSizeBytes() {
return sizeof(BlitzSteamCallback);
}
};
DLL_EXPORT void* BlitzSteam_CreateCallback(uint32_t fpFunctionPointer) {
BlitzSteamCallback* lpBSCallback = new BlitzSteamCallback();
lpBSCallback->blitzFunctionPointer = fpFunctionPointer;
return lpBSCallback;
}
DLL_EXPORT void BlitzSteam_DestroyCallback(uint32_t lpCallback) {
BlitzSteamCallback* lpBSCallback = (BlitzSteamCallback*)lpCallback;
if (lpBSCallback != nullptr) {
delete lpBSCallback;
}
}
+20
View File
@@ -0,0 +1,20 @@
#include "dllmain.h"
// Callbacks
DLL_EXPORT void SteamClient_SetWarningMessageHook(ISteamClient* lpSteamClient, SteamAPIWarningMessageHook_t pFunction) {
lpSteamClient->SetWarningMessageHook(pFunction);
}
DLL_EXPORT void SteamClient_Set_SteamAPI_CPostAPIResultInProcess(ISteamClient* lpSteamClient, SteamAPI_PostAPIResultInProcess_t fpFunction) {
lpSteamClient->Set_SteamAPI_CPostAPIResultInProcess(fpFunction);
}
DLL_EXPORT void SteamClient_Remove_SteamAPI_CPostAPIResultInProcess(ISteamClient* lpSteamClient, SteamAPI_PostAPIResultInProcess_t fpFunction) {
lpSteamClient->Remove_SteamAPI_CPostAPIResultInProcess(fpFunction);
}
DLL_EXPORT void SteamClient_Set_SteamAPI_CCheckCallbackRegisteredInProcess(ISteamClient* lpSteamClient, SteamAPI_CheckCallbackRegistered_t fpFunction) {
lpSteamClient->Set_SteamAPI_CCheckCallbackRegisteredInProcess(fpFunction);
}
+7
View File
@@ -0,0 +1,7 @@
#include "dllmain.h"
DLL_EXPORT void* BlitzSteam_ISteamUser_GetSteamID(void* lpSteamUser) {
return (void*)&(((ISteamUser*)lpSteamUser)->GetSteamID());
}
//DLL_EXPORT void* BlitzSteam_ISteamUser_
+16
View File
@@ -0,0 +1,16 @@
#include "dllmain.h"
bool WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
return true;
}
+15
View File
@@ -0,0 +1,15 @@
// STL Exceptions
#include <exception>
#include <stdexcept>
// Memory Management
#include <memory>
// Platform specific: Windows
#include <windows.h>
// Macros
#define DLL_EXPORT extern "C" __declspec(dllexport)
// Steam
#include "steam/steam_api.h"