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?
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.