I'm developing a component that would send messages to Snarl (a notifier program) via the commandline.
I'm able to do system("C:\\snarl_command.exe /M \"Hello\" \"World\"")
but that creates the command prompt window (for a split second)so I'm trying to use ShellExecute() instead.
I'm now trying ShellExecute(NULL, LPCWSTR("open"), LPCWSTR("C:\\snarl_command.exe"), LPCWSTR("/M \"Hello\" \"World\""), NULL, SW_HIDE)
but for some reason this doesn't seem to do anything.
any suggestions as to what might be wrong or how I can go about debugging this?
my guess is that maybe I cannot simply use NULL as the first argument (quote MSDN: A handle to the owner window used for displaying a user interface (UI) or error messages. This value can be NULL if the operation is not associated with a window.).
to clarify this, are components associated with any windows?
thanks in advance.