c# - C++ ULONG 定义到 VB.NET 或 C# 等价物?

标签 c# c++ vb.net types

我正在尝试通过套接字使用通话录音 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/

相关文章:

c# - Monotouch iPad 项目帮助景观等

c# - 如何在不同的可执行文件之间共享或保存数据?

mysql - 错误地将值插入到 MySQL 表中

vb.net - MeasureText() - SizeF 到英寸

c# - 使用委托(delegate)在 C# 中实现的观察者模式?

c# - 从逻辑上讲,为什么不能更改对象的 ParentID,而我必须自己更改父对象?

c++存储超出数组范围的值

c++ - 使用 std::string.compare() 不起作用

C++:如何获取指向二维动态数组的指针?

regex - 如何在标签中查找报价?