dll 的函数是: BOOL DoRecog(HBITMAP hBmp, int nImageID, MAPINFO* pbmi,char m_BackGround, RECT rect, LPSTR pAreaCode, OCRRECTATTR* pAreaCodeAttr);我这样声明,调用会出错! 
Public Type OCRRECTATTR
left As Integer
top As Integer
right As Integer
bottom As Integer
attribute As Integer
accuracy As Single
Cand(10) As Long
End Type
Public Type RECT
left As Long
top As Long
right As Long
bottom As Long
End TypePublic Type BITMAP
bmType As Long
bmWidth As Long
bmHeight As Long
bmWidthBytes As Long
bmPlanes As Integer
bmBitsPixel As Integer
bmBits As Long
End TypePublic Declare Function DoRecog Lib "ocr.dll" (ByRef hBmp As Long, ByVal nImageID As Integer, ByRef pbmi As BITMAP, ByVal m_BackGround As Byte, ByRef RECT1 As RECT, ByRef pAreaCode As String, ByRef pAreaCodeAttr As OCRRECTATTR) As Boolean

解决方案 »

  1.   

    例如下面是在模塊中聲明:Declare Function rf_init Lib "mwrf32.dll" (ByVal port%, ByVal baud As Long) As Long
    Declare Function rf_load_key_hex Lib "mwrf32.dll" (ByVal icdev As Long, ByVal mode%, ByVal secnr%, ByVal nkey As String) As Integer
    Declare Function rf_exit Lib "mwrf32.dll" (ByVal icdev As Long) As Integer
    Declare Function rf_card Lib "mwrf32.dll" (ByVal icdev As Long, ByVal mode%, Snr As Long) As Integer
    Declare Function rf_authentication Lib "mwrf32.dll" (ByVal icdev As Long, ByVal mode%, ByVal scenr%) As Integer