Win32Shell

Torsten.Bergmann at phaidros.com Torsten.Bergmann at phaidros.com
Fri Aug 22 13:22:01 UTC 2003


>Do you mean something like this in Win32Shell>>shellExecute:

The implementation of externalCallFailed will
query for the last error message.

Typically a windows API call returns a result (failed, success
or error code). If it fails you can use GetLastError()
to retrieve error information. 

The method #shellOpen: uses the ShellExecute() API with the 'open'
parameter. This opens an executable associated with the provided
file parameter. Win32Shell new shellOpen: 'c:\letter.doc' 
for example typically opens M$Word.

Note that ShellOpen is not the best way to call an external
executable - it's used for open documents.
To start an executable the CreateProcess() API is better suited.

See the API description in the MSDN for details on ShellExecute:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/pla
tform/shell/reference/functions/shellexecute.asp

The problem on the other Win98 machines may be that there is 
no executable associated with the provided file, so the call
may fail. 

Jon: If you need more help to solve the problem feel free to 
contact me. 

Bye
Torsten



More information about the Squeak-dev mailing list