标题: 在VB.NET中调用DLL [打印本页] 作者: 2323220987 时间: 2010-10-3 10:38 标题: 在VB.NET中调用DLL Private Class ButtonListener
Implements pfcls.IpfcUICommandActionListener
Implements ICIPClientObject
Public Function GetClientInterfaceName() As String _
Implements ICIPClientObject.GetClientInterfaceName
GetClientInterfaceName = "IpfcUICommandActionListener"
End Function
Public Sub OnCommand() Implements pfcls.IpfcUICommandActionListener.OnCommand
Me.UserFunction()
End Sub
Public Sub UserFunction()
Dim par As IpfcArgument
Dim parname As String
parname = ""
Dim aC As pfcls.IpfcAsyncConnection
aC = (New CCpfcAsyncConnection).GetActiveConnection
Dim parguvalue As IpfcArgValue
parguvalue = (New CMpfcArgument).CreateASCIIStringArgValue("")
par = (New CCpfcArgument).Create(parname, parguvalue)
Dim bs As IpfcFunctionReturn
Dim pars As IpfcArguments
pars = New CpfcArguments
pars.Append(par)
Dim dll As IpfcDll
dll = aC.Session.LoadProToolkitDll("Example2_1", "F:\\JLINK\\calledtoolkit\\debug\\yangli.dll", "F:\\JLINK\\calledtoolkit", True)
bs = dll.ExecuteFunction("modelpath", pars)
dll.Unload()
End Sub
End Class