在 VB.net 中将 ActiveDs.LargeInteger 转换为 Long?
我正在尝试计算密码到期日期,大部分示例代码都是 C# 中的
一个示例:
IADsLargeInteger largeInt;
largeInt = (IADsLargeInteger) largeIntVal;
myLong = (long)largeInt.HighPart << 32 | (uint)largeInt.LowPart;
如果我在 VB.net 中尝试类似的操作:
dim myLong as Long
myLong = largeInt.HighPart << 32 Or largeInt.LowPart
那么我似乎会得到一个无效值。如何在VB中获得类似的结果?
I'm trying to compute the password expiry date, and most of the example code is in C#
One sample has:
IADsLargeInteger largeInt;
largeInt = (IADsLargeInteger) largeIntVal;
myLong = (long)largeInt.HighPart << 32 | (uint)largeInt.LowPart;
If I try something similar in VB.net:
dim myLong as Long
myLong = largeInt.HighPart << 32 Or largeInt.LowPart
Then I seem to get an invalid value. How can I obtain similar results in VB?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 this ,问题是因为 VB.Net 没有无符号整数类。
解决办法是:
According to this the problem is because VB.Net has no unsigned integer class.
The solution is: