- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See ShellExecuteEx; after you call it, you can use WaitForSingleObject on SEI.hProcess (see docs). Note, however, that your application will appear to be non-responding while waiting for Excel to terminate.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, but I'm struggling with this. I can't seem to use this without defining shellinfoexec, and when I do, it complains it doesn't match the dummy argument. I'm probably not undertanding the structure definition properly anyway, not being a C programmer. No includesor use statments seem to help.
Any further clues would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quick sketch:
USE DFWIN
type (T_SHELLEXECUTEINFO):: SEI !CVF api translations have T_ prefix
SEI%cbSize = SIZEOF(SEI)
SEI%fMask = SEE_MASK_NOCLOSEPROCESS
SEI%lpVerb = NULL ! = open
SEI%lpFile = LOC("whatever.xls")C !LP*STR's in TYPEs require LOC
IF (ShellExecuteEx(SEI) .EQ.0) THEN
iErr = GetLastError()
ELSE
i = WaitForSingleObject(SEI%hProcess, INFINITE)
i = CloseHandle(SEI%hProcess)
END IF
HTH
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page