Confused about P/Invoke and .NET CF - MissingMethodException

  • Thread starter Thread starter John Kingston
  • Start date Start date
J

John Kingston

I am confused on how to use an existing dll written in VC++ ver 6
(written originally for the desktop) with a smart device project. I
am writing my app using VS2003 in VB.

I have declared it as follows:


Public Declare Function tx_opc167 Lib "roccom.dll" (ByVal irocadd As
Short, ByVal irocgrp As Short, ByVal iRocType As Short, ByVal iLogical
As Short, ByVal inum_parm As Short, ByVal istart_parm As Short) As
Short



I do not get any build errors but when I call the function, I get a
MissingMethodException error.

Here is the call:

xval = tx_opc167(RocAdd, RocGrp, T, L, N, P)

I have copied the DLL to the device into the directory with the exe
as well as in the \Windows directory. My questions are:

1) Will the DLL work since it was originally written for the desktop?
2) If it won't work, how do I migrate the code (I have the source)?
3) Am I doing it wrong? If so, what is my error?

Any help is greatly apreciated.

John
 
You can't use that compiler. It won't allow you to target ARM processors.

Paul T.
 

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

Back
Top