Files
2026-02-21 16:45:37 +08:00

38 lines
1.9 KiB
C#

using System.Runtime.InteropServices;
using System.Text;
namespace Viveport.Internal
{
internal class User
{
static User()
{
Api.LoadLibraryManually("viveport_api");
}
[DllImport("viveport_api", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, EntryPoint = "IViveportUser_IsReady")]
internal static extern int IsReady(StatusCallback IsReadyCallback);
[DllImport("viveport_api64", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, EntryPoint = "IViveportUser_IsReady")]
internal static extern int IsReady_64(StatusCallback IsReadyCallback);
[DllImport("viveport_api", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, EntryPoint = "IViveportUser_GetUserID")]
internal static extern int GetUserID(StringBuilder userId, int size);
[DllImport("viveport_api64", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, EntryPoint = "IViveportUser_GetUserID")]
internal static extern int GetUserID_64(StringBuilder userId, int size);
[DllImport("viveport_api", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, EntryPoint = "IViveportUser_GetUserName")]
internal static extern int GetUserName(StringBuilder userName, int size);
[DllImport("viveport_api64", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, EntryPoint = "IViveportUser_GetUserName")]
internal static extern int GetUserName_64(StringBuilder userName, int size);
[DllImport("viveport_api", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, EntryPoint = "IViveportUser_GetUserAvatarUrl")]
internal static extern int GetUserAvatarUrl(StringBuilder userAvatarUrl, int size);
[DllImport("viveport_api64", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, EntryPoint = "IViveportUser_GetUserAvatarUrl")]
internal static extern int GetUserAvatarUrl_64(StringBuilder userAvatarUrl, int size);
}
}