<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Matthew,<div><br></div><div>Your initial advice worked wonderfully and I was able to get a list of currently active process IDS, thanks again!</div><div><br></div><div>I now need a function that takes a pid and returns the name of the main executable module of this process.  It seems I need to make a call to <span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">GetModuleBaseName or seemingly even better </span><strong xmlns="http://www.w3.org/1999/xhtml"><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms683217%28v=vs.85%29.aspx">GetProcessImageFileName</a> or </strong><strong xmlns="http://www.w3.org/1999/xhtml"><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms684919%28v=vs.85%29.aspx">QueryFullProcessImageName</a>.  S</strong>adly it seems that even external-call does not find these functions and returns an error like this:</div><div><br></div><div>Error: Can't resolve foreign symbol "GetModuleBaseName"</div><div><br></div><div>Or if we call #_GetModuleBaseName I get an error like:</div><div><br></div><div>Error: Foreign function not found: WIN32::|GetModuleFileNameEx|</div><div><br></div><div>If external-call does not find it does this mean: A) the function really does not exist B) I had some kind of problem with the parameters I passed C) Something else?   I tried playing with the parameters for quite some time so I am guessing it is not B.  </div><div><br></div><div>Thanks again for all your help!</div><div><br></div><div>--Mike<br><div><br></div><div><div>On Nov 18, 2011, at 2:19 PM, R. Matthew Emerson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On Nov 18, 2011, at 2:58 PM, Michael Minerva wrote:<br><br><blockquote type="cite">I wanted to try out some of the function Gary suggested but it seems the library EnumProcesses is in may not be used by CCL.  When I call #_EnumProcesses I get the following error in CCL:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Error: Foreign function not found: WIN32::|EnumProcesses|<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Does this imply that EnumProcesses is in a library not currently used by CCL?<br></blockquote><br>That means that EnumProcesses isn't in the interface database.  I see<br>from looking at win32-headers/libc/C/populate.sh that we don't process<br>psapi.h.<br><br>You can use external-call instead.  Something like (untested)<br><br>(external-call "EnumProcesses" :address pProcessIds :int cb :address pBytesReturned :<BOOL>)<br><br><br></div></blockquote></div><br></div></body></html>