GetCurrentProcess

  • Thread starter Thread starter Bogdan Sima
  • Start date Start date
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
 
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
 
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
 
How about posting the code that gets an error. We can't debug it otherwise.
 
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
 
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
 
Back
Top