示例#1
0
 static T AllocCallback <T>(SteamAPICall_t handle, out IntPtr pCallback, int k_iCallback)
 {
     pCallback = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(T)));
     SteamUtils.GetAPICallResult(handle, pCallback, Marshal.SizeOf(typeof(T)), k_iCallback, out bool pbFailed);
     return((T)Marshal.PtrToStructure(pCallback, typeof(T)));
 }