?
Solved

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

Posted on 2004-09-27
8
Medium Priority
?
429 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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…
If you are anything like me, you install many apps on your phone and have your life on it, sometimes literally.  When I bought my current phone, a Samsung Galaxy S5 from Verizon, they were only selling the versions with 16 GB internal.  I didn't rea…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

752 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