Re: shell to MS explorer
- Posted by gwalters at sc.rr.com
Jan 15, 2002
thanks, but that is way over my head.....I'll chew on it a while.
George Walters
----- Original Message -----
From: "Euman" <euman at bellsouth.net>
To: "EUforum" <EUforum at topica.com>
Subject: Re: shell to MS explorer
>
> Here is one such wrapper. You could make this more generic than it is.
>
> --ShellExecute(
> -- HWND hwnd,
> -- LPCTSTR lpOperation,
> -- LPCTSTR lpFile,
> -- LPCTSTR lpParameters,
> -- LPCTSTR lpDirectory,
> -- INT nShowCmd
>
> xShellExecute = define_c_func(shell32_dll, "ShellExecuteA",
> {C_LONG, C_LONG, C_LONG, C_LONG, C_LONG, C_INT}, C_LONG)
>
> global function ShellExecute(atom hw, sequence op, sequence pgm, sequence
arg, object isdir, integer sw)
> atom ppgm, parg, pdir, inst
> ppgm = allocate_string(pgm)
> parg = allocate_string(arg)
> if not integer isdir then
> pdir = allocate_string(isdir)
> end if
> inst = c_func(xShellExecute, {hw, op, ppgm, parg, pdir, sw})
> free(ppgm)
> free(parg)
> return inst
> end function
>
> <example:>
>
> object junk
> junk = ShellExecute(handle, "open", file, NULL, NULL, SW_SHOWNORMAL)
>
> Euman
> euman at bellsouth.net
>
> Q: Are we monetarily insane?
> A: YES
>
>
>
>
|
Not Categorized, Please Help
|
|