GetCurrentProcess

B

Bogdan Sima

Hi All,

According to MSDN GetCurrentProcess() is supported in Win CE .NET, but I am
getting a MissingMethodException when I try to call it using Interop
services. Any other method to get the handle of the current process?

Thanks,

Bogdan
 
P

Peter Foot [MVP]

What are you using as your P/Invoke declaration, there may be an error in
it. This should work:-

[DllImport("coredll.dll")]
public static extern IntPtr GetCurrentProcess();

Peter
 
P

Peter Foot [MVP]

Ignore this, more coffee required...

GetCurrentProcess is a macro - see Alex's post.

Peter

Peter Foot said:
What are you using as your P/Invoke declaration, there may be an error in
it. This should work:-

[DllImport("coredll.dll")]
public static extern IntPtr GetCurrentProcess();

Peter

--
Peter Foot
Windows Embedded MVP
OpenNETCF.org Senior Advisor
www.inthehand.com | www.opennetcf.org


Bogdan Sima said:
Hi All,

According to MSDN GetCurrentProcess() is supported in Win CE .NET, but I am
getting a MissingMethodException when I try to call it using Interop
services. Any other method to get the handle of the current process?

Thanks,

Bogdan
 
C

Chris Tacke, eMVP

How about posting the code that gets an error. We can't debug it otherwise.
 
B

Bogdan Sima

Hi Alex,

Thanks a lot for your response. I implemented it as I saw it in Alex
Feinman's sample, although, to be honest, I don't really understand how it
works ... BTW, will it also work on PocketPC 2002?

Bogdan
 
B

Bogdan Sima

Thank you Peter!

Peter Foot said:
Ignore this, more coffee required...

GetCurrentProcess is a macro - see Alex's post.

Peter

Peter Foot said:
What are you using as your P/Invoke declaration, there may be an error in
it. This should work:-

[DllImport("coredll.dll")]
public static extern IntPtr GetCurrentProcess();

Peter

--
Peter Foot
Windows Embedded MVP
OpenNETCF.org Senior Advisor
www.inthehand.com | www.opennetcf.org


Bogdan Sima said:
Hi All,

According to MSDN GetCurrentProcess() is supported in Win CE .NET, but
I
am
getting a MissingMethodException when I try to call it using Interop
services. Any other method to get the handle of the current process?

Thanks,

Bogdan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top