I am changing the architecture of a VB 6 scheduling application from serial execution architecture to parallel execution and I need to do this with as little code changes as possible. Basically, the first instance of the .exe will start a defined amount of additional instances.
One of the changes required is to update the job table with the PID of the instance that is executing the job. I have searched but I have not been able to find a way to get this when multiple instances of the same .exe may be running.
How can I get the process ID of the current process?
Do it the same way a program in any other language would do it: Call
GetCurrentProcessId.