ShellExecute (OpenInsight Specific)
At 26 FEB 2002 12:55:17AM bobyerkes wrote:
I am attempting to make an API call to shell32.dll, this is what I have as a pointer:
shell32.dll ULONG STDCALL ShellExecuteA(ULONG,PCHAR,PCHAR,PCHAR,PCHAR,ULONG) AS SHELLEXECUTE
*This is the actual program *
**
Subroutine TEST_ShellExecute(X)
Declare function ShellExecute
runvalue=c:\Programs Files\Microsoft Word\Office10\winword.exe'workingdir=c:\Programs Files\Microsoft Word\Office10\'x=ShellExecute(0,'Open',runvalue:\00\,0,workingdir:\00\,0)return
*Any ideas as to what I am doing wrong would be great, thanks.
Robert Yerkes
At 26 FEB 2002 03:13AM Bob Watson wrote:
This might help
Here's my declaration
ULONG STDCALL ShellExecuteA(ULONG, LPCHAR, LPCHAR, LPCHAR, LPCHAR, ULONG) AS SHELLEXECUTE
and here's some code that calls shellexecute
function OpenDoc(name, parms, showCmd)
declare function ShellExecute, IsEventContext, Get_Property
$insert WinShow_Insert
if IsEventContext() then
Parent= @windowFrame=Get_Property(Parent, "MDIFRAME")if len(Frame) thenParent=Frameendhwnd=Get_Property(Parent, "HANDLE")end else
hwnd=0end
* Make show command zero if it is not an executable
if name-4,4=.exe' or name-4,4=.EXE' else
showCmd=0end
return ShellExecute(hwnd, 'open':\00\, name:\00\, parms:\00\, drive():\00\, showCmd)
Bob watson