有一函式:
void abc(char* sInputInof, char* sOutputInfo);
到VB6.0我是這樣申明的:
Private Declare Function abc Lib "xxx.dll" (ByVal inputInfo As String, ByRef outputInfo As String)
呼叫什么的都正常,但是實際傳進去的兩個引數都是沒有值的,是我型別定義錯了嗎?急,求各位大哥解答,在線等...
uj5u.com熱心網友回復:
Private Declare Sub abc Lib "xxx.dll" (ByVal inputInfo As String, ByVal outputInfo As String)inputInfo = Space(256) '分配空間,長度根據源函式的約定
outputInfo = Space(256)
abc inputInfo, outputInfo
或
Private Declare Sub abc Lib "xxx.dll" (ByRef inputInfo As Byte, ByRef outputInfo As Byte)
Dim inputInfo(256) As Byte
Dim outputInfo(256) As Byte
abc inputInfo(0), outputInfo(0)
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/92456.html
標籤:VB基礎類
上一篇:adodc1.refresh
下一篇:Zedgraph如何添加時間軸?
