General information
Category:
Windows API functions
>I don't think that second declare will work. Both NT (as far as I know) and 95 use the first one, but the strings should be passed by reference.
It works, but this is a big happening! :)) No way to consider the declaration and use of the function as correct! At least the passing of SW_SHOWNORMAL as string is a good joke!
The first one didn't work on NT because it was also a happening that it worked on 95! :) The strings have to be passed by reference. In this case, the second parameter was an empty string. So, VFP passed the value of the string concatenated with a chr(0). Probably on 95 the program allocated the string on a zeroed memory area (very possible to happen). So, the next 3 chars in the memory were also zero, so, the second parameter was interpreted by ShellExecute as null pointer. Etc. But this is just luck...
>I see you've discovered one of the beauties of ShellExecute(), you can smply pass the name of the file you want opened and the associated application will open and run it.
This is why the second parameter can be "open" and not "run".
Vlad
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only