Solved

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

Posted on 2004-09-27
8
407 Views
Last Modified: 2013-11-18
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
0
Comment
Question by:cdoggett
  • 6
  • 2
8 Comments
 
LVL 48

Expert Comment

by:Mikal613
Comment Utility
0
 
LVL 48

Expert Comment

by:Mikal613
Comment Utility
0
 

Author Comment

by:cdoggett
Comment Utility
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
 
LVL 48

Expert Comment

by:Mikal613
Comment Utility
"Calling a p/invoke function call to wince would be fine as well."
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 48

Expert Comment

by:Mikal613
Comment Utility
"(hinstance) that I saw" where did you see it?
0
 

Author Comment

by:cdoggett
Comment Utility
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
 
LVL 48

Expert Comment

by:Mikal613
Comment Utility
Thanks
0
 
LVL 48

Accepted Solution

by:
Mikal613 earned 250 total points
Comment Utility
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

I think the most popular question in our Windows Mobile Programming zone is about the backlight - we all want to keep it on when our application is running. Few years ago the function SystemIdleTimerReset() did this job. On our side we had to detec…
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now