C# How to Dynamically Load .Dll of 3rd party (.net) under windows mobile -


i have commercial problem in company have project wavenis product give sdk (dll files) application running under compact framework 3.5 windows mobile 6.1 used dll file 1- right click on references 2- add reference 3- browse , select needed dll 4- copy dll output

now company doesn't need make sdk available used
google , got use using system.reflection; assembly classlibrary1 = null; classlibrary1 = assembly.loadfrom(filename); foreach (type type in classlibrary1.gettypes()) if (type.getinterfaces() != null) return activator.createinstance(type) iclass1; doesn't work me if have idea please me

i read thread compact framework c# loading dll dynamically didn't me

the first question have why isn't add references enough? if have file @ design time, should using mechanism.

mt second question "it doesn't work" mean? exception? type of exception? message?

normally these under "comments" of question, i'm sure know answer.

if use "add references" studio fails or give error message, it's because dll native (i.e. not .net assembly) dll. trying load dynamically going fail (iirc badimageformatexception).

you cannot add .net reference (through studio or code) native dll, 3rd-party hardware vendors supply. if native dll, may able use p/invoke call library, provided has public, non-mangled, c-exported (ie.e. not c++ classes) functions.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -