Можно ли вызвать неуправляемый Dll Mobile CE из Full .Net Framework (запустить на рабочем столе) - PullRequest
1 голос
/ 15 июля 2010

У меня Unmanaged Lib, скомпилированный для Windows Ce. Я пытаюсь вызвать эту dll из приложения Windows Profile Client VB.net Full Framework .Net 4. Я пытаюсь использовать тот же код, который я использую в приложении Compact Framework. Он компилируется без ошибок и запускается, но при вызове функции я получаю ошибку ex = {"Была сделана попытка загрузить программу с неверным форматом. (Исключение из HRESULT: 0x8007000B)"} Возможно ли использовать Mobile Unmanaged Dll на рабочий стол? Вот код Wrapper, который я использую для вызова 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

1 Ответ

0 голосов
/ 02 сентября 2010

Я могу ошибаться, но я полагаю, что двоичный формат немного отличается в Windows CE, что может объяснить, почему в окнах рабочего стола возникают трудности с пониманием файла образа

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...