Click to See Complete Forum and Search --> : Shellexecuteinfow


Mfcer__
November 17th, 2003, 04:21 AM
this code don't work under Win98/ Please Help me!
SHELLEXECUTEINFOW SHExecInfo;
ZeroMemory(&SHExecInfo, sizeof(SHExecInfo));
WCHAR str[MAX_PATH],str1[MAX_PATH];
ConvertAnsiToWide(str,szPathProgramm,MAX_PATH);
MessageBoxW(0,str,0,0);
SHExecInfo.cbSize = sizeof(SHExecInfo);
SHExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
SHExecInfo.nShow = SW_SHOWNORMAL;
SHExecInfo.lpFile = str;
ConvertAnsiToWide(str1,">res.txt",MAX_PATH);
MessageBoxW(0,str1,0,0);
SHExecInfo.lpParameters = str1; //Parameters don't work
if(!ShellExecuteExW(&SHExecInfo)) {
MessageBox(0L,"Error",0,MB_OK);
return;
}
:(

vicodin451
November 17th, 2003, 07:52 AM
What didn't work?

vicodin451
November 17th, 2003, 07:53 AM
MSDN for ShellExecuteEx:

Windows 95/98/Me: ShellExecuteEx is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.

http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdkredist.htm

Mfcer__
November 17th, 2003, 10:01 AM
Of course, I use Microsoft Layer for Unicode on Windows 95/98/Me Systems, but transfer of parameters - It's a problem.

typedef struct _SHELLEXECUTEINFO {
DWORD cbSize;
ULONG fMask;
HWND hwnd;
LPCTSTR lpVerb;
LPCTSTR lpFile;
LPCTSTR lpParameters; // this
LPCTSTR lpDirectory;
int nShow;
HINSTANCE hInstApp;
LPVOID lpIDList;
LPCTSTR lpClass;
HKEY hkeyClass;
DWORD dwHotKey;
union {
HANDLE hIcon;
HANDLE hMonitor;
} DUMMYUNIONNAME;
HANDLE hProcess;
} SHELLEXECUTEINFO, *LPSHELLEXECUTEINFO;


MSDN:

lpParameters
Address of a null-terminated string that contains the application parameters. The parameters must be separated by spaces. If the lpFile member specifies a document file, lpParameters should be NULL.

Parameters under Windows 98 SE don't work

:confused: