Fixed API issues.

This commit is contained in:
gibbed
2017-11-24 08:56:38 -06:00
parent cbef61fc2a
commit ec28921bc7
4 changed files with 7 additions and 6 deletions

View File

@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SAM.API</RootNamespace>
<AssemblyName>SAM.API</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ApplicationIcon>Pink.ico</ApplicationIcon>
<PublishUrl>publish\</PublishUrl>
@@ -28,6 +28,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>

View File

@@ -62,7 +62,7 @@ namespace SAM.API
return (string)Registry.GetValue(@"HKEY_LOCAL_MACHINE\Software\Valve\Steam", "InstallPath", null);
}
[UnmanagedFunctionPointer(CallingConvention.StdCall, CharSet = CharSet.Ansi)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private delegate IntPtr NativeCreateInterface(string version, IntPtr returnCode);
private static NativeCreateInterface _CallCreateInterface;

View File

@@ -31,9 +31,9 @@ namespace SAM.API.Wrappers
#region IsSubscribed
[UnmanagedFunctionPointer(CallingConvention.ThisCall)]
[return: MarshalAs(UnmanagedType.I1)]
private delegate bool NativeIsSubscribedApp(IntPtr self, Int64 gameId);
private delegate bool NativeIsSubscribedApp(IntPtr self, uint gameId);
public bool IsSubscribedApp(Int64 gameId)
public bool IsSubscribedApp(uint gameId)
{
return this.Call<bool, NativeIsSubscribedApp>(this.Functions.IsSubscribedApp, this.ObjectAddress, gameId);
}

View File

@@ -41,11 +41,11 @@ namespace SAM.API.Wrappers
#region ReleaseSteamPipe
[UnmanagedFunctionPointer(CallingConvention.ThisCall)]
[return: MarshalAs(UnmanagedType.I1)]
private delegate bool NativeReleaseSteamPipe(IntPtr self);
private delegate bool NativeReleaseSteamPipe(IntPtr self, int pipe);
public bool ReleaseSteamPipe(int pipe)
{
return this.Call<bool, NativeReleaseSteamPipe>(this.Functions.ReleaseSteamPipe, this.ObjectAddress);
return this.Call<bool, NativeReleaseSteamPipe>(this.Functions.ReleaseSteamPipe, this.ObjectAddress, pipe);
}
#endregion