ProcessWorks.dll (ProcessWorks.lib) and SProcessWorks.lib export:

 DWORD ProcessName2PID(LPCTSTR ProcessName);
 - if call succeeded returns PID of process specified by ProcessName
   otherwise it returns PIDERROR or MEMERROR.
 - ProcessName can contain PathTo.

 DWORD BuildPIDList(LPDWORD pPIDs, DWORD SizeInPIDs);
 - if call succeeded pPIDs is filled with current PIDs and return value
   is the number of PIDs in pPIDs.
 - if SizeInPIDs is < returned value, you must increase pPIDs buffer
   and call BuildPIDList again  
   otherwise it returns PIDERROR or MEMERROR.

Force static linking by #define PW_STATIC_LINKING.