NETMF DLLImport

Is there any way I can use DLLImport in NETMF? I have placed

using System.Runtime.InteropServices;

in my code, but get this error

Error 2 The type or namespace name ‘DllImportAttribute’ could not be found (are you missing a using directive or an assembly reference?)

I am trying to use a DLL ro run a few ASM functions.

As far as I know the only option is to use GHI’s RLP functionality to invoke non managed (native) code. Other than rebuilding the framework with your own extensions of course.

Right now you can only use other NETMF libraries through Assrmbly.Load.

@ taylorza,

Thanks , but I’ve explored RLP, and I know it will work. At the moment I am trying to expand what I know about NETMF as I am very new to it. The register class showed me that NETMF is in fact very versatile and is faster then I previously thought.

@ Skewworks,

I have had a look at the Assembly.Load WIKI, and this option looks very intresting! Thankyou!

@ Davef - Pleasure. I had assumed that ‘ASM’ in your post stood for assembly language code, which is why I pointed you to RLP. I do not believe Assembly.Load can be used to load assembly language routines, but if you are referring to dynamically loading managed .NETMF assemblies then that is the way to go.

1 Like

@ taylorza - You are correct! I only skimmed the wiki, and incorrectly assumed it was assembly language code. @ @ !##@ !?. So its back to RLP.