1

我有一个为 Windows Ce 编译的非托管库。我正在尝试从 VB.net Full Framework .Net 4 Client Profile Windows 应用程序中调用此 dll。我正在尝试使用我在 Compact Framework 应用程序中使用的相同代码。它编译时没有错误并运行,但是在调用函数时出现错误 ex = {“尝试加载格式不正确的程序。(HRESULT 异常:0x8007000B)”} 是否可以使用 Mobile Unmanaged Dll on桌面?这是我用来调用 Dll 的包装器代码:

Imports System
Imports System.Runtime.InteropServices

Module modM300CF

    Public Declare Function ParseBarCode Lib "M300LAP.dll" ( _
               ByVal P_track1 As Byte(), ByVal P_t1length As Short, _
               ByRef P_DLStatus As Short, _
               ByRef P_StateID As Byte, _
               ByRef P_DAge As Short, _
               ByRef P_CardName As Byte, _
               ByRef P_Address As Byte, _
               ByRef P_City As Byte, _
               ByRef P_State As Byte, _
               ByRef P_Zip As Byte, _
               ByRef P_DLNumber As Byte, _
               ByRef P_Expdate As Byte, _
               ByRef P_Bdate As Byte, _
               ByRef P_DLAlpha As Byte, _
               ByRef P_DHair As Byte, _
               ByRef P_DEyes As Byte, _
               ByRef P_DHeight As Byte, _
               ByRef P_DWeight As Byte, _
               ByRef P_DSex As Byte) As Short

    Public Declare Function ParseMagStripe Lib "M300LAP.dll" ( _
            ByVal P_track1 As Byte(), ByVal P_t1length As Short, _
            ByVal P_track2 As Byte(), ByVal P_t2length As Short, _
            ByVal P_track3 As Byte(), ByVal P_t3length As Short, _
            ByRef P_DLStatus As Short, _
            ByRef P_StateID As Byte, _
            ByRef P_DAge As Short, _
            ByRef P_CardName As Byte, _
            ByRef P_Address As Byte, _
            ByRef P_City As Byte, _
            ByRef P_State As Byte, _
            ByRef P_Zip As Byte, _
            ByRef P_DLNumber As Byte, _
            ByRef P_Expdate As Byte, _
            ByRef P_Bdate As Byte, _
            ByRef P_DLAlpha As Byte, _
            ByRef P_DHair As Byte, _
            ByRef P_DEyes As Byte, _
            ByRef P_DHeight As Byte, _
            ByRef P_DWeight As Byte, _
            ByRef P_DSex As Byte) As Short

End Module
4

1 回答 1

0

我可能是错的,但我相信 Windows CE 上的二进制格式略有不同,这可以解释为什么桌面窗口难以理解图像文件

于 2010-09-02T06:28:41.943 回答