How to add Dll under C# .Net CF

J

Jason Jacob

To all,

How can I add the dll (written by embedded VC) to my C# .NetCF project
???
I am now using the "browse" button on the Reference --> Add refernce
to browse for the designated dll... but somehow errors such as
TypeLoadException or IOException will occur

Thanks

From Jason (Kusangihk)
 
A

Alex Feinman [MVP]

Use Project/Add Existing item. An unmanaged DLL cannot be added to
references
 
C

Chris Tacke, eMVP

But that has nothing to do with adding a reference for an unmanaged DLL to
the project, which cannot be done, and explains the error the original
poster was talking about.

-Chris
 
J

Jason Jacob

To all,

I've tried your suggestions
1) adding the dll as existing resource, but no use in creating the dll
object
2) P/Invoke, no luck too. Since the entry point is not found (I think
the Emulator can't allocate the dll)

I think adding the dll as an existing item should be quite reasonable
as winCE is quite different in File Systems, embedding all the
resources to the assembly should be logical, but the matter is how to
get the dll reference...

From Jason (Kusanagihk)
 
J

Jason Jacob

To all,

I've suddenly got the problem solved (don't know why)
1) add the dll (written in eVC) to the project through "Reference -->
from projects", the Dll is then added (somehow a warning is popped up)
2) Treat it as a normal object (ie. instantiate an instance of it and
do all sorts of things....)
3) Compile and Deploy it to the Emulator works fine
4) double checking the folders of the Application shows that the eVC
dll is also copied to the App folder, so that's why it works fine (but
it's a hidden file)

PS. since the DLL involves serial port I/O, so I can't say if it
really works normally at this stage, but at least no compilation
errors.

Thanks for you guy's help!

From Jason (Kusangihk)
 

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