/*
* -----
* Screenshot Sender - ___api.js
* -----
* Win32 API class
* -----
*/
var __win32 = function () {
this._const = new __win32const();
this._USER32 = 'user32.dll';
this._KERNEL32 = 'kernel32.dll';
this._COMDLG32 = 'comdlg32.dll';
this._OLE32 = 'ole32.dll';
this._SHELL32 = 'shell32.dll';
this._GDIP32 = 'gdip32.dll';
this._GDI32 = 'gdi32.dll';
this._WININET = 'wininet.dll';
};
__win32.prototype = {
'ChooseColorW' : function (CHOOSECOLOR) {
_debug.sgetfuncname('ChooseColorW', arguments);
return Interop.Call(this._COMDLG32, 'ChooseColorW', CHOOSECOLOR);
},
'CloseClipboard' : function () {
_debug.sgetfuncname('CloseClipboard', arguments);
return Interop.Call(this._USER32, 'CloseClipboard');
},
'CloseHandle' : function (hHandle) {
_debug.sgetfuncname('CloseHandle', arguments);
return Interop.Call(this._KERNEL32, 'CloseHandle', hHandle);
},
'CreateFileW' : function (lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile) {
_debug.sgetfuncname('CreateFileW', arguments);
return Interop.Call(this._KERNEL32, 'CreateFileW', lpFileName,
dwDesiredAccess,
dwShareMode,
lpSecurityAttributes,
dwCreationDisposition,
dwFlagsAndAttributes,
hTemplateFile);
},
'CreateWindowExW' : function (dwExStyle, lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lParam) {
_debug.sgetfuncname('CreateWindowExW', arguments);
return Interop.Call(this._USER32, 'CreateWindowExW', dwExStyle,
lpClassName,
lpWindowName,
dwStyle,
x,
y,
nWidth,
nHeight,
hWndParent,
hMenu,
hInstance,
lParam);
},
'DeleteFileW' : function (lpszFile) {
_debug.sgetfuncname('DeleteFileW', arguments);
return Interop.Call(this._KERNEL32, 'DeleteFileW', '\\\\?\\'+lpszFile);
},
'DeleteObject' : function (hObject) {
_debug.sgetfuncname('DeleteObject', arguments);
return Interop.Call(this._GDI32, 'DeleteObject', hObject);
},
'DeleteUrlCacheEntryW' : function (lpszUrl) {
_debug.sgetfuncname('DeleteUrlCacheEntryW', arguments);
return Interop.Call(this._WININET, 'DeleteUrlCacheEntryW', lpszUrl);
},
'DestroyIcon' : function (hIcon) {
_debug.sgetfuncname('DestroyIcon', arguments);
return Interop.Call(this._USER32, 'DestroyIcon', hIcon);
},
'DragQueryFileW' : function (hDrop, iFile, lpszFile, cch) {
_debug.sgetfuncname('DragQueryFileW', arguments);
return Interop.Call(this._SHELL32, 'DragQueryFileW', hDrop, iFile, lpszFile, cch);
},
'DrawFocusRect' : function (hDC, lprc) {
_debug.sgetfuncname('DrawFocusRect', arguments);
return Interop.Call(this._USER32, 'DrawFocusRect', hDC, lprc);
},
'DrawTextW' : function (hDC, lpsz, iLength, lpRect, dwFlags) {
_debug.sgetfuncname('DrawTextW', arguments);
return Interop.Call(this._USER32, 'DrawTextW', hDC, lpsz, iLength, lpRect, dwFlags);
},
'EmptyClipboard' : function () {
_debug.sgetfuncname('EmptyClipboard', arguments);
return Interop.Call(this._USER32, 'EmptyClipboard');
},
'EnableMenuItem' : function (hMenu, uIDEnableItem, uEnable) {
_debug.sgetfuncname('EnableMenuItem', arguments);
return Interop.Call(this._USER32, 'EnableMenuItem', hMenu, this._SC_CLOSE, uEnable);
},
'EnableWindow' : function (hWnd, bEnable) {
_debug.sgetfuncname('EnableWindow', arguments);
return Interop.Call(this._USER32, 'EnableWindow', hWnd, bEnable);
},
'EnumDisplayMonitors' : function (hDc, lpRect, lpEnumFunc, lParam) {
_debug.sgetfuncname('EnumDisplayMonitors', arguments);
return Interop.Call(this._USER32, 'EnumDisplayMonitors', hDc, lpRect, lpEnumFunc, lParam);
},
'EnumWindows' : function (lpEnumFunc, lParam) {
_debug.sgetfuncname('EnumWindows', arguments);
return Interop.Call(this._USER32, 'EnumWindows', lpEnumFunc, lParam);
},
'FindClose' : function (hFindFile) {
_debug.sgetfuncname('FindClose', arguments);
return Interop.Call(this._KERNEL32, 'FindClose', hFindFile);
},
'FindFirstFileW' : function (lpszPath, WIN32_FIND_DATA) {
_debug.sgetfuncname('FindFirstFileW', arguments);
return Interop.Call(this._KERNEL32, 'FindFirstFileW', lpszPath, WIN32_FIND_DATA);
},
'FindNextFileW' : function (hFindFile, WIN32_FIND_DATA) {
_debug.sgetfuncname('FindNextFileW', arguments);
return Interop.Call(this._KERNEL32, 'FindNextFileW', hFindFile, WIN32_FIND_DATA);
},
'FindWindowExW' : function (hWndParent, hWndChildAfter, lpszClass, lpszWindow) {
_debug.sgetfuncname('FindWindowExW', arguments);
return Interop.Call(this._USER32, 'FindWindowExW', hWndParent, hWndChildAfter, lpszClass, lpszWindow);
},
'FindWindowW' : function (lpszClass, lpszWindow) {
_debug.sgetfuncname('FindWindowW', arguments);
return Interop.Call(this._USER32, 'FindWindowW', lpszClass, lpszWindow);
},
'GetAncestor' : function (hWnd, gaFlags) {
_debug.sgetfuncname('GetAncestor', arguments);
return Interop.Call(this._USER32, 'GetAncestor', hWnd, gaFlags);
},
'GetClassFile' : function (szFileName, pclsid) {
_debug.sgetfuncname('GetClassFile', arguments);
return Interop.Call(this._OLE32, 'GetClassFile', szFileName, pclsid);
},
'GetClassNameW' : function (hWnd, lpClassName, nMaxCount) {
_debug.sgetfuncname('GetClassNameW', arguments);
return Interop.Call(this._USER32, 'GetClassNameW', hWnd, lpClassName, nMaxCount);
},
'GetClientRect' : function (hWnd, lpRect) {
_debug.sgetfuncname('GetClientRect', arguments);
return Interop.Call(this._USER32, 'GetClientRect', hWnd, lpRect);
},
'GetClipboardData' : function (iType) {
_debug.sgetfuncname('GetClipboardData', arguments);
return Interop.Call(this._USER32, 'GetClipboardData', iType);
},
'GetCurrentProcess' : function () {
_debug.sgetfuncname('GetCurrentProcess', arguments);
return Interop.Call(this._KERNEL32, 'GetCurrentProcess');
},
'GetCursorPos' : function (lpPoint) {
_debug.sgetfuncname('GetCursorPos', arguments);
return Interop.Call(this._USER32, 'GetCursorPos', lpPoint);
},
'GetDC' : function (hWnd) {
_debug.sgetfuncname('GetDC', arguments);
return Interop.Call(this._USER32, 'GetDC', hWnd);
},
'GetDesktopWindow' : function () {
_debug.sgetfuncname('GetDesktopWindow', arguments);
return Interop.Call(this._USER32, 'GetDesktopWindow');
},
'GetFileInformationByHandle' : function (hFile, lpFileInformation) {
_debug.sgetfuncname('GetFileInformationByHandle', arguments);
return Interop.Call(this._KERNEL32, 'GetFileInformationByHandle', hFile, lpFileInformation);
},
'GetForegroundWindow' : function () {
_debug.sgetfuncname('GetForegroundWindow', arguments);
return Interop.Call(this._USER32, 'GetForegroundWindow');
},
'GetKeyNameTextW' : function (lParam, lpString, nSize) {
_debug.sgetfuncname('GetKeyNameTextW', arguments);
return Interop.Call(this._USER32, 'GetKeyNameTextW', lParam, lpString, nSize);
},
'GetMonitorInfoW' : function (hMonitor, MONITORINFO) {
_debug.sgetfuncname('GetMonitorInfoW', arguments);
return Interop.Call(this._USER32, 'GetMonitorInfoW', hMonitor, MONITORINFO);
},
'GetParent' : function (hWnd) {
_debug.sgetfuncname('GetParent', arguments);
return Interop.Call(this._USER32, 'GetParent', hWnd);
},
'GetSaveFileNameW' : function (OPENFILENAME) {
_debug.sgetfuncname('GetSaveFileNameW', arguments);
return Interop.Call(this._COMDLG32, 'GetSaveFileNameW', OPENFILENAME);
},
'GetSystemMenu' : function (hWnd, bRevert) {
_debug.sgetfuncname('GetSystemMenu', arguments);
return Interop.Call(this._USER32, 'GetSystemMenu', hWnd, bRevert);
},
'GetSystemMetrics' : function (nIndex) {
_debug.sgetfuncname('GetSystemMetrics', arguments);
return Interop.Call(this._USER32, 'GetSystemMetrics', nIndex);
},
'GetVersion' : function () {
_debug.sgetfuncname('GetVersion', arguments);
return Interop.Call(this._KERNEL32, 'GetVersion');
},
'GetWindowDC' : function (hWnd) {
_debug.sgetfuncname('GetWindowDC', arguments);
return Interop.Call(this._USER32, 'GetWindowDC', hWnd);
},
'GetWindowLongW' : function (hWnd, nIndex) {
_debug.sgetfuncname('GetWindowLongW', arguments);
return Interop.Call(this._USER32, 'GetWindowLongW', hWnd, nIndex);
},
'GetWindowPlacement' : function (hWnd, WINDOWPLACEMENT) {
_debug.sgetfuncname('GetWindowPlacement', arguments);
return Interop.Call(this._USER32, 'GetWindowPlacement', hWnd, WINDOWPLACEMENT);
},
'GetWindowRect' : function (hWnd, lpRect) {
_debug.sgetfuncname('GetWindowRect', arguments);
return Interop.Call(this._USER32, 'GetWindowRect', hWnd, lpRect);
},
'GetWindowTextLengthW' : function (hWnd) {
_debug.sgetfuncname('GetWindowTextLengthW', arguments);
return Interop.Call(this._USER32, 'GetWindowTextLengthW', hWnd);
},
'GetWindowTextW' : function (hWnd, lpszTitle, iLength) {
_debug.sgetfuncname('GetWindowTextW', arguments);
return Interop.Call(this._USER32, 'GetWindowTextW', hWnd, lpszTitle, iLength);
},
'GlobalAddAtomW' : function (lpString) {
_debug.sgetfuncname('GlobalAddAtomW', arguments);
return Interop.Call(this._KERNEL32, 'GlobalAddAtomW', lpString);
},
'GlobalFindAtomW' : function (lpString) {
_debug.sgetfuncname('GlobalFindAtomW', arguments);
return Interop.Call(this._KERNEL32, 'GlobalFindAtomW', lpString);
},
'GlobalGetAtomNameW' : function (nAtom, lpBuffer, nSize) {
_debug.sgetfuncname('GlobalGetAtomNameW', arguments);
return Interop.Call(this._KERNEL32, 'GlobalGetAtomNameW', nAtam, lpBuffer, nSize);
},
'GlobalDeleteAtom' : function (nAtom) {
_debug.sgetfuncname('GlobalDeleteAtom', arguments);
return Interop.Call(this._KERNEL32, 'GlobalDeleteAtom', nAtom);
},
'IsClipboardFormatAvailable' : function (hFormat) {
_debug.sgetfuncname('IsClipboardFormatAvailable', arguments);
return Interop.Call(this._USER32, 'IsClipboardFormatAvailable', hFormat);
},
'IsWindow' : function (hWnd) {
_debug.sgetfuncname('IsWindow', arguments);
return Interop.Call(this._USER32, 'IsWindow', hWnd);
},
'IsWindowVisible' : function (hWnd) {
_debug.sgetfuncname('IsWindowVisible', arguments);
return Interop.Call(this._USER32, 'IsWindowVisible', hWnd);
},
'LoadImageW' : function (hinst, lpszName, uType, cxDesired, cyDesired, fuLoad) {
_debug.sgetfuncname('LoadImageW', arguments);
return Interop.Call(this._USER32, 'LoadImageW', hinst, lpszName, uType, cxDesired, cyDesired, fuLoad);
},
'MapVirtualKeyW' : function (uCode, uMapType) {
_debug.sgetfuncname('MapVirtualKeyW', arguments);
return Interop.Call(this._USER32, 'MapVirtualKeyW', uCode, uMapType);
},
'MessageBoxW' : function (hWnd, lpText, lpCaption, uType) {
_debug.sgetfuncname('MessageBoxW', arguments);
return Interop.Call(this._USER32, 'MessageBoxW', hWnd, lpText, lpCaption, uType);
},
'MoveWindowW' : function (hWnd, x, y, nWidth, nHeight, bRepaint) {
_debug.sgetfuncname('MoveWindowW', arguments);
return Interop.Call(this._USER32, 'MoveWindowW', hWnd, x, y, nWidth, nHeight, bRepaint);
},
'OpenClipboard' : function (hWnd) {
_debug.sgetfuncname('OpenClipboard', arguments);
return Interop.Call(this._USER32, 'OpenClipboard', hWnd);
},
'PostMessageW' : function (hWnd, lMessage, wParam, lParam) {
_debug.sgetfuncname('PostMessageW', arguments);
return Interop.Call(this._USER32, 'PostMessageW', hWnd, lMessage, wParam, lParam);
},
'RegisterHotKey' : function (hWnd, id, fsModifiers, vk) {
_debug.sgetfuncname('RegisterHotKey', arguments);
return Interop.Call(this._USER32, 'RegisterHotKey', hWnd, id, fsModifiers, vk);
},
'ReleaseDC' : function (hWnd, hDC) {
_debug.sgetfuncname('ReleaseDC', arguments);
return Interop.Call(this._USER32, 'ReleaseDC', hWnd, hDC);
},
'RtlMoveMemory' : function (pDest, pSource, hSize) {
_debug.sgetfuncname('RtlMoveMemory', arguments);
return Interop.Call(this._KERNEL32, 'RtlMoveMemory', pDest, pSource, hSize);
},
'SendMessageW' : function (hWnd, lMessage, wParam, lParam) {
_debug.sgetfuncname('SendMessageW', arguments);
return Interop.Call(this._USER32, 'SendMessageW', hWnd, lMessage, wParam, lParam);
},
'SetBkMode' : function (hDC, iBkMode) {
_debug.sgetfuncname('SetBkMode', arguments);
return Interop.Call(this._GDI32, 'SetBkMode', hDC, iBkMode);
},
'SetClipboardData' : function (uFormat, hMem) {
_debug.sgetfuncname('SetClipboardData', arguments);
return Interop.Call(this._USER32, 'SetClipboardData', uFormat, hMem);
},
'SetFocus' : function (hWnd) {
_debug.sgetfuncname('SetFocus', arguments);
return Interop.Call(this._USER32, 'SetFocus', hWnd);
},
'SetForegroundWindow' : function (hWnd) {
_debug.sgetfuncname('SetForegroundWindow', arguments);
return Interop.Call(this._USER32, 'SetForegroundWindow', hWnd);
},
'SetLayeredWindowAttributes' : function (hWnd, crKey, bAlpha, dwFlags) {
_debug.sgetfuncname('SetLayeredWindowAttributes', arguments);
return Interop.Call(this._USER32, 'SetLayeredWindowAttributes', hWnd, crKey, bAlpha, dwFlags);
},
'SetWindowLongW' : function (hWnd, nIndex, nMsg) {
_debug.sgetfuncname('SetWindowLongW', arguments);
return Interop.Call(this._USER32, 'SetWindowLongW', hWnd, nIndex, nMsg);
},
'SetWindowPlacement' : function (hWnd, lpwndpl) {
_debug.sgetfuncname('SetWindowPlacement', arguments);
return Interop.Call(this._USER32, 'SetWindowPlacement', hWnd, lpwndpl);
},
'SetWindowPos' : function (hWnd, hWndInsertAfter, x, y, cx, cy, dwFlags) {
_debug.sgetfuncname('SetWindowPos', arguments);
return Interop.Call(this._USER32, 'SetWindowPos', hWnd, hWndInsertAfter, x, y, cx, cy, dwFlags);
},
'SetWindowTextW' : function (hWnd, lpsz) {
_debug.sgetfuncname('SetWindowTextW', arguments);
return Interop.Call(this._USER32, 'SetWindowText', hWnd, lpsz);
},
'SHBrowseForFolderW' : function (BROWSEINFO) {
_debug.sgetfuncname('SHBrowseForFolderW', arguments);
return Interop.Call(this._SHELL32, 'SHBrowseForFolderW', BROWSEINFO);
},
'SHCreateDirectoryExW' : function (hWnd, lpszPath, SECURITY_ATTRIBUTES) {
_debug.sgetfuncname('SHCreateDirectoryExW', arguments);
return Interop.Call(this._SHELL32, 'SHCreateDirectoryExW', hWnd, lpszPath, SECURITY_ATTRIBUTES);
},
'ShellExecuteW' : function (hWnd, lpOperateion, lpFile, lpParameters, lpDirectory, nShowCmd) {
_debug.sgetfuncname('ShellExecuteW', arguments);
return Interop.Call(this._SHELL32, 'ShellExecuteW', hWnd, lpOperateion, lpFile, lpParameters, lpDirectory, nShowCmd);
},
'SHGetPathFromIDListW' : function (pidl, lpsz) {
_debug.sgetfuncname('SHGetPathFromIDListW', arguments);
return Interop.Call(this._SHELL32, 'SHGetPathFromIDListW', pidl, lpsz);
},
'SHGetSpecialFolderPathW' : function (hWnd, lpszPath, csidl, fCreate) {
_debug.sgetfuncname('SHGetSpecialFolderPathW', arguments);
return Interop.Call(this._SHELL32, 'SHGetSpecialFolderPathW', hWnd, lpszPath, csidl, fCreate);
},
'ShowWindow' : function (hWnd, nShowCmd) {
_debug.sgetfuncname('ShowWindow', arguments);
return Interop.Call(this._USER32, 'ShowWindow', hWnd, nShowCmd);
},
'StringFromGUID2' : function (rguid, lpsz, cchMax) {
_debug.sgetfuncname('StringFromGUID2', arguments);
return Interop.Call(this._OLE32, 'StringFromGUID2', rguid, lpsz, cchMax);
},
'UnregisterHotKey' : function (hWnd, id) {
_debug.sgetfuncname('UnregisterHotKey', arguments);
return Interop.Call(this._USER32, 'UnregisterHotKey', hWnd, id);
},
'WaitForSingleObject' : function (hHandle, dwMilliseconds) {
_debug.sgetfuncname('WaitForSingleObject', arguments);
return Interop.Call(this._KERNEL32, 'WaitForSingleObject', hHandle, dwMilliseconds);
},
'WindowFromPoint' : function (x, y) {
_debug.sgetfuncname('WindowFromPoint', arguments);
return Interop.Call(this._USER32, 'WindowFromPoint', x, y);
}
};
var __win32const = function () {
this._LVM_FIRST = 0x1000;
this._NM_FIRST = 0x0;
this._WM_USER = 0x400;
this._BIF_DONTGOBELOWDOMAIN = 0x2;
this._BIF_RETURNONLYFSDIRS = 0x1;
this._BIF_USENEWUI = 0x50;
this._CF_BITMAP = 0x2;
this._CF_HDROP = 0xf;
this._CB_RESETCONTENT = 0x014b;
this._CC_FULLOPEN = 0x2;
this._CC_RGBINIT = 0x2;
this._CLSID_PERSONAL = 0x5;
this._DT_CALCRECT = 0x400;
this._EM_SETBKGNDCOLOR = (this._WM_USER + 0x43);
this._FILE_ATTRIBUTE_DIRECTORY = 0x10;
this._FILE_SHARE_READ = 0x1;
this._GENERIC_READ = 0x80000000;
this._GA_ROOTOWNER = 0x3;
this._GWL_EXSTYLE = -20;
this._GWL_STYLE = -16;
this._HK_GETKEY = (this._WM_USER + 0x2);
this._HK_SETKEY = (this._WM_USER + 0x1);
this._HWND_BROADCAST = 0xffff;
this._HWND_TOPMOST = -1;
this._INFINITE = 0xffff;
this._LVM_DELETEALLITEMS = (this._LVM_FIRST + 0x9);
this._LWA_ALPHA = 0x2;
this._MB_OK = 0x0,
this._MB_ICONHAND = 0x10;
this._MB_ICONQUESTION = 0x20;
this._MB_ICONEXCLAMATION = 0x30;
this._MB_ICONASTERISK = 0x40;
this._MB_OK = 0;
this._MB_OKCANCEL = 0x1;
this._MB_ABORTRETRYIGNORE = 0x2;
this._MB_YESNOCANCEL = 0x3;
this._MB_YESNO = 0x4;
this._MB_RETRYCANCEL = 0x5;
this._MF_BYCOMMAND = 0x0;
this._MF_ENABLED = 0x0;
this._MF_DISABLED = 0x2;
this._MOD_ALT = 0x1;
this._MOD_CONTROL = 0x2;
this._MOD_SHIFT = 0x4;
this._MOD_WIN = 0x8;
this._NM_RELEASEDCAPTURE = (this._NM_FIRST - 0x10);
this._OPEN_EXISTING = 0x3;
this._OFN_ENABLESIZING = 0x800000;
this._OFN_EXPLORER = 0x80000;
this._OFN_HIDEREADONLY = 0x4;
this._OFN_LONGNAMES = 0x200000;
this._OFN_PATHMUSTEXIST = 0x800;
this._OFN_FILEMUSTEXIST = 0x1000;
this._OFN_OVERWRITEPROMPT = 0x2;
this._OFN_COMMON_FLAGS = (this._OFN_ENABLESIZING |
this._OFN_EXPLORER |
this._OFN_HIDEREADONLY |
this._OFN_LONGNAMES |
this._OFN_PATHMUSTEXIST |
this._OFN_FILEMUSTEXIST |
this._OFN_OVERWRITEPROMPT);
this._SM_CXVIRTUALSCREEN = 0x4e;
this._SM_CYVIRTUALSCREEN = 0x4f;
this._SM_XVIRTUALSCREEN = 0x4c;
this._SM_YVIRTUALSCREEN = 0x4d;
this._SC_CLOSE = 0xf060;
this._SIZE_MAXIMIZED = 0x2;
this._SW_HIDE = 0x0;
this._SW_RESTORE = 0x9;
this._SW_SHOW = 0x5;
this._SW_SHOWMINIMIZED = 0x2;
this._SW_SHOWNORMAL = 0x1;
this._SWP_NOMOVE = 0x2;
this._SWP_NOSIZE = 0x1;
this._SWP_NOZORDER = 0x4;
this._TBM_GETPOS = 0x400;
this._TBM_SETPOS = 0x405;
this._WA_INACTIVE = 0x0;
this._WM_ACTIVATE = 0x6;
this._WM_HOTKEY = 0x312;
this._WM_LBUTTONDOWN = 0x201;
this._WM_LBUTTONUP = 0x202;
this._WM_LBUTTONDBLCLK = 0x203;
this._WM_MOUSEMOVE = 0x200;
this._WM_NOTIFY = 0x4e;
this._WM_PARENTNOTIFY = 0x210;
this._WM_SIZE = 0x5;
this._WPF_ASYNCWINDOWPLACEMENT = 0x4;
this._WS_BOARDER = 0x800000;
this._WS_CAPTION = 0xC00000;
this._WS_EX_LAYERED = 0x80000;
this._WS_EX_TRANSPARENT = 0x20;
};
__win32const.prototype = {};