+BOOL ShellExecuteExM(LPSHELLEXECUTEINFOA lpExecInfo)\r
+{\r
+ BOOL r = FALSE;\r
+ wchar_t* pw0 = NULL;\r
+ wchar_t* pw1 = NULL;\r
+ wchar_t* pw2 = NULL;\r
+ wchar_t* pw3 = NULL;\r
+ wchar_t* pw4 = NULL;\r
+ SHELLEXECUTEINFOW wExecInfo;\r
+START_ROUTINE\r
+ wExecInfo.cbSize = sizeof(SHELLEXECUTEINFOW);\r
+ wExecInfo.fMask = lpExecInfo->fMask;\r
+ wExecInfo.hwnd = lpExecInfo->hwnd;\r
+ pw0 = DuplicateMtoW(lpExecInfo->lpVerb, -1);\r
+ wExecInfo.lpVerb = pw0;\r
+ pw1 = DuplicateMtoW(lpExecInfo->lpFile, -1);\r
+ wExecInfo.lpFile = pw1;\r
+ pw2 = DuplicateMtoW(lpExecInfo->lpParameters, -1);\r
+ wExecInfo.lpParameters = pw2;\r
+ pw3 = DuplicateMtoW(lpExecInfo->lpDirectory, -1);\r
+ wExecInfo.lpDirectory = pw3;\r
+ wExecInfo.nShow = lpExecInfo->nShow;\r
+ wExecInfo.hInstApp = lpExecInfo->hInstApp;\r
+ wExecInfo.lpIDList = lpExecInfo->lpIDList;\r
+ if(lpExecInfo->fMask & SEE_MASK_CLASSNAME)\r
+ {\r
+ pw4 = DuplicateMtoW(lpExecInfo->lpClass, -1);\r
+ wExecInfo.lpClass = pw4;\r
+ }\r
+ wExecInfo.hkeyClass = lpExecInfo->hkeyClass;\r
+ wExecInfo.dwHotKey = lpExecInfo->dwHotKey;\r
+ wExecInfo.hIcon = lpExecInfo->hIcon;\r
+ wExecInfo.hProcess = lpExecInfo->hProcess;\r
+ r = ShellExecuteExW(&wExecInfo);\r
+ lpExecInfo->hInstApp = wExecInfo.hInstApp;\r
+ lpExecInfo->hProcess = wExecInfo.hProcess;\r
+END_ROUTINE\r
+ FreeDuplicatedString(pw0);\r
+ FreeDuplicatedString(pw1);\r
+ FreeDuplicatedString(pw2);\r
+ FreeDuplicatedString(pw3);\r
+ FreeDuplicatedString(pw4);\r
+ return r;\r
+}\r
+\r