Manually create SteamNet delegates

This commit is contained in:
Garry Newman 2020-09-04 09:53:07 +01:00
parent 699b7c0850
commit 73b5c9ceb6
3 changed files with 26 additions and 10 deletions

View File

@ -257,7 +257,7 @@ namespace Steamworks
var returnValue = _SetConnectionConfigValueFloat( Self, hConn, eValue, val );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConnectionConfigValueString", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]

View File

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Steamworks.Data;
namespace Steamworks
{
[UnmanagedFunctionPointer( Platform.CC )]
internal delegate void NetDebugFunc( [In] NetDebugOutput nType, [In] IntPtr pszMsg );
[UnmanagedFunctionPointer( Platform.CC )]
internal unsafe delegate void FnSteamNetConnectionStatusChanged( ref SteamNetConnectionStatusChangedCallback_t arg );
[UnmanagedFunctionPointer( Platform.CC )]
internal delegate void FnSteamNetAuthenticationStatusChanged( ref SteamNetAuthenticationStatus_t arg );
[UnmanagedFunctionPointer( Platform.CC )]
internal delegate void FnSteamRelayNetworkStatusChanged( ref SteamRelayNetworkStatus_t arg );
[UnmanagedFunctionPointer( Platform.CC )]
internal delegate void FnSteamNetworkingMessagesSessionRequest( ref SteamNetworkingMessagesSessionRequest_t arg );
[UnmanagedFunctionPointer( Platform.CC )]
internal delegate void FnSteamNetworkingMessagesSessionFailed( ref SteamNetworkingMessagesSessionFailed_t arg );
}

View File

@ -1,9 +0,0 @@
using Steamworks.Data;
using System;
using System.Runtime.InteropServices;
namespace Steamworks.Data
{
[UnmanagedFunctionPointer( Platform.CC )]
delegate void NetDebugFunc( [In] NetDebugOutput nType, [In] IntPtr pszMsg );
}