Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ShellExecute()
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00092846
Message ID:
00093137
Views:
38
>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
Map
View

Click here to load this message in the networking platform