1

Windows Ce 用にコンパイルされた Unmanaged Lib があります。VB.net Full Framework .Net 4 Client Profile Windows アプリケーションからこの dll を呼び出そうとしています。Compact Framework アプリケーションで使用するのと同じコードを使用しようとしています。エラーなしでコンパイルして実行しますが、関数を呼び出すとエラーが発生します ex = {"不正な形式のプログラムをロードしようとしました。(HRESULT からの例外: 0x8007000B)"} モバイル アンマネージ DLL を使用することは可能ですか?デスクトップ?Dll を呼び出すために使用する Wrapper コードは次のとおりです。

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 に答える