カレントプロセスのプロセスIDを取得する
Declare Function GetCurrentProcessId Lib "kernel32.dll" () As Long
正常終了のとき カレントプロセスのプロセスID