Public Declare Function INIT Lib "SiInterface.dll" Alias "INIT"(pErrMsg) As Integer
改成
Public Declare Function INIT Lib "SiInterface.dll" Alias "INIT"(byref pErrMsg as string) As Integer
或者试试
Public Declare Function INIT Lib "SiInterface.dll" Alias "INIT"(byref pErrMsg as stringbuilder) As Integer
------------------ http://www.foxtable.com/webhelp/scr/2097.htm
调用的时候,试试
Dim S3 As new stringbuilder
Dim S2 As Integer = Init(S3)
msgbox(S2)