FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


what function gives process id in C#





umeshtangnu
hi,
i am writing a http server programme and have an old code from a friend which uses getpid in error messages.
In the win32 API, GetCurrentProcessId() gives the handle of current funtion but what function is used in c#
plz help
MrBaseball34
You should be able to use that using a PINvoke:

C# Signature:
[DllImport("kernel32.dll")]
static extern uint GetCurrentProcessId();
umeshtangnu
thanks worked but isnt there ne thing inbuit in c#
MrBaseball34
You can use WMI:

http://www.codeproject.com/cs/system/win32processusingwmi.asp
Related topics
Help to find a script
A search to make JS file even smaller-2306byte to 542
Flash websites
need help: cant call $db object from within my function
php..free account help
help needed with css & javascript
Male Pregnancy!!!
Session not sticking from page to page.
Error trying to display SQL statement in html table
fatal error in Joomla installation "index.php"
JOOMLA Article Manager Error
Drop Down Menu
Table Help / Javascript dopdown menu
This is how you set cookie in another domain
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.