UNPKG

@ahmic/autoit-js

Version:
21 lines (18 loc) 968 B
import './@types/point.js'; import './@types/rect.js'; import { VOID, LPCWSTR, INT, LPWSTR } from './@types/win32.js'; import { autoit } from './lib/autoit.js'; import { createUnicodeBuffer, unicodeBufferToString } from './util/buffer.util.js'; var DriveMapFlag; (function (DriveMapFlag) { DriveMapFlag[DriveMapFlag["Default"] = 0] = "Default"; DriveMapFlag[DriveMapFlag["Persistant"] = 1] = "Persistant"; DriveMapFlag[DriveMapFlag["Authentication"] = 8] = "Authentication"; })(DriveMapFlag || (DriveMapFlag = {})); function DriveMapAdd(device, share, flags = DriveMapFlag.Default, username = '', password = '') { const [buffer, length] = createUnicodeBuffer(1024); autoit.invoke('AU3_DriveMapAdd', VOID, [LPCWSTR, LPCWSTR, INT, LPCWSTR, LPCWSTR, LPWSTR, INT], [device, share, flags, username, password, buffer, length]); return unicodeBufferToString(buffer); } export { DriveMapAdd, DriveMapFlag }; //# sourceMappingURL=drive-map-add.js.map