mirror of
https://github.com/JDM170/SteamAchievementManager
synced 2025-12-10 05:37:18 +07:00
Fixed API issues.
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>SAM.API</RootNamespace>
|
<RootNamespace>SAM.API</RootNamespace>
|
||||||
<AssemblyName>SAM.API</AssemblyName>
|
<AssemblyName>SAM.API</AssemblyName>
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<ApplicationIcon>Pink.ico</ApplicationIcon>
|
<ApplicationIcon>Pink.ico</ApplicationIcon>
|
||||||
<PublishUrl>publish\</PublishUrl>
|
<PublishUrl>publish\</PublishUrl>
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ namespace SAM.API
|
|||||||
return (string)Registry.GetValue(@"HKEY_LOCAL_MACHINE\Software\Valve\Steam", "InstallPath", null);
|
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 delegate IntPtr NativeCreateInterface(string version, IntPtr returnCode);
|
||||||
|
|
||||||
private static NativeCreateInterface _CallCreateInterface;
|
private static NativeCreateInterface _CallCreateInterface;
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ namespace SAM.API.Wrappers
|
|||||||
#region IsSubscribed
|
#region IsSubscribed
|
||||||
[UnmanagedFunctionPointer(CallingConvention.ThisCall)]
|
[UnmanagedFunctionPointer(CallingConvention.ThisCall)]
|
||||||
[return: MarshalAs(UnmanagedType.I1)]
|
[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);
|
return this.Call<bool, NativeIsSubscribedApp>(this.Functions.IsSubscribedApp, this.ObjectAddress, gameId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,11 +41,11 @@ namespace SAM.API.Wrappers
|
|||||||
#region ReleaseSteamPipe
|
#region ReleaseSteamPipe
|
||||||
[UnmanagedFunctionPointer(CallingConvention.ThisCall)]
|
[UnmanagedFunctionPointer(CallingConvention.ThisCall)]
|
||||||
[return: MarshalAs(UnmanagedType.I1)]
|
[return: MarshalAs(UnmanagedType.I1)]
|
||||||
private delegate bool NativeReleaseSteamPipe(IntPtr self);
|
private delegate bool NativeReleaseSteamPipe(IntPtr self, int pipe);
|
||||||
|
|
||||||
public bool ReleaseSteamPipe(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
|
#endregion
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user