getprocessimagefilenamew could not be located in the dynamic link library psapi.dll

  • Thread starter Thread starter Claire
  • Start date Start date
C

Claire

When trying to run a process to convert xml to xsd schema "Process p =
Process.Start("xsd.exe",xmlfilename);" I received the error message in the
subject of the thread.
The code used to work but doesn't any more. I may have installed IE7 since
last using this bit of code but it would have come down in an automatic
update and tbh I've no idea.
I've done a file find for all instances of psapi.dll and they're all over
the place.
I don't have any of the pieces of software installed that other people
mention when I do a search for this problem on google (eg Smartbridge)
As this is the only way I can get my visual studio to create xsd files for
some datasets/crystal reports, I need to find a solution.
How can I tell which of the psapi.dlls is the correct one to use, and how do
I find out which one xsd.exe is attempting to use in error.

thank you
 
Downloaded and installed process explorer. My application was using the same
version of psapi.dll as that being used by spoolsv.exe.
I stopped both apps, renamed that dll then restarted. Both use the system32
version now and my error disappeared
 
Claire said:
When trying to run a process to convert xml to xsd schema "Process p =
Process.Start("xsd.exe",xmlfilename);" I received the error message in the subject of the
thread.
The code used to work but doesn't any more. I may have installed IE7 since last using this
bit of code but it would have come down in an automatic update and tbh I've no idea.
I've done a file find for all instances of psapi.dll and they're all over the place.
I don't have any of the pieces of software installed that other people mention when I do a
search for this problem on google (eg Smartbridge)
As this is the only way I can get my visual studio to create xsd files for some
datasets/crystal reports, I need to find a solution.
How can I tell which of the psapi.dlls is the correct one to use, and how do I find out
which one xsd.exe is attempting to use in error.

thank you


The only valid psapi.dll is the one in %windir%\sytem32. GetProcessImageFileNameW is a
psapi.dll exported function (UNICODE), you can verify this by running depends.exe or dumpbin
/exports on psapi.dll.
Note that psapi.dll is delay loaded by Process.Start and is not the result of running
xsd.exe, also this dll is not related to any IE version.

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top