Re: Passing through ShellExecute
Actually, I have been using ShellExecute in conjunction with the shared
memory library that Mario Steele and I wrote. I have found that this worked
good for passing parameters to the program that's run, but the parameters
are seperated by "white spaces" and you can't pass a zero, as the arguments
are null strings.
atom lpapp, lpparam, lpdir
lpapp = alloc_sz("C:\\Euphoria\\bin\\exw.exe")
lpparam = alloc_sz( "test.exw" & " " & "some-sequence-to-pass" )
lpdir = alloc_sz( "C:\\Euphoria\\Windows\\" )
-- for an exe file, the above code would be;
-- lpapp = alloc_sz("test.exe")
-- lpparam = alloc_sz( "some-sequence-to-pass" )
-- lpdir = alloc_sz( "C:\\Euphoria\\Windows\\" )
ack = ShellExecute({0,0,lpapp,lpparam,lpdir,SW_SHOWNORMAL})
Once the string is passed to the new application, you can use it to allocate
shared memory, and poke/peek data any way you want, in either direction.
Just be careful to use only the sm_dealloc() that's provided in the
memshare.ew library to release the memory in both applications when you're
done.
The latest version of memshare.ew can be found here:
http://pages.prodigy.net/mirwalds/memshare.zip
Jason
PS: alloc_sz() is the same as allocate_string().
|
Not Categorized, Please Help
|
|