Windows Process ID: Difference between revisions
m
Using "source" tag
(Created) |
m (Using "source" tag) |
||
Line 8: | Line 8: | ||
Retrieving the Process ID involves calling a Windows API function in '''Kernel32.dll''', defined in your code as follows: | Retrieving the Process ID involves calling a Windows API function in '''Kernel32.dll''', defined in your code as follows: | ||
<source lang="vdf"> | |||
External_Function GetCurrentProcessID "GetCurrentProcessId" Kernel32.dll Returns DWord | |||
</source> | |||
('''Note''' that the terminal "'''d'''" of "''GetCurrentProcessId''" is ''lower-case'' and External Function calls are case-sensitive - something that caused me to fail to get it working for some time! --[[User:Mikepeat|Mike]]) | ('''Note''' that the terminal "'''d'''" of "''GetCurrentProcessId''" is ''lower-case'' and External Function calls are case-sensitive - something that caused me to fail to get it working for some time! --[[User:Mikepeat|Mike]]) | ||
Line 14: | Line 16: | ||
Then in order to determine the Process ID you need only use something like: | Then in order to determine the Process ID you need only use something like: | ||
<source lang="vdf"> | |||
Set piProcessID to (GetCurrentProcessID()) | |||
</source> | |||
[[Category:Cookbook]] | [[Category:Cookbook]] |