Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

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

[email protected]


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= @window
Frame=Get_Property(Parent, "MDIFRAME")
if len(Frame) then
  Parent=Frame
end
hwnd=Get_Property(Parent, "HANDLE")

end else

hwnd=0

end

* Make show command zero if it is not an executable

if name-4,4=.exe' or name-4,4=.EXE' else

 showCmd=0

end

return ShellExecute(hwnd, 'open':\00\, name:\00\, parms:\00\, drive():\00\, showCmd)

Bob watson

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/22e2a5b312ef97ec88256b6c00208711.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1