typedef long (WINAPI *MessageBoxAT)
(
long Port,
unsigned char *ComAdr,
unsigned char Baud ,
long FrmHandle
);
long Port1=9;
BYTE ComAddr1=0X00;
long FrmHandle1;
MessageBoxAT pfMessageBoxA=(MessageBoxAT )GetProcAddress(hModule,"AutoOpenComPort");
long a=(pfMessageBoxA)(9,ComAddr1,5,FrmHandle1);
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long
Private Sub Form_Load() Dim ll As Long, GP As Long
ll = LoadLibrary(App.Path & "\ZK_RFID106.dll") GP = GetProcAddress(ll, "AutoOpenComPort") End Sub