mscorlib.dll and PInvoke and .NET 3.5

H

Harry Simpson

I'm now working in VS2008 and created a test app to print BT from MC70 to a
Zebra printer

When I try to print I get a

Missing Method Exception "Can't find PInvoke DLL 'malibtdll.dll'.

StackTrace: " at Zebra.Communication.MotorolaBluetooth.Disconnect() at
Zebra.Communication.MotorolaBluetooth.Connect() at
Zebra.Communication.MotorolaBluetooth.Connect(String commPort, String
bluetoothAddressOrName) at ZebraVBNET.Form1.ConnectToBluetoothDevice() at
ZebraVBNET.Form1.MenuItem1_Click(Object sender, EventArgs e) at
System.Windows.Forms.MenuItem.OnClick(EventArgs e) at
System.Windows.Forms.Menu.ProcessMnuProc(Control ctlThis, WM wm, Int32
wParam, Int32 lParam) at System.Windows.Forms.Form.WnProc(WM wm, Int32
wParam, Int32 lParam) at System.Windows.Forms.Control._InternalWnProc(WM wm,
Int32 wParam, Int32 lParam) at Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr
hwnMain) at System.Windows.Forms.Application.Run(Form fm) at
ZebraVBNET.Form1.Main() "

Welp I try to add a reference to mscorlib.dll to my project and it won't
add. This PInvoke is in the Zebra DLL. Am I gonna have to run this in
debug from VS2005 and target 2.0? Does PInvoke even work in 3.5?

Harry
 
G

Guest

P/Invoke certainly works - in fact it's how a large amount of the framework
calls Win32 APIs.

What is "malibtdll.dll"? It simply sounds like that DLL is missing from the
device.
 
H

Harry Simpson

Think it's a DLL specific to the Motorola MC70 device image. The sample
project in C# has a reference to mscorlib.dll and you see the reference in
the References list

But in my VS2008 test project, it will not let me add mscorlib such that I
see it listed as a project reference......
There is a System.Core reference.....

Harry
 
G

Guest

But mscorlib has nothing to do with the error. Why are you concerned about
it? The exception is telling you that some code is trying to P/Invoke
malibtdll.dll and the CF can't find it. If mscorlib weren't there the app
flat out wouldn't even start.


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top