```
0:000> !py
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import pykd
>>> pykd.getCurrentProcessId()
0
```
It appears the difference is:
0.2.x:
```
hres = g_dbgEng->system->GetCurrentProcessSystemId( &pid );
```
0.3.x:
```
hres = g_dbgMgr->system->GetCurrentProcessId( &id );
```
Not sure if that difference is causing my issue. There's also a very good chance I could be doing something wrong :)
Comments: ** Comment from web user: ussrhero **
Note, Process ID != PID. It is internal ID for Debug Engine and it has sense only for multiple process debugging.
Try:
```
>>>from pykd import *
>>>initialize()
>>>getCurrentProcessId()
pykd.DbgException: Call IDebugSystemObjects::GetCurrentProcessId failed
```
There is no attached process so getCurrentProcessId() raises exception
```
>>>startProcess("notepad.exe")
>>>getCurrentProcessId()
0
>>>getProcessSystemID(0) #return PID
1234
>>>getProcessExeName(0) # return process name
'notepad.exe'
```
If you are debugging several process, you can use process id to get information about different processes.
Also, pykd 0.3 has new classes for working with process. See
help(pykd.targetSystem)
help(pykd.targetProcess)
help(pykd.targetThread)
Sample:
```
>>>print targetProcess.getCurrent().systemId
2000
```