Skip to content

Commit 1b11445

Browse files
committed
Switch to -W version of ShellExecuteEx
1 parent 6b23693 commit 1b11445

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

lib/native/shell32.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var shell32 = new ffi.Library('Shell32', {
1010
_Inout_ SHELLEXECUTEINFO *pExecInfo
1111
);
1212
*/
13-
ShellExecuteExA: ['bool', [SHELLEXECUTEINFOPtr]]
13+
ShellExecuteExW: ['bool', [SHELLEXECUTEINFOPtr]]
1414
});
1515

1616
module.exports = shell32;

lib/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = {
4040
hProcess: ref.alloc(types.HANDLE)
4141
});
4242

43-
shell32.ShellExecuteExA.async(shellexecuteinfoval.ref(), callback);
43+
shell32.ShellExecuteExW.async(shellexecuteinfoval.ref(), callback);
4444
},
4545
associateExeForFile: function (handlerName, handlerDescription, iconPath, exePath, extensionName) {
4646
var key = registry.openKeyFromPredefined(windef.HKEY.HKEY_CLASSES_ROOT, '', windef.KEY_ACCESS.KEY_ALL_ACCESS);

lib/windef.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ module.exports = {
7171
cbSize: types.DWORD,
7272
fMask: types.ULONG,
7373
hwnd: types.HWND,
74-
lpVerb: types.STRING,
75-
lpFile: types.STRING,
76-
lpParameters: types.STRING,
77-
lpDirectory: types.STRING,
74+
lpVerb: types.LPCWSTR,
75+
lpFile: types.LPCWSTR,
76+
lpParameters: types.LPCWSTR,
77+
lpDirectory: types.LPCWSTR,
7878
nShow: types.INT,
7979
hInstApp: types.HINSTANCE,
8080
lpIDList: types.LPVOID,
81-
lpClass: types.STRING,
81+
lpClass: types.LPCWSTR,
8282
hkeyClass: types.HKEY,
8383
dwHotKey: types.DWORD,
8484
DUMMYUNIONNAME: DUMMYUNIONNAME,

0 commit comments

Comments
 (0)