Hello. The issue is that AutoIt structures does not support wstr LPCSTR,LPSTRSTR LPCWSTR,LPWSTRWSTR as C/C++. For that reason you need to create an structure.
If dllstructure allow you wstr and str data types it was correct did the way you tried.
using something like this WSTR lpFile (Of couse AutoIt does not support that kind of structure data type)
DllStructSetData($ShExecInfo, 'lpFile', 'C:\Windows\Notepad.exe')
But as I said if was possible if AutoIt allow you that data type in dll structures but it does not, So it will not work.
So for that reason you need to create the strings structures.
;~ If you'll use UNICODE unicode
Local $lpVerb = DllStructCreate('WCHAR[15];')
Local $lpFile = DllStructCreate('WCHAR[255];')
Local $lpParameters = DllStructCreate('WCHAR[255];')
Local $lpDirectory = DllStructCreate('WCHAR[255];')
;~ If you'll use ANSI version
Local $lpVerb = DllStructCreate('CHAR[15];')
Local $lpFile = DllStructCreate('CHAR[255];')
Local $lpParameters = DllStructCreate('CHAR[255];')
Local $lpDirectory = DllStructCreate('CHAR[255];')
;pd: of course the size could be diferent
Sorry for post code without correct tag my connections is unable to load the popup window for put the code.
MSDN is clear enough I think when it says:
lpFile
Type: LPCTSTR
The address of a null-terminated string that specifies the name of the file or object on which ShellExecuteEx will perform the action specified by the lpVerb parameter.
So what is the address?
$MyAddress=DllStructGetPtr($lpFile)
the we put it in our HELLEXECUTEINFO structure
DllStructSetData($ShExecInfo, 'lpFile',$MyAddress)
that's all.
Saludos