jbpez
Programmer
- Jan 25, 2005
- 102
How is the "System.Diagnostics.Process.GetCurrentProcess.Id" different from the GetCurrentProcessId API (Kernel32.dll)?
I'm trying to convert code from VB6 to VB.NET and supposedly GetCurrentProcess.Id (.NET) is the equivalent of GetCurrentProcessId API, but it doesn't work. I placed both in my .NET app to read the results and I get different numbers. I tried just using the API in .NET but the function (WD_ConnectPS from ehlapi32.dll) that needs the process id won't accept it.
How can I get the process id that works in VB6 in VB.NET?
Please help, thank you.
I'm trying to convert code from VB6 to VB.NET and supposedly GetCurrentProcess.Id (.NET) is the equivalent of GetCurrentProcessId API, but it doesn't work. I placed both in my .NET app to read the results and I get different numbers. I tried just using the API in .NET but the function (WD_ConnectPS from ehlapi32.dll) that needs the process id won't accept it.
How can I get the process id that works in VB6 in VB.NET?
Please help, thank you.