在c#中怎样调用地址传递的机构体?

sweig0721 2010-03-13 12:40:57
Private Const MAX_KEY_SIZE = 64
Private Const MAX_IV_SIZE = 16
Private Const MAXNR = 14

Private Const DIR_ENCRYPT = 0
Private Const DIR_DECRYPT = 1

Private Const MODE_ECB = 1
Private Const MODE_CBC = 2
Private Const MODE_CFB1 = 3


Private Type KeyInstance
direction As Byte
keyLen As Long
keyMaterial(MAX_KEY_SIZE + 1) As Byte
Nr As Long
rk(4 * (MAXNR + 1)) As Long
ek(4 * (MAXNR + 1)) As Long
End Type

Private Type CipherInstance
mode As Byte
iv(MAX_IV_SIZE) As Byte
End Type

Private Declare Function makeKeyPStdCall Lib "Rijndael.dll" (ByRef key As KeyInstance, ByVal dir As Byte, ByVal keyLen As Long, ByRef keyPhrase As Byte,

ByVal keyPhraseLen As Long) As Long



Dim kInst As KeyInstance
Dim cInst As CipherInstance

makeKeyPStdCall kInst, DIR_ENCRYPT, 128, bytSignature(0), 32

请问怎用在c# 中调用?
...全文
74 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
xingyuebuyu 2010-03-13
  • 打赏
  • 举报
回复
VB6.0中的Long对应C#中的int类型,其它的对应改就好了

110,537

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧