in reply to Re^4: Win32 wperl open Console when system
in thread Win32 wperl open Console when system

The "normal" way to open any file on Windows is to invoke ShellExecute() with hwnd set to 0, lpOperation set to NULL or to "open", lpFile set to the file to be opened, lpParameters and lpDirectory set to NULL, and nShowCmd set to SW_SHOWNORMAL.

In other words:

/* In C/C++: */ ShellExecute(0, NULL, file, NULL, NULL, SW_SHOWNORMAL); // request def +ault action ShellExecute(0, "open", file, NULL, NULL, SW_SHOWNORMAL); // request o +pen ShellExecute(0, "print", file, NULL, NULL, SW_SHOWNORMAL); // request +printing

This should be equal to a double click on the respective file.

I'm to lazy to search for a module exporting ShellExecute(), Win32::API should be able to import that function from shell32.dll.

Update: Win32::FileOp exports ShellExecute(). Win32::GUI also has a ShellExecute() method, burried somewhere.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)