How to get the application instance in .net cf or wince

I need to pass in the application instance to a p/invoke function call using c# and .net compact framework.  Calling a p/invoke function call to wince would be fine as well.

Thanks,
Craig
cdoggettAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
cdoggettAuthor Commented:
Thanks, I am very familar with platform invoke and that article from Microsoft is wonderful as I have used pieces of it in the past.  However, it does not address how to get the application instance (hinstance) that I saw.

Craig
0
 
Mikal613Commented:
"Calling a p/invoke function call to wince would be fine as well."
0
 
Mikal613Commented:
"(hinstance) that I saw" where did you see it?
0
 
cdoggettAuthor Commented:
In this function call that works under .Net, but not under .Net CF.  I get an Unsupported Function exception.    The code is as follows:

IntPtr appInstance = System.Runtime.InteropServices.Marshal.GetHINSTANCE( module );

The return value is the HINSTANCE of the module or -1 if it does not have an instance.

An equivalent WinCE solution would work as well.



0
 
Mikal613Commented:
Thanks
0
All Courses

From novice to tech pro — start learning today.