Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2004-09-27
8
Medium Priority
?
441 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
ID: 12163706
0
 

Author Comment

by:cdoggett
ID: 12164236
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
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.

 
LVL 48

Expert Comment

by:Mikal613
ID: 12164689
"Calling a p/invoke function call to wince would be fine as well."
0
 
LVL 48

Expert Comment

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

Author Comment

by:cdoggett
ID: 12171817
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
ID: 12172272
Thanks
0
 
LVL 48

Accepted Solution

by:
Mikal613 earned 750 total points
ID: 12172314
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator (https://www.appcelerator.com/). This article presumes a wor…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Loops Section Overview
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month21 days, 5 hours left to enroll

810 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