From: Brian D. <br...@de...> - 2007-02-07 00:19:32
|
Rene Sugar wrote: > I get an undefined reference to GetProcessId when compiling a simple > test program. The function appears to be in the import library. There is > no error when calling a function like GetCurrentProcess(). Go read the MSDN page for GetProcessId. Note that it is only available in XP, 2k3, and Vista. Then recall that if you don't #define anything to the contrary, the Windows headers are designed to only allow you to use features that are available on all Windows versions, i.e. Win95 and up. Then change your code to define _WIN32_WINNT appropriately if you want to use this function (and remember that it will fail to execute on Windows 2000 and prior.) Brian |