c++ - ShellExecute doesn't work for other computer -
i made program using win32api. in program, has "shellexecute" phrase in order execute chrome searching. following abstraction fo wrote.
#include <windows.h> #include <shellapi.h> int main () { shellexecute(null, l"open", searching_url, null, null, sw_showmaximized); }
it works in computer. but, sent windows app other people , said doesn't work. mean shellexecute doesn't work. cannot catch start figuring out what's wrong here.
would please suggest how figure out in structured way? thanks.
two things try:
- shellexecute can require com initialized under circumstances. docs
shellexecute
function explain why in more detail. should callcoinitializeex(null, coinit_apartmentthreaded | coinit_disable_ole1dde)
before callshellexecute
,couninitialize()
afterwards. - instead of using
l"open"
verb, should usenull
.null
give "default" action object (equivalent double-clicking it) not "open".
Comments
Post a Comment