我正在尝试通过套接字使用通话录音 API。我们有 API 文档,但样本都是用 C++ 编写的。
如何在 VB.NET 或 C# 中声明以下内容?
#define SIF_GENERAL 0x08000000
#define SIF_CONFIGURATION 0x08010000
#define SIF_ARCHIVE 0x08020000
#define SIF_SEARCH 0x08030000
#define SIF_REPLAY 0x08040000
#define SIF_STATISTICS 0x08050000
#define SIF_ENGINEER 0x08060000
文档注释:消息标识符是无符号的 32 位值 (ULONG
)。
最佳答案
VB.NET
Module Constants
Public Const SIF_GENERAL as Integer =&H08000000
Public Const SIF_CONFIGURATION As Integer = &H08010000
Public Const SIF_ARCHIVE As Integer = &H08020000
Public Const SIF_SEARCH As Integer = &H08030000
Public Const SIF_REPLAY As Integer = &H08040000
Public Const SIF_STATISTICS As Integer = &h08050000
Public Const SIF_ENGINEER As Integer = &h08060000
End Module
C#
public static class Constants {
public const int SIF_GENERAL =0x08000000;
public const int SIF_CONFIGURATION = 0x08010000;
public const int SIF_ARCHIVE = 0x08020000;
public const int SIF_SEARCH = 0x08030000;
public const int SIF_REPLAY = 0x08040000;
public const int SIF_STATISTICS = 0x08050000;
public const int SIF_ENGINEER = 0x08060000;
}
关于c# - C++ ULONG 定义到 VB.NET 或 C# 等价物?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/650261/