Solved

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

Posted on 2004-09-27
8
412 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
 
LVL 48

Expert Comment

by:Mikal613
ID: 12163715
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
 
LVL 48

Expert Comment

by:Mikal613
ID: 12164689
"Calling a p/invoke function call to wince would be fine as well."
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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 250 total points
ID: 12172314
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Backup contact in Nokia Lumia 525 4 490
Samsung Galaxy Phones 3 81
Android 4.3 - World Clock on the lock screen 3 77
xamarin - container for showing website 2 87
Progress means simplifying, not complicating. Bruno Munari Preface How to detect the name of the internal storage or an SD-card on Windows Mobile device from the desktop application? I got this question, when I was working on a PC applicati…
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.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

861 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

25 Experts available now in Live!

Get 1:1 Help Now