Shoutbox

interop call open - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: interop call open (/showthread.php?tid=78971)

interop call open by roxy_dany22 on 11-12-2007 at 03:14 PM

hi!(i'm italian..sorry 4 my bad english)
i've read in one topic to call this function to execute a file:

code:
Interop.Call("shell32.dll", "ShellExecuteW", null, "open", "C:app.exe", "param1 param2", "", SW_SHOWDEFAULT)

but it says that SW_SHOWDEFAULT is not defined...what shall i do?
RE: interop call open by Spunky on 11-12-2007 at 03:45 PM

Constants are not not defined so you need to find the value of SW_SHOWDEFAULT and set it...

I think it's 10 so either declare it globally or just change SW_SHOWDEFAULT to 10.


RE: interop call open by Matti on 11-12-2007 at 05:15 PM

You may also want to change "C:app.exe" to "C:\\app.exe". And I don't know if you want "param1 param2" sent to that application, maybe you need to have a look at those too? :)