views:

8

answers:

1

I have an Unmanaged Lib compiled for Windows Ce. I am trying to call this dll from VB.net Full Framework .Net 4 Client Profile Windows application. I am trying to use the same code that I use in the Compact Framework application. It compiles without errors and runs but when Invoking a function I get error ex = {"An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"} Is it possible to use the Mobile Unmanaged Dll on the Desktop ? Here is the Wrapper code I use to call the 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
A: 

I could be wrong but I believe the binary format is slightly different on Windows CE which might explain why desktop windows is having difficulty making sense of the image file

Crippledsmurf