Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shellexecute
Message
 
To
22/06/2006 05:55:01
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
01130727
Message ID:
01130741
Views:
21
What happend if you double click on that file in Windows Explorer (there where your ShellExecute not working)?


>I get the error code 31 though the file type (It's a Jpg) is associated to MSPAINT
>As I told you I have no problems in WinXp Environment
>
>>>Hi there,
>>>I developed an application in which I call the function
>>>
>>>Procedure CallExt
>>>Parameters xfiletoOpen,xlocation
>>>
>>>DECLARE INTEGER ShellExecute IN SHELL32.DLL INTEGER nWinHandle,;
>>>                                               STRING cOperation,;
>>>                                               STRING cFileName,;
>>>                                               STRING cParameters,;
>>>                                               STRING cDirectory,;
>>>                                               INTEGER nShowWindow
>>>    result = ShellExecute(0, 'Edit', xFileToOpen , '', xLocation, 1)
>>>
>>>
>>>This works fine in Win XP but under a PC running with Win2000 it does not open the file as it was not, but it is, associated to any application.
>>>
>>>How can I get through this problem ?
>>>Thank you all
>>>Alessio
>>
>>
>>Check the result. If it is bigger than 32 than everything is OK, but if it is smaller or equal to 32 error happened.
>>Error codes:
>>
>>#define ERROR_OUT_OF_MEMORY      0 &&The operating system is out of memory or resources.
>>#define ERROR_FILE_NOT_FOUND     2 &&The specified file was not found.
>>#define ERROR_PATH_NOT_FOUND     3 &&The specified path was not found.
>>#define ERROR_BAD_FORMAT        11 &&The .exe file is invalid (non-Microsoft Win32 .exe or error in .exe image).
>>#define SE_ERR_ACCESSDENIED      5 && access denied
>>#define SE_ERR_ASSOCINCOMPLETE  27 &&The file name association is incomplete or invalid.
>>#define SE_ERR_DDEBUSY          30 &&The Dynamic Data Exchange (DDE) transaction could not be completed because other DDE
>>                                   &&transactions were being processed.
>>#define SE_ERR_DDEFAIL          29 &&The DDE transaction failed.
>>#define SE_ERR_DDETIMEOUT       28 &&The DDE transaction could not be completed because the request timed out.
>>#define SE_ERR_NOASSOC          31 &&There is no application associated with the given file name extension.
>>                                   &&This error will also be returned if you attempt to print a file that is not printable.
>>#define SE_ERR_SHARE            26 &&A sharing violation occurred.
>>
>>#define SE_ERR_OOM               8 && out of memory
>>#define SE_ERR_DLLNOTFOUND      32 &&The specified dynamic-link library (DLL) was not found.
>>
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform