1

I am doing an API call to FindExecutableA (Ansi version of FindExecutable) via shell32.dll from Smalltalk, but when I send UNC paths like

\\\serverName\\sharedFolder\filename

it returns error code 2, which basically means that the system could not find the given path.

The strange thing is that when I use paths like

\\\myPcName\C$\sharedFolder\filename

where C$ is the shared name of C:\ in my Pc, then it works.

I would like to make it work for "normal" UNC paths like the first one I wrote above. The system I am using is Windows XP SP3 and the shell32.dll has version number 6.0.2900.6072

I've been searching the net without luck. Has anyone got any tips?

Thanks!

Frank Shearar
  • 17,012
  • 8
  • 67
  • 94
  • Which Smalltalk are you using? Squeak/Pharo? Cincom? Dolphin? Other? – Frank Shearar Oct 18 '11 at 10:00
  • 3
    Are you sure with the number of backslashes in your examples? The paths should be `\\serverName\sharedFolder\filename` and `\\myPcName\C$\sharedFolder\filename`, right? – Michael Oct 20 '11 at 21:10

1 Answers1

0

According to http://msdn.microsoft.com/en-us/library/windows/desktop/bb776419(v=vs.85).aspx the error code 2returned from FindExecutable is: "The specified file was not found"

This means your UNC paths are invalid, use \\servername\sharename\dirname\filename

Henrik Høyer
  • 1,225
  • 1
  • 19
  • 27