PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Re: GetCurrentProcessId import prblem
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Re: GetCurrentProcessId import prblem
![]() |
Re: GetCurrentProcessId import prblem |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I wonder if your declarations are right: GetCurrentProcessId returns a DWORD
so I would declare it as: [DllImport("coredll.dll")] public static extern unsigned int GetCurrentProcessId(); and GetCurrentProcess returns a HANDLE, so I would declare it as: [DllImport("coredll.dll")] public static extern IntPtr GetCurrentProcess(); If it is still not working you should follow Neil's suggestion and provide us with some sample code. -- Regards, Maarten Struys PTS Software bv ---- "Timo Meier" <t.meier@contrigo.de> wrote in message news:4thqt-6h.ln1@news.dt.contrigo.de... > Hi, i want to import the following function but i always get an Exception: > System.MissingMethodException > > What is wrong? > > [DllImport("coredll.dll")] > > public static extern int GetCurrentProcessId(); > > [DllImport("coredll.dll")] > > public static extern int GetCurrentProcess(); > > > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

