diff --git a/reactos/lib/shell32/control/control.c b/reactos/lib/shell32/control/control.c new file mode 100644 index 00000000000..9698fd02555 --- /dev/null +++ b/reactos/lib/shell32/control/control.c @@ -0,0 +1,551 @@ +/* + * ReactOS shell32 - Control Panel + * + * control.c + * + * Copyright (C) 2002 Robert Dickenson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#include +#include +#include +#include +#include +#include +#include +#include +//#include +//#include + +#include "control.h" +#include "framewnd.h" +#include "settings.h" + +#include "shell32.h" +#include "trace.h" + +//#define _USE_WINE_WND_ + +//WINE_DEFAULT_DEBUG_CHANNEL(shlctrl); + +//////////////////////////////////////////////////////////////////////////////// +// Global Variables: +// + +HINSTANCE hInst; +HWND hFrameWnd; +HWND hStatusBar; +HMENU hMenuFrame; + +TCHAR szTitle[MAX_LOADSTRING]; +TCHAR szWindowClass[MAX_LOADSTRING]; + + +//////////////////////////////////////////////////////////////////////////////// + +BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) +{ + RECT rect; + WNDCLASSEX wcFrame = { + sizeof(WNDCLASSEX), + CS_HREDRAW | CS_VREDRAW/*style*/, + FrameWndProc, + 0/*cbClsExtra*/, + 0/*cbWndExtra*/, + hInstance, + LoadIcon(hInstance, (LPCTSTR)MAKEINTRESOURCE(IDI_CONTROL)), + LoadCursor(0, IDC_ARROW), + 0/*hbrBackground*/, + 0/*lpszMenuName*/, + szWindowClass, + (HICON)LoadImage(hInstance, (LPCTSTR)MAKEINTRESOURCE(IDI_CONTROL), IMAGE_ICON, + GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED) + }; + ATOM hFrameWndClass = RegisterClassEx(&wcFrame); // register frame window class + + hMenuFrame = LoadMenu(hInstance, (LPCTSTR)MAKEINTRESOURCE(IDR_CONTROL_MENU)); + + // Initialize the Windows Common Controls DLL + InitCommonControls(); + + if (LoadSettings(&rect)) { + hFrameWnd = CreateWindowEx(0, (LPCTSTR)(int)hFrameWndClass, szTitle, + WS_OVERLAPPEDWINDOW | WS_EX_CLIENTEDGE, + rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, + NULL, hMenuFrame, hInstance, NULL/*lpParam*/); + } else { + hFrameWnd = CreateWindowEx(0, (LPCTSTR)(int)hFrameWndClass, szTitle, + WS_OVERLAPPEDWINDOW | WS_EX_CLIENTEDGE, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + NULL, hMenuFrame, hInstance, NULL/*lpParam*/); + } + + + if (!hFrameWnd) { + return FALSE; + } + + // Create the status bar + hStatusBar = CreateStatusWindow(WS_VISIBLE|WS_CHILD|WS_CLIPSIBLINGS|SBT_NOBORDERS, + _T(""), hFrameWnd, STATUS_WINDOW); + if (hStatusBar) { + // Create the status bar panes + SetupStatusBar(hFrameWnd, FALSE); + CheckMenuItem(GetSubMenu(hMenuFrame, ID_VIEW_MENU), ID_VIEW_STATUSBAR, MF_BYCOMMAND|MF_CHECKED); + } + ShowWindow(hFrameWnd, nCmdShow); + UpdateWindow(hFrameWnd); + return TRUE; +} + +//////////////////////////////////////////////////////////////////////////////// + +void ExitInstance(void) +{ + DestroyMenu(hMenuFrame); +} + + +int APIENTRY ControlMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPCTSTR pCmdLine, + int nCmdShow) +{ + MSG msg; + HACCEL hAccel; + + // Initialize global strings + LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); + LoadString(hInstance, IDC_CONTROL, szWindowClass, MAX_LOADSTRING); + + // Store instance handle in our global variable + hInst = hInstance; + + // Perform application initialization: + if (!InitInstance(hInstance, nCmdShow)) { + return FALSE; + } + hAccel = LoadAccelerators(hInstance, (LPCTSTR)IDC_CONTROL); + + // Main message loop: + while (GetMessage(&msg, (HWND)NULL, 0, 0)) { + if (!TranslateAccelerator(msg.hwnd, hAccel, &msg)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } + ExitInstance(); + return msg.wParam; +} + +//////////////////////////////////////////////////////////////////////////////// + +CPlApplet* Control_UnloadApplet(CPlApplet* applet) +{ + unsigned i; + CPlApplet* next; + + for (i = 0; i < applet->count; i++) { + if (!applet->info[i].dwSize) continue; + applet->proc(applet->hWnd, CPL_STOP, i, applet->info[i].lData); + } + if (applet->proc) applet->proc(applet->hWnd, CPL_EXIT, 0L, 0L); + FreeLibrary(applet->hModule); + next = applet->next; + HeapFree(GetProcessHeap(), 0, applet); + return next; +} + +CPlApplet* Control_LoadApplet(HWND hWnd, LPCTSTR cmd, CPlApplet** pListHead) +{ + CPlApplet* applet; + unsigned i; + CPLINFO info; + + if (!(applet = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*applet)))) + return applet; + applet->hWnd = hWnd; + if (!(applet->hModule = LoadLibrary(cmd))) { + TRACE(_T("Cannot load control panel applet %s\n"), cmd); + goto theError; + } + if (!(applet->proc = (APPLET_PROC)GetProcAddress(applet->hModule, "CPlApplet"))) { +// if (!(applet->proc = (APPLET_PROC)GetProcAddress(applet->hModule, "_CPlApplet@16"))) { + TRACE(_T("Not a valid control panel applet %s\n"), cmd); + goto theError; + } + if (!applet->proc(hWnd, CPL_INIT, 0L, 0L)) { + TRACE(_T("Init of applet has failed\n")); + goto theError; + } + if ((applet->count = applet->proc(hWnd, CPL_GETCOUNT, 0L, 0L)) == 0) { + TRACE(_T("No subprogram in applet\n")); + goto theError; + } + applet = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, applet, +// sizeof(*applet) + (applet->count - 1) * sizeof(NEWCPLINFOA)); + sizeof(*applet) + (applet->count - 0) * sizeof(NEWCPLINFO)); + for (i = 0; i < applet->count; i++) { +// applet->info[i].dwSize = sizeof(NEWCPLINFOA); + applet->info[i].dwSize = sizeof(NEWCPLINFO); + /* proc is supposed to return a null value upon success for + * CPL_INQUIRE and CPL_NEWINQUIRE + * However, real drivers don't seem to behave like this + * So, use introspection rather than return value + */ + applet->info[i].hIcon = 0; + applet->proc(hWnd, CPL_NEWINQUIRE, i, (LPARAM)&applet->info[i]); + if (applet->info[i].hIcon == 0) { + applet->proc(hWnd, CPL_INQUIRE, i, (LPARAM)&info); + if (info.idIcon == 0 || info.idName == 0) { + TRACE(_T("Couldn't get info from sp %u\n"), i); + applet->info[i].dwSize = 0; + } else { + /* convert the old data into the new structure */ + applet->info[i].dwFlags = 0; + applet->info[i].dwHelpContext = 0; + applet->info[i].lData = info.lData; +// applet->info[i].hIcon = LoadIcon(applet->hModule, (LPCTSTR)MAKEINTRESOURCEA(info.idIcon)); +// applet->info[i].hIcon = LoadIcon(applet->hModule, (LPCTSTR)MAKEINTRESOURCE(info.idIcon)); + applet->info[i].hIcon = LoadImage(applet->hModule, (LPCTSTR)info.idIcon, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE); + + LoadString(applet->hModule, info.idName, applet->info[i].szName, sizeof(applet->info[i].szName)/sizeof(TCHAR)); + //LoadString(applet->hModule, info.idInfo, applet->info[i].szInfo, sizeof(applet->info[i].szInfo)/sizeof(TCHAR)); + //applet->info[i].szHelpFile[0] = '\0'; + LoadString(applet->hModule, info.idInfo, applet->info[i].szInfo, 192); + } + } else { + TRACE(_T("Using CPL_NEWINQUIRE data\n")); + } + } + applet->next = *pListHead; + *pListHead = applet; + return applet; +theError: + Control_UnloadApplet(applet); + return NULL; +} + +void Control_DoLaunch(CPlApplet** pListHead, HWND hWnd, LPCTSTR cmd) + /* forms to parse: + * foo.cpl,@sp,str + * foo.cpl,@sp + * foo.cpl,,str + * foo.cpl @sp + * foo.cpl str + */ +{ + TCHAR* buffer; + TCHAR* beg = NULL; + TCHAR* end; + TCHAR ch; + unsigned sp = 0; + TCHAR* extraPmts = NULL; + + buffer = HeapAlloc(GetProcessHeap(), 0, _tcslen(cmd) + 1); + if (!buffer) return; + + end = _tcscpy(buffer, cmd); + + for (;;) { + ch = *end; + if (ch == _T(' ') || ch == _T(',') || ch == _T('\0')) { + *end = _T('\0'); + if (beg) { + if (*beg == _T('@')) { + sp = _ttoi(beg + 1); + } else if (*beg == _T('\0')) { + sp = 0; + } else { + extraPmts = beg; + } + } + if (ch == _T('\0')) break; + beg = end + 1; + if (ch == _T(' ')) while (end[1] == _T(' ')) end++; + } + end++; + } +#if 1 + Control_LoadApplet(hWnd, buffer, pListHead); + if (*pListHead) { + CPlApplet* applet = *pListHead; + assert(applet && applet->next == NULL); + if (sp >= applet->count) { + TRACE(_T("Out of bounds (%u >= %u), setting to 0\n"), sp, applet->count); + sp = 0; + } + if (applet->info[sp].dwSize) { + if (!applet->proc(applet->hWnd, CPL_STARTWPARMS, sp, (LPARAM)extraPmts)) + applet->proc(applet->hWnd, CPL_DBLCLK, sp, applet->info[sp].lData); + } + Control_UnloadApplet(applet); + } +#else + +//static void Control_LaunchApplet(HWND hWnd, CPlEntry* pCPlEntry) + +#endif + HeapFree(GetProcessHeap(), 0, buffer); +} + +//int APIENTRY ControlMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPCTSTR lpCmdLine, int nCmdShow); + +VOID Control_RunDLL(HWND hWnd, HINSTANCE hInst_unused, LPCTSTR lpCmdLine, DWORD nCmdShow) +{ + CPanel panel; +// TRACE("(0x%08x, 0x%08lx, %s, 0x%08lx)\n", hWnd, (DWORD)hInst, debugstr_a(lpCmdLine), nCmdShow); + + memset(&panel, 0, sizeof(panel)); + + if (!lpCmdLine || !*lpCmdLine) { +#ifdef _USE_WINE_WND_ + Control_DoWindow(&panel, hWnd, hInst); +#else + ControlMain(hInst, NULL, lpCmdLine, nCmdShow); +#endif + } else { + Control_DoLaunch(&panel.first, hWnd, lpCmdLine); + } +} + + +//////////////////////////////////////////////////////////////////////////////// +#ifdef _USE_WINE_WND_ + +static void Control_WndProc_Create(HWND hWnd, const CREATESTRUCTA* cs) +{ + CPanel* panel = (CPanel*)cs->lpCreateParams; + + SetWindowLong(hWnd, 0, (LPARAM)panel); + panel->status = 0; + panel->hWnd = hWnd; +} + +#define XICON 32 +#define XSTEP 128 +#define YICON 32 +#define YSTEP 64 + +static BOOL Control_Localize(const CPanel* panel, unsigned cx, unsigned cy, + CPlApplet** papplet, unsigned* psp) +{ + unsigned i, x = (XSTEP-XICON)/2, y = 0; + CPlApplet* applet; + RECT rc; + + GetClientRect(panel->hWnd, &rc); + for (applet = panel->first; applet; applet = applet = applet->next) { + for (i = 0; i < applet->count; i++) { + if (!applet->info[i].dwSize) continue; + if (x + XSTEP >= rc.right - rc.left) { + x = (XSTEP-XICON)/2; + y += YSTEP; + } + if (cx >= x && cx < x + XICON && cy >= y && cy < y + YSTEP) { + *papplet = applet; + *psp = i; + return TRUE; + } + x += XSTEP; + } + } + return FALSE; +} + +static LRESULT Control_WndProc_Paint(const CPanel* panel, WPARAM wParam) +{ + HDC hdc; + PAINTSTRUCT ps; + RECT rc, txtRect; + unsigned i, x = 0, y = 0; + CPlApplet* applet; + HGDIOBJ hOldFont; + + hdc = (wParam) ? (HDC)wParam : BeginPaint(panel->hWnd, &ps); + hOldFont = SelectObject(hdc, GetStockObject(ANSI_VAR_FONT)); + GetClientRect(panel->hWnd, &rc); + for (applet = panel->first; applet; applet = applet = applet->next) { + for (i = 0; i < applet->count; i++) { + if (x + XSTEP >= rc.right - rc.left) { + x = 0; + y += YSTEP; + } + if (!applet->info[i].dwSize) continue; + DrawIcon(hdc, x + (XSTEP-XICON)/2, y, applet->info[i].hIcon); + txtRect.left = x; + txtRect.right = x + XSTEP; + txtRect.top = y + YICON; + txtRect.bottom = y + YSTEP; + DrawText(hdc, applet->info[i].szName, -1, &txtRect, + DT_CENTER | DT_VCENTER); + x += XSTEP; + } + } + SelectObject(hdc, hOldFont); + if (!wParam) EndPaint(panel->hWnd, &ps); + return 0; +} + +static LRESULT Control_WndProc_LButton(CPanel* panel, LPARAM lParam, BOOL up) +{ + unsigned i; + CPlApplet* applet; + + if (Control_Localize(panel, LOWORD(lParam), HIWORD(lParam), &applet, &i)) { + if (up) { + if (panel->clkApplet == applet && panel->clkSP == i) { + applet->proc(applet->hWnd, CPL_DBLCLK, i, applet->info[i].lData); + } + } else { + panel->clkApplet = applet; + panel->clkSP = i; + } + } + return 0; +} + +//static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg, +static LRESULT __stdcall Control_WndProc(HWND hWnd, UINT wMsg, + WPARAM lParam1, LPARAM lParam2) +{ + CPanel* panel = (CPanel*)GetWindowLongA(hWnd, 0); + + if (panel || wMsg == WM_CREATE) { + switch (wMsg) { + case WM_CREATE: + Control_WndProc_Create(hWnd, (CREATESTRUCTA*)lParam2); + return 0; + case WM_DESTROY: + while ((panel->first = Control_UnloadApplet(panel->first))); + break; + case WM_PAINT: + return Control_WndProc_Paint(panel, lParam1); + case WM_LBUTTONUP: + return Control_WndProc_LButton(panel, lParam2, TRUE); + case WM_LBUTTONDOWN: + return Control_WndProc_LButton(panel, lParam2, FALSE); +/* EPP case WM_COMMAND: */ +/* EPP return Control_WndProc_Command(mwi, lParam1, lParam2); */ + } + } + + return DefWindowProcA(hWnd, wMsg, lParam1, lParam2); +} + +static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst) +{ + WNDCLASS wc; + MSG msg; + + wc.style = CS_HREDRAW|CS_VREDRAW; + wc.lpfnWndProc = Control_WndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = sizeof(CPlApplet*); + wc.hInstance = hInst; + wc.hIcon = 0; + wc.hCursor = 0; + wc.hbrBackground = GetStockObject(WHITE_BRUSH); + wc.lpszMenuName = NULL; + wc.lpszClassName = "Shell_Control_WndClass"; + + if (!RegisterClass(&wc)) return; + + CreateWindowEx(0, wc.lpszClassName, "Wine Control Panel", + WS_OVERLAPPEDWINDOW | WS_VISIBLE, + CW_USEDEFAULT, CW_USEDEFAULT, + CW_USEDEFAULT, CW_USEDEFAULT, + hWnd, (HMENU)0, hInst, panel); + if (!panel->hWnd) return; + while (GetMessage(&msg, panel->hWnd, 0, 0)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + if (!panel->first) break; + } +} + +static void Control_DoWindow(CPanel* panel, HWND hWnd, HINSTANCE hInst) +{ + HANDLE h; + WIN32_FIND_DATA fd; + TCHAR buffer[MAX_PATH]; + + /* TRACE: should grab path somewhere from configuration */ + if ((h = FindFirstFile("c:\\winnt\\system32\\*.cpl", &fd)) != 0) { + do { + sprintf(buffer, "c:\\winnt\\system32\\%s", fd.cFileName); + if (!strstr(fd.cFileName, "powercfg")) { + Control_LoadApplet(hWnd, buffer, panel); + } + } while (FindNextFile(h, &fd)); + FindClose(h); + } + + if (panel->first) Control_DoInterface(panel, hWnd, hInst); +} + +#endif // _USE_WINE_WND_ + +#if 0 +/************************************************************************* + * Control_RunDLL [SHELL32.@] + * + */ + +VOID WINAPI +Control_RunDLL(HWND hWnd, HINSTANCE hInst_unused, LPCSTR lpCmdLine, DWORD nCmdShow) +{ +// TRACE("(0x%08x, 0x%08lx, %s, 0x%08lx)\n", hWnd, (DWORD)hInst, debugstr_a(lpCmdLine), nCmdShow); +} + +/************************************************************************* + * Control_FillCache_RunDLL [SHELL32.@] + * + */ +HRESULT WINAPI +Control_FillCache_RunDLL(HWND hWnd, HANDLE hModule, DWORD w, DWORD x) +{ + TRACE(_T("0x%04x 0x%04x 0x%04lx 0x%04lx stub\n"), hWnd, hModule, w, x); + return 0; +} + +/************************************************************************* + * RunDLL_CallEntry16 [SHELL32.122] + * the name is probably wrong + */ +HRESULT WINAPI +RunDLL_CallEntry16(DWORD v, DWORD w, DWORD x, DWORD y, DWORD z) +{ + TRACE(_T("0x%04lx 0x%04lx 0x%04lx 0x%04lx 0x%04lx stub\n"),v,w,x,y,z); + return 0; +} + +/************************************************************************* + * CallCPLEntry16 [SHELL32.166] + * + * called by desk.cpl on "Advanced" with: + * hMod("DeskCp16.Dll"), pFunc("CplApplet"), 0, 1, 0xc, 0 + * + */ +DWORD WINAPI +CallCPLEntry16(HMODULE hMod, FARPROC pFunc, DWORD dw3, DWORD dw4, DWORD dw5, DWORD dw6) +{ + TRACE(_T("(%04x, %p, %08lx, %08lx, %08lx, %08lx): stub.\n"), hMod, pFunc, dw3, dw4, dw5, dw6); + return 0x0deadbee; +} +#endif diff --git a/reactos/lib/shell32/control/control.h b/reactos/lib/shell32/control/control.h new file mode 100644 index 00000000000..ca6157c0875 --- /dev/null +++ b/reactos/lib/shell32/control/control.h @@ -0,0 +1,174 @@ +/* + * ReactOS shell32 - Control Panel + * + * control.h + * + * Copyright (C) 2002 Robert Dickenson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __CONTROL_H__ +#define __CONTROL_H__ + +#ifdef __cplusplus +extern "C" { +#endif + + +#include "resource.h" + +#define STATUS_WINDOW 2001 +#define TREE_WINDOW 2002 +#define LIST_WINDOW 2003 + +#define MAX_LOADSTRING 100 +#define SPLIT_WIDTH 5 +#define MAX_NAME_LEN 500 + +#define MAX_CPL_NAME 128 +#define MAX_CPL_INFO 128 + +//////////////////////////////////////////////////////////////////////////////// +/* +typedef struct tagNEWCPLINFO { + DWORD dwSize; + DWORD dwFlags; + DWORD dwHelpContext; + LONG lData; + HICON hIcon; + TCHAR szName[32]; + TCHAR szInfo[64]; + TCHAR szHelpFile[128]; +} NEWCPLINFO; + + */ +typedef struct tagCPLAppletINFO { + DWORD dwSize; + DWORD dwFlags; + DWORD dwHelpContext; + LONG lData; + HICON hIcon; + TCHAR szName[32]; + TCHAR szInfo[192]; +// TCHAR szHelpFile[128]; +} CPLAppletINFO; + + +typedef struct CPlApplet { + struct CPlApplet* next; /* linked list */ + HWND hWnd; + unsigned count; /* number of subprograms */ + HMODULE hModule; /* module of loaded applet */ + TCHAR filename[MAX_PATH]; + APPLET_PROC proc; /* entry point address */ + NEWCPLINFO info[1]; /* array of count information. dwSize field is 0 if entry is invalid */ +} CPlApplet; + +typedef struct CPlEntry { + CPlApplet* pCPlApplet; /* which cpl module we are associated with (contained in) */ + HWND hWnd; /* handle to existing window if we are already launched */ + unsigned nSubProg; /* which sub-program we are within the CPlApplet */ + unsigned nIconIndex; /* */ + long lData; +// union { +// NEWCPLINFO NewCplInfo; +// CPLAppletINFO AppletInfo; +// } info; +} CPlEntry; + +typedef struct CPanel { + CPlApplet* first; /* linked list */ + HWND hWnd; + unsigned status; + CPlApplet* clkApplet; + unsigned clkSP; +} CPanel; + +#ifndef CPL_STARTWPARMSW +#undef CPL_STARTWPARMS +#define CPL_STARTWPARMSW 10 +#ifdef UNICODE +#define CPL_STARTWPARMS CPL_STARTWPARMSW +#else +#define CPL_STARTWPARMS CPL_STARTWPARMSA +#endif +#endif + + +enum OPTION_FLAGS { + OPTIONS_AUTO_REFRESH = 0x01, + OPTIONS_READ_ONLY_MODE = 0x02, + OPTIONS_CONFIRM_ON_DELETE = 0x04, + OPTIONS_SAVE_ON_EXIT = 0x08, + OPTIONS_DISPLAY_BINARY_DATA = 0x10, + OPTIONS_VIEW_TREE_ONLY = 0x20, + OPTIONS_VIEW_DATA_ONLY = 0x40, +}; + +typedef struct { + HWND hWnd; + HWND hTreeWnd; + HWND hListWnd; + int nFocusPanel; // 0: left 1: right + int nSplitPos; + WINDOWPLACEMENT pos; + TCHAR szPath[MAX_PATH]; +} ChildWnd; + +//////////////////////////////////////////////////////////////////////////////// +// Global Variables: +// +extern HINSTANCE hInst; +extern HWND hFrameWnd; +extern HMENU hMenuFrame; +extern HWND hStatusBar; +extern HFONT hFont; +extern enum OPTION_FLAGS Options; + +extern TCHAR szTitle[]; +extern TCHAR szWindowClass[]; + +void Control_DoLaunch(CPlApplet** pListHead, HWND hWnd, LPCTSTR cmd); +CPlApplet* Control_LoadApplet(HWND hWnd, LPCTSTR cmd, CPlApplet** pListHead); +CPlApplet* Control_UnloadApplet(CPlApplet* applet); + + +#ifdef __GNUC__ +typedef struct tagNMITEMACTIVATE{ + NMHDR hdr; + int iItem; + int iSubItem; + UINT uNewState; + UINT uOldState; + UINT uChanged; + POINT ptAction; + LPARAM lParam; + UINT uKeyFlags; +} NMITEMACTIVATE, FAR *LPNMITEMACTIVATE; +#define HDITEM HD_ITEM +#define LPNMLISTVIEW LPNM_LISTVIEW +#define NMLISTVIEW NM_LISTVIEW +#define HDN_ENDDRAG TBN_ENDDRAG +#define LVSICF_NOSCROLL LVS_NOSCROLL +#define HDM_GETORDERARRAY (HDM_FIRST+19) // TODO: FIX ME +#endif + + +#ifdef __cplusplus +}; +#endif + +#endif // __CONTROL_H__ diff --git a/reactos/lib/shell32/control/framewnd.c b/reactos/lib/shell32/control/framewnd.c new file mode 100644 index 00000000000..0a4d5fa1b6e --- /dev/null +++ b/reactos/lib/shell32/control/framewnd.c @@ -0,0 +1,458 @@ +/* + * ReactOS shell32 - Control Panel Frame Window implementation + * + * framewnd.c + * + * Copyright (C) 2002 Robert Dickenson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#include +#include +#include +#include +#include +#include +#include +#include + +#include "control.h" +#include "framewnd.h" +#include "settings.h" +#include "listview.h" +//#include +#include "trace.h" + + +#ifdef __GNUC__ +int WINAPI ShellAboutA(HWND,LPCSTR,LPCSTR,HICON); +int WINAPI ShellAboutW(HWND,LPCWSTR,LPCWSTR,HICON); +#else +int ShellAboutA(HWND,LPCSTR,LPCSTR,HICON); +int ShellAboutW(HWND,LPCWSTR,LPCWSTR,HICON); +#endif + + +//////////////////////////////////////////////////////////////////////////////// +// Global and Local Variables: +// + +DWORD nListStyle; +DWORD nSortOrder; + +static int nSelectedItem; +static HWND hListWnd; +static BOOL bInMenuLoop = FALSE; // Tells us if we are in the menu loop + +//////////////////////////////////////////////////////////////////////////////// +// Local module support methods +// + +static void resize_frame_rect(HWND hWnd, PRECT prect) +{ + RECT rt; +/* + if (IsWindowVisible(hToolBar)) { + SendMessage(hToolBar, WM_SIZE, 0, 0); + GetClientRect(hToolBar, &rt); + prect->top = rt.bottom+3; + prect->bottom -= rt.bottom+3; + } + */ + if (IsWindowVisible(hStatusBar)) { + SetupStatusBar(hWnd, TRUE); + GetClientRect(hStatusBar, &rt); + prect->bottom -= rt.bottom; + } + MoveWindow(hListWnd, prect->left, prect->top, prect->right, prect->bottom, TRUE); +} + +void resize_frame_client(HWND hWnd) +{ + RECT rect; + + GetClientRect(hWnd, &rect); + resize_frame_rect(hWnd, &rect); +} + +//////////////////////////////////////////////////////////////////////////////// + +static void OnEnterMenuLoop(HWND hWnd) +{ + int nParts; + + // Update the status bar pane sizes + nParts = -1; + SendMessage(hStatusBar, SB_SETPARTS, 1, (long)&nParts); + bInMenuLoop = TRUE; + SendMessage(hStatusBar, SB_SETTEXT, (WPARAM)0, (LPARAM)_T("")); +} + +static void OnExitMenuLoop(HWND hwndLV, HWND hWnd) +{ + bInMenuLoop = FALSE; + // Update the status bar pane sizes + SetupStatusBar(hWnd, TRUE); + UpdateStatusBar(hwndLV, -1); +} + +static void OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu) +{ + TCHAR str[100]; + + _tcscpy(str, _T("")); + if (nFlags & MF_POPUP) { + if (hSysMenu != GetMenu(hWnd)) { + if (nItemID == 2) nItemID = 5; + } + } + if (LoadString(hInst, nItemID, str, 100)) { + // load appropriate string + LPTSTR lpsz = str; + // first newline terminates actual string + lpsz = _tcschr(lpsz, '\n'); + if (lpsz != NULL) + *lpsz = '\0'; + } + SendMessage(hStatusBar, SB_SETTEXT, 0, (LPARAM)str); +} + +void SetupStatusBar(HWND hWnd, BOOL bResize) +{ + RECT rc; + int nParts; + GetClientRect(hWnd, &rc); + nParts = rc.right; +// nParts = -1; + if (bResize) + SendMessage(hStatusBar, WM_SIZE, 0, 0); + SendMessage(hStatusBar, SB_SETPARTS, 1, (LPARAM)&nParts); +} + +void UpdateStatusBar(HWND hwndLV, int list_index) +{ + static int last_list_index; + TCHAR buffer[MAX_CPL_INFO]; + LVITEM item; + + if (list_index == -1) list_index = last_list_index; + last_list_index = list_index; + //LPNMLISTVIEW pnmv = (LPNMLISTVIEW)lParam; + //CPlEntry* pCPlEntry pCPLInfo = pnmv->lParam + item.mask = LVIF_TEXT; + item.iItem = last_list_index; + item.pszText = buffer; + item.cchTextMax = MAX_CPL_INFO; + item.iSubItem = 1; + if (ListView_GetItem(hwndLV, &item)) { + SendMessage(hStatusBar, SB_SETTEXT, 0, (LPARAM)buffer); + } +} + +static void toggle_child(HWND hWnd, UINT cmd, HWND hchild) +{ + BOOL vis = IsWindowVisible(hchild); + HMENU hMenuView = GetSubMenu(hMenuFrame, ID_VIEW_MENU); + + CheckMenuItem(hMenuView, cmd, vis?MF_BYCOMMAND:MF_BYCOMMAND|MF_CHECKED); + ShowWindow(hchild, vis?SW_HIDE:SW_SHOW); + resize_frame_client(hWnd); +} + +static void OnPaint(HWND hWnd) +{ + PAINTSTRUCT ps; + RECT rt; + HDC hdc; + + GetClientRect(hWnd, &rt); + hdc = BeginPaint(hWnd, &ps); + FillRect(ps.hdc, &rt, GetStockObject(LTGRAY_BRUSH)); + EndPaint(hWnd, &ps); +} + +static void SetListSytle(DWORD view) +{ + HMENU hMenuView = GetSubMenu(hMenuFrame, ID_VIEW_MENU); + DWORD dwListStyle = GetWindowLong(hListWnd, GWL_STYLE); + dwListStyle &= ~(LVS_ICON | LVS_SMALLICON | LVS_LIST | LVS_REPORT); + nListStyle = view; + switch (view) { + case ID_VIEW_LARGE_ICONS: + dwListStyle |= LVS_ICON; + break; + case ID_VIEW_SMALL_ICONS: + dwListStyle |= LVS_SMALLICON; + break; + case ID_VIEW_LIST: + dwListStyle |= LVS_LIST; + break; + default: + nListStyle = ID_VIEW_DETAILS; + case ID_VIEW_DETAILS: + dwListStyle |= LVS_REPORT; + break; + } + SetWindowLong(hListWnd, GWL_STYLE, dwListStyle); + CheckMenuItem(hMenuView, ID_VIEW_LARGE_ICONS, MF_BYCOMMAND); + CheckMenuItem(hMenuView, ID_VIEW_SMALL_ICONS, MF_BYCOMMAND); + CheckMenuItem(hMenuView, ID_VIEW_LIST, MF_BYCOMMAND); + CheckMenuItem(hMenuView, ID_VIEW_DETAILS, MF_BYCOMMAND); + CheckMenuItem(hMenuView, nListStyle, MF_BYCOMMAND|MF_CHECKED); +} + +void SetViewArrangement(DWORD cmd) +{ + DWORD dwListStyle = GetWindowLong(hListWnd, GWL_STYLE); + HMENU hMenuView = GetSubMenu(hMenuFrame, ID_VIEW_MENU); + nSortOrder = cmd; + dwListStyle &= ~(LVS_AUTOARRANGE); + switch (cmd) { + case ID_VIEW_ARRANGE_BY_NAME: + SortListView(hListWnd, 0); + break; + case ID_VIEW_ARRANGE_BY_COMMENT: + SortListView(hListWnd, 1); + break; + default: + nSortOrder = ID_VIEW_ARRANGE_AUTO; + case ID_VIEW_ARRANGE_AUTO: + SortListView(hListWnd, -1); + dwListStyle |= LVS_AUTOARRANGE; + break; + } + SetWindowLong(hListWnd, GWL_STYLE, dwListStyle); + CheckMenuItem(hMenuView, ID_VIEW_ARRANGE_BY_NAME, MF_BYCOMMAND); + CheckMenuItem(hMenuView, ID_VIEW_ARRANGE_BY_COMMENT, MF_BYCOMMAND); + CheckMenuItem(hMenuView, ID_VIEW_ARRANGE_AUTO, MF_BYCOMMAND); + CheckMenuItem(hMenuView, nSortOrder, MF_BYCOMMAND|MF_CHECKED); +} + +//////////////////////////////////////////////////////////////////////////////// +// +// FUNCTION: _CmdWndProc(HWND, unsigned, WORD, LONG) +// +// PURPOSE: Processes WM_COMMAND messages for the main frame window. +// +// + +static void OnFileOpen(HWND hWnd) +{ + LVITEM item; + + item.mask = LVIF_PARAM; + item.iItem = nSelectedItem; + item.iSubItem = 0; + if (ListView_GetItem(hListWnd, &item)) { + Control_LaunchApplet(hListWnd, (CPlEntry*)item.lParam); + } +} + +static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (LOWORD(wParam)) { + // Parse the menu selections: + case ID_FILE_OPEN: + OnFileOpen(hWnd); + break; + case ID_FILE_EXIT: + DestroyWindow(hWnd); + break; + case ID_VIEW_REFRESH: + RefreshListView(hListWnd, NULL); + break; + case ID_VIEW_LARGE_ICONS: + case ID_VIEW_SMALL_ICONS: + case ID_VIEW_LIST: + case ID_VIEW_DETAILS: + SetListSytle(LOWORD(wParam)); + break; + case ID_VIEW_STATUSBAR: + toggle_child(hWnd, LOWORD(wParam), hStatusBar); + break; + case ID_VIEW_ARRANGE_BY_NAME: + case ID_VIEW_ARRANGE_BY_COMMENT: + case ID_VIEW_ARRANGE_AUTO: + SetViewArrangement(LOWORD(wParam)); + break; + case ID_VIEW_LINE_UP_ICONS: + ListView_Arrange(hListWnd, LVA_DEFAULT ); + break; + case ID_HELP_ABOUT: +#ifdef UNICODE + ShellAboutW(hWnd, szTitle, L"", LoadIcon(hInst, (LPCTSTR)IDI_CONTROL)); +#else + ShellAboutA(hWnd, szTitle, "", LoadIcon(hInst, (LPCTSTR)IDI_CONTROL)); +#endif + break; + default: + return FALSE; + } + return TRUE; +} + +extern CPlApplet* pListHead; // holds pointer to linked list of cpl modules CPlApplet* + +static void OnLeftClick(HWND hWnd, NMITEMACTIVATE* nmitem) +{ + //HMENU hMenu = NULL; + LVHITTESTINFO info; + + info.pt.x = nmitem->ptAction.x; + info.pt.y = nmitem->ptAction.y; + if (ListView_HitTest(hListWnd, &info) != -1) { + LVITEM item; + item.mask = LVIF_PARAM; + item.iItem = info.iItem; + if (ListView_GetItem(hListWnd, &item)) { + //Control_LaunchApplet(hWnd, (CPlEntry*)item.lParam); + //hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_CONTROL_CONTEXT_APPLET)); + } + } else { + TCHAR buffer[MAX_CPL_INFO]; + int obj_count = ListView_GetItemCount(hListWnd); + int cpl_count = 0; + int cpl_locked_count = 0; + CPlApplet* applet = pListHead; + while (applet) { + ++cpl_count; + if (applet->hModule) ++cpl_locked_count; + applet = applet->next; + } + + + TRACE(_T("OnLeftClick(0x%08X) - %u\n"), hWnd, obj_count); + + wsprintf(buffer, _T("%u applets in %u libraries (%u locked)"), obj_count, cpl_count, cpl_locked_count); + SendMessage(hStatusBar, SB_SETTEXT, 0, (LPARAM)buffer); + } +} + +static void OnRightClick(HWND hWnd, NMITEMACTIVATE* nmitem) +{ + HMENU hMenu = NULL; + LVHITTESTINFO info; + info.pt.x = nmitem->ptAction.x; + info.pt.y = nmitem->ptAction.y; + if (ListView_HitTest(hListWnd, &info) != -1) { + LVITEM item; + item.mask = LVIF_PARAM; + item.iItem = info.iItem; + if (ListView_GetItem(hListWnd, &item)) { + //Control_LaunchApplet(hWnd, (CPlEntry*)item.lParam); + hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_CONTROL_CONTEXT_APPLET)); + } + } + if (!hMenu) { + hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_CONTROL_CONTEXT)); + } + if (hMenu) { + HMENU hSubMenu = GetSubMenu(hMenu, 0); + if (hSubMenu) { + POINT pt; + GetCursorPos(&pt); + TrackPopupMenu(hSubMenu, TPM_LEFTALIGN|TPM_TOPALIGN|TPM_LEFTBUTTON, pt.x, pt.y, 0, hWnd, NULL); + } + DestroyMenu(hMenu); + } +} + +//////////////////////////////////////////////////////////////////////////////// +// +// FUNCTION: FrameWndProc(HWND, unsigned, WORD, LONG) +// +// PURPOSE: Processes messages for the main frame window. +// +// WM_COMMAND - process the application menu +// WM_DESTROY - post a quit message and return +// +// + +LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + RECT rect; + + switch (message) { + case WM_CREATE: + hListWnd = CreateListView(hWnd, LIST_WINDOW); + SetListSytle(nListStyle); + SetViewArrangement(nSortOrder); + break; + case WM_NOTIFY: + { + NMITEMACTIVATE* nmitem = (LPNMITEMACTIVATE)lParam; + if (nmitem->hdr.idFrom == LIST_WINDOW) { + switch (((LPNMHDR)lParam)->code) { + case LVN_ITEMCHANGED: + nSelectedItem = ((LPNMLISTVIEW)lParam)->iItem; + UpdateStatusBar(hListWnd, ((LPNMLISTVIEW)lParam)->iItem); + break; + //case NM_DBLCLK: + //OnDblClick(hWnd, nmitem); + //break; + case NM_RETURN: + OnFileOpen(hWnd); + break; + case NM_CLICK: + OnLeftClick(hWnd, nmitem); + break; + case NM_RCLICK: + OnRightClick(hWnd, nmitem); + break; + //default: + //return FALSE; + } + if (ListViewNotifyProc(hListWnd, message, wParam, lParam)) + return TRUE; + } + } + return DefWindowProc(hWnd, message, wParam, lParam); + case WM_COMMAND: + if (!_CmdWndProc(hWnd, message, wParam, lParam)) { + return DefWindowProc(hWnd, message, wParam, lParam); + } + break; + case WM_PAINT: + OnPaint(hWnd); + return 0; + case WM_SIZE: + resize_frame_client(hWnd); + //if (nSortOrder == ID_VIEW_ARRANGE_AUTO) SetViewArrangement(nSortOrder); + //if (nSortOrder == ID_VIEW_ARRANGE_AUTO) ListView_Update(hListWnd, 0); + break; + case WM_TIMER: + break; + case WM_ENTERMENULOOP: + OnEnterMenuLoop(hWnd); + break; + case WM_EXITMENULOOP: + OnExitMenuLoop(hListWnd, hWnd); + break; + case WM_MENUSELECT: + OnMenuSelect(hWnd, LOWORD(wParam), HIWORD(wParam), (HMENU)lParam); + break; + case WM_DESTROY: + GetWindowRect(hWnd, &rect); + SaveSettings(&rect); + DestroyListView(hListWnd); + PostQuitMessage(0); + break; + default: + return DefWindowProc(hWnd, message, wParam, lParam); + } + return 0; +} diff --git a/reactos/lib/shell32/control/framewnd.h b/reactos/lib/shell32/control/framewnd.h new file mode 100644 index 00000000000..156a544ab7a --- /dev/null +++ b/reactos/lib/shell32/control/framewnd.h @@ -0,0 +1,45 @@ +/* + * ReactOS shell32 - Control Panel Frame Window implementation + * + * framewnd.h + * + * Copyright (C) 2002 Robert Dickenson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __FRAMEWND_H__ +#define __FRAMEWND_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM); + +void SetupStatusBar(HWND hWnd, BOOL bResize); +void UpdateStatusBar(HWND hwndLV, int list_index); + + +#ifdef __cplusplus +}; +#endif + +#endif // __FRAMEWND_H__ diff --git a/reactos/lib/shell32/control/listview.c b/reactos/lib/shell32/control/listview.c new file mode 100644 index 00000000000..82dec802590 --- /dev/null +++ b/reactos/lib/shell32/control/listview.c @@ -0,0 +1,660 @@ +/* + * ReactOS shell32 - Control Panel ListCtrl implementation + * + * listview.c + * + * Copyright (C) 2002 Robert Dickenson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "control.h" +#include "listview.h" + +#include "assert.h" +#include "trace.h" + + +static int _GetSystemDirectory(LPTSTR buffer, int buflen) +{ +#if 0 + return GetSystemDirectory(buffer, buflen); +#else + return GetCurrentDirectory(buflen, buffer); +// if (lstrcpyn(buffer, szTestDirName, buflen - 1)) { +// return lstrlen(buffer); +// } +// return 0; +#endif +} + + +//////////////////////////////////////////////////////////////////////////////// +// Global and Local Variables: +// + +#define MAX_LIST_COLUMNS (IDS_LIST_COLUMN_LAST - IDS_LIST_COLUMN_FIRST + 1) +static int default_column_widths[MAX_LIST_COLUMNS] = { 250, 500 }; +static int column_alignment[MAX_LIST_COLUMNS] = { LVCFMT_LEFT, LVCFMT_LEFT }; + +CPlApplet* pListHead; // holds pointer to linked list of cpl modules CPlApplet* +//static CPlApplet* pListHead; // holds pointer to linked list of cpl modules CPlApplet* + + +//////////////////////////////////////////////////////////////////////////////// +// Local module support methods +// + +static void AddAppletsToListView(HWND hwndLV, CPlApplet* pApplet) +{ + LVITEM item; + UINT count; + + for (count = 0; count < pApplet->count; count++) { + int index = 0; + NEWCPLINFO* pCPLInfo = &pApplet->info[count]; + + CPlEntry* pCPlEntry; + if (!(pCPlEntry = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pCPlEntry)))) + return; + + pCPlEntry->hWnd = hwndLV; + pCPlEntry->nSubProg = count; + pCPlEntry->pCPlApplet = pApplet; + + if (pCPLInfo->hIcon) { // add the icon to an image list + HIMAGELIST hImageList; + hImageList = ListView_GetImageList(hwndLV, LVSIL_NORMAL); + index = ImageList_AddIcon(hImageList, pCPLInfo->hIcon); + hImageList = ListView_GetImageList(hwndLV, LVSIL_SMALL); + ImageList_AddIcon(hImageList, pCPLInfo->hIcon); + DestroyIcon(pCPLInfo->hIcon); + } + item.mask = LVIF_TEXT | LVIF_STATE | LVIF_IMAGE | LVIF_PARAM; + item.iItem = 0;//idx; + item.iSubItem = 0; + item.state = 0; + item.stateMask = 0; +// item.pszText = LPSTR_TEXTCALLBACK; +// item.cchTextMax = 50; + item.pszText = pCPLInfo->szName; + item.cchTextMax = _tcslen(item.pszText); + item.iImage = index; + item.lParam = (LPARAM)pCPlEntry; +#if (_WIN32_IE >= 0x0300) + item.iIndent = 0; +#endif + index = ListView_InsertItem(hwndLV, &item); + if (index != -1 && pCPLInfo->szInfo != NULL) { + ListView_SetItemText(hwndLV, index, 1, pCPLInfo->szInfo); + } + } +} + +static void CreateListColumns(HWND hwndLV) +{ + TCHAR szText[50]; + int index; + LV_COLUMN lvC; + + // Create columns. + lvC.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM; + lvC.pszText = szText; + + // Load the column labels from the resource file. + for (index = 0; index < MAX_LIST_COLUMNS; index++) { + lvC.iSubItem = index; + lvC.cx = default_column_widths[index]; + lvC.fmt = column_alignment[index]; + LoadString(hInst, IDS_LIST_COLUMN_FIRST + index, szText, 50); + if (ListView_InsertColumn(hwndLV, index, &lvC) == -1) { + // TODO: handle failure condition... + break; + } + } +} + +// InitListViewImageLists - creates image lists for a list view control. +// This function only creates image lists. It does not insert the +// items into the control, which is necessary for the control to be +// visible. +// Returns TRUE if successful, or FALSE otherwise. +// hwndLV - handle to the list view control. +static BOOL InitListViewImageLists(HWND hwndLV) +{ +// HICON hiconItem; // icon for list view items + HIMAGELIST hLarge; // image list for icon view + HIMAGELIST hSmall; // image list for other views + + // Create the full-sized icon image lists. + hLarge = ImageList_Create(GetSystemMetrics(SM_CXICON), + GetSystemMetrics(SM_CYICON), ILC_MASK, 1, 20); + hSmall = ImageList_Create(GetSystemMetrics(SM_CXSMICON), + GetSystemMetrics(SM_CYSMICON), ILC_MASK, 1, 20); + + // Add an icon to each image list. +// hiconItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ITEM)); +// hiconItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_CONTROL)); +// ImageList_AddIcon(hLarge, hiconItem); +// ImageList_AddIcon(hSmall, hiconItem); +// DestroyIcon(hiconItem); + + /********************************************************* + Usually you have multiple icons; therefore, the previous + four lines of code can be inside a loop. The following code + shows such a loop. The icons are defined in the application's + header file as resources, which are numbered consecutively + starting with IDS_FIRSTICON. The number of icons is + defined in the header file as C_ICONS. + + for(index = 0; index < C_ICONS; index++) { + hIconItem = LoadIcon (hInst, MAKEINTRESOURCE (IDS_FIRSTICON + index)); + ImageList_AddIcon(hSmall, hIconItem); + ImageList_AddIcon(hLarge, hIconItem); + Destroy(hIconItem); + } + *********************************************************/ + + // Assign the image lists to the list view control. + ListView_SetImageList(hwndLV, hLarge, LVSIL_NORMAL); + ListView_SetImageList(hwndLV, hSmall, LVSIL_SMALL); + return TRUE; +} + +typedef LONG (WINAPI *CPlApplet_Ptr)(HWND, UINT, LONG, LONG); + +static void AddEntryToList(HWND hwndLV, LPTSTR szName, LPTSTR szInfo, CPlEntry* pCPlEntry) +{ + LVITEM item; + int index; + + assert(pCPlEntry); + memset(&item, 0, sizeof(LVITEM)); + item.mask = LVIF_TEXT | LVIF_STATE | LVIF_IMAGE | LVIF_PARAM; + if (szName != NULL) { + item.pszText = szName; + item.cchTextMax = _tcslen(item.pszText); + item.iImage = pCPlEntry->nIconIndex; + } else { + item.pszText = LPSTR_TEXTCALLBACK; + item.cchTextMax = MAX_CPL_NAME; + item.iImage = I_IMAGECALLBACK; + } + item.lParam = (LPARAM)pCPlEntry; +#if (_WIN32_IE >= 0x0300) + item.iIndent = 0; +#endif + index = ListView_InsertItem(hwndLV, &item); + if (index != -1) { + if (szInfo != NULL) { + ListView_SetItemText(hwndLV, index, 1, szInfo); + } else { + ListView_SetItemText(hwndLV, index, 1, LPSTR_TEXTCALLBACK); + } + } +} + +#if 0 +/* +static CPlApplet* Control_LoadApplet(HWND hwndLV, LPTSTR buffer, CPlApplet** pListHead) +{ + HMODULE hCpl; + hCpl = LoadLibrary(buffer); + if (hCpl) { + CPlApplet_Ptr pCPlApplet; + pCPlApplet = (CPlApplet_Ptr)(FARPROC)GetProcAddress(hCpl, "CPlApplet"); + if (pCPlApplet) { + if (pCPlApplet(hwndLV, CPL_INIT, 0, 0)) { + int nSubProgs = pCPlApplet(hwndLV, CPL_GETCOUNT, 0, 0); + if (nSubProgs == 0) { + TRACE(_T("No subprogram in applet\n")); + } + + { + CPlApplet* applet; + if (!(applet = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*applet)))) { + return applet; + } + applet->next = *pListHead; + *pListHead = applet; + } + strncpy(applet->filename, buffer, MAX_PATH); + while (nSubProgs && nSubProgs--) { + CPLINFO cplInfo; + memset(&cplInfo, 0, sizeof(CPLINFO)); + pCPlApplet(hwndLV, CPL_INQUIRE, nSubProgs, (LPARAM)&cplInfo); + if (cplInfo.idName == CPL_DYNAMIC_RES) { +#if UNICODE + NEWCPLINFO cplNewInfo; + memset(&cplNewInfo, 0, sizeof(NEWCPLINFO)); + cplNewInfo.dwSize = sizeof(NEWCPLINFO); + pCPlApplet(hwndLV, CPL_NEWINQUIRE, nSubProgs, (LPARAM)&cplNewInfo); + cplNewInfo.lData = hCpl; + AddEntryToList(hwndLV, &cplNewInfo); +#endif + } else { + int index = 0; + NEWCPLINFO cplNewInfo; + memset(&cplNewInfo, 0, sizeof(NEWCPLINFO)); + cplNewInfo.dwSize = sizeof(NEWCPLINFO); + if (LoadString(hCpl, cplInfo.idName, cplNewInfo.szName, sizeof(cplNewInfo.szName)/sizeof(TCHAR))) { + } + if (LoadString(hCpl, cplInfo.idInfo, cplNewInfo.szInfo, sizeof(cplNewInfo.szInfo)/sizeof(TCHAR))) { + } + cplNewInfo.hIcon = LoadImage(hCpl, (LPCTSTR)cplInfo.idIcon, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE); + cplNewInfo.lData = (LONG)hCpl; + AddEntryToList(hwndLV, &cplNewInfo); + } + } + return TRUE; + } else { + TRACE(_T("Init of applet has failed\n")); + } + } else { + TRACE(_T("Not a valid control panel applet %s\n"), buffer); + } + FreeLibrary(hCpl); + } else { + TRACE(_T("Cannot load control panel applet %s\n"), buffer); + } + return FALSE; +} + */ +#endif + +static void LoadApplet(HWND hwndLV, LPTSTR buffer, CPlApplet** pListHead) +{ + HMODULE hModule; + hModule = LoadLibrary(buffer); + if (hModule) { + CPlApplet_Ptr pCPlApplet; + pCPlApplet = (CPlApplet_Ptr)(FARPROC)GetProcAddress(hModule, "CPlApplet"); + if (pCPlApplet) { + if (pCPlApplet(hwndLV, CPL_INIT, 0, 0)) { + CPlApplet* applet; + int nSubProgs = pCPlApplet(hwndLV, CPL_GETCOUNT, 0, 0); + if (nSubProgs == 0) { + TRACE(_T("No subprogram in applet\n")); + } + if (!(applet = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*applet)))) { + goto loadapplet_error; + } + applet->next = *pListHead; + *pListHead = applet; + _tcsncpy(applet->filename, buffer, MAX_PATH); + while (nSubProgs && nSubProgs--) { + NEWCPLINFO cplNewInfo; + memset(&cplNewInfo, 0, sizeof(NEWCPLINFO)); + cplNewInfo.dwSize = sizeof(NEWCPLINFO); + pCPlApplet(hwndLV, CPL_NEWINQUIRE, nSubProgs, (LPARAM)&cplNewInfo); + if (cplNewInfo.hIcon == 0) { + CPLINFO cplInfo; + memset(&cplInfo, 0, sizeof(CPLINFO)); + pCPlApplet(hwndLV, CPL_INQUIRE, nSubProgs, (LPARAM)&cplInfo); + if (cplInfo.idIcon == 0 || cplInfo.idName == 0) { + TRACE(_T("Couldn't get info from sp %u\n"), nSubProgs); + } else { + TCHAR szName[MAX_CPL_NAME]; + TCHAR szInfo[MAX_CPL_INFO]; + HICON hIcon = NULL; + CPlEntry* pCPlEntry; + if (!(pCPlEntry = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPlEntry)))) { + goto loadapplet_error; + } + pCPlEntry->nSubProg = nSubProgs; + pCPlEntry->lData = cplInfo.lData; + pCPlEntry->pCPlApplet = applet; + hIcon = LoadImage(hModule, (LPCTSTR)cplInfo.idIcon, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE); + LoadString(hModule, cplInfo.idName, szName, MAX_CPL_NAME); + LoadString(hModule, cplInfo.idInfo, szInfo, MAX_CPL_INFO); + if (hIcon) { // add the icon to an image list + HIMAGELIST hImageList; + hImageList = ListView_GetImageList(hwndLV, LVSIL_NORMAL); + pCPlEntry->nIconIndex = ImageList_AddIcon(hImageList, hIcon); + hImageList = ListView_GetImageList(hwndLV, LVSIL_SMALL); + ImageList_AddIcon(hImageList, hIcon); + DestroyIcon(hIcon); + } + AddEntryToList(hwndLV, szName, szInfo, pCPlEntry); + } + } else { + HIMAGELIST hImageList; + CPlEntry* pCPlEntry; + TRACE(_T("Using CPL_NEWINQUIRE data\n")); + if (!(pCPlEntry = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPlEntry)))) { + goto loadapplet_error; + } + applet->hModule = LoadLibrary(buffer); + pCPlEntry->nSubProg = nSubProgs; + pCPlEntry->lData = cplNewInfo.lData; + pCPlEntry->pCPlApplet = applet; + hImageList = ListView_GetImageList(hwndLV, LVSIL_NORMAL); + pCPlEntry->nIconIndex = ImageList_AddIcon(hImageList, cplNewInfo.hIcon); + hImageList = ListView_GetImageList(hwndLV, LVSIL_SMALL); + ImageList_AddIcon(hImageList, cplNewInfo.hIcon); + DestroyIcon(cplNewInfo.hIcon); + AddEntryToList(hwndLV, NULL, NULL, pCPlEntry); + } + } + } else { + TRACE(_T("Init of applet has failed\n")); + } + } else { + TRACE(_T("Not a valid control panel applet %s\n"), buffer); + } +loadapplet_error: + FreeLibrary(hModule); + } else { + TRACE(_T("Cannot load control panel applet %s\n"), buffer); + } +} + + +static BOOL InitListViewItems(HWND hwndLV, LPTSTR szPath) +{ + WIN32_FIND_DATA data; + HANDLE hFind; + TCHAR buffer[MAX_PATH+10], *p; + UINT length; + + length = _GetSystemDirectory(buffer, sizeof(buffer)/sizeof(TCHAR)); + p = &buffer[length]; + lstrcpy(p, _T("\\*.cpl")); + memset(&data, 0, sizeof(WIN32_FIND_DATA)); + hFind = FindFirstFile(buffer, &data); + if (hFind != INVALID_HANDLE_VALUE) { + do { + if (!(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { +#if 0 + CPlApplet* pApplet; + lstrcpy(p+1, data.cFileName); + pApplet = Control_LoadApplet(hwndLV, buffer, &pListHead); + if (pApplet != NULL) { + AddAppletsToListView(hwndLV, pApplet); + } +#else + lstrcpy(p+1, data.cFileName); + LoadApplet(hwndLV, buffer, &pListHead); +#endif + } + } while (FindNextFile(hFind, &data)); + FindClose(hFind); + } + return TRUE; +} + +// OnGetDispInfo - processes the LVN_GETDISPINFO notification message. +static void OnGetDispInfo(HWND hWnd, NMLVDISPINFO* plvdi) +{ + CPlEntry* pCPlEntry = (CPlEntry*)plvdi->item.lParam; + + plvdi->item.pszText = NULL; + plvdi->item.cchTextMax = 0; + if (pCPlEntry != NULL) { + CPlApplet* pApplet = pCPlEntry->pCPlApplet; + assert(pApplet); + if (pApplet->hModule) { + CPlApplet_Ptr pCPlApplet; + pCPlApplet = (CPlApplet_Ptr)(FARPROC)GetProcAddress(pApplet->hModule, "CPlApplet"); + if (pCPlApplet) { + static NEWCPLINFO cplNewInfo; + memset(&cplNewInfo, 0, sizeof(NEWCPLINFO)); + cplNewInfo.dwSize = sizeof(NEWCPLINFO); + pCPlApplet(hWnd, CPL_NEWINQUIRE, pCPlEntry->nSubProg, (LPARAM)&cplNewInfo); + + if (plvdi->item.mask && LVIF_IMAGE) { + if (cplNewInfo.hIcon) { // add the icon to an image list + HIMAGELIST hImageList; + hImageList = ListView_GetImageList(hWnd, LVSIL_NORMAL); + pCPlEntry->nIconIndex = ImageList_ReplaceIcon(hImageList, pCPlEntry->nIconIndex, cplNewInfo.hIcon); + hImageList = ListView_GetImageList(hWnd, LVSIL_SMALL); + ImageList_ReplaceIcon(hImageList, pCPlEntry->nIconIndex, cplNewInfo.hIcon); + DestroyIcon(cplNewInfo.hIcon); + } + plvdi->item.iImage = pCPlEntry->nIconIndex; + } + if (plvdi->item.mask && LVIF_STATE) { + } + if (plvdi->item.mask && LVIF_TEXT) { + switch (plvdi->item.iSubItem) { + case 0: + plvdi->item.pszText = cplNewInfo.szName; + plvdi->item.cchTextMax = _tcslen(plvdi->item.pszText); + break; + case 1: + plvdi->item.pszText = cplNewInfo.szInfo; + plvdi->item.cchTextMax = _tcslen(plvdi->item.pszText); + break; + case 2: + plvdi->item.pszText = _T(""); + plvdi->item.cchTextMax = _tcslen(plvdi->item.pszText); + break; + } + } + } + } + } +} + +static void OnDeleteItem(NMLISTVIEW* pnmlv) +{ + CPlEntry* pCPlEntry = (CPlEntry*)pnmlv->lParam; + if (pCPlEntry != NULL) { + HeapFree(GetProcessHeap(), 0, pCPlEntry); + } +} + +static void OnItemChanged(NMLISTVIEW* pnmlv) +{ +} + +void Control_LaunchApplet(HWND hwndLV, CPlEntry* pCPlEntry) +{ + CPlApplet_Ptr pCPlApplet; + CPlApplet* pApplet = pCPlEntry->pCPlApplet; + + assert(pApplet); + if (pApplet->hModule == NULL) { + pApplet->hModule = LoadLibrary(pApplet->filename); + pCPlApplet = (CPlApplet_Ptr)(FARPROC)GetProcAddress(pApplet->hModule, "CPlApplet"); + if (pCPlApplet) { + if (pCPlApplet(hwndLV, CPL_INIT, 0, 0)) { + unsigned int nSubProgs = pCPlApplet(hwndLV, CPL_GETCOUNT, 0, 0); + if (nSubProgs < pCPlEntry->nSubProg) { + TRACE(_T("Only %u subprograms in applet, requested %u\n"), nSubProgs, pCPlEntry->nSubProg); + return; + } + } else { + TRACE(_T("Init of applet has failed\n")); + return; + } + } else { + TRACE(_T("Not a valid control panel applet %s\n"), pApplet->filename); + return; + } + } + if (pApplet->hModule) { + pCPlApplet = (CPlApplet_Ptr)(FARPROC)GetProcAddress(pApplet->hModule, "CPlApplet"); + if (pCPlApplet) { + TCHAR* extraPmts = NULL; + if (!pCPlApplet(hwndLV, CPL_STARTWPARMS, pCPlEntry->nSubProg, (LPARAM)extraPmts)) + pCPlApplet(hwndLV, CPL_DBLCLK, pCPlEntry->nSubProg, pCPlEntry->lData); + } + + } +// NEWCPLINFO* pCPLInfo = &(pCPlEntry->pCPlApplet->info[pCPlEntry->nSubProg]); +// TCHAR* extraPmts = NULL; +// if (pCPLInfo->dwSize && pApplet->proc) { +// if (!pApplet->proc(pApplet->hWnd, CPL_STARTWPARMS, pCPlEntry->nSubProg, (LPARAM)extraPmts)) +// pApplet->proc(pApplet->hWnd, CPL_DBLCLK, pCPlEntry->nSubProg, pCPLInfo->lData); +// } +} + +static void OnDblClick(HWND hWnd, NMITEMACTIVATE* nmitem) +{ + LVHITTESTINFO info; +/* +#ifdef _MSC_VER + switch (nmitem->uKeyFlags) { + case LVKF_ALT: // The ALT key is pressed. + break; + case LVKF_CONTROL: // The CTRL key is pressed. + break; + case LVKF_SHIFT: // The SHIFT key is pressed. + break; + } +#endif + */ + info.pt.x = nmitem->ptAction.x; + info.pt.y = nmitem->ptAction.y; + if (ListView_HitTest(hWnd, &info) != -1) { + LVITEM item; + item.mask = LVIF_PARAM; + item.iItem = info.iItem; + if (ListView_GetItem(hWnd, &item)) { + Control_LaunchApplet(hWnd, (CPlEntry*)item.lParam); + } + } +} + +struct CompareData { + HWND hListWnd; + int nSortColumn; +}; + +static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) +{ + struct CompareData* pcd = (struct CompareData*)lParamSort; + + TCHAR buf1[MAX_CPL_INFO]; + TCHAR buf2[MAX_CPL_INFO]; + + ListView_GetItemText(pcd->hListWnd, lParam1, pcd->nSortColumn, buf1, sizeof(buf1)/sizeof(TCHAR)); + ListView_GetItemText(pcd->hListWnd, lParam2, pcd->nSortColumn, buf2, sizeof(buf2)/sizeof(TCHAR)); + return _tcscmp(buf1, buf2); +} + +/* +static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) +{ + TCHAR buf1[1000]; + TCHAR buf2[1000]; + + ListView_GetItemText((HWND)lParamSort, lParam1, 0, buf1, sizeof(buf1)/sizeof(TCHAR)); + ListView_GetItemText((HWND)lParamSort, lParam2, 0, buf2, sizeof(buf2)/sizeof(TCHAR)); + return _tcscmp(buf1, buf2); +} + +static void ListViewPopUpMenu(HWND hWnd, POINT pt) +{ +} + +BOOL ListView_SortItemsEx( + HWND hwnd, + PFNLVCOMPARE pfnCompare, + LPARAM lParamSort +); + + + */ +#ifdef __GNUC__ +//#define LVM_FIRST 0x1000 // ListView messages +#define LVM_SORTITEMSEX (0x1000 + 81) +#define ListView_SortItemsEx(hwndLV, _pfnCompare, _lPrm) \ + (BOOL)SendMessage((hwndLV), LVM_SORTITEMSEX, (WPARAM)(LPARAM)(_lPrm), (LPARAM)(PFNLVCOMPARE)(_pfnCompare)) +#endif + +BOOL SortListView(HWND hWnd, int nSortColumn) +{ + struct CompareData cd = { hWnd, nSortColumn }; + return ListView_SortItemsEx(hWnd, CompareFunc, &cd); +} + +BOOL ListViewNotifyProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + NMITEMACTIVATE* nmitem = (LPNMITEMACTIVATE)lParam; + + if (nmitem->hdr.idFrom == LIST_WINDOW) { + switch (((LPNMHDR)lParam)->code) { + case LVN_GETDISPINFO: + OnGetDispInfo(hWnd, (NMLVDISPINFO*)lParam); + break; + case LVN_DELETEITEM: + OnDeleteItem((NMLISTVIEW*)lParam); + //pnmv = (LPNMLISTVIEW) lParam + break; + case LVN_ITEMCHANGED: + OnItemChanged((NMLISTVIEW*)lParam); + break; + case NM_DBLCLK: + OnDblClick(hWnd, nmitem); + break; + //case NM_RCLICK: + //OnRightClick(hWnd, nmitem); + //break; + default: + return FALSE; + } + } + return TRUE; +} + +VOID DestroyListView(HWND hwndLV) +{ + if (pListHead) + while ((pListHead = Control_UnloadApplet(pListHead))); +} + +BOOL RefreshListView(HWND hwndLV, LPTSTR szPath) +{ + if (hwndLV != NULL) { + ListView_DeleteAllItems(hwndLV); + } + return InitListViewItems(hwndLV, szPath); +} + +HWND CreateListView(HWND hwndParent, int id) +{ + RECT rcClient; + HWND hwndLV; + + // Get the dimensions of the parent window's client area, and create the list view control. + GetClientRect(hwndParent, &rcClient); + hwndLV = CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, _T("List View"), + WS_VISIBLE | WS_CHILD, + 0, 0, rcClient.right, rcClient.bottom, + hwndParent, (HMENU)id, hInst, NULL); + ListView_SetExtendedListViewStyle(hwndLV, LVS_EX_FULLROWSELECT); + CreateListColumns(hwndLV); + + // Initialize the image list, and add items to the control. + if (!InitListViewImageLists(hwndLV) || !InitListViewItems(hwndLV, NULL/*szPath*/)) { + DestroyWindow(hwndLV); + return FALSE; + } + return hwndLV; +} + diff --git a/reactos/lib/shell32/control/listview.h b/reactos/lib/shell32/control/listview.h new file mode 100644 index 00000000000..9ce659fbc40 --- /dev/null +++ b/reactos/lib/shell32/control/listview.h @@ -0,0 +1,48 @@ +/* + * ReactOS shell32 - Control Panel ListCtrl implementation + * + * listview.h + * + * Copyright (C) 2002 Robert Dickenson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __LISTVIEW_H__ +#define __LISTVIEW_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +HWND CreateListView(HWND hwndParent, int id); +BOOL RefreshListView(HWND hwndTV, LPTSTR szPath); +//void OnGetDispInfo(NMLVDISPINFO* plvdi); +BOOL ListViewNotifyProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); +VOID DestroyListView(HWND hwndLV); +BOOL SortListView(HWND hWnd, int nSortColumn); +void Control_LaunchApplet(HWND hwndLV, CPlEntry* pCPlEntry); + + +#ifdef __cplusplus +}; +#endif + +#endif // __LISTVIEW_H__ diff --git a/reactos/lib/shell32/control/settings.c b/reactos/lib/shell32/control/settings.c new file mode 100644 index 00000000000..4d81d443cfd --- /dev/null +++ b/reactos/lib/shell32/control/settings.c @@ -0,0 +1,157 @@ +/* + * ReactOS shell32 - Control Panel + * + * settings.c + * + * Copyright (C) 2002 Robert Dickenson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#include +#include +#include +#include +#include +#include +#include +#include +//#include +//#include + +#include "control.h" +//#include "framewnd.h" +//#include "shell32.h" +#include "trace.h" + +//#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +//#include +//#include +//#include +//#define ASSERT assert + +//#include "control.h" +#include "settings.h" + + +//////////////////////////////////////////////////////////////////////////////// +// Global and Local Variables: +// + +extern DWORD nListStyle; +extern DWORD nSortOrder; + +//////////////////////////////////////////////////////////////////////////////// +// Local module support methods +// + +BOOL CheckResult(LONG error) +{ + if (error != ERROR_SUCCESS) { + PTSTR msg; + if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, + 0, error, MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), (PTSTR)&msg, 0, NULL)) + MessageBox(NULL, msg, szTitle, MB_ICONERROR | MB_OK); + else + MessageBox(NULL, _T("Error"), szTitle, MB_ICONERROR | MB_OK); + LocalFree(msg); + return FALSE; + } + return TRUE; +} + +static BOOL CreateRegistryPath(LPTSTR szRegPath, int nMaxLen) +{ + LPTSTR pRegPath = szRegPath; + + // Initialise registry path string from application PATH and KEY resources + int nLength = LoadString(hInst, IDS_APP_REG_PATH, szRegPath, nMaxLen); + nLength += LoadString(hInst, IDS_APP_REG_KEY, szRegPath + nLength, nMaxLen - nLength); +// ASSERT(nLength < (nMaxLen - 1)); + szRegPath[nLength] = _T('\\'); + + // walk the registry path string creating the tree if required + while ((pRegPath = _tcschr(pRegPath, _T('\\')))) { + LONG result; + HKEY hKey = NULL; + *pRegPath = _T('\0'); + // Open (or create) the key + result = RegCreateKeyEx(HKEY_CURRENT_USER, szRegPath, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL); + if (!CheckResult(result)) return FALSE; + RegCloseKey(hKey); + *pRegPath = _T('\\'); + pRegPath = pRegPath + 1; + } + szRegPath[nLength] = _T('\0'); + return TRUE; +} + +BOOL LoadSettings(RECT* prc) +{ + BOOL retval = TRUE; + TCHAR szRegPath[MAX_LOADSTRING]; + HMENU hMenuView = GetSubMenu(hMenuFrame, ID_VIEW_MENU); + + HKEY hKey; + DWORD dwSize; + LONG result; + + if (!CreateRegistryPath(szRegPath, MAX_LOADSTRING)) return FALSE; + + // Open the key + result = RegOpenKeyEx(HKEY_CURRENT_USER, szRegPath, 0, KEY_READ, &hKey); + if (!CheckResult(result)) return FALSE; + + // Read the settings + dwSize = sizeof(nListStyle); + result = RegQueryValueEx(hKey, _T("ListStyle"), NULL, NULL, (LPBYTE)&nListStyle, &dwSize); + dwSize = sizeof(nSortOrder); + result = RegQueryValueEx(hKey, _T("SortOrder"), NULL, NULL, (LPBYTE)&nSortOrder, &dwSize); + dwSize = sizeof(RECT); + result = RegQueryValueEx(hKey, _T("WindowPos"), NULL, NULL, (LPBYTE)prc, &dwSize); + if (result != ERROR_SUCCESS) { + retval = FALSE; + } + + // Close the key + RegCloseKey(hKey); + return retval; +} + +void SaveSettings(RECT* prc) +{ + TCHAR szRegPath[MAX_LOADSTRING]; + HKEY hKey = NULL; + LONG result; + + if (!CreateRegistryPath(szRegPath, MAX_LOADSTRING)) return; + + // Open the key + result = RegOpenKeyEx(HKEY_CURRENT_USER, szRegPath, 0, KEY_WRITE, &hKey); + if (!CheckResult(result)) return; + + // Save the settings + result = RegSetValueEx(hKey, _T("ListStyle"), 0, REG_DWORD, (LPBYTE)&nListStyle, sizeof(nListStyle)); + if (!CheckResult(result)) goto abort; + result = RegSetValueEx(hKey, _T("SortOrder"), 0, REG_DWORD, (LPBYTE)&nSortOrder, sizeof(nSortOrder)); + if (!CheckResult(result)) goto abort; + result = RegSetValueEx(hKey, _T("WindowPos"), 0, REG_BINARY, (LPBYTE)prc, sizeof(RECT)); + if (!CheckResult(result)) goto abort; + +abort: + // Close the key + RegCloseKey(hKey); +} diff --git a/reactos/lib/shell32/control/settings.h b/reactos/lib/shell32/control/settings.h new file mode 100644 index 00000000000..a72c8c83db1 --- /dev/null +++ b/reactos/lib/shell32/control/settings.h @@ -0,0 +1,44 @@ +/* + * ReactOS shell32 - Control Panel + * + * settings.h + * + * Copyright (C) 2002 Robert Dickenson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __SETTINGS_H__ +#define __SETTINGS_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +BOOL CheckResult(LONG error); +BOOL LoadSettings(RECT*); +void SaveSettings(RECT*); + + +#ifdef __cplusplus +}; +#endif + +#endif // __SETTINGS_H__ diff --git a/reactos/lib/shell32/control/trace.c b/reactos/lib/shell32/control/trace.c new file mode 100644 index 00000000000..b5ac2d5fc48 --- /dev/null +++ b/reactos/lib/shell32/control/trace.c @@ -0,0 +1,82 @@ +///////////////////////////////////////////////////////////////////////////// +// Diagnostic Trace +// +#include +#include +#define WIN32_LEAN_AND_MEAN +#include "windows.h" +#include "trace.h" + + +#ifdef _DEBUG + +#ifdef WIN32 +//#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +//#include +//#include +//WINBASEAPI VOID WINAPI DebugBreak(VOID); +//WINBASEAPI VOID WINAPI OutputDebugStringA(LPCSTR lpOutputString); +//WINBASEAPI VOID WINAPI OutputDebugStringW(LPCWSTR lpOutputString); +//void __stdcall DebugBreak(void); +//void __stdcall OutputDebugStringA(char* lpOutputString); +//void __stdcall OutputDebugStringW(wchar_t* lpOutputString); +#ifdef UNICODE +#define OutputDebugString OutputDebugStringW +#else +#define OutputDebugString OutputDebugStringA +#endif // !UNICODE + +#else +#include "hardware.h" +#endif // WIN32 + + +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; + +void _DebugBreak(void) +{ + DebugBreak(); +} + +void Trace(TCHAR* lpszFormat, ...) +{ + va_list args; + int nBuf; + TCHAR szBuffer[512]; + + va_start(args, lpszFormat); +// nBuf = vsprintf(szBuffer, lpszFormat, args); +// nBuf = _vsntprintf(szBuffer, _countof(szBuffer), lpszFormat, args); +#ifdef _UNICODE + nBuf = _vsnwprintf(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), lpszFormat, args); +#else + nBuf = _vsnprintf(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), lpszFormat, args); +#endif + OutputDebugString(szBuffer); + // was there an error? was the expanded string too long? +// ASSERT(nBuf >= 0); + va_end(args); +} + +void Assert(void* assert, TCHAR* file, int line, void* msg) +{ + if (msg == NULL) { + printf("ASSERT -- %s occured on line %u of file %s.\n", + assert, line, file); + } else { + printf("ASSERT -- %s occured on line %u of file %s: Message = %s.\n", + assert, line, file, msg); + } +} + + +#else + +//inline void Trace(TCHAR* lpszFormat, ...) { }; +//inline void Assert(void* assert, TCHAR* file, int line, void* msg) { }; +void Trace(TCHAR* lpszFormat, ...) { }; +void Assert(void* assert, TCHAR* file, int line, void* msg) { }; + +#endif //_DEBUG +///////////////////////////////////////////////////////////////////////////// diff --git a/reactos/lib/shell32/control/trace.h b/reactos/lib/shell32/control/trace.h new file mode 100644 index 00000000000..bbd863afc1e --- /dev/null +++ b/reactos/lib/shell32/control/trace.h @@ -0,0 +1,72 @@ +///////////////////////////////////////////////////////////////////////////// +// +#ifndef __TRACE_H__ +#define __TRACE_H__ + +#ifdef _DEBUG + +//============================================================================= +// BreakPoint() macro. +//============================================================================= + +#ifdef _X86_ +#define BreakPoint() _asm { int 3h } +#else +#define BreakPoint() _DebugBreak() +#endif + +//============================================================================= +// MACRO: ASSERT() +//============================================================================= + +#ifndef ASSERT +#define ASSERT(exp) \ +{ \ + if ( !(exp) ) \ + { \ + Assert(#exp, __FILE__, __LINE__, NULL); \ + BreakPoint(); \ + } \ +} \ + +#define ASSERTMSG(exp, msg) \ +{ \ + if ( !(exp) ) \ + { \ + Assert(#exp, __FILE__, __LINE__, msg); \ + BreakPoint(); \ + } \ +} +#endif + +//============================================================================= +// MACRO: TRACE() +//============================================================================= + +void Assert(void* assert, TCHAR* file, int line, void* msg); +void Trace(TCHAR* lpszFormat, ...); +void Trace1(int code, TCHAR* lpszFormat, ...); + +#define TRACE Trace +#define TRACE0 Trace + +#else // _DEBUG + +#ifndef ASSERT +#define ASSERT(exp) +#define ASSERTMSG(exp, msg) +#endif + +//#define TRACE0 TRACE +//#define TRACE1 TRACE + +void Assert(void* assert, TCHAR* file, int line, void* msg); +void Trace(TCHAR* lpszFormat, ...); + +#define TRACE 0 ? (void)0 : Trace + + +#endif // !_DEBUG + +#endif // __TRACE_H__ +///////////////////////////////////////////////////////////////////////////// diff --git a/reactos/lib/shell32/makefile b/reactos/lib/shell32/makefile index a358f840d81..72d373c7949 100644 --- a/reactos/lib/shell32/makefile +++ b/reactos/lib/shell32/makefile @@ -1,33 +1,55 @@ -# $Id: makefile,v 1.5 2001/08/21 20:13:07 chorns Exp $ +# $Id: makefile,v 1.6 2002/09/24 15:06:09 robd Exp $ PATH_TO_TOP = ../.. -TARGET_DEFONLY = yes +SHELL32_ALIAS = roshel32 +COMCTL32_ALIAS = rosctl32 +#SHELL32_ALIAS = shell32 +#COMCTL32_ALIAS = comctl32 + +#TARGET_NAME = $(SHELL32_ALIAS) +TARGET_NAME = roshel32 + +TARGET_DEFNAME = shell32 TARGET_TYPE = dynlink -TARGET_NAME = shell32 +#TARGET_SDKLIBS = ntdll.a kernel32.a user32.a gdi32.a advapi32.a $(COMCTL32_ALIAS).a msvcrt.a +TARGET_SDKLIBS = ntdll.a kernel32.a user32.a gdi32.a advapi32.a msvcrt.a + +TARGET_GCCLIBS = comctl32 comdlg32 version + +TARGET_CFLAGS = -D_WIN32_IE=0x0400 -DUNICODE -D_UNICODE -O2 -Wall -Wstrict-prototypes -fno-builtin -DDBG + +TARGET_CPPFLAGS = -D_WIN32_IE=0x0400 -DUNICODE -D_UNICODE -O2 -Wall -Wstrict-prototypes -fno-builtin -DDBG + +#TARGET_LFLAGS = -nostdlib TARGET_BASE = 0x77260000 -TARGET_SDKLIBS = ntdll.a kernel32.a +MISC_OBJECTS = \ + misc/dllmain.o \ + misc/_stubs.o \ + misc/stubs.o -TARGET_OBJECTS = $(TARGET_NAME).o +CONTROL_OBJECTS = \ + control/framewnd.o \ + control/listview.o \ + control/control.o \ + control/settings.o \ + control/trace.o -TARGET_CLEAN = misc/*.o +TARGET_OBJECTS = \ + $(MISC_OBJECTS) \ + $(CONTROL_OBJECTS) + +TARGET_CLEAN = $(TARGET_OBJECTS) $(TARGET_NAME).coff include $(PATH_TO_TOP)/rules.mak include $(TOOLS_PATH)/helper.mk -MISC_OBJECTS = \ - misc/dllmain.o \ - misc/stubs.o +MK_CFLAGS = -D_WIN32_IE=0x0400 -D_UNICODE -DUNICODE -I./ +MK_CPPFLAGS = -D_WIN32_IE=0x0400 -D_UNICODE -DUNICODE -I./ +MK_RCFLAGS = -D_WIN32_IE=0x0400 -D_UNICODE -DUNICODE -OBJECTS = \ - $(MISC_OBJECTS) - -$(TARGET_NAME).o: $(OBJECTS) - $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o - -# EOF diff --git a/reactos/lib/shell32/misc/_stubs.cpp b/reactos/lib/shell32/misc/_stubs.cpp new file mode 100644 index 00000000000..715573f0787 --- /dev/null +++ b/reactos/lib/shell32/misc/_stubs.cpp @@ -0,0 +1,89 @@ +/* + * ReactOS shell32 - + * + * _stubs.cpp + * + * Copyright (C) 2002 Robert Dickenson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: stubs.cpp, + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/shell32/misc/stubs.c + * PURPOSE: C++ Stubbed exports + * PROGRAMMER: Robert Dickenson (robd@reactos.org) + */ + +//#include +#ifdef _MSC_VER +#include +#else +#include +#endif +//#define NDEBUG +//#include + +#ifdef __cplusplus +extern "C" { +#endif + +#include "shell32.h" + + +#define STUB \ + do \ + { \ + } \ + while (0) + +// DbgPrint ("%s(%d):%s not implemented\n", __FILE__, __LINE__, __FUNCTION__); + + +#ifndef __GNUC__ + +//long __stdcall +STDAPI +DllGetClassObject(const CLSID & rclsid, const IID & riid, void ** ppv) +{ + STUB; +/* +This function supports the standard return values: + E_INVALIDARG + E_OUTOFMEMORY + E_UNEXPECTED +as well as the following: + S_OK - The object was retrieved successfully + CLASS_E_CLASSNOTAVAILABLE - The DLL does not support the class (object definition) + */ + return CLASS_E_CLASSNOTAVAILABLE; +} + +#else + +//VOID STDCALL +long __stdcall +DllGetClassObject(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +{ + STUB; + return CLASS_E_CLASSNOTAVAILABLE; +} + +#endif + +#ifdef __cplusplus +}; +#endif diff --git a/reactos/lib/shell32/misc/dllmain.c b/reactos/lib/shell32/misc/dllmain.c index 364740d30f4..5e84b8879e9 100644 --- a/reactos/lib/shell32/misc/dllmain.c +++ b/reactos/lib/shell32/misc/dllmain.c @@ -1,4 +1,25 @@ -/* $Id: dllmain.c,v 1.1 2001/07/06 02:47:17 rex Exp $ +/* + * ReactOS shell32 - main library entry point + * + * dllmain.c + * + * Copyright (C) 2002 Robert Dickenson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: dllmain.c,v 1.2 2002/09/24 15:06:10 robd Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -7,11 +28,22 @@ * PROGRAMMER: Rex Jolliff (rex@lvcablemodem.com) */ -#include +//#include #include +#include +#include "..\control\control.h" -#define NDEBUG -#include +//#define NDEBUG +//#include +#ifdef _MSC_VER +#pragma warning (disable:4273) // : inconsistent dll linkage. dllexport assumed. +#define STDCALL CALLBACK +#define WINBOOL BOOL + +#else +#endif +#define DPRINT(a) +#define DPRINT1(a) INT STDCALL @@ -24,6 +56,7 @@ DllMain(PVOID hinstDll, switch (dwReason) { case DLL_PROCESS_ATTACH: + hInst = hinstDll; break; case DLL_PROCESS_DETACH: diff --git a/reactos/lib/shell32/misc/shlwapi.h b/reactos/lib/shell32/misc/shlwapi.h new file mode 100644 index 00000000000..af77b329e44 --- /dev/null +++ b/reactos/lib/shell32/misc/shlwapi.h @@ -0,0 +1,726 @@ +/* + * SHLWAPI.DLL functions + * + * Copyright (C) 2000 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __WINE_SHLWAPI_H +#define __WINE_SHLWAPI_H + +#ifdef __cplusplus +extern "C" { +#endif /* defined(__cplusplus) */ + +#ifndef NO_SHLWAPI_REG + +/* Registry functions */ + +DWORD WINAPI SHDeleteEmptyKeyA(HKEY,LPCSTR); +DWORD WINAPI SHDeleteEmptyKeyW(HKEY,LPCWSTR); +#define SHDeleteEmptyKey WINELIB_NAME_AW(SHDeleteEmptyKey) + +DWORD WINAPI SHDeleteKeyA(HKEY,LPCSTR); +DWORD WINAPI SHDeleteKeyW(HKEY,LPCWSTR); +#define SHDeleteKey WINELIB_NAME_AW(SHDeleteKey) + +DWORD WINAPI SHDeleteValueA(HKEY,LPCSTR,LPCSTR); +DWORD WINAPI SHDeleteValueW(HKEY,LPCWSTR,LPCWSTR); +#define SHDeleteValue WINELIB_NAME_AW(SHDeleteValue) + +DWORD WINAPI SHGetValueA(HKEY,LPCSTR,LPCSTR,LPDWORD,LPVOID,LPDWORD); +DWORD WINAPI SHGetValueW(HKEY,LPCWSTR,LPCWSTR,LPDWORD,LPVOID,LPDWORD); +#define SHGetValue WINELIB_NAME_AW(SHGetValue) + +DWORD WINAPI SHSetValueA(HKEY,LPCSTR,LPCSTR,DWORD,LPCVOID,DWORD); +DWORD WINAPI SHSetValueW(HKEY,LPCWSTR,LPCWSTR,DWORD,LPCVOID,DWORD); +#define SHSetValue WINELIB_NAME_AW(SHSetValue) + +DWORD WINAPI SHQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPVOID,LPDWORD); +DWORD WINAPI SHQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPVOID,LPDWORD); +#define SHQueryValueEx WINELIB_NAME_AW(SHQueryValueEx) + +LONG WINAPI SHEnumKeyExA(HKEY,DWORD,LPSTR,LPDWORD); +LONG WINAPI SHEnumKeyExW(HKEY,DWORD,LPWSTR,LPDWORD); +#define SHEnumKeyEx WINELIB_NAME_AW(SHEnumKeyEx) + +LONG WINAPI SHEnumValueA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPVOID,LPDWORD); +LONG WINAPI SHEnumValueW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPVOID,LPDWORD); +#define SHEnumValue WINELIB_NAME_AW(SHEnumValue) + +LONG WINAPI SHQueryInfoKeyA(HKEY,LPDWORD,LPDWORD,LPDWORD,LPDWORD); +LONG WINAPI SHQueryInfoKeyW(HKEY,LPDWORD,LPDWORD,LPDWORD,LPDWORD); +#define SHQueryInfoKey WINELIB_NAME_AW(SHQueryInfoKey) + +DWORD WINAPI SHRegGetPathA(HKEY,LPCSTR,LPCSTR,LPSTR,DWORD); +DWORD WINAPI SHRegGetPathW(HKEY,LPCWSTR,LPCWSTR,LPWSTR,DWORD); +#define SHRegGetPath WINELIB_NAME_AW(SHRegGetPath) + +DWORD WINAPI SHRegSetPathA(HKEY,LPCSTR,LPCSTR,LPCSTR,DWORD); +DWORD WINAPI SHRegSetPathW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR,DWORD); +#define SHRegSetPath WINELIB_NAME_AW(SHRegSetPath) + +DWORD WINAPI SHCopyKeyA(HKEY,LPCSTR,HKEY,DWORD); +DWORD WINAPI SHCopyKeyW(HKEY,LPCWSTR,HKEY,DWORD); +#define SHCopyKey WINELIB_NAME_AW(SHCopyKey) + +/* Undocumented registry functions */ + +HKEY WINAPI SHRegDuplicateHKey(HKEY hKey); + +/* FIXME: SHDeleteOrphanKey */ + + +/* User registry functions */ + +typedef enum +{ + SHREGDEL_DEFAULT = 0, + SHREGDEL_HKCU = 0x1, + SHREGDEL_HKLM = 0x10, + SHREGDEL_BOTH = SHREGDEL_HKLM | SHREGDEL_HKCU +} SHREGDEL_FLAGS; + +typedef enum +{ + SHREGENUM_DEFAULT = 0, + SHREGENUM_HKCU = 0x1, + SHREGENUM_HKLM = 0x10, + SHREGENUM_BOTH = SHREGENUM_HKLM | SHREGENUM_HKCU +} SHREGENUM_FLAGS; + +#define SHREGSET_HKCU 0x1 /* Apply to HKCU if empty */ +#define SHREGSET_FORCE_HKCU 0x2 /* Always apply to HKCU */ +#define SHREGSET_HKLM 0x4 /* Apply to HKLM if empty */ +#define SHREGSET_FORCE_HKLM 0x8 /* Always apply to HKLM */ +#define SHREGSET_DEFAULT (SHREGSET_FORCE_HKCU | SHREGSET_HKLM) + +typedef HANDLE HUSKEY; +typedef HUSKEY *PHUSKEY; + +LONG WINAPI SHRegCreateUSKeyA(LPCSTR,REGSAM,HUSKEY,PHUSKEY,DWORD); +LONG WINAPI SHRegCreateUSKeyW(LPCWSTR,REGSAM,HUSKEY,PHUSKEY,DWORD); +#define SHRegCreateUSKey WINELIB_NAME_AW(SHRegCreateUSKey) + +LONG WINAPI SHRegOpenUSKeyA(LPCSTR,REGSAM,HUSKEY,PHUSKEY,BOOL); +LONG WINAPI SHRegOpenUSKeyW(LPCWSTR,REGSAM,HUSKEY,PHUSKEY,BOOL); +#define SHRegOpenUSKey WINELIB_NAME_AW(SHRegOpenUSKey) + +LONG WINAPI SHRegQueryUSValueA(HUSKEY,LPCSTR,LPDWORD,LPVOID,LPDWORD, + BOOL,LPVOID,DWORD); +LONG WINAPI SHRegQueryUSValueW(HUSKEY,LPCWSTR,LPDWORD,LPVOID,LPDWORD, + BOOL,LPVOID,DWORD); +#define SHRegQueryUSValue WINELIB_NAME_AW(SHRegQueryUSValue) + +LONG WINAPI SHRegWriteUSValueA(HUSKEY,LPCSTR,DWORD,LPVOID,DWORD,DWORD); +LONG WINAPI SHRegWriteUSValueW(HUSKEY,LPCWSTR,DWORD,LPVOID,DWORD,DWORD); +#define SHRegWriteUSValue WINELIB_NAME_AW(SHRegWriteUSValue) + +LONG WINAPI SHRegDeleteUSValueA(HUSKEY,LPCSTR,SHREGDEL_FLAGS); +LONG WINAPI SHRegDeleteUSValueW(HUSKEY,LPCWSTR,SHREGDEL_FLAGS); +#define SHRegDeleteUSValue WINELIB_NAME_AW(SHRegDeleteUSValue) + +LONG WINAPI SHRegDeleteEmptyUSKeyA(HUSKEY,LPCSTR,SHREGDEL_FLAGS); +LONG WINAPI SHRegDeleteEmptyUSKeyW(HUSKEY,LPCWSTR,SHREGDEL_FLAGS); +#define SHRegDeleteEmptyUSKey WINELIB_NAME_AW(SHRegDeleteEmptyUSKey) + +LONG WINAPI SHRegEnumUSKeyA(HUSKEY,DWORD,LPSTR,LPDWORD,SHREGENUM_FLAGS); +LONG WINAPI SHRegEnumUSKeyW(HUSKEY,DWORD,LPWSTR,LPDWORD,SHREGENUM_FLAGS); +#define SHRegEnumUSKey WINELIB_NAME_AW(SHRegEnumUSKey) + +LONG WINAPI SHRegEnumUSValueA(HUSKEY,DWORD,LPSTR,LPDWORD,LPDWORD, + LPVOID,LPDWORD,SHREGENUM_FLAGS); +LONG WINAPI SHRegEnumUSValueW(HUSKEY,DWORD,LPWSTR,LPDWORD,LPDWORD, + LPVOID,LPDWORD,SHREGENUM_FLAGS); +#define SHRegEnumUSValue WINELIB_NAME_AW(SHRegEnumUSValue) + +LONG WINAPI SHRegQueryInfoUSKeyA(HUSKEY,LPDWORD,LPDWORD,LPDWORD, + LPDWORD,SHREGENUM_FLAGS); +LONG WINAPI SHRegQueryInfoUSKeyW(HUSKEY,LPDWORD,LPDWORD,LPDWORD, + LPDWORD,SHREGENUM_FLAGS); +#define SHRegQueryInfoUSKey WINELIB_NAME_AW(SHRegQueryInfoUSKey) + +LONG WINAPI SHRegCloseUSKey(HUSKEY); + +LONG WINAPI SHRegGetUSValueA(LPCSTR,LPCSTR,LPDWORD,LPVOID,LPDWORD, + BOOL,LPVOID,DWORD); +LONG WINAPI SHRegGetUSValueW(LPCWSTR,LPCWSTR,LPDWORD,LPVOID,LPDWORD, + BOOL,LPVOID,DWORD); +#define SHRegGetUSValue WINELIB_NAME_AW(SHRegGetUSValue) + +LONG WINAPI SHRegSetUSValueA(LPCSTR,LPCSTR,DWORD,LPVOID,DWORD,DWORD); +LONG WINAPI SHRegSetUSValueW(LPCWSTR,LPCWSTR,DWORD,LPVOID,DWORD,DWORD); +#define SHRegSetUSValue WINELIB_NAME_AW(SHRegSetUSValue) + +BOOL WINAPI SHRegGetBoolUSValueA(LPCSTR,LPCSTR,BOOL,BOOL); +BOOL WINAPI SHRegGetBoolUSValueW(LPCWSTR,LPCWSTR,BOOL,BOOL); +#define SHRegGetBoolUSValue WINELIB_NAME_AW(SHRegGetBoolUSValue) + +#endif /* NO_SHLWAPI_REG */ + + +/* Path functions */ +#ifndef NO_SHLWAPI_PATH + +/* GetPathCharType return flags */ +#define GCT_INVALID 0x0 +#define GCT_LFNCHAR 0x1 +#define GCT_SHORTCHAR 0x2 +#define GCT_WILD 0x4 +#define GCT_SEPARATOR 0x8 + +LPSTR WINAPI PathAddBackslashA(LPSTR); +LPWSTR WINAPI PathAddBackslashW(LPWSTR); +#define PathAddBackslash WINELIB_NAME_AW(PathAddBackslash) + +BOOL WINAPI PathAddExtensionA(LPSTR,LPCSTR); +BOOL WINAPI PathAddExtensionW(LPWSTR,LPCWSTR); +#define PathAddExtension WINELIB_NAME_AW(PathAddExtension) + +BOOL WINAPI PathAppendA(LPSTR,LPCSTR); +BOOL WINAPI PathAppendW(LPWSTR,LPCWSTR); +#define PathAppend WINELIB_NAME_AW(PathAppend) + +LPSTR WINAPI PathBuildRootA(LPSTR,int); +LPWSTR WINAPI PathBuildRootW(LPWSTR,int); +#define PathBuildRoot WINELIB_NAME_AW(PathBuiltRoot) + +BOOL WINAPI PathCanonicalizeA(LPSTR,LPCSTR); +BOOL WINAPI PathCanonicalizeW(LPWSTR,LPCWSTR); +#define PathCanonicalize WINELIB_NAME_AW(PathCanonicalize) + +LPSTR WINAPI PathCombineA(LPSTR,LPCSTR,LPCSTR); +LPWSTR WINAPI PathCombineW(LPWSTR,LPCWSTR,LPCWSTR); +#define PathCombine WINELIB_NAME_AW(PathCombine) + +BOOL WINAPI PathCompactPathA(HDC,LPSTR,UINT); +BOOL WINAPI PathCompactPathW(HDC,LPWSTR,UINT); +#define PathCompactPath WINELIB_NAME_AW(PathCompactPath) + +BOOL WINAPI PathCompactPathExA(LPSTR,LPCSTR,UINT,DWORD); +BOOL WINAPI PathCompactPathExW(LPWSTR,LPCWSTR,UINT,DWORD); +#define PathCompactPathEx WINELIB_NAME_AW(PathCompactPathEx) + +int WINAPI PathCommonPrefixA(LPCSTR,LPCSTR,LPSTR); +int WINAPI PathCommonPrefixW(LPCWSTR,LPCWSTR,LPWSTR); +#define PathCommonPrefix WINELIB_NAME_AW(PathCommonPrefix) + +BOOL WINAPI PathFileExistsA(LPCSTR); +BOOL WINAPI PathFileExistsW(LPCWSTR); +#define PathFileExists WINELIB_NAME_AW(PathFileExists) + +LPSTR WINAPI PathFindExtensionA(LPCSTR); +LPWSTR WINAPI PathFindExtensionW(LPCWSTR); +#define PathFindExtension WINELIB_NAME_AW(PathFindExtension) + +LPSTR WINAPI PathFindFileNameA(LPCSTR); +LPWSTR WINAPI PathFindFileNameW(LPCWSTR); +#define PathFindFileName WINELIB_NAME_AW(PathFindFileName) + +LPSTR WINAPI PathFindNextComponentA(LPCSTR); +LPWSTR WINAPI PathFindNextComponentW(LPCWSTR); +#define PathFindNextComponent WINELIB_NAME_AW(PathFindNextComponent) + +BOOL WINAPI PathFindOnPathA(LPSTR,LPCSTR*); +BOOL WINAPI PathFindOnPathW(LPWSTR,LPCWSTR*); +#define PathFindOnPath WINELIB_NAME_AW(PathFindOnPath) + +LPSTR WINAPI PathGetArgsA(LPCSTR); +LPWSTR WINAPI PathGetArgsW(LPCWSTR); +#define PathGetArgs WINELIB_NAME_AW(PathGetArgs) + +UINT WINAPI PathGetCharTypeA(UCHAR); +UINT WINAPI PathGetCharTypeW(WCHAR); +#define PathGetCharType WINELIB_NAME_AW(PathGetCharType) + +int WINAPI PathGetDriveNumberA(LPCSTR); +int WINAPI PathGetDriveNumberW(LPCWSTR); +#define PathGetDriveNumber WINELIB_NAME_AW(PathGetDriveNumber) + +BOOL WINAPI PathIsDirectoryA(LPCSTR); +BOOL WINAPI PathIsDirectoryW(LPCWSTR); +#define PathIsDirectory WINELIB_NAME_AW(PathIsDirectory) + +BOOL WINAPI PathIsDirectoryEmptyA(LPCSTR); +BOOL WINAPI PathIsDirectoryEmptyW(LPCWSTR); +#define PathIsDirectoryEmpty WINELIB_NAME_AW(PathIsDirectoryEmpty) + +BOOL WINAPI PathIsFileSpecA(LPCSTR); +BOOL WINAPI PathIsFileSpecW(LPCWSTR); +#define PathIsFileSpec WINELIB_NAME_AW(PathIsFileSpec); + +BOOL WINAPI PathIsPrefixA(LPCSTR,LPCSTR); +BOOL WINAPI PathIsPrefixW(LPCWSTR,LPCWSTR); +#define PathIsPrefix WINELIB_NAME_AW(PathIsPrefix) + +BOOL WINAPI PathIsRelativeA(LPCSTR); +BOOL WINAPI PathIsRelativeW(LPCWSTR); +#define PathIsRelative WINELIB_NAME_AW(PathIsRelative) + +BOOL WINAPI PathIsRootA(LPCSTR); +BOOL WINAPI PathIsRootW(LPCWSTR); +#define PathIsRoot WINELIB_NAME_AW(PathIsRoot) + +BOOL WINAPI PathIsSameRootA(LPCSTR,LPCSTR); +BOOL WINAPI PathIsSameRootW(LPCWSTR,LPCWSTR); +#define PathIsSameRoot WINELIB_NAME_AW(PathIsSameRoot) + +BOOL WINAPI PathIsUNCA(LPCSTR); +BOOL WINAPI PathIsUNCW(LPCWSTR); +#define PathIsUNC WINELIB_NAME_AW(PathIsUNC) + +BOOL WINAPI PathIsUNCServerA(LPCSTR); +BOOL WINAPI PathIsUNCServerW(LPCWSTR); +#define PathIsUNCServer WINELIB_NAME_AW(PathIsUNCServer) + +BOOL WINAPI PathIsUNCServerShareA(LPCSTR); +BOOL WINAPI PathIsUNCServerShareW(LPCWSTR); +#define PathIsUNCServerShare WINELIB_NAME_AW(PathIsUNCServerShare) + +BOOL WINAPI PathIsContentTypeA(LPCSTR,LPCSTR); +BOOL WINAPI PathIsContentTypeW(LPCWSTR,LPCWSTR); +#define PathIsContentType WINELIB_NAME_AW(PathIsContentType) + +BOOL WINAPI PathIsURLA(LPCSTR); +BOOL WINAPI PathIsURLW(LPCWSTR); +#define PathIsURL WINELIB_NAME_AW(PathIsURL) + +BOOL WINAPI PathMakePrettyA(LPSTR); +BOOL WINAPI PathMakePrettyW(LPWSTR); +#define PathMakePretty WINELIB_NAME_AW(PathMakePretty) + +BOOL WINAPI PathMatchSpecA(LPCSTR,LPCSTR); +BOOL WINAPI PathMatchSpecW(LPCWSTR,LPCWSTR); +#define PathMatchSpec WINELIB_NAME_AW(PathMatchSpec) + +int WINAPI PathParseIconLocationA(LPSTR); +int WINAPI PathParseIconLocationW(LPWSTR); +#define PathParseIconLocation WINELIB_NAME_AW(PathParseIconLocation) + +VOID WINAPI PathQuoteSpacesA(LPSTR); +VOID WINAPI PathQuoteSpacesW(LPWSTR); +#define PathQuoteSpaces WINELIB_NAME_AW(PathQuoteSpaces) + +BOOL WINAPI PathRelativePathToA(LPSTR,LPCSTR,DWORD,LPCSTR,DWORD); +BOOL WINAPI PathRelativePathToW(LPWSTR,LPCWSTR,DWORD,LPCWSTR,DWORD); +#define PathRelativePathTo WINELIB_NAME_AW(PathRelativePathTo) + +VOID WINAPI PathRemoveArgsA(LPSTR); +VOID WINAPI PathRemoveArgsW(LPWSTR); +#define PathRemoveArgs WINELIB_NAME_AW(PathRemoveArgs) + +LPSTR WINAPI PathRemoveBackslashA(LPSTR); +LPWSTR WINAPI PathRemoveBackslashW(LPWSTR); +#define PathRemoveBackslash WINELIB_NAME_AW(PathRemoveBackslash) + +VOID WINAPI PathRemoveBlanksA(LPSTR); +VOID WINAPI PathRemoveBlanksW(LPWSTR); +#define PathRemoveBlanks WINELIB_NAME_AW(PathRemoveBlanks) + +VOID WINAPI PathRemoveExtensionA(LPSTR); +VOID WINAPI PathRemoveExtensionW(LPWSTR); +#define PathRemoveExtension WINELIB_NAME_AW(PathRemoveExtension) + +BOOL WINAPI PathRemoveFileSpecA(LPSTR); +BOOL WINAPI PathRemoveFileSpecW(LPWSTR); +#define PathRemoveFileSpec WINELIB_NAME_AW(PathRemoveFileSpec) + +BOOL WINAPI PathRenameExtensionA(LPSTR,LPCSTR); +BOOL WINAPI PathRenameExtensionW(LPWSTR,LPCWSTR); +#define PathRenameExtension WINELIB_NAME_AW(PathRenameExtension) + +BOOL WINAPI PathSearchAndQualifyA(LPCSTR,LPSTR,UINT); +BOOL WINAPI PathSearchAndQualifyW(LPCWSTR,LPWSTR,UINT); +#define PathSearchAndQualify WINELIB_NAME_AW(PathSearchAndQualify) + +VOID WINAPI PathSetDlgItemPathA(HWND,int,LPCSTR); +VOID WINAPI PathSetDlgItemPathW(HWND,int,LPCWSTR); +#define PathSetDlgItemPath WINELIB_NAME_AW(PathSetDlgItemPath) + +LPSTR WINAPI PathSkipRootA(LPCSTR); +LPWSTR WINAPI PathSkipRootW(LPCWSTR); +#define PathSkipRoot WINELIB_NAME_AW(PathSkipRoot) + +VOID WINAPI PathStripPathA(LPSTR); +VOID WINAPI PathStripPathW(LPWSTR); +#define PathStripPath WINELIB_NAME_AW(PathStripPath) + +BOOL WINAPI PathStripToRootA(LPSTR); +BOOL WINAPI PathStripToRootW(LPWSTR); +#define PathStripToRoot WINELIB_NAME_AW(PathStripToRoot) + +VOID WINAPI PathUnquoteSpacesA(LPSTR); +VOID WINAPI PathUnquoteSpacesW(LPWSTR); +#define PathUnquoteSpaces WINELIB_NAME_AW(PathUnquoteSpaces) + +BOOL WINAPI PathMakeSystemFolderA(LPCSTR); +BOOL WINAPI PathMakeSystemFolderW(LPCWSTR); +#define PathMakeSystemFolder WINELIB_NAME_AW(PathMakeSystemFolder) + +BOOL WINAPI PathUnmakeSystemFolderA(LPCSTR); +BOOL WINAPI PathUnmakeSystemFolderW(LPCWSTR); +#define PathUnmakeSystemFolder WINELIB_NAME_AW(PathUnmakeSystemFolder) + +BOOL WINAPI PathIsSystemFolderA(LPCSTR,DWORD); +BOOL WINAPI PathIsSystemFolderW(LPCWSTR,DWORD); +#define PathIsSystemFolder WINELIB_NAME_AW(PathIsSystemFolder) + +BOOL WINAPI PathIsNetworkPathA(LPCSTR); +BOOL WINAPI PathIsNetworkPathW(LPCWSTR); +#define PathIsNetworkPath WINELIB_NAME_AW(PathIsNetworkPath) + +BOOL WINAPI PathIsLFNFileSpecA(LPCSTR); +BOOL WINAPI PathIsLFNFileSpecW(LPCWSTR); +#define PathIsLFNFileSpec WINELIB_NAME_AW(PathIsLFNFileSpec) + +int WINAPI PathFindSuffixArrayA(LPCSTR,LPCSTR *,int); +int WINAPI PathFindSuffixArrayW(LPCWSTR,LPCWSTR *,int); +#define PathFindSuffixArray WINELIB_NAME_AW(PathFindSuffixArray) + +VOID WINAPI PathUndecorateA(LPSTR); +VOID WINAPI PathUndecorateW(LPWSTR); +#define PathUndecorate WINELIB_NAME_AW(PathUndecorate) + +BOOL WINAPI PathUnExpandEnvStringsA(LPCSTR,LPSTR,UINT); +BOOL WINAPI PathUnExpandEnvStringsW(LPCWSTR,LPWSTR,UINT); +#define PathUnExpandEnvStrings WINELIB_NAME_AW(PathUnExpandEnvStrings) + +/* Url functions */ + +/* These are used by UrlGetPart routine */ +typedef enum { + URL_PART_NONE = 0, + URL_PART_SCHEME = 1, + URL_PART_HOSTNAME, + URL_PART_USERNAME, + URL_PART_PASSWORD, + URL_PART_PORT, + URL_PART_QUERY +} URL_PART; + +#define URL_PARTFLAG_KEEPSCHEME 0x00000001 + +/* These are used by the UrlIs... routines */ +typedef enum { + URLIS_URL, + URLIS_OPAQUE, + URLIS_NOHISTORY, + URLIS_FILEURL, + URLIS_APPLIABLE, + URLIS_DIRECTORY, + URLIS_HASQUERY +} URLIS; + +/* This is used by the UrlApplyScheme... routines */ +#define URL_APPLY_FORCEAPPLY 0x00000008 +#define URL_APPLY_GUESSFILE 0x00000004 +#define URL_APPLY_GUESSSCHEME 0x00000002 +#define URL_APPLY_DEFAULT 0x00000001 + +/* The following are used by UrlEscape..., UrlUnEscape..., + * UrlCanonicalize..., and UrlCombine... routines + */ +#define URL_WININET_COMPATIBILITY 0x80000000 +#define URL_PLUGGABLE_PROTOCOL 0x40000000 +#define URL_ESCAPE_UNSAFE 0x20000000 +#define URL_UNESCAPE 0x10000000 + +#define URL_DONT_SIMPLIFY 0x08000000 +#define URL_NO_META URL_DONT_SIMPLIFY +#define URL_ESCAPE_SPACES_ONLY 0x04000000 +#define URL_DONT_ESCAPE_EXTRA_INFO 0x02000000 +#define URL_DONT_UNESCAPE_EXTRA_INFO URL_DONT_ESCAPE_EXTRA_INFO +#define URL_BROWSER_MODE URL_DONT_ESCAPE_EXTRA_INFO + +#define URL_INTERNAL_PATH 0x00800000 /* Will escape #'s in paths */ +#define URL_UNESCAPE_HIGH_ANSI_ONLY 0x00400000 +#define URL_CONVERT_IF_DOSPATH 0x00200000 +#define URL_UNESCAPE_INPLACE 0x00100000 + +#define URL_FILE_USE_PATHURL 0x00010000 + +#define URL_ESCAPE_SEGMENT_ONLY 0x00002000 +#define URL_ESCAPE_PERCENT 0x00001000 + +HRESULT WINAPI UrlApplySchemeA(LPCSTR,LPSTR,LPDWORD,DWORD); +HRESULT WINAPI UrlApplySchemeW(LPCWSTR,LPWSTR,LPDWORD,DWORD); +#define UrlApplyScheme WINELIB_NAME_AW(UrlApplyScheme) + +HRESULT WINAPI UrlCanonicalizeA(LPCSTR,LPSTR,LPDWORD,DWORD); +HRESULT WINAPI UrlCanonicalizeW(LPCWSTR,LPWSTR,LPDWORD,DWORD); +#define UrlCanonicalize WINELIB_NAME_AW(UrlCanoncalize) + +HRESULT WINAPI UrlCombineA(LPCSTR,LPCSTR,LPSTR,LPDWORD,DWORD); +HRESULT WINAPI UrlCombineW(LPCWSTR,LPCWSTR,LPWSTR,LPDWORD,DWORD); +#define UrlCombine WINELIB_NAME_AW(UrlCombine) + +INT WINAPI UrlCompareA(LPCSTR,LPCSTR,BOOL); +INT WINAPI UrlCompareW(LPCWSTR,LPCWSTR,BOOL); +#define UrlCompare WINELIB_NAME_AW(UrlCompare) + +HRESULT WINAPI UrlEscapeA(LPCSTR,LPSTR,LPDWORD,DWORD); +HRESULT WINAPI UrlEscapeW(LPCWSTR,LPWSTR,LPDWORD,DWORD); +#define UrlEscape WINELIB_NAME_AW(UrlEscape) + +#define UrlEscapeSpacesA(x,y,z) UrlCanonicalizeA(x, y, z, \ + URL_DONT_ESCAPE_EXTRA_INFO|URL_ESCAPE_SPACES_ONLY) +#define UrlEscapeSpacesW(x,y,z) UrlCanonicalizeW(x, y, z, \ + URL_DONT_ESCAPE_EXTRA_INFO|URL_ESCAPE_SPACES_ONLY) +#define UrlEscapeSpaces WINELIB_NAME_AW(UrlEscapeSpaces) + +LPCSTR WINAPI UrlGetLocationA(LPCSTR); +LPCWSTR WINAPI UrlGetLocationW(LPCWSTR); +#define UrlGetLocation WINELIB_NAME_AW(UrlGetLocation) + +HRESULT WINAPI UrlGetPartA(LPCSTR,LPSTR,LPDWORD,DWORD,DWORD); +HRESULT WINAPI UrlGetPartW(LPCWSTR,LPWSTR,LPDWORD,DWORD,DWORD); +#define UrlGetPart WINELIB_NAME_AW(UrlGetPart) + +BOOL WINAPI HashData(const unsigned char *,INT,unsigned char *lpDest,INT); + +HRESULT WINAPI UrlHashA(LPCSTR,unsigned char *,INT); +HRESULT WINAPI UrlHashW(LPCWSTR,unsigned char *,INT); +#define UrlHash WINELIB_NAME_AW(UrlHash) + +BOOL WINAPI UrlIsA(LPCSTR,URLIS); +BOOL WINAPI UrlIsW(LPCWSTR,URLIS); +#define UrlIs WINELIB_NAME_AW(UrlIs) + +BOOL WINAPI UrlIsNoHistoryA(LPCSTR); +BOOL WINAPI UrlIsNoHistoryW(LPCWSTR); +#define UrlIsNoHistory WINELIB_NAME_AW(UrlIsNoHistory) + +BOOL WINAPI UrlIsOpaqueA(LPCSTR); +BOOL WINAPI UrlIsOpaqueW(LPCWSTR); +#define UrlIsOpaque WINELIB_NAME_AW(UrlIsOpaque) + +#define UrlIsFileUrlA(x) UrlIsA(x, URLIS_FILEURL) +#define UrlIsFileUrlW(y) UrlIsW(x, URLIS_FILEURL) +#define UrlIsFileUrl WINELIB_NAME_AW(UrlIsFileUrl) + +HRESULT WINAPI UrlUnescapeA(LPCSTR,LPSTR,LPDWORD,DWORD); +HRESULT WINAPI UrlUnescapeW(LPCWSTR,LPWSTR,LPDWORD,DWORD); +#define UrlUnescape WINELIB_AW_NAME(UrlUnescape) + +#define UrlUnescapeInPlaceA(x,y) UrlUnescapeA(x, NULL, NULL, \ + y | URL_UNESCAPE_INPLACE) +#define UrlUnescapeInPlaceW(x,y) UrlUnescapeW(x, NULL, NULL, \ + y | URL_UNESCAPE_INPLACE) +#define UrlUnescapeInPlace WINELIB_AW_NAME(UrlUnescapeInPlace) + +HRESULT WINAPI UrlCreateFromPathA(LPCSTR,LPSTR,LPDWORD,DWORD); +HRESULT WINAPI UrlCreateFromPathW(LPCWSTR,LPWSTR,LPDWORD,DWORD); +#define UrlCreateFromPath WINELIB_AW_NAME(UrlCreateFromPath) + +#endif /* NO_SHLWAPI_PATH */ + + +/* String functions */ +#ifndef NO_SHLWAPI_STRFCNS + +/* StrToIntEx flags */ +#define STIF_DEFAULT 0x0L +#define STIF_SUPPORT_HEX 0x1L + +BOOL WINAPI ChrCmpIA (WORD w1, WORD w2); +BOOL WINAPI ChrCmpIW (WCHAR w1, WCHAR w2); +#define ChrCmpI WINELIB_NAME_AW(ChrCmpI) + +INT WINAPI StrCSpnA(LPCSTR,LPCSTR); +INT WINAPI StrCSpnW(LPCWSTR,LPCWSTR); +#define StrCSpn WINELIB_NAME_AW(StrCSpn) + +INT WINAPI StrCSpnIA(LPCSTR,LPCSTR); +INT WINAPI StrCSpnIW(LPCWSTR,LPCWSTR); +#define StrCSpnI WINELIB_NAME_AW(StrCSpnI) + +#define StrCatA lstrcatA +LPWSTR WINAPI StrCatW(LPWSTR,LPCWSTR); +#define StrCat WINELIB_NAME_AW(StrCat) + +LPSTR WINAPI StrCatBuffA(LPSTR,LPCSTR,INT); +LPWSTR WINAPI StrCatBuffW(LPWSTR,LPCWSTR,INT); +#define StrCatBuff WINELIB_NAME_AW(StrCatBuff) + +LPSTR WINAPI StrChrA(LPCSTR,WORD); +LPWSTR WINAPI StrChrW(LPCWSTR,WCHAR); +#define StrChr WINELIB_NAME_AW(StrChr) + +LPSTR WINAPI StrChrIA(LPCSTR,CHAR); +LPWSTR WINAPI StrChrIW(LPCWSTR,WCHAR); +#define StrChrI WINELIB_NAME_AW(StrChrI) + +#define StrCmpA lstrcmpA +int WINAPI StrCmpW(LPCWSTR,LPCWSTR); +#define StrCmp WINELIB_NAME_AW(StrCmp) + +#define StrCmpIA lstrcmpiA +int WINAPI StrCmpIW(LPCWSTR,LPCWSTR); +#define StrCmpI WINELIB_NAME_AW(StrCmpI) + +#define StrCpyA lstrcpyA +LPWSTR WINAPI StrCpyW(LPWSTR,LPCWSTR); +#define StrCpy WINELIB_NAME_AW(StrCpy) + +//#define StrCpyNA lstrcpynA +LPWSTR WINAPI StrCpyNW(LPWSTR,LPCWSTR,int); +#define StrCpyN WINELIB_NAME_AW(StrCpyN) +#define StrNCpy WINELIB_NAME_AW(StrCpyN) + +INT WINAPI StrCmpNA(LPCSTR,LPCSTR,INT); +INT WINAPI StrCmpNW(LPCWSTR,LPCWSTR,INT); +#define StrCmpN WINELIB_NAME_AW(StrCmpN) +#define StrNCmp WINELIB_NAME_AW(StrCmpN) + +INT WINAPI StrCmpNIA(LPCSTR,LPCSTR,INT); +INT WINAPI StrCmpNIW(LPCWSTR,LPCWSTR,INT); +#define StrCmpNI WINELIB_NAME_AW(StrCmpNI) +#define StrNCmpI WINELIB_NAME_AW(StrCmpNI) + +LPSTR WINAPI StrDupA(LPCSTR); +LPWSTR WINAPI StrDupW(LPCWSTR); +#define StrDup WINELIB_NAME_AW(StrDup) + +LPSTR WINAPI StrFormatByteSizeA (DWORD,LPSTR,UINT); +LPWSTR WINAPI StrFormatByteSizeW (DWORD,LPWSTR,UINT); +#define StrFormatByteSize WINELIB_NAME_AW(StrFormatByteSize) + +int WINAPI StrFromTimeIntervalA(LPSTR,UINT,DWORD,int); +int WINAPI StrFromTimeIntervalW(LPWSTR,UINT,DWORD,int); +#define StrFromTimeInterval WINELIB_NAME_AW(StrFromTimeInterval) + +BOOL WINAPI StrIsIntlEqualA(BOOL,LPCSTR,LPCSTR,int); +BOOL WINAPI StrIsIntlEqualW(BOOL,LPCWSTR,LPCWSTR,int); +#define StrIsIntlEqual WINELIB_NAME_AW(StrIsIntlEqual) + +#define StrIntlEqNA(a,b,c) StrIsIntlEqualA(TRUE,a,b,c) +#define StrIntlEqNW(a,b,c) StrIsIntlEqualW(TRUE,a,b,c) + +#define StrIntlEqNIA(a,b,c) StrIsIntlEqualA(FALSE,a,b,c) +#define StrIntlEqNIW(a,b,c) StrIsIntlEqualW(FALSE,a,b,c) + +LPSTR WINAPI StrNCatA(LPSTR,LPCSTR,int); +LPWSTR WINAPI StrNCatW(LPWSTR,LPCWSTR,int); +#define StrNCat WINELIB_NAME_AW(StrNCat) +#define StrCatN WINELIB_NAME_AW(StrNCat) + +LPSTR WINAPI StrPBrkA(LPCSTR,LPCSTR); +LPWSTR WINAPI StrPBrkW(LPCWSTR,LPCWSTR); +#define StrPBrk WINELIB_NAME_AW(StrPBrk) + +LPSTR WINAPI StrRChrA(LPCSTR,LPCSTR,WORD); +LPWSTR WINAPI StrRChrW(LPCWSTR,LPCWSTR,WORD); +#define StrRChr WINELIB_NAME_AW(StrRChr) + +LPSTR WINAPI StrRChrIA(LPCSTR,LPCSTR,WORD); +LPWSTR WINAPI StrRChrIW(LPCWSTR,LPCWSTR,WORD); +#define StrRChrI WINELIB_NAME_AW(StrRChrI) + +LPSTR WINAPI StrRStrIA(LPCSTR,LPCSTR,LPCSTR); +LPWSTR WINAPI StrRStrIW(LPCWSTR,LPCWSTR,LPCWSTR); +#define StrRStrI WINELIB_NAME_AW(StrRStrI) + +int WINAPI StrSpnA(LPCSTR,LPCSTR); +int WINAPI StrSpnW(LPCWSTR,LPCWSTR); +#define StrSpn WINELIB_NAME_AW(StrSpn) + +LPSTR WINAPI StrStrA(LPCSTR,LPCSTR); +LPWSTR WINAPI StrStrW(LPCWSTR,LPCWSTR); +#define StrStr WINELIB_NAME_AW(StrStr) + +LPSTR WINAPI StrStrIA(LPCSTR,LPCSTR); +LPWSTR WINAPI StrStrIW(LPCWSTR,LPCWSTR); +#define StrStrI WINELIB_NAME_AW(StrStrI) + +int WINAPI StrToIntA(LPCSTR); +int WINAPI StrToIntW(LPCWSTR); +#define StrToInt WINELIB_NAME_AW(StrToInt) +#define StrToLong WINELIB_NAME_AW(StrToInt) + +BOOL WINAPI StrToIntExA(LPCSTR,DWORD,int*); +BOOL WINAPI StrToIntExW(LPCWSTR,DWORD,int*); +#define StrToIntEx WINELIB_NAME_AW(StrToIntEx) + +BOOL WINAPI StrTrimA(LPSTR,LPCSTR); +BOOL WINAPI StrTrimW(LPWSTR,LPCWSTR); +#define StrTrim WINELIB_NAME_AW(StrTrim) + +INT WINAPI wvnsprintfA(LPSTR lpOut, INT cchLimitIn, LPCSTR lpFmt, va_list arglist); +INT WINAPI wvnsprintfW(LPWSTR lpOut, INT cchLimitIn, LPCWSTR lpFmt, va_list arglist); +#define wvnsprintf WINELIB_NAME_AW(wvnsprintf) + +INT WINAPIV wnsprintfA(LPSTR lpOut, INT cchLimitIn, LPCSTR lpFmt, ...); +INT WINAPIV wnsprintfW(LPWSTR lpOut, INT cchLimitIn, LPCWSTR lpFmt, ...); +#define wnsprintf WINELIB_NAME_AW(wnsprintf) + +/* Undocumented */ +struct _STRRET; +struct _ITEMIDLIST; +HRESULT WINAPI StrRetToBufA(struct _STRRET *src, const struct _ITEMIDLIST *pidl, LPSTR dest, DWORD len); +HRESULT WINAPI StrRetToBufW(struct _STRRET *src, const struct _ITEMIDLIST *pidl, LPWSTR dest, DWORD len); +#define StrRetToBuf WINELIB_NAME_AW(StrRetToBuf) + +#endif /* NO_SHLWAPI_STRFCNS */ + + +/* GDI functions */ +#ifndef NO_SHLWAPI_GDI + +HPALETTE WINAPI SHCreateShellPalette(HDC); + +COLORREF WINAPI ColorHLSToRGB(WORD,WORD,WORD); + +COLORREF WINAPI ColorAdjustLuma(COLORREF,int,BOOL); + +VOID WINAPI ColorRGBToHLS(COLORREF,LPWORD,LPWORD,LPWORD); + +#endif /* NO_SHLWAPI_GDI */ + + +/* Stream functions */ +#if !defined(NO_SHLWAPI_STREAM) && defined(IStream_IMETHODS) + +IStream * WINAPI SHOpenRegStreamA(HKEY,LPCSTR,LPCSTR,DWORD); +IStream * WINAPI SHOpenRegStreamW(HKEY,LPCWSTR,LPCWSTR,DWORD); +#define SHOpenRegStream WINELIB_NAME_AW(SHOpenRegStream) + +IStream * WINAPI SHOpenRegStream2A(HKEY,LPCSTR,LPCSTR,DWORD); +IStream * WINAPI SHOpenRegStream2W(HKEY,LPCWSTR,LPCWSTR,DWORD); +#define SHOpenRegStream2 WINELIB_NAME_AW(SHOpenRegStream2) + +#endif /* NO_SHLWAPI_STREAM */ + + +/* Version Information */ + +typedef struct _DllVersionInfo { + DWORD cbSize; + DWORD dwMajorVersion; + DWORD dwMinorVersion; + DWORD dwBuildNumber; + DWORD dwPlatformID; +} DLLVERSIONINFO; + +#define DLLVER_PLATFORM_WINDOWS 0x01 /* Win9x */ +#define DLLVER_PLATFORM_NT 0x02 /* WinNT */ + +typedef HRESULT (CALLBACK *DLLGETVERSIONPROC)(DLLVERSIONINFO *); + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* defined(__cplusplus) */ + +#endif /* __WINE_SHLWAPI_H */ diff --git a/reactos/lib/shell32/misc/stubs.c b/reactos/lib/shell32/misc/stubs.c index 5d9116519d8..e1ad7a7cab3 100644 --- a/reactos/lib/shell32/misc/stubs.c +++ b/reactos/lib/shell32/misc/stubs.c @@ -1,4 +1,25 @@ -/* $Id: stubs.c,v 1.2 2001/07/06 04:01:27 rex Exp $ +/* + * ReactOS shell32 - + * + * stubs.c + * + * Copyright (C) 2002 Robert Dickenson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id: stubs.c,v 1.3 2002/09/24 15:06:10 robd Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -7,11 +28,77 @@ * PROGRAMMER: Rex Jolliff (rex@lvcablemodem.com) */ -#include +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include +#include +#include +#include +#include +#include +#include +#include + + +#include "shell32.h" +#include + +#ifdef __GNUC__ +void* _alloca(size_t); +#endif + +#define NO_SHLWAPI_STREAM +#include "shlwapi.h" +//#include +//#include + +#define HDROP HANDLE +#define LPSHELLEXECUTEINFOA int* +#define LPSHELLEXECUTEINFOW int* +#define PNOTIFYICONDATAA int* +#define PNOTIFYICONDATAW int* +#define PAPPBARDATA int* +#define LPSHFILEOPSTRUCTA int* +#define LPSHFILEOPSTRUCTW int* +#define LPSHQUERYRBINFO int* +#define SHFILEINFOA int +#define SHFILEINFOW int + #define NDEBUG -#include +//#include + +typedef struct _SHITEMID { + USHORT cb; + BYTE abID[1]; +} SHITEMID, * LPSHITEMID; +typedef const SHITEMID * LPCSHITEMID; + +typedef struct _ITEMIDLIST { + SHITEMID mkid; +} ITEMIDLIST, * LPITEMIDLIST; +typedef const ITEMIDLIST * LPCITEMIDLIST; + +int CALLBACK BrowseCallbackProc( + HWND hwnd, + UINT uMsg, + LPARAM lParam, + LPARAM lpData + ); + +typedef int (*BFFCALLBACK)(HWND, UINT, LPARAM, LPARAM); + +typedef struct _browseinfo { + HWND hwndOwner; + LPCITEMIDLIST pidlRoot; + LPTSTR pszDisplayName; + LPCTSTR lpszTitle; + UINT ulFlags; + BFFCALLBACK lpfn; + LPARAM lParam; + int iImage; +} BROWSEINFO, *PBROWSEINFO, *LPBROWSEINFO; + + #undef DragQueryFile #undef ShellExecute @@ -19,723 +106,926 @@ #define STUB \ do \ { \ - DbgPrint ("%s(%d):%s not implemented\n", __FILE__, __LINE__, __FUNCTION__); \ + DbgPrint ("%s(%d):%s not implemented\n", __FILE__, __LINE__, __FUNCTION__); \ } \ while (0) + + VOID -STDCALL +WINAPI SHChangeNotifyRegister(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6) { STUB; } -VOID STDCALL +VOID WINAPI SHChangeNotifyDeregister(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI SHChangeNotifyUpdateEntryList(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI PifMgr_OpenProperties(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI PifMgr_GetProperties(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) { STUB; } -VOID STDCALL +VOID WINAPI PifMgr_SetProperties(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) { STUB; } -VOID STDCALL +VOID WINAPI PifMgr_CloseProperties(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI ILGetDisplayName(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI ILFindLastID(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI ILRemoveLastID(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI ILClone(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI ILCloneFirst(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI ILGlobalClone(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI ILIsEqual(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI ILIsParent(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI ILFindChild(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI ILCombine(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI ILLoadFromStream(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI ILSaveToStream(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI SHILCreateFromPath(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL -PathIsRoot(DWORD Unknown1) +BOOL WINAPI +PathIsRootA(LPCSTR path) +{ + STUB; + return FALSE; +} + +BOOL WINAPI +PathIsRootW(LPCWSTR path) +{ + STUB; + return FALSE; +} + +LPSTR WINAPI +PathBuildRootA(LPSTR Unknown1, int Unknown2) +{ + STUB; + return 0; +} + +LPWSTR WINAPI +PathBuildRootW(LPWSTR Unknown1, int Unknown2) +{ + STUB; + return 0; +} + +BOOL WINAPI +PathAddExtensionA(LPSTR Unknown1, LPCSTR Unknown2) +{ + STUB; + return FALSE; +} + +BOOL WINAPI +PathAddExtensionW(LPWSTR Unknown1, LPCWSTR Unknown2) +{ + STUB; + return FALSE; +} + + +LPSTR WINAPI +PathFindExtensionA(LPCSTR Unknown1) +{ + STUB; + return 0; +} + +LPWSTR WINAPI +PathFindExtensionW(LPCWSTR Unknown1) +{ + STUB; + return 0; +} + +LPSTR WINAPI +PathAddBackslashA(LPSTR Unknown1) +{ + STUB; + return 0; +} + +LPWSTR WINAPI +PathAddBackslashW(LPWSTR Unknown1) +{ + STUB; + return 0; +} + +VOID WINAPI +PathRemoveBlanksA(LPSTR Unknown1) { STUB; } -VOID STDCALL -PathBuildRoot(DWORD Unknown1, DWORD Unknown2) +VOID WINAPI +PathRemoveBlanksW(LPWSTR Unknown1) { STUB; } -VOID STDCALL -PathFindExtension(DWORD Unknown1) +LPSTR WINAPI +PathFindFileNameA(LPCSTR Unknown1) +{ + STUB; + return 0; +} + +LPWSTR WINAPI +PathFindFileNameW(LPCWSTR Unknown1) +{ + STUB; + return 0; +} + +BOOL WINAPI +PathRemoveFileSpecA(LPSTR Unknown1) +{ + STUB; + return FALSE; +} + +BOOL WINAPI +PathRemoveFileSpecW(LPWSTR Unknown1) +{ + STUB; + return FALSE; +} + +BOOL WINAPI +PathAppendA(LPSTR Unknown1, LPCSTR Unknown2) +{ + STUB; + return FALSE; +} + +BOOL WINAPI +PathAppendW(LPWSTR Unknown1, LPCWSTR Unknown2) +{ + STUB; + return FALSE; +} + +LPSTR WINAPI +PathCombineA(LPSTR Unknown1, LPCSTR Unknown2, LPCSTR Unknown3) +{ + STUB; + return 0; +} + +LPWSTR WINAPI +PathCombineW(LPWSTR Unknown1, LPCWSTR Unknown2, LPCWSTR Unknown3) +{ + STUB; + return 0; +} + +VOID WINAPI +PathStripPathA(LPSTR Unknown1) { STUB; } -VOID STDCALL -PathAddBackslash(DWORD Unknown1) +VOID WINAPI +PathStripPathW(LPWSTR Unknown1) { STUB; } -VOID STDCALL -PathRemoveBlanks(DWORD Unknown1) +BOOL WINAPI +PathIsUNCA(LPCSTR Unknown1) +{ + STUB; + return FALSE; +} + +BOOL WINAPI +PathIsUNCW(LPCWSTR Unknown1) +{ + STUB; + return FALSE; +} + +BOOL WINAPI +PathIsRelativeA(LPCSTR Unknown1) +{ + STUB; + return FALSE; +} + +BOOL WINAPI +PathIsRelativeW(LPCWSTR Unknown1) +{ + STUB; + return FALSE; +} + +VOID WINAPI +PathIsExeA(DWORD Unknown1) { STUB; } -VOID STDCALL -PathFindFileName(DWORD Unknown1) +VOID WINAPI +PathIsExeW(DWORD Unknown1) { STUB; } -VOID STDCALL -PathRemoveFileSpec(DWORD Unknown1) +BOOL WINAPI +PathFileExistsA(LPCSTR Unknown1) +{ + STUB; + return FALSE; +} + +BOOL WINAPI +PathFileExistsW(LPCWSTR Unknown1) +{ + STUB; + return FALSE; +} + +BOOL WINAPI +PathMatchSpecA(LPCSTR Unknown1, LPCSTR Unknown2) +{ + STUB; + return FALSE; +} + +BOOL WINAPI +PathMatchSpecW(LPCWSTR Unknown1, LPCWSTR Unknown2) +{ + STUB; + return FALSE; +} + +VOID WINAPI +PathMakeUniqueNameA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) { STUB; } -VOID STDCALL -PathAppend(DWORD Unknown1, DWORD Unknown2) +VOID WINAPI +PathMakeUniqueNameW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) { STUB; } -VOID STDCALL -PathCombine(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +VOID WINAPI +PathSetDlgItemPathA(HWND Unknown1, int Unknown2, LPCSTR Unknown3) { STUB; } -VOID STDCALL -PathStripPath(DWORD Unknown1) +VOID WINAPI +PathSetDlgItemPathW(HWND Unknown1, int Unknown2, LPCWSTR Unknown3) { STUB; } -VOID STDCALL -PathIsUNC(DWORD Unknown1) +VOID WINAPI +PathQualifyA(DWORD Unknown1) { STUB; } -VOID STDCALL -PathIsRelative(DWORD Unknown1) +VOID WINAPI +PathQualifyW(DWORD Unknown1) { STUB; } -VOID STDCALL -PathIsExe(DWORD Unknown1) +BOOL WINAPI +PathStripToRootA(LPSTR Unknown1) +{ + STUB; + return FALSE; +} + +BOOL WINAPI +PathStripToRootW(LPWSTR Unknown1) +{ + STUB; + return FALSE; +} + +VOID WINAPI +PathResolveA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL -PathFileExists(DWORD Unknown1) +VOID WINAPI +PathResolveW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL -PathMatchSpec(DWORD Unknown1, DWORD Unknown2) +LPSTR WINAPI +PathGetArgsA(LPCSTR Unknown1) +{ + STUB; + return 0; +} + +LPWSTR WINAPI +PathGetArgsW(LPCWSTR Unknown1) +{ + STUB; + return 0; +} + +DWORD WINAPI +DoEnvironmentSubst(LPTSTR pszString, UINT cbSize) +{ + STUB; + return 0; +} + +//VOID WINAPI +//DragAcceptFiles (HWND Unknown1, WINBOOL Unknown2) +VOID WINAPI +DragAcceptFiles(HWND hWnd, BOOL fAccept) { STUB; } -VOID STDCALL -PathMakeUniqueName(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) +VOID WINAPI +PathQuoteSpacesA(LPSTR Unknown1) { STUB; } -VOID STDCALL -PathSetDlgItemPath(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +VOID WINAPI +PathQuoteSpacesW(LPWSTR Unknown1) { STUB; } -VOID STDCALL -PathQualify(DWORD Unknown1) +VOID WINAPI +PathUnquoteSpacesA(LPSTR Unknown1) { STUB; } -VOID STDCALL -PathStripToRoot(DWORD Unknown1) +VOID WINAPI +PathUnquoteSpacesW(LPWSTR Unknown1) { STUB; } -VOID STDCALL -PathResolve(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +int WINAPI +PathGetDriveNumberA(LPCSTR Unknown1) { STUB; + return 0; } -VOID STDCALL -PathGetArgs(DWORD Unknown1) +int WINAPI +PathGetDriveNumberW(LPCWSTR Unknown1) { STUB; + return 0; } -VOID STDCALL -DoEnvironmentSubst(DWORD Unknown1, DWORD Unknown2) -{ - STUB; -} - -void WINAPI -DragAcceptFiles (HWND Unknown1, WINBOOL Unknown2) -{ - STUB; -} - -VOID STDCALL -PathQuoteSpaces(DWORD Unknown1) -{ - STUB; -} - -VOID STDCALL -PathUnquoteSpaces(DWORD Unknown1) -{ - STUB; -} - -VOID STDCALL -PathGetDriveNumber(DWORD Unknown1) -{ - STUB; -} - -VOID STDCALL +VOID WINAPI ParseField(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI RestartDialog(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI ExitWindowsDialog(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI RunFileDlg(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6) { STUB; } -VOID STDCALL +VOID WINAPI PickIconDlg(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI GetFileNameFromBrowse(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6, DWORD Unknown7) { STUB; } -VOID STDCALL +VOID WINAPI DriveType(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI InvalidateDriveType(VOID) { STUB; } -VOID STDCALL +VOID WINAPI IsNetDrive(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI Shell_MergeMenus(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6) { STUB; } -VOID STDCALL +VOID WINAPI SHGetSetSettings(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI SHGetNetResource(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SHCreateDefClassObject(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) { STUB; } -VOID STDCALL +VOID WINAPI Shell_GetImageList(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI Shell_GetCachedImageIndex(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI SHShellFolderView_Message(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI SHCreateStdEnumFmtEtc(VOID) { STUB; } -VOID STDCALL +VOID WINAPI PathYetAnotherMakeUniqueName(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI DragQueryInfo(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SHMapPIDLToSystemImageListIndex(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI OleStrToStrN(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI StrToOleStrN(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -void WINAPI -DragFinish (HDROP Unknown1) +VOID WINAPI +CIDLData_CreateFromIDArray(VOID) { STUB; } +VOID WINAPI +SHIsBadInterfacePtr(VOID) +{ + STUB; +} + +VOID WINAPI +SHRegisterDragDrop(DWORD Unknown1, DWORD Unknown2) +{ + STUB; +} + +VOID WINAPI +SHRevokeDragDrop(DWORD Unknown1) +{ + STUB; +} + +VOID WINAPI +SHDoDragDrop(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) +{ + STUB; +} + +VOID WINAPI +SHCloneSpecialIDList(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +{ + STUB; +} + +VOID WINAPI +SHFindFiles(VOID) +{ + STUB; +} + +VOID WINAPI +SHFindComputer(VOID) +{ + STUB; +} + +VOID WINAPI +PathGetShortPath(DWORD Unknown1) +{ + STUB; +} + +VOID WINAPI +Win32CreateDirectory(VOID) +{ + STUB; +} + +VOID WINAPI +Win32RemoveDirectory(VOID) +{ + STUB; +} + +VOID WINAPI +SHLogILFromFSIL(DWORD Unknown1) +{ + STUB; +} + +VOID WINAPI +StrRetToStrN(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) +{ + STUB; +} + +VOID WINAPI +SHWaitForFileToOpen(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +{ + STUB; +} + +VOID WINAPI +SHGetRealIDL(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +{ + STUB; +} + +VOID WINAPI +SetAppStartingCursor(DWORD Unknown1, DWORD Unknown2) +{ + STUB; +} + +VOID WINAPI +SHRestricted(DWORD Unknown1) +{ + STUB; +} + +VOID WINAPI +SHCoCreateInstance(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) +{ + STUB; +} + +VOID WINAPI +SignalFileOpen(DWORD Unknown1) +{ + STUB; +} + +VOID WINAPI +FileMenu_DeleteAllItems(DWORD Unknown1) +{ + STUB; +} + +VOID WINAPI +FileMenu_DrawItem(DWORD Unknown1, DWORD Unknown2) +{ + STUB; +} + +VOID WINAPI +FileMenu_FindSubMenuByPidl(DWORD Unknown1, DWORD Unknown2) +{ + STUB; +} + +VOID WINAPI +FileMenu_GetLastSelectedItemPidls(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +{ + STUB; +} + +VOID WINAPI +FileMenu_HandleMenuChar(DWORD Unknown1, DWORD Unknown2) +{ + STUB; +} + +VOID WINAPI +FileMenu_InitMenuPopup(DWORD Unknown1) +{ + STUB; +} + +VOID WINAPI +FileMenu_InsertUsingPidl(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6) +{ + STUB; +} + +VOID WINAPI +FileMenu_Invalidate(DWORD Unknown1) +{ + STUB; +} + +VOID WINAPI +FileMenu_MeasureItem(DWORD Unknown1, DWORD Unknown2) +{ + STUB; +} + +VOID WINAPI +FileMenu_ReplaceUsingPidl(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) +{ + STUB; +} + +VOID WINAPI +FileMenu_Create(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) +{ + STUB; +} + +VOID WINAPI +FileMenu_AppendItem(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6) +{ + STUB; +} + +VOID WINAPI +FileMenu_TrackPopupMenuEx(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6) +{ + STUB; +} + +VOID WINAPI +FileMenu_DeleteItemByCmd(DWORD Unknown1, DWORD Unknown2) +{ + STUB; +} + +VOID WINAPI +FileMenu_Destroy(DWORD Unknown1) +{ + STUB; +} + +VOID WINAPI +IsLFNDrive(DWORD Unknown1) +{ + STUB; +} + +VOID WINAPI +FileMenu_AbortInitMenu(VOID) +{ + STUB; +} + +VOID WINAPI +SHFlushClipboard(VOID) +{ + STUB; +} +/* +VOID WINAPI +RunDLL_CallEntry16(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) +{ + STUB; +} + */ +VOID WINAPI +SHFreeUnusedLibraries(VOID) +{ + STUB; +} + +VOID WINAPI +FileMenu_AppendFilesForPidl(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +{ + STUB; +} + +VOID WINAPI +FileMenu_AddFilesForPidl(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6, DWORD Unknown7) +{ + STUB; +} + +VOID WINAPI +SHOutOfMemoryMessageBox(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +{ + STUB; +} + +VOID WINAPI +SHWinHelp(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) +{ + STUB; +} + +/* +VOID WINAPI +DllGetClassObject(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +{ + STUB; +} + + This is now implemented in the C++ module _stubs.cpp as: + + STDAPI DllGetClassObject(const CLSID & rclsid, const IID & riid, void ** ppv); + + */ + +VOID WINAPI +DAD_AutoScroll(VOID) +{ + STUB; +} + +VOID WINAPI +DAD_DragEnter(VOID) +{ + STUB; +} + +VOID WINAPI +DAD_DragEnterEx(VOID) +{ + STUB; +} + +VOID WINAPI +DAD_DragLeave(VOID) +{ + STUB; +} + +VOID WINAPI +DragFinish(HDROP hDrop) +{ + STUB; +} +/* unsigned int WINAPI DragQueryFile(HDROP Unknown1, unsigned int Unknown2, char * Unknown3, unsigned int Unknown4) { STUB; + return 0; } unsigned int WINAPI DragQueryFileA(HDROP Unknown1, unsigned int Unknown2, char * Unknown3, unsigned int Unknown4) { STUB; -} - -VOID STDCALL -CIDLData_CreateFromIDArray(VOID) -{ - STUB; -} - -VOID STDCALL -SHIsBadInterfacePtr(VOID) -{ - STUB; -} - -VOID STDCALL -SHRegisterDragDrop(DWORD Unknown1, DWORD Unknown2) -{ - STUB; -} - -VOID STDCALL -SHRevokeDragDrop(DWORD Unknown1) -{ - STUB; -} - -VOID STDCALL -SHDoDragDrop(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) -{ - STUB; -} - -VOID STDCALL -SHCloneSpecialIDList(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) -{ - STUB; -} - -VOID STDCALL -SHFindFiles(VOID) -{ - STUB; -} - -VOID STDCALL -SHFindComputer(VOID) -{ - STUB; -} - -VOID STDCALL -PathGetShortPath(DWORD Unknown1) -{ - STUB; -} - -VOID STDCALL -Win32CreateDirectory(VOID) -{ - STUB; -} - -VOID STDCALL -Win32RemoveDirectory(VOID) -{ - STUB; -} - -VOID STDCALL -SHLogILFromFSIL(DWORD Unknown1) -{ - STUB; -} - -VOID STDCALL -StrRetToStrN(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) -{ - STUB; -} - -VOID STDCALL -SHWaitForFileToOpen(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) -{ - STUB; -} - -VOID STDCALL -SHGetRealIDL(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) -{ - STUB; -} - -VOID STDCALL -SetAppStartingCursor(DWORD Unknown1, DWORD Unknown2) -{ - STUB; -} - -VOID STDCALL -SHRestricted(DWORD Unknown1) -{ - STUB; -} - -VOID STDCALL -SHCoCreateInstance(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) -{ - STUB; -} - -VOID STDCALL -SignalFileOpen(DWORD Unknown1) -{ - STUB; -} - -VOID STDCALL -FileMenu_DeleteAllItems(DWORD Unknown1) -{ - STUB; -} - -VOID STDCALL -FileMenu_DrawItem(DWORD Unknown1, DWORD Unknown2) -{ - STUB; -} - -VOID STDCALL -FileMenu_FindSubMenuByPidl(DWORD Unknown1, DWORD Unknown2) -{ - STUB; -} - -VOID STDCALL -FileMenu_GetLastSelectedItemPidls(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) -{ - STUB; -} - -VOID STDCALL -FileMenu_HandleMenuChar(DWORD Unknown1, DWORD Unknown2) -{ - STUB; -} - -VOID STDCALL -FileMenu_InitMenuPopup(DWORD Unknown1) -{ - STUB; -} - -VOID STDCALL -FileMenu_InsertUsingPidl(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6) -{ - STUB; -} - -VOID STDCALL -FileMenu_Invalidate(DWORD Unknown1) -{ - STUB; -} - -VOID STDCALL -FileMenu_MeasureItem(DWORD Unknown1, DWORD Unknown2) -{ - STUB; -} - -VOID STDCALL -FileMenu_ReplaceUsingPidl(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) -{ - STUB; -} - -VOID STDCALL -FileMenu_Create(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) -{ - STUB; -} - -VOID STDCALL -FileMenu_AppendItem(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6) -{ - STUB; -} - -VOID STDCALL -FileMenu_TrackPopupMenuEx(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6) -{ - STUB; -} - -VOID STDCALL -FileMenu_DeleteItemByCmd(DWORD Unknown1, DWORD Unknown2) -{ - STUB; -} - -VOID STDCALL -FileMenu_Destroy(DWORD Unknown1) -{ - STUB; -} - -VOID STDCALL -IsLFNDrive(DWORD Unknown1) -{ - STUB; -} - -VOID STDCALL -FileMenu_AbortInitMenu(VOID) -{ - STUB; -} - -VOID STDCALL -SHFlushClipboard(VOID) -{ - STUB; -} - -VOID STDCALL -RunDLL_CallEntry16(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) -{ - STUB; -} - -VOID STDCALL -SHFreeUnusedLibraries(VOID) -{ - STUB; -} - -VOID STDCALL -FileMenu_AppendFilesForPidl(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) -{ - STUB; -} - -VOID STDCALL -FileMenu_AddFilesForPidl(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6, DWORD Unknown7) -{ - STUB; -} - -VOID STDCALL -SHOutOfMemoryMessageBox(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) -{ - STUB; -} - -VOID STDCALL -SHWinHelp(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) -{ - STUB; -} - -VOID STDCALL -DllGetClassObject(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) -{ - STUB; -} - -VOID STDCALL -DAD_AutoScroll(VOID) -{ - STUB; -} - -VOID STDCALL -DAD_DragEnter(VOID) -{ - STUB; -} - -VOID STDCALL -DAD_DragEnterEx(VOID) -{ - STUB; -} - -VOID STDCALL -DAD_DragLeave(VOID) -{ - STUB; + return 0; } unsigned int WINAPI @@ -743,608 +1033,705 @@ DragQueryFileW(HDROP Unknown1, unsigned int Unknown2, LPCWSTR Unknown3, unsigned { STUB; } + */ +UINT WINAPI +DragQueryFileA(HDROP hDrop, UINT iFile, LPSTR lpszFile, UINT cch) +{ + STUB; + return 0; +} -VOID STDCALL +UINT WINAPI +DragQueryFileW(HDROP hDrop, UINT iFile, LPWSTR lpszFile, UINT cch) +{ + STUB; + return 0; +} + + +VOID WINAPI DAD_DragMove(VOID) { STUB; } -WINBOOL WINAPI -DragQueryPoint (HDROP Unknown1, LPPOINT Unknown2) +UINT WINAPI +DragQueryPoint(HDROP Unknown1, LPPOINT Unknown2) { STUB; + return 0; } -VOID STDCALL +VOID WINAPI DAD_SetDragImage(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI DAD_ShowDragImage(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI Desktop_UpdateBriefcaseOnEvent(VOID) { STUB; } -VOID STDCALL +VOID WINAPI FileMenu_DeleteItemByIndex(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI FileMenu_DeleteItemByFirstID(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI FileMenu_DeleteSeparator(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI FileMenu_EnableItemByCmd(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI FileMenu_GetItemExtent(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL -PathFindOnPath(DWORD Unknown1, DWORD Unknown2) +BOOL WINAPI +PathFindOnPathA(LPSTR Unknown1, LPCSTR* Unknown2) { STUB; + return 0; } -VOID STDCALL +BOOL WINAPI +PathFindOnPathW(LPWSTR Unknown1, LPCWSTR* Unknown2) +{ + STUB; + return 0; +} + +VOID WINAPI RLBuildListOfPaths(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SHCLSIDFromString(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI SHFind_InitMenuPopup(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI SHLoadOLE(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI ILGetSize(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI ILGetNext(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI ILAppend(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI ILFree(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI ILGlobalFree(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI ILCreateFromPath(DWORD Unknown1) { STUB; } -VOID STDCALL -PathGetExtension(DWORD Unknown1) +VOID WINAPI +PathGetExtensionA(DWORD Unknown1) { STUB; } -VOID STDCALL -PathIsDirectory(DWORD Unknown1) +VOID WINAPI +PathGetExtensionW(DWORD Unknown1) { STUB; } -VOID STDCALL +BOOL WINAPI +PathIsDirectoryA(LPCSTR Unknown1) +{ + STUB; + return 0; +} + +BOOL WINAPI +PathIsDirectoryW(LPCWSTR Unknown1) +{ + STUB; + return 0; +} + +VOID WINAPI SHNetConnectionDialog(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SHRunControlPanel(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI SHSimpleIDListFromPath(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI StrToOleStr(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI Win32DeleteFile(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI SHCreateDirectory(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL -CallCPLEntry16(VOID) +DWORD WINAPI +CallCPLEntry16(HMODULE hMod, FARPROC pFunc, DWORD dw3, DWORD dw4, DWORD dw5, DWORD dw6) +//VOID WINAPI +//CallCPLEntry16(VOID) { STUB; + return 0; } - -VOID STDCALL + +VOID WINAPI SHAddFromPropSheetExtArray(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI SHCreatePropSheetExtArray(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI SHDestroyPropSheetExtArray(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI SHReplaceFromPropSheetExtArray(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL -PathCleanupSpec(DWORD Unknown1, DWORD Unknown2) +VOID WINAPI +PathCleanupSpecA(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI SHCreateLinks(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SHValidateUNC(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI SHCreateShellFolderViewEx(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI SHGetSpecialFolderPath(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI SHSetInstanceExplorer(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI DAD_SetDragImageFromListView(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SHObjectProperties(VOID) { STUB; } -VOID STDCALL +/* +//VOID WINAPI +//SHGetNewLinkInfo(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) +#ifndef _MSC_VER +BOOL WINAPI +SHGetNewLinkInfo(LPCTSTR pszLinkTo, LPCTSTR pszDir, LPTSTR pszName, BOOL* pfMustCopy, UINT uFlags) +{ + STUB; +} +#endif + */ +#ifdef _MSC_VER +BOOL WINAPI +SHGetNewLinkInfoA(LPCTSTR pszLinkTo, LPCTSTR pszDir, LPTSTR pszName, BOOL* pfMustCopy, UINT uFlags) +#else +BOOL WINAPI SHGetNewLinkInfoA(VOID) +#endif { STUB; + return 0; } -VOID STDCALL +#ifdef _MSC_VER +BOOL WINAPI +SHGetNewLinkInfoW(LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName, BOOL* pfMustCopy, UINT uFlags) +#else +BOOL WINAPI SHGetNewLinkInfoW(VOID) +#endif { STUB; + return 0; } -VOID STDCALL +VOID WINAPI RegisterShellHook(DWORD Unknown1, DWORD Unknown2) { STUB; } VOID -ShellMessageBoxW (DWORD Unknown1, ...) +ShellMessageBoxW(DWORD Unknown1, ...) { STUB; } VOID -ShellMessageBoxA (DWORD Unknown1, ...) +ShellMessageBoxA(DWORD Unknown1, ...) { STUB; } -VOID STDCALL +VOID WINAPI ArrangeWindows(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) { STUB; } -VOID STDCALL +VOID WINAPI SHHandleDiskFull(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SHFree(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI SHAlloc(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI SHGlobalDefect(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SHAbortInvokeCommand(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SHGetFileIcon(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SHLocalAlloc(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SHLocalFree(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SHLocalReAlloc(VOID) { STUB; } -VOID STDCALL +VOID WINAPI AddCommasW(VOID) { STUB; } -VOID STDCALL +VOID WINAPI ShortSizeFormatW(VOID) { STUB; } -VOID STDCALL +VOID WINAPI Printer_LoadIconsW(VOID) { STUB; } -VOID STDCALL +VOID WINAPI Link_AddExtraDataSection(VOID) { STUB; } -VOID STDCALL +VOID WINAPI Link_ReadExtraDataSection(VOID) { STUB; } -VOID STDCALL +VOID WINAPI Link_RemoveExtraDataSection(VOID) { STUB; } -VOID STDCALL +VOID WINAPI Int64ToString(VOID) { STUB; } -VOID STDCALL +VOID WINAPI LargeIntegerToString(VOID) { STUB; } -VOID STDCALL +VOID WINAPI Printers_GetPidl(VOID) { STUB; } -VOID STDCALL +VOID WINAPI Printer_AddPrinterPropPages(VOID) { STUB; } -VOID STDCALL +VOID WINAPI Printers_RegisterWindowW(VOID) { STUB; } -VOID STDCALL +VOID WINAPI Printers_UnregisterWindow(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SHStartNetConnectionDialog(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI shell32_243(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI SHInitRestricted(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI SHGetDataFromIDListA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) { STUB; } -VOID STDCALL +VOID WINAPI SHGetDataFromIDListW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) { STUB; } -VOID STDCALL -PathParseIconLocation(DWORD Unknown1) +int WINAPI +PathParseIconLocationA(LPSTR Unknown1) +{ + STUB; + return 0; +} + +int WINAPI +PathParseIconLocationW(LPWSTR Unknown1) +{ + STUB; + return 0; +} + +VOID WINAPI +PathRemoveExtensionA(LPSTR Unknown1) { STUB; } -VOID STDCALL -PathRemoveExtension(DWORD Unknown1) +VOID WINAPI +PathRemoveExtensionW(LPWSTR Unknown1) { STUB; } -VOID STDCALL -PathRemoveArgs(DWORD Unknown1) +VOID WINAPI +PathRemoveArgsA(LPSTR Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI +PathRemoveArgsW(LPWSTR Unknown1) +{ + STUB; +} + +VOID WINAPI SheChangeDirA(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SheChangeDirExA(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SheChangeDirExW(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SheChangeDirW(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI SheConvertPathW(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SheFullPathA(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SheFullPathW(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SheGetCurDrive(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SheGetDirA(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI SheGetDirExW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI SheGetDirW(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI SheGetPathOffsetW(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SheRemoveQuotesA(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SheRemoveQuotesW(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SheSetCurDrive(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SheShortenPathA(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SheShortenPathW(VOID) { STUB; } -int WINAPI -ShellAboutA (HWND Unknown1, const char * Unknown2, const char * Unknown3, HICON Unknown4) +UINT WINAPI +ShellAboutA (HWND Unknown1, LPCSTR Unknown2, LPCSTR Unknown3, HICON Unknown4) { STUB; + return 0; } -int WINAPI -ShellAboutW (HWND Unknown1, const LPCWSTR Unknown2, const LPCWSTR Unknown3, HICON Unknown4) +UINT WINAPI +//ShellAboutW (HWND Unknown1, const LPCWSTR Unknown2, const LPCWSTR Unknown3, HICON Unknown4) +ShellAboutW (HWND Unknown1, LPCWSTR Unknown2, LPCWSTR Unknown3, HICON Unknown4) { STUB; + return 0; } - +/* HINSTANCE WINAPI ShellExecuteA (HWND Unknown1, const char * Unknown2, const char * Unknown3, char * Unknown4, const char * Unknown5, int Unknown6) { STUB; } - -VOID STDCALL -ShellExecuteEx(DWORD Unknown1) + */ +/* +//VOID WINAPI +//ShellExecuteEx(DWORD Unknown1) +BOOL WINAPI +ShellExecuteEx(LPSHELLEXECUTEINFO lpExecInfo) { STUB; + return 0; } - -VOID STDCALL -ShellExecuteExA(DWORD Unknown1) + */ +//VOID WINAPI +//ShellExecuteExA(DWORD Unknown1) +BOOL WINAPI +ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo) { STUB; + return 0; } -VOID STDCALL -ShellExecuteExW(DWORD Unknown1) +//VOID WINAPI +//ShellExecuteExW(DWORD Unknown1) +BOOL WINAPI +ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo) { STUB; + return 0; } -VOID STDCALL +VOID WINAPI ShellExecute (DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6) { STUB; @@ -1354,321 +1741,358 @@ HINSTANCE WINAPI ShellExecuteW (HWND Unknown1, const LPCWSTR Unknown2, const LPCWSTR Unknown3, LPCWSTR Unknown4, const LPCWSTR Unknown5, int Unknown6) { STUB; + return 0; } - -VOID STDCALL -Shell_NotifyIcon(DWORD Unknown1, DWORD Unknown2) +/* +//VOID WINAPI +//Shell_NotifyIcon(DWORD Unknown1, DWORD Unknown2) +BOOL WINAPI Shell_NotifyIcon(DWORD dwMessage, PNOTIFYICONDATA pnid) { STUB; + return 0; } - -VOID STDCALL -Shell_NotifyIconA(DWORD Unknown1, DWORD Unknown2) + */ +//VOID WINAPI +//Shell_NotifyIconA(DWORD Unknown1, DWORD Unknown2) +BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid) { STUB; + return 0; } -VOID STDCALL -Shell_NotifyIconW(DWORD Unknown1, DWORD Unknown2) +//VOID WINAPI +//Shell_NotifyIconW(DWORD Unknown1, DWORD Unknown2) +//BOOL WINAPI Shell_NotifyIconW(DWORD,PNOTIFYICONDATAW); +BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW pnid) { STUB; + return 0; } -VOID STDCALL +VOID WINAPI Shl1632_ThunkData32(VOID) { STUB; } -VOID STDCALL +VOID WINAPI Shl3216_ThunkData32(VOID) { STUB; } -VOID STDCALL +VOID WINAPI StrCpyNA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } - -VOID STDCALL + +VOID WINAPI StrNCpyA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI StrRStrA(VOID) { STUB; } -VOID STDCALL +VOID WINAPI StrRStrW(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SHRegCloseKey(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI SHRegOpenKeyA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI SHRegOpenKeyW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI SHRegQueryValueA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI SHRegQueryValueExA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6) { STUB; } -VOID STDCALL +VOID WINAPI SHRegQueryValueW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI SHRegQueryValueExW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6) { STUB; } -VOID STDCALL +VOID WINAPI SHRegDeleteKeyW(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI SHAllocShared(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) { STUB; } -VOID STDCALL +VOID WINAPI SHLockShared(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI SHUnlockShared(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI SHFreeShared(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI RealDriveType(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI RealDriveTypeFlags(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI NTSHChangeNotifyRegister(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6) { STUB; } -VOID STDCALL +VOID WINAPI NTSHChangeNotifyDeregister(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI SHChangeNotifyReceive(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI SHChangeNotification_Lock(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI SHChangeNotification_Unlock(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI SHChangeRegistrationReceive(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI ReceiveAddToRecentDocs(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI SHWaitOp_Operate(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL -PathIsSameRoot(DWORD Unknown1, DWORD Unknown2) +BOOL WINAPI +PathIsSameRootA(LPCSTR Unknown1, LPCSTR Unknown2) { STUB; + return 0; } -VOID STDCALL +BOOL WINAPI +PathIsSameRootW(LPCWSTR Unknown1, LPCWSTR Unknown2) +{ + STUB; + return 0; +} + +VOID WINAPI ReadCabinetState(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI WriteCabinetState(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI PathProcessCommand(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI shell32_654(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI FileIconInit(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI IsUserAdmin(VOID) { STUB; } -VOID STDCALL +VOID WINAPI shell32_714(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI FOOBAR1217(VOID) { STUB; } -VOID STDCALL +VOID WINAPI CheckEscapesA(VOID) { STUB; } -VOID STDCALL +VOID WINAPI CheckEscapesW(VOID) { STUB; } -VOID STDCALL +LPWSTR WINAPI CommandLineToArgvW(DWORD Unknown1, DWORD Unknown2) +//CommandLineToArgvW(LPCWSTR lpCmdLine, int* pNumArgs) +{ +// lpCmdLine - pointer to a command-line string +// pNumArgs - receives the argument count + STUB; + return 0; +} +/* +HRESULT WINAPI +Control_FillCache_RunDLL(HWND hWnd, HANDLE hModule, DWORD w, DWORD x) +//VOID WINAPI +//Control_FillCache_RunDLL(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; + return 0; } - -VOID STDCALL -Control_FillCache_RunDLL(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) + */ +//VOID WINAPI +//Control_FillCache_RunDLLA(VOID) +HRESULT WINAPI +Control_FillCache_RunDLLA(HWND hWnd, HANDLE hModule, DWORD w, DWORD x) { STUB; + return 0; } -VOID STDCALL -Control_FillCache_RunDLLA(VOID) +//VOID WINAPI +//Control_FillCache_RunDLLW(VOID) +HRESULT WINAPI +Control_FillCache_RunDLLW(HWND hWnd, HANDLE hModule, DWORD w, DWORD x) { STUB; + return 0; } -VOID STDCALL -Control_FillCache_RunDLLW(VOID) +VOID Control_RunDLL(HWND hWnd, HINSTANCE hInst_unused, LPCWSTR lpCmdLine, DWORD nCmdShow); + +VOID WINAPI +Control_RunDLLA(HWND hWnd, HINSTANCE hInst_unused, LPCSTR lpCmdLine, DWORD nCmdShow) { - STUB; + int reqSize = MultiByteToWideChar(CP_ACP, 0, lpCmdLine, -1, 0, 0) * sizeof(TCHAR); + if (reqSize) { +// LPWSTR pCmdLine = (LPWSTR)malloc(reqSize + 10); + LPWSTR pCmdLine = (LPWSTR)_alloca(reqSize); + if (MultiByteToWideChar(CP_ACP, 0, lpCmdLine, -1, pCmdLine, reqSize)) { + Control_RunDLL(hWnd, hInst_unused, pCmdLine, nCmdShow); + } +// free(pCmdLine); + } } -VOID STDCALL -Control_RunDLL(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) +VOID WINAPI +Control_RunDLLW(HWND hWnd, HINSTANCE hInst_unused, LPCWSTR lpCmdLine, DWORD nCmdShow) { - STUB; + Control_RunDLL(hWnd, hInst_unused, lpCmdLine, nCmdShow); } -VOID STDCALL -Control_RunDLLA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) -{ - STUB; -} - -VOID STDCALL -Control_RunDLLW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) -{ - STUB; -} - -VOID STDCALL +VOID WINAPI DllInstall(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL -DoEnvironmentSubstA(DWORD Unknown1, DWORD Unknown2) +/* +//VOID WINAPI +//DoEnvironmentSubstA(DWORD Unknown1, DWORD Unknown2) +DWORD WINAPI DoEnvironmentSubstA(LPCTSTR pszString, UINT cbSize) { STUB; } - -VOID STDCALL -DoEnvironmentSubstW(DWORD Unknown1, DWORD Unknown2) + */ +//VOID WINAPI +//DoEnvironmentSubstW(DWORD Unknown1, DWORD Unknown2) +DWORD WINAPI DoEnvironmentSubstW(LPCTSTR pszString, UINT cbSize) { STUB; + return 0; } -VOID STDCALL +VOID WINAPI DragQueryFileAorW(VOID) { STUB; @@ -1678,21 +2102,23 @@ HICON WINAPI DuplicateIcon (HINSTANCE Unknown1, HICON Unknown2) { STUB; + return 0; } HICON WINAPI -ExtractAssociatedIconA (HINSTANCE Unknown1, char * Unknown2, WORD * Unknown3) +ExtractAssociatedIconA(HINSTANCE Unknown1, LPCSTR Unknown2, PWORD Unknown3) { STUB; + return 0; } -VOID STDCALL +VOID WINAPI ExtractAssociatedIconExA(VOID) { STUB; } -VOID STDCALL +VOID WINAPI ExtractAssociatedIconExW(VOID) { STUB; @@ -1702,399 +2128,485 @@ HICON WINAPI ExtractAssociatedIconW (HINSTANCE Unknown1, LPCWSTR Unknown2, WORD * Unknown3) { STUB; + return 0; } HICON WINAPI ExtractIconA (HINSTANCE Unknown1, const char * Unknown2, unsigned int Unknown3) { STUB; + return 0; } -VOID STDCALL -ExtractIconEx(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) +/* +//VOID WINAPI +//ExtractIconEx(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) +UINT WINAPI ExtractIconEx(LPCTSTR lpszFile, int nIconIndex, HICON* phiconLarge, HICON* phiconSmall, UINT nIcons) +{ +// lpszFile - file name +// nIconIndex - icon index +// phiconLarge - large icon array +// phiconSmall - small icon array +// nIcons - number of icons to extract + STUB; + return 0; +} + */ + +//VOID WINAPI +//ExtractIconExA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) +//HICON WINAPI ExtractIconExA(LPCSTR,int,HICON*,HICON*,UINT); +//HICON WINAPI ExtractIconExA(LPCSTR lpszFile, int nIconIndex, HICON* phiconLarge, HICON* phiconSmall, UINT nIcons) +#ifdef _MSC_VER +UINT +#else +HICON +#endif +WINAPI +ExtractIconExA(LPCSTR lpszFile, int nIconIndex, HICON* phiconLarge, HICON* phiconSmall, UINT nIcons) { STUB; + return 0; } -VOID STDCALL -ExtractIconExA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) +//VOID WINAPI +//ExtractIconExW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) +//HICON WINAPI ExtractIconExW(LPCWSTR,int,HICON*,HICON*,UINT); // from ming header +//UINT WINAPI ExtractIconExW(LPCTSTR lpszFile, int nIconIndex, HICON* phiconLarge, HICON* phiconSmall, UINT nIcons) +//HICON WINAPI ExtractIconExW(LPCWSTR lpszFile, int nIconIndex, HICON* phiconLarge, HICON* phiconSmall, UINT nIcons) +#ifdef _MSC_VER +UINT +#else +HICON +#endif +WINAPI +ExtractIconExW(LPCWSTR lpszFile, int nIconIndex, HICON* phiconLarge, HICON* phiconSmall, UINT nIcons) { STUB; + return 0; } -VOID STDCALL -ExtractIconExW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) -{ - STUB; -} - -HICON WINAPI +HICON +//WINAPI +WINAPI ExtractIconW (HINSTANCE Unknown1, const LPCWSTR Unknown2, unsigned int Unknown3) { STUB; + return 0; } -VOID STDCALL +VOID WINAPI ExtractIconResInfoA(VOID) { STUB; } -VOID STDCALL +VOID WINAPI ExtractIconResInfoW(VOID) { STUB; } -VOID STDCALL +VOID WINAPI ExtractVersionResource16W(VOID) { STUB; } -VOID STDCALL +VOID WINAPI FindExeDlgProc(VOID) { STUB; } -HINSTANCE WINAPI -FindExecutableA (const char * Unknown1, const char * Unknown2, char * Unknown3) +HINSTANCE +WINAPI +FindExecutableA(const char * Unknown1, const char * Unknown2, char * Unknown3) { STUB; + return 0; } -HINSTANCE WINAPI -FindExecutableW (const LPCWSTR Unknown1, const LPCWSTR Unknown2, LPCWSTR Unknown3) +HINSTANCE +WINAPI +// FindExecutableW(LPCWSTR,LPCWSTR,LPWSTR); +FindExecutableW(const LPCWSTR Unknown1, const LPCWSTR Unknown2, LPWSTR Unknown3) { STUB; + return 0; } -VOID STDCALL +VOID WINAPI FreeIconList(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI InternalExtractIconListA(VOID) { STUB; } -VOID STDCALL +VOID WINAPI InternalExtractIconListW(VOID) { STUB; } -VOID STDCALL +VOID WINAPI OpenAs_RunDLL(VOID) { STUB; } -VOID STDCALL +VOID WINAPI OpenAs_RunDLLA(VOID) { STUB; } -VOID STDCALL +VOID WINAPI OpenAs_RunDLLW(VOID) { STUB; } -VOID STDCALL +VOID WINAPI PrintersGetCommand_RunDLL(VOID) { STUB; } -VOID STDCALL +VOID WINAPI PrintersGetCommand_RunDLLA(VOID) { STUB; } -VOID STDCALL +VOID WINAPI PrintersGetCommand_RunDLLW(VOID) { STUB; } -VOID STDCALL +VOID WINAPI RealShellExecuteA(VOID) { STUB; } -VOID STDCALL +VOID WINAPI RealShellExecuteExA(VOID) { STUB; } -VOID STDCALL +VOID WINAPI RealShellExecuteExW(VOID) { STUB; } -VOID STDCALL +VOID WINAPI RealShellExecuteW(VOID) { STUB; } -VOID STDCALL +VOID WINAPI RegenerateUserEnvironment(VOID) { STUB; } -void WINAPI +//void WINAPI +VOID WINAPI SHAddToRecentDocs (UINT Unknown1, LPCVOID Unknown2) { STUB; } -VOID STDCALL -SHAppBarMessage(DWORD Unknown1, DWORD Unknown2) +//VOID WINAPI +//SHAppBarMessage(DWORD Unknown1, DWORD Unknown2) +UINT WINAPI SHAppBarMessage(DWORD dwMessage, PAPPBARDATA pData) { STUB; + return 0; } -LPITEMIDLIST WINAPI -SHBrowseForFolder (LPBROWSEINFO Unknown1) + + +LPITEMIDLIST +//WINAPI +WINAPI +SHBrowseForFolder(LPBROWSEINFO Unknown1) { STUB; + return 0; } -VOID STDCALL +VOID WINAPI SHBrowseForFolderA(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI SHBrowseForFolderW(DWORD Unknown1) { STUB; } -void WINAPI +//void WINAPI +VOID WINAPI SHChangeNotify (LONG Unknown1, UINT Unknown2, LPCVOID Unknown3, LPCVOID Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI ShellHookProc(VOID) { STUB; } -VOID STDCALL -SHEmptyRecycleBinA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) + +//VOID WINAPI +//SHEmptyRecycleBinA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +HRESULT WINAPI SHEmptyRecycleBinA(HWND hwnd, LPCTSTR pszRootPath, DWORD dwFlags) { STUB; + return 0; } -VOID STDCALL -SHEmptyRecycleBinW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +//VOID WINAPI +//SHEmptyRecycleBinW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +HRESULT WINAPI SHEmptyRecycleBinW(HWND hwnd, LPCTSTR pszRootPath, DWORD dwFlags) { STUB; + return 0; } - +/* int WINAPI SHFileOperation (LPSHFILEOPSTRUCT Unknown1) { STUB; + return 0; } + */ +//VOID WINAPI +//SHFileOperationA(DWORD Unknown1) +//int WINAPI -VOID STDCALL -SHFileOperationA(DWORD Unknown1) +INT WINAPI +SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp) { STUB; + return 0; } -VOID STDCALL -SHFileOperationW(DWORD Unknown1) +//VOID WINAPI +//SHFileOperationW(DWORD Unknown1) +//int WINAPI +INT WINAPI +SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) { STUB; + return 0; } -VOID STDCALL +VOID WINAPI SHFormatDrive(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -void WINAPI +//void WINAPI +VOID WINAPI SHFreeNameMappings (HANDLE Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI SHGetDesktopFolder(DWORD Unknown1) { STUB; } +/* +//DWORD WINAPI +//SHGetFileInfo (LPCTSTR Unknown1, DWORD Unknown2, SHFILEINFO FAR * Unknown3, UINT Unknown4, UINT Unknown5) +DWORD_PTR WINAPI +SHGetFileInfo(LPCTSTR pszPath, DWORD dwFileAttributes, SHFILEINFO* psfi, UINT cbFileInfo, UINT uFlags) +{ + STUB; + return 0; +} + */ +//VOID WINAPI +//SHGetFileInfoA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) +//DWORD WINAPI SHGetFileInfoA(LPCSTR,DWORD,SHFILEINFOA*,UINT,UINT); +//DWORD_PTR WINAPI +//DWORD WINAPI DWORD WINAPI -SHGetFileInfo (LPCTSTR Unknown1, DWORD Unknown2, SHFILEINFO FAR * Unknown3, UINT Unknown4, UINT Unknown5) +SHGetFileInfoA(LPCSTR pszPath, DWORD dwFileAttributes, SHFILEINFOA* psfi, UINT cbFileInfo, UINT uFlags) { STUB; + return 0; } -VOID STDCALL -SHGetFileInfoA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) +//VOID WINAPI +//SHGetFileInfoW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) +//DWORD_PTR WINAPI +//DWORD WINAPI +DWORD WINAPI +SHGetFileInfoW(LPCTSTR pszPath, DWORD dwFileAttributes, SHFILEINFOW* psfi, UINT cbFileInfo, UINT uFlags) { STUB; + return 0; } -VOID STDCALL -SHGetFileInfoW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) -{ - STUB; -} - -VOID STDCALL +VOID WINAPI SHGetInstanceExplorer(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI SHGetMalloc(DWORD Unknown1) { STUB; } -VOID STDCALL -SHGetNewLinkInfo(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) -{ - STUB; -} - -WINBOOL WINAPI +//WINBOOL WINAPI +BOOL WINAPI SHGetPathFromIDList (LPCITEMIDLIST Unknown1, LPTSTR Unknown2) { STUB; + return 0; } -VOID STDCALL +VOID WINAPI SHGetPathFromIDListA(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI SHGetPathFromIDListW(DWORD Unknown1, DWORD Unknown2) { STUB; } -VOID STDCALL +VOID WINAPI SHGetSettings(DWORD Unknown1, DWORD Unknown2) { STUB; } -HRESULT WINAPI +HRESULT +//WINAPI +WINAPI SHGetSpecialFolderLocation (HWND Unknown1, int Unknown2, LPITEMIDLIST * Unknown3) { STUB; + return 0; } -VOID STDCALL +VOID WINAPI SHHelpShortcuts_RunDLL(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI SHHelpShortcuts_RunDLLA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI SHHelpShortcuts_RunDLLW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI SHLoadInProc(DWORD Unknown1) { STUB; } -VOID STDCALL -SHQueryRecycleBinA(DWORD Unknown1, DWORD Unknown2) +//VOID WINAPI +//SHQueryRecycleBinA(DWORD Unknown1, DWORD Unknown2) +HRESULT WINAPI +SHQueryRecycleBinA(LPCTSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo) { STUB; + return 0; } -VOID STDCALL -SHQueryRecycleBinW(DWORD Unknown1, DWORD Unknown2) +//VOID WINAPI +//SHQueryRecycleBinW(DWORD Unknown1, DWORD Unknown2) +HRESULT WINAPI +SHQueryRecycleBinW(LPCTSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo) { STUB; + return 0; } -VOID STDCALL +VOID WINAPI SHUpdateRecycleBinIcon(VOID) { STUB; } -VOID STDCALL +VOID WINAPI WOWShellExecute(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6, DWORD Unknown7) { STUB; } -VOID STDCALL +STDAPI DllCanUnloadNow(VOID) { STUB; + return 0; } -VOID STDCALL +VOID WINAPI DllGetVersion(DWORD Unknown1) { STUB; } -VOID STDCALL +VOID WINAPI SHGetFreeDiskSpace(VOID) { STUB; } -VOID STDCALL +VOID WINAPI SHGetSpecialFolderPathA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) { STUB; } -VOID STDCALL +VOID WINAPI SHGetFolderPathA(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) { STUB; } -VOID STDCALL +VOID WINAPI SHGetFolderPathW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) { STUB; } -VOID STDCALL +VOID WINAPI SHGetFolderLocation(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5) { STUB; diff --git a/reactos/lib/shell32/res/control.ico b/reactos/lib/shell32/res/control.ico new file mode 100644 index 00000000000..57b16da0b65 Binary files /dev/null and b/reactos/lib/shell32/res/control.ico differ diff --git a/reactos/lib/shell32/res/small.ico b/reactos/lib/shell32/res/small.ico new file mode 100644 index 00000000000..576aec9ea6f Binary files /dev/null and b/reactos/lib/shell32/res/small.ico differ diff --git a/reactos/lib/shell32/resource.h b/reactos/lib/shell32/resource.h new file mode 100644 index 00000000000..63dcaee1332 --- /dev/null +++ b/reactos/lib/shell32/resource.h @@ -0,0 +1,54 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by roshel32.rc +// +#define ID_FILE_MENU 0 +#define ID_VIEW_MENU 1 +#define ID_HELP_MENU 2 +#define IDC_MYICON 2 +#define IDS_LIST_COLUMN_FIRST 91 +#define IDS_LIST_COLUMN_NAME 91 +#define IDS_LIST_COLUMN_COMMENT 92 +#define IDS_LIST_COLUMN_LAST 92 +#define IDD_CONTROL_DIALOG 102 +#define IDD_ABOUTBOX 103 +#define IDS_APP_TITLE 103 +#define IDI_CONTROL 107 +#define IDI_SMALL 108 +#define IDC_CONTROL 109 +#define IDS_APP_REG_KEY 110 +#define IDS_APP_REG_PATH 111 + +#define IDR_CONTROL_MENU 130 +#define ID_FILE_OPEN 32770 +#define ID_FILE_EXIT 32771 +#define ID_VIEW_TOOLBAR 32772 +#define ID_VIEW_STATUSBAR 32773 +#define ID_VIEW_LARGE_ICONS 32774 +#define ID_VIEW_SMALL_ICONS 32775 +#define ID_VIEW_LIST 32776 +#define ID_VIEW_DETAILS 32777 +#define ID_VIEW_ARRANGE_ICONS 32778 +#define ID_VIEW_ARRANGE_BY_NAME 32779 +#define ID_VIEW_ARRANGE_BY_COMMENT 32780 +#define ID_VIEW_ARRANGE_AUTO 32781 +#define ID_VIEW_LINE_UP_ICONS 32782 +#define ID_VIEW_REFRESH 32783 +#define ID_HELP_ABOUT 32784 +#define IDR_CONTROL_CONTEXT 32785 +#define IDR_CONTROL_CONTEXT_APPLET 32786 +#define ID_FILE_CREATE_SHORTCUT 32787 +#define ID_FILE_PASTE 32788 +#define ID_FILE_PASTE_SHORTCUT 32789 +#define IDC_STATIC -1 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 129 +#define _APS_NEXT_COMMAND_VALUE 32780 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 110 +#endif +#endif diff --git a/reactos/lib/shell32/roshel32.rc b/reactos/lib/shell32/roshel32.rc new file mode 100644 index 00000000000..15e5bfd0449 --- /dev/null +++ b/reactos/lib/shell32/roshel32.rc @@ -0,0 +1,290 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_CONTROL ICON DISCARDABLE "res/control.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_CONTROL_MENU MENU DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Open", ID_FILE_OPEN + MENUITEM "&Create Shortcut", ID_FILE_CREATE_SHORTCUT, GRAYED + MENUITEM SEPARATOR + MENUITEM "E&xit", ID_FILE_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Tool Bar", ID_VIEW_TOOLBAR, GRAYED + MENUITEM "Status &Bar", ID_VIEW_STATUSBAR + MENUITEM SEPARATOR + MENUITEM "Lar&ge Icons", ID_VIEW_LARGE_ICONS + MENUITEM "S&mall Icons", ID_VIEW_SMALL_ICONS + MENUITEM "&List", ID_VIEW_LIST + MENUITEM "&Details", ID_VIEW_DETAILS + MENUITEM SEPARATOR + POPUP "Arrange &Icons" + BEGIN + MENUITEM "by &Name", ID_VIEW_ARRANGE_BY_NAME + MENUITEM "by &Comment", ID_VIEW_ARRANGE_BY_COMMENT + + MENUITEM SEPARATOR + MENUITEM "&Auto-Arrange", ID_VIEW_ARRANGE_AUTO + END + MENUITEM "Line &Up Icons", ID_VIEW_LINE_UP_ICONS + MENUITEM SEPARATOR + MENUITEM "&Refresh\tF5", ID_VIEW_REFRESH + END + POPUP "&Help" + BEGIN + MENUITEM "&About ...", ID_HELP_ABOUT + END +END + +IDR_CONTROL_CONTEXT MENU DISCARDABLE +BEGIN + POPUP "DUMMY" + BEGIN + POPUP "&View" + BEGIN + MENUITEM "Lar&ge Icons", ID_VIEW_LARGE_ICONS + MENUITEM "S&mall Icons", ID_VIEW_SMALL_ICONS + MENUITEM "&List", ID_VIEW_LIST + MENUITEM "&Details", ID_VIEW_DETAILS + END + MENUITEM SEPARATOR + POPUP "Arrange &Icons" + BEGIN + MENUITEM "by &Name", ID_VIEW_ARRANGE_BY_NAME + MENUITEM "by &Comment", ID_VIEW_ARRANGE_BY_COMMENT + + MENUITEM SEPARATOR + MENUITEM "&Auto-Arrange", ID_VIEW_ARRANGE_AUTO + END + MENUITEM "Line &Up Icons", ID_VIEW_LINE_UP_ICONS + MENUITEM SEPARATOR + MENUITEM "&Refresh", ID_VIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "&Paste", ID_FILE_PASTE, GRAYED + MENUITEM "Paste &Shortcut", ID_FILE_PASTE_SHORTCUT + , GRAYED + END +END + +IDR_CONTROL_CONTEXT_APPLET MENU DISCARDABLE +BEGIN + POPUP "DUMMY" + BEGIN + MENUITEM "&Open", ID_FILE_OPEN + MENUITEM SEPARATOR + MENUITEM "&Create Shortcut", ID_FILE_CREATE_SHORTCUT + , GRAYED + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOG DISCARDABLE 22, 17, 230, 75 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "About Control Panel" +FONT 8, "System" +BEGIN + ICON IDI_CONTROL,IDC_MYICON,14,9,16,16 + LTEXT "Control Panel Version 1.0",IDC_STATIC,49,10,119,8, + SS_NOPREFIX + LTEXT "Copyright (C) 2002",IDC_STATIC,49,20,119,8 + DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP +END + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""resource.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +(1) VERSIONINFO + FILEVERSION 0,0,19,154 + PRODUCTVERSION 0,0,19,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Absolutely no warranties whatsoever - Use at your own risk\0" + VALUE "CompanyName", "ReactOS Development Team\0" + VALUE "FileDescription", "ReactOS Shell32 Dynamic Link Library\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "shell32\0" + VALUE "LegalCopyright", "Copyright © 2002 Robert Dickenson\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "shell32.dll\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "ReactOS Operating System\0" + VALUE "ProductVersion", "0.0.19\0" + VALUE "SpecialBuild", "Non-versioned Development Beta Release\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0xc09, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_LIST_COLUMN_NAME "Name" + IDS_LIST_COLUMN_COMMENT "Comment" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_FILE_MENU "Contains commands for working with the selected items" + ID_VIEW_MENU "Contains commands for manipulating the view" + ID_HELP_MENU "Contains commands for displaying help" +END + +STRINGTABLE DISCARDABLE +BEGIN + ID_VIEW_TOOLBAR "Shows or hides the tool bar" + ID_VIEW_STATUSBAR "Shows or hides the status bar" + ID_VIEW_LARGE_ICONS "Displays items using large icons" + ID_VIEW_SMALL_ICONS "Displays items using small icons" + ID_VIEW_LIST "Displays items in a list" + ID_VIEW_DETAILS "Displays information about each item in the list" + ID_VIEW_ARRANGE_ICONS "Contains commands for arranging items in the window" + ID_VIEW_ARRANGE_BY_NAME "Sorts items alphabetically by name" + ID_VIEW_ARRANGE_BY_COMMENT "Sorts items by the thier comment property" + ID_VIEW_ARRANGE_AUTO "Arranges the items automatically" + ID_VIEW_LINE_UP_ICONS "Arranges icons in a grid layout" + ID_VIEW_REFRESH "Refreshes the contents of the current page" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_APP_TITLE "ReactOS Control Panel" + IDC_CONTROL "CONTROL" + IDS_APP_REG_KEY "\\Control Panel" + IDS_APP_REG_PATH "Software\\ReactWare" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Australia) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (Australia) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/reactos/lib/shell32/shell32.def b/reactos/lib/shell32/shell32.def index ec771c6b098..8d7a9ad4f86 100644 --- a/reactos/lib/shell32/shell32.def +++ b/reactos/lib/shell32/shell32.def @@ -1,232 +1,240 @@ -LIBRARY shell32 +; $Id: shell32.def +; +; shell32.def +; +; ReactOS Operating System +; +; +;LIBRARY shell32 +LIBRARY roshel32.dll EXPORTS SHChangeNotifyRegister@24 ; @ 2 -SHChangeNotifyDeregister@4 ; @ 4 +SHChangeNotifyDeregister ; @ 4 SHChangeNotifyUpdateEntryList@16 ; @ 5 PifMgr_OpenProperties@16 ; @ 9 PifMgr_GetProperties@20 ; @ 10 PifMgr_SetProperties@20 ; @ 11 -PifMgr_CloseProperties@8 ; @ 13 -ILGetDisplayName@8 ; @ 15 -ILFindLastID@4 ; @ 16 -ILRemoveLastID@4 ; @ 17 -ILClone@4 ; @ 18 -ILCloneFirst@4 ; @ 19 -ILGlobalClone@4 ; @ 20 -ILIsEqual@8 ; @ 21 +PifMgr_CloseProperties ; @ 13 +ILGetDisplayName ; @ 15 +ILFindLastID ; @ 16 +ILRemoveLastID ; @ 17 +ILClone ; @ 18 +ILCloneFirst ; @ 19 +ILGlobalClone ; @ 20 +ILIsEqual ; @ 21 ILIsParent@12 ; @ 23 -ILFindChild@8 ; @ 24 -ILCombine@8 ; @ 25 -ILLoadFromStream@8 ; @ 26 -ILSaveToStream@8 ; @ 27 +ILFindChild ; @ 24 +ILCombine ; @ 25 +ILLoadFromStream ; @ 26 +ILSaveToStream ; @ 27 SHILCreateFromPath@12 ; @ 28 -PathIsRoot@4 ; @ 29 -PathBuildRoot@8 ; @ 30 -PathFindExtension@4 ; @ 31 -PathAddBackslash@4 ; @ 32 -PathRemoveBlanks@4 ; @ 33 -PathFindFileName@4 ; @ 34 -PathRemoveFileSpec@4 ; @ 35 -PathAppend@8 ; @ 36 -PathCombine@12 ; @ 37 -PathStripPath@4 ; @ 38 -PathIsUNC@4 ; @ 39 -PathIsRelative@4 ; @ 40 -PathIsExe@4 ; @ 43 -PathFileExists@4 ; @ 45 -PathMatchSpec@8 ; @ 46 -PathMakeUniqueName@20 ; @ 47 -PathSetDlgItemPath@12 ; @ 48 -PathQualify@4 ; @ 49 -PathStripToRoot@4 ; @ 50 -PathResolve@12 ; @ 51 -PathGetArgs@4 ; @ 52 -DoEnvironmentSubst@8 ; @ 53 -DragAcceptFiles@8 ; @ 54 -PathQuoteSpaces@4 ; @ 55 -PathUnquoteSpaces@4 ; @ 56 -PathGetDriveNumber@4 ; @ 57 +PathIsRootA ; @ 29 +PathBuildRootA ; @ 30 +PathFindExtensionA ; @ 31 +PathAddBackslashA ; @ 32 +PathRemoveBlanksA ; @ 33 +PathFindFileNameA ; @ 34 +PathRemoveFileSpecA ; @ 35 +PathAppendA ; @ 36 +PathCombineA@12 ; @ 37 +PathStripPathA ; @ 38 +PathIsUNCA ; @ 39 +PathIsRelativeA ; @ 40 +PathIsExeA ; @ 43 +PathFileExistsA ; @ 45 +PathMatchSpecA ; @ 46 +PathMakeUniqueNameA@20 ; @ 47 +PathSetDlgItemPathA@12 ; @ 48 +PathQualifyA ; @ 49 +PathStripToRootA ; @ 50 +PathResolveA@12 ; @ 51 +PathGetArgsA ; @ 52 +DoEnvironmentSubst ; @ 53 +DragAcceptFiles ; @ 54 +PathQuoteSpacesA ; @ 55 +PathUnquoteSpacesA ; @ 56 +PathGetDriveNumberA ; @ 57 ParseField@16 ; @ 58 RestartDialog@12 ; @ 59 -ExitWindowsDialog@4 ; @ 60 +ExitWindowsDialog ; @ 60 RunFileDlg@24 ; @ 61 PickIconDlg@16 ; @ 62 GetFileNameFromBrowse@28 ; @ 63 -DriveType@4 ; @ 64 -InvalidateDriveType@0 ; @ 65 -IsNetDrive@4 ; @ 66 +DriveType ; @ 64 +InvalidateDriveType ; @ 65 +IsNetDrive ; @ 66 Shell_MergeMenus@24 ; @ 67 SHGetSetSettings@12 ; @ 68 -SHGetNetResource@0 ; @ 69 +SHGetNetResource ; @ 69 SHCreateDefClassObject@20 ; @ 70 -Shell_GetImageList@8 ; @ 71 +Shell_GetImageList ; @ 71 Shell_GetCachedImageIndex@12 ; @ 72 SHShellFolderView_Message@12 ; @ 73 -SHCreateStdEnumFmtEtc@0 ; @ 74 +SHCreateStdEnumFmtEtc ; @ 74 PathYetAnotherMakeUniqueName@16 ; @ 75 -DragQueryInfo@0 ; @ 76 +DragQueryInfo ; @ 76 SHMapPIDLToSystemImageListIndex@12 ; @ 77 OleStrToStrN@16 ; @ 78 StrToOleStrN@16 ; @ 79 -DragFinish@4 ; @ 80 -DragQueryFile@16 ; @ 81 +DragFinish ; @ 80 +;DragQueryFile@16 ; @ 81 DragQueryFileA@16 ; @ 82 -CIDLData_CreateFromIDArray@0 ; @ 83 -SHIsBadInterfacePtr@0 ; @ 84 +CIDLData_CreateFromIDArray ; @ 83 +SHIsBadInterfacePtr ; @ 84 ; OpenRegStream=shlwapi.SHOpenRegStreamA ; @ 85 -SHRegisterDragDrop@8 ; @ 86 -SHRevokeDragDrop@4 ; @ 87 +SHRegisterDragDrop ; @ 86 +SHRevokeDragDrop ; @ 87 SHDoDragDrop@20 ; @ 88 SHCloneSpecialIDList@12 ; @ 89 -SHFindFiles@0 ; @ 90 -SHFindComputer@0 ; @ 91 -PathGetShortPath@4 ; @ 92 -Win32CreateDirectory@0 ; @ 93 -Win32RemoveDirectory@0 ; @ 94 -SHLogILFromFSIL@4 ; @ 95 +SHFindFiles ; @ 90 +SHFindComputer ; @ 91 +PathGetShortPath ; @ 92 +Win32CreateDirectory ; @ 93 +Win32RemoveDirectory ; @ 94 +SHLogILFromFSIL ; @ 95 StrRetToStrN@16 ; @ 96 SHWaitForFileToOpen@12 ; @ 97 SHGetRealIDL@12 ; @ 98 -SetAppStartingCursor@8 ; @ 99 -SHRestricted@4 ; @ 100 +SetAppStartingCursor ; @ 99 +SHRestricted ; @ 100 SHCoCreateInstance@20 ; @ 102 -SignalFileOpen@4 ; @ 103 -FileMenu_DeleteAllItems@4 ; @ 104 -FileMenu_DrawItem@8 ; @ 105 -FileMenu_FindSubMenuByPidl@8 ; @ 106 +SignalFileOpen ; @ 103 +FileMenu_DeleteAllItems ; @ 104 +FileMenu_DrawItem ; @ 105 +FileMenu_FindSubMenuByPidl ; @ 106 FileMenu_GetLastSelectedItemPidls@12 ; @ 107 -FileMenu_HandleMenuChar@8 ; @ 108 -FileMenu_InitMenuPopup@4 ; @ 109 +FileMenu_HandleMenuChar ; @ 108 +FileMenu_InitMenuPopup ; @ 109 FileMenu_InsertUsingPidl@24 ; @ 110 -FileMenu_Invalidate@4 ; @ 111 -FileMenu_MeasureItem@8 ; @ 112 +FileMenu_Invalidate ; @ 111 +FileMenu_MeasureItem ; @ 112 FileMenu_ReplaceUsingPidl@20 ; @ 113 FileMenu_Create@20 ; @ 114 FileMenu_AppendItem@24 ; @ 115 FileMenu_TrackPopupMenuEx@24 ; @ 116 -FileMenu_DeleteItemByCmd@8 ; @ 117 -FileMenu_Destroy@4 ; @ 118 -IsLFNDrive@4 ; @ 119 -FileMenu_AbortInitMenu@0 ; @ 120 -SHFlushClipboard@0 ; @ 121 -RunDLL_CallEntry16@20 ; @ 122 -SHFreeUnusedLibraries@0 ; @ 123 +FileMenu_DeleteItemByCmd ; @ 117 +FileMenu_Destroy ; @ 118 +IsLFNDrive ; @ 119 +FileMenu_AbortInitMenu ; @ 120 +SHFlushClipboard ; @ 121 +;RunDLL_CallEntry16@20 ; @ 122 +SHFreeUnusedLibraries ; @ 123 FileMenu_AppendFilesForPidl@12 ; @ 124 FileMenu_AddFilesForPidl@28 ; @ 125 SHOutOfMemoryMessageBox@12 ; @ 126 SHWinHelp@16 ; @ 127 DllGetClassObject@12 ; @ 128 -DAD_AutoScroll@0 ; @ 129 -DAD_DragEnter@0 ; @ 130 -DAD_DragEnterEx@0 ; @ 131 -DAD_DragLeave@0 ; @ 132 +DAD_AutoScroll ; @ 129 +DAD_DragEnter ; @ 130 +DAD_DragEnterEx ; @ 131 +DAD_DragLeave ; @ 132 DragQueryFileW@16 ; @ 133 -DAD_DragMove@0 ; @ 134 -DragQueryPoint@8 ; @ 135 -DAD_SetDragImage@8 ; @ 136 -DAD_ShowDragImage@4 ; @ 137 -Desktop_UpdateBriefcaseOnEvent@0 ; @ 139 -FileMenu_DeleteItemByIndex@8 ; @ 140 -FileMenu_DeleteItemByFirstID@8 ; @ 141 -FileMenu_DeleteSeparator@4 ; @ 142 +DAD_DragMove ; @ 134 +DragQueryPoint ; @ 135 +DAD_SetDragImage ; @ 136 +DAD_ShowDragImage ; @ 137 +Desktop_UpdateBriefcaseOnEvent ; @ 139 +FileMenu_DeleteItemByIndex ; @ 140 +FileMenu_DeleteItemByFirstID ; @ 141 +FileMenu_DeleteSeparator ; @ 142 FileMenu_EnableItemByCmd@12 ; @ 143 -FileMenu_GetItemExtent@8 ; @ 144 -PathFindOnPath@8 ; @ 145 -RLBuildListOfPaths@0 ; @ 146 -SHCLSIDFromString@8 ; @ 147 +FileMenu_GetItemExtent ; @ 144 +PathFindOnPathA ; @ 145 +RLBuildListOfPaths ; @ 146 +SHCLSIDFromString ; @ 147 SHFind_InitMenuPopup@16 ; @ 149 -SHLoadOLE@4 ; @ 151 -ILGetSize@4 ; @ 152 -ILGetNext@4 ; @ 153 +SHLoadOLE ; @ 151 +ILGetSize ; @ 152 +ILGetNext ; @ 153 ILAppend@12 ; @ 154 -ILFree@4 ; @ 155 -ILGlobalFree@4 ; @ 156 -ILCreateFromPath@4 ; @ 157 -PathGetExtension@4 ; @ 158 -PathIsDirectory@4 ; @ 159 -SHNetConnectionDialog@0 ; @ 160 -SHRunControlPanel@8 ; @ 161 -SHSimpleIDListFromPath@4 ; @ 162 -StrToOleStr@8 ; @ 163 -Win32DeleteFile@4 ; @ 164 -SHCreateDirectory@8 ; @ 165 -CallCPLEntry16@0 ; @ 166 +ILFree ; @ 155 +ILGlobalFree ; @ 156 +ILCreateFromPath ; @ 157 +PathGetExtensionA ; @ 158 +PathIsDirectoryA ; @ 159 +SHNetConnectionDialog ; @ 160 +SHRunControlPanel ; @ 161 +SHSimpleIDListFromPath ; @ 162 +StrToOleStr ; @ 163 +Win32DeleteFile ; @ 164 +SHCreateDirectory ; @ 165 +CallCPLEntry16@24 ; @ 166 SHAddFromPropSheetExtArray@12 ; @ 167 SHCreatePropSheetExtArray@12 ; @ 168 -SHDestroyPropSheetExtArray@4 ; @ 169 +SHDestroyPropSheetExtArray ; @ 169 SHReplaceFromPropSheetExtArray@16 ; @ 170 -PathCleanupSpec@8 ; @ 171 -SHCreateLinks@0 ; @ 172 +PathCleanupSpecA ; @ 171 +SHCreateLinks ; @ 172 SHValidateUNC@12 ; @ 173 -SHCreateShellFolderViewEx@8 ; @ 174 +SHCreateShellFolderViewEx ; @ 174 SHGetSpecialFolderPath@16 ; @ 175 -SHSetInstanceExplorer@4 ; @ 176 -DAD_SetDragImageFromListView@0 ; @ 177 -SHObjectProperties@0 ; @ 178 -SHGetNewLinkInfoA@0 ; @ 179 -SHGetNewLinkInfoW@0 ; @ 180 -RegisterShellHook@8 ; @ 181 +SHSetInstanceExplorer ; @ 176 +DAD_SetDragImageFromListView ; @ 177 +SHObjectProperties ; @ 178 +SHGetNewLinkInfoA ; @ 179 +SHGetNewLinkInfoW ; @ 180 +RegisterShellHook ; @ 181 ShellMessageBoxW ; @ 182 ShellMessageBoxA ; @ 183 ArrangeWindows@20 ; @ 184 -SHHandleDiskFull@0 ; @ 185 -SHFree@4 ; @ 195 -SHAlloc@4 ; @ 196 -SHGlobalDefect@0 ; @ 197 -SHAbortInvokeCommand@0 ; @ 198 -SHGetFileIcon@0 ; @ 199 -SHLocalAlloc@0 ; @ 200 -SHLocalFree@0 ; @ 201 -SHLocalReAlloc@0 ; @ 202 -AddCommasW@0 ; @ 203 -ShortSizeFormatW@0 ; @ 204 -Printer_LoadIconsW@0 ; @ 205 -Link_AddExtraDataSection@0 ; @ 206 -Link_ReadExtraDataSection@0 ; @ 207 -Link_RemoveExtraDataSection@0 ; @ 208 -Int64ToString@0 ; @ 209 -LargeIntegerToString@0 ; @ 210 -Printers_GetPidl@0 ; @ 211 -Printer_AddPrinterPropPages@0 ; @ 212 -Printers_RegisterWindowW@0 ; @ 213 -Printers_UnregisterWindow@0 ; @ 214 +SHHandleDiskFull ; @ 185 +SHFree ; @ 195 +SHAlloc ; @ 196 +SHGlobalDefect ; @ 197 +SHAbortInvokeCommand ; @ 198 +SHGetFileIcon ; @ 199 +SHLocalAlloc ; @ 200 +SHLocalFree ; @ 201 +SHLocalReAlloc ; @ 202 +AddCommasW ; @ 203 +ShortSizeFormatW ; @ 204 +Printer_LoadIconsW ; @ 205 +Link_AddExtraDataSection ; @ 206 +Link_ReadExtraDataSection ; @ 207 +Link_RemoveExtraDataSection ; @ 208 +Int64ToString ; @ 209 +LargeIntegerToString ; @ 210 +Printers_GetPidl ; @ 211 +Printer_AddPrinterPropPages ; @ 212 +Printers_RegisterWindowW ; @ 213 +Printers_UnregisterWindow ; @ 214 SHStartNetConnectionDialog@12 ; @ 215 -shell32_243@8 ; @ 243 -SHInitRestricted@8 ; @ 244 +shell32_243 ; @ 243 +SHInitRestricted ; @ 244 SHGetDataFromIDListA@20 ; @ 247 SHGetDataFromIDListW@20 ; @ 248 -PathParseIconLocation@4 ; @ 249 -PathRemoveExtension@4 ; @ 250 -PathRemoveArgs@4 ; @ 251 -SheChangeDirA@0 ; @ 271 -SheChangeDirExA@0 ; @ 272 -SheChangeDirExW@0 ; @ 273 -SheChangeDirW@4 ; @ 274 -SheConvertPathW@0 ; @ 275 -SheFullPathA@0 ; @ 276 -SheFullPathW@0 ; @ 277 -SheGetCurDrive@0 ; @ 278 -SheGetDirA@8 ; @ 279 +PathParseIconLocationA ; @ 249 +PathRemoveExtensionA ; @ 250 +PathRemoveArgsA ; @ 251 +SheChangeDirA ; @ 271 +SheChangeDirExA ; @ 272 +SheChangeDirExW ; @ 273 +SheChangeDirW ; @ 274 +SheConvertPathW ; @ 275 +SheFullPathA ; @ 276 +SheFullPathW ; @ 277 +SheGetCurDrive ; @ 278 +SheGetDirA ; @ 279 SheGetDirExW@12 ; @ 280 -SheGetDirW@8 ; @ 281 -SheGetPathOffsetW@0 ; @ 282 -SheRemoveQuotesA@0 ; @ 283 -SheRemoveQuotesW@0 ; @ 284 -SheSetCurDrive@0 ; @ 285 -SheShortenPathA@0 ; @ 286 -SheShortenPathW@0 ; @ 287 -ShellAboutA@16 ; @ 288 -ShellAboutW@16 ; @ 289 -ShellExecuteA=ShellExecuteA@24 ; @ 290 -ShellExecuteEx@4 ; @ 291 -ShellExecuteExA=ShellExecuteExA@4 ; @ 292 -ShellExecuteExW@4 ; @ 293 +SheGetDirW ; @ 281 +SheGetPathOffsetW ; @ 282 +SheRemoveQuotesA ; @ 283 +SheRemoveQuotesW ; @ 284 +SheSetCurDrive ; @ 285 +SheShortenPathA ; @ 286 +SheShortenPathW ; @ 287 +ShellAboutA ; @ 288 +ShellAboutW ; @ 289 +;ShellExecuteA=ShellExecuteA@24 ; @ 290 +;ShellExecuteEx ; @ 291 +ShellExecuteExA=ShellExecuteExA ; @ 292 +ShellExecuteExW ; @ 293 ShellExecuteW@24 ; @ 294 -Shell_NotifyIcon@8 ; @ 296 -Shell_NotifyIconA@8 ; @ 297 -Shell_NotifyIconW@8 ; @ 298 -Shl1632_ThunkData32@0 ; @ 299 -Shl3216_ThunkData32@0 ; @ 300 +;Shell_NotifyIcon ; @ 296 +Shell_NotifyIconA ; @ 297 +Shell_NotifyIconW ; @ 298 +Shl1632_ThunkData32 ; @ 299 +Shl3216_ThunkData32 ; @ 300 ; StrChrA=shlwapi.StrChrA ; @ 301 ; StrChrIA=shlwapi.StrChrIA ; @ 302 ; StrChrIW=shlwapi.StrChrIW ; @ 303 @@ -247,56 +255,56 @@ StrNCpyA@12 ; @ 315 ; StrRChrIA=shlwapi.StrRChrIA ; @ 318 ; StrRChrIW=shlwapi.StrRChrIW ; @ 319 ; StrRChrW=shlwapi.StrRChrW ; @ 320 -StrRStrA@0 ; @ 321 +StrRStrA ; @ 321 ; StrRStrIA=shlwapi.StrRStrIA ; @ 322 ; StrRStrIW=shlwapi.StrRStrIW ; @ 323 -StrRStrW@0 ; @ 324 +StrRStrW ; @ 324 ; StrStrA=shlwapi.StrStrA ; @ 325 ; StrStrIA=shlwapi.StrStrIA ; @ 326 ; StrStrIW=shlwapi.StrStrIW ; @ 327 ; StrStrW=shlwapi.StrStrW ; @ 328 -SHRegCloseKey@4 ; @ 505 +SHRegCloseKey ; @ 505 SHRegOpenKeyA@12 ; @ 506 SHRegOpenKeyW@12 ; @ 507 SHRegQueryValueA@16 ; @ 508 SHRegQueryValueExA@24 ; @ 509 SHRegQueryValueW@16 ; @ 510 SHRegQueryValueExW@24 ; @ 511 -SHRegDeleteKeyW@8 ; @ 512 +SHRegDeleteKeyW ; @ 512 SHAllocShared@12 ; @ 520 -SHLockShared@8 ; @ 521 -SHUnlockShared@4 ; @ 522 -SHFreeShared@8 ; @ 523 -RealDriveType@8 ; @ 524 -RealDriveTypeFlags@8 ; @ 525 +SHLockShared ; @ 521 +SHUnlockShared ; @ 522 +SHFreeShared ; @ 523 +RealDriveType ; @ 524 +RealDriveTypeFlags ; @ 525 NTSHChangeNotifyRegister@24 ; @ 640 -NTSHChangeNotifyDeregister@4 ; @ 641 +NTSHChangeNotifyDeregister ; @ 641 SHChangeNotifyReceive@16 ; @ 643 SHChangeNotification_Lock@16 ; @ 644 -SHChangeNotification_Unlock@4 ; @ 645 -SHChangeRegistrationReceive@8 ; @ 646 -ReceiveAddToRecentDocs@8 ; @ 647 -SHWaitOp_Operate@8 ; @ 648 -PathIsSameRoot@8 ; @ 650 -ReadCabinetState@8 ; @ 651 -WriteCabinetState@4 ; @ 652 +SHChangeNotification_Unlock ; @ 645 +SHChangeRegistrationReceive ; @ 646 +ReceiveAddToRecentDocs ; @ 647 +SHWaitOp_Operate ; @ 648 +PathIsSameRootA ; @ 650 +ReadCabinetState ; @ 651 +WriteCabinetState ; @ 652 PathProcessCommand@16 ; @ 653 -shell32_654@8 ; @ 654 -FileIconInit@4 ; @ 660 -IsUserAdmin@0 ; @ 680 -shell32_714@4 ; @ 714 -FOOBAR1217@0 ; @ 1217 +shell32_654 ; @ 654 +FileIconInit ; @ 660 +IsUserAdmin ; @ 680 +shell32_714 ; @ 714 +FOOBAR1217 ; @ 1217 CheckEscapesA@0 CheckEscapesW@0 CommandLineToArgvW@8 -Control_FillCache_RunDLL@16 -Control_FillCache_RunDLLA@0 -Control_FillCache_RunDLLW@0 -Control_RunDLL@16 -Control_RunDLLA@16 -Control_RunDLLW@16 +;Control_FillCache_RunDLL@16 +Control_FillCache_RunDLLA@16 +Control_FillCache_RunDLLW@16 +;Control_RunDLL@16 +Control_RunDLLA +Control_RunDLLW DllInstall@8 -DoEnvironmentSubstA@8 +;DoEnvironmentSubstA@8 DoEnvironmentSubstW@8 DragQueryFileAorW@0 DuplicateIcon@8 @@ -305,7 +313,7 @@ ExtractAssociatedIconExA@0 ExtractAssociatedIconExW@0 ExtractAssociatedIconW@12 ExtractIconA=ExtractIconA@12 -ExtractIconEx@20 +;ExtractIconEx@20 ExtractIconExA@20 ExtractIconExW@20 ExtractIconW@12 @@ -338,18 +346,18 @@ SHChangeNotify@16 ShellHookProc@0 SHEmptyRecycleBinA@12 SHEmptyRecycleBinW@12 -SHFileOperation@4 +;SHFileOperation@4 SHFileOperationA@4 SHFileOperationW@4 SHFormatDrive@16 SHFreeNameMappings@4 SHGetDesktopFolder@4 -SHGetFileInfo@20 +;SHGetFileInfo@20 SHGetFileInfoA@20 SHGetFileInfoW@20 SHGetInstanceExplorer@4 SHGetMalloc=SHGetMalloc@4 -SHGetNewLinkInfo@20 +;SHGetNewLinkInfo@20 SHGetPathFromIDList=SHGetPathFromIDList@8 SHGetPathFromIDListA=SHGetPathFromIDListA@8 SHGetPathFromIDListW=SHGetPathFromIDListW@8 diff --git a/reactos/lib/shell32/shell32.edf b/reactos/lib/shell32/shell32.edf new file mode 100644 index 00000000000..863c5a4406a --- /dev/null +++ b/reactos/lib/shell32/shell32.edf @@ -0,0 +1,381 @@ +; $Id: shell32.edf +; +; shell32.edf +; +; ReactOS Operating System +; +; +;LIBRARY shell32 +LIBRARY roshel32.dll +EXPORTS +SHChangeNotifyRegister@24 ; @ 2 +SHChangeNotifyDeregister@4 ; @ 4 +SHChangeNotifyUpdateEntryList@16 ; @ 5 +PifMgr_OpenProperties@16 ; @ 9 +PifMgr_GetProperties@20 ; @ 10 +PifMgr_SetProperties@20 ; @ 11 +PifMgr_CloseProperties@8 ; @ 13 +ILGetDisplayName@8 ; @ 15 +ILFindLastID@4 ; @ 16 +ILRemoveLastID@4 ; @ 17 +ILClone@4 ; @ 18 +ILCloneFirst@4 ; @ 19 +ILGlobalClone@4 ; @ 20 +ILIsEqual@8 ; @ 21 +ILIsParent@12 ; @ 23 +ILFindChild@8 ; @ 24 +ILCombine@8 ; @ 25 +ILLoadFromStream@8 ; @ 26 +ILSaveToStream@8 ; @ 27 +SHILCreateFromPath@12 ; @ 28 +PathIsRootA=PathIsRootA@4 ; @ 29 +PathBuildRootA=PathBuildRootA@8 ; @ 30 +PathFindExtensionA=PathFindExtensionA@4 ; @ 31 +PathAddBackslashA=PathAddBackslashA@4 ; @ 32 +PathRemoveBlanksA=PathRemoveBlanksA@4 ; @ 33 +PathFindFileNameA=PathFindFileNameA@4 ; @ 34 +PathRemoveFileSpecA=PathRemoveFileSpecA@4 ; @ 35 +PathAppendA=PathAppendA@8 ; @ 36 +PathCombineA=PathCombineA@12 ; @ 37 +PathStripPathA=PathStripPathA@4 ; @ 38 +PathIsUNCA=PathIsUNCA@4 ; @ 39 +PathIsRelativeA=PathIsRelativeA@4 ; @ 40 +PathIsExeA=PathIsExeA@4 ; @ 43 +PathFileExistsA=PathFileExistsA@4 ; @ 45 +PathMatchSpecA=PathMatchSpecA@8 ; @ 46 +PathMakeUniqueNameA=PathMakeUniqueNameA@20 ; @ 47 +PathSetDlgItemPathA=PathSetDlgItemPathA@12 ; @ 48 +PathQualifyA=PathQualifyA@4 ; @ 49 +PathStripToRootA=PathStripToRootA@4 ; @ 50 +PathResolveA=PathResolveA@12 ; @ 51 +PathGetArgsA=PathGetArgsA@4 ; @ 52 +DoEnvironmentSubst@8 ; @ 53 +DragAcceptFiles@8 ; @ 54 +PathQuoteSpacesA=PathQuoteSpacesA@4 ; @ 55 +PathUnquoteSpacesA=PathUnquoteSpacesA@4 ; @ 56 +PathGetDriveNumberA=PathGetDriveNumberA@4 ; @ 57 +ParseField@16 ; @ 58 +RestartDialog@12 ; @ 59 +ExitWindowsDialog@4 ; @ 60 +RunFileDlg@24 ; @ 61 +PickIconDlg@16 ; @ 62 +GetFileNameFromBrowse@28 ; @ 63 +DriveType@4 ; @ 64 +InvalidateDriveType@0 ; @ 65 +IsNetDrive@4 ; @ 66 +Shell_MergeMenus@24 ; @ 67 +SHGetSetSettings@12 ; @ 68 +SHGetNetResource@0 ; @ 69 +SHCreateDefClassObject@20 ; @ 70 +Shell_GetImageList@8 ; @ 71 +Shell_GetCachedImageIndex@12 ; @ 72 +SHShellFolderView_Message@12 ; @ 73 +SHCreateStdEnumFmtEtc@0 ; @ 74 +PathYetAnotherMakeUniqueName@16 ; @ 75 +DragQueryInfo@0 ; @ 76 +SHMapPIDLToSystemImageListIndex@12 ; @ 77 +OleStrToStrN@16 ; @ 78 +StrToOleStrN@16 ; @ 79 +DragFinish@4 ; @ 80 +;DragQueryFile@16 ; @ 81 +DragQueryFileA@16 ; @ 82 +CIDLData_CreateFromIDArray@0 ; @ 83 +SHIsBadInterfacePtr@0 ; @ 84 +; OpenRegStream=shlwapi.SHOpenRegStreamA ; @ 85 +SHRegisterDragDrop@8 ; @ 86 +SHRevokeDragDrop@4 ; @ 87 +SHDoDragDrop@20 ; @ 88 +SHCloneSpecialIDList@12 ; @ 89 +SHFindFiles@0 ; @ 90 +SHFindComputer@0 ; @ 91 +PathGetShortPath@4 ; @ 92 +Win32CreateDirectory@0 ; @ 93 +Win32RemoveDirectory@0 ; @ 94 +SHLogILFromFSIL@4 ; @ 95 +StrRetToStrN@16 ; @ 96 +SHWaitForFileToOpen@12 ; @ 97 +SHGetRealIDL@12 ; @ 98 +SetAppStartingCursor@8 ; @ 99 +SHRestricted@4 ; @ 100 +SHCoCreateInstance@20 ; @ 102 +SignalFileOpen@4 ; @ 103 +FileMenu_DeleteAllItems@4 ; @ 104 +FileMenu_DrawItem@8 ; @ 105 +FileMenu_FindSubMenuByPidl@8 ; @ 106 +FileMenu_GetLastSelectedItemPidls@12 ; @ 107 +FileMenu_HandleMenuChar@8 ; @ 108 +FileMenu_InitMenuPopup@4 ; @ 109 +FileMenu_InsertUsingPidl@24 ; @ 110 +FileMenu_Invalidate@4 ; @ 111 +FileMenu_MeasureItem@8 ; @ 112 +FileMenu_ReplaceUsingPidl@20 ; @ 113 +FileMenu_Create@20 ; @ 114 +FileMenu_AppendItem@24 ; @ 115 +FileMenu_TrackPopupMenuEx@24 ; @ 116 +FileMenu_DeleteItemByCmd@8 ; @ 117 +FileMenu_Destroy@4 ; @ 118 +IsLFNDrive@4 ; @ 119 +FileMenu_AbortInitMenu@0 ; @ 120 +SHFlushClipboard@0 ; @ 121 +;RunDLL_CallEntry16@20 ; @ 122 +SHFreeUnusedLibraries@0 ; @ 123 +FileMenu_AppendFilesForPidl@12 ; @ 124 +FileMenu_AddFilesForPidl@28 ; @ 125 +SHOutOfMemoryMessageBox@12 ; @ 126 +SHWinHelp@16 ; @ 127 +DllGetClassObject@12 ; @ 128 +DAD_AutoScroll@0 ; @ 129 +DAD_DragEnter@0 ; @ 130 +DAD_DragEnterEx@0 ; @ 131 +DAD_DragLeave@0 ; @ 132 +DragQueryFileW@16 ; @ 133 +DAD_DragMove@0 ; @ 134 +DragQueryPoint@8 ; @ 135 +DAD_SetDragImage@8 ; @ 136 +DAD_ShowDragImage@4 ; @ 137 +Desktop_UpdateBriefcaseOnEvent@0 ; @ 139 +FileMenu_DeleteItemByIndex@8 ; @ 140 +FileMenu_DeleteItemByFirstID@8 ; @ 141 +FileMenu_DeleteSeparator@4 ; @ 142 +FileMenu_EnableItemByCmd@12 ; @ 143 +FileMenu_GetItemExtent@8 ; @ 144 +PathFindOnPathA=PathFindOnPathA@8 ; @ 145 +RLBuildListOfPaths@0 ; @ 146 +SHCLSIDFromString@8 ; @ 147 +SHFind_InitMenuPopup@16 ; @ 149 +SHLoadOLE@4 ; @ 151 +ILGetSize@4 ; @ 152 +ILGetNext@4 ; @ 153 +ILAppend@12 ; @ 154 +ILFree@4 ; @ 155 +ILGlobalFree@4 ; @ 156 +ILCreateFromPath@4 ; @ 157 +PathGetExtensionA=PathGetExtensionA@4 ; @ 158 +PathIsDirectoryA=PathIsDirectoryA@4 ; @ 159 +SHNetConnectionDialog@0 ; @ 160 +SHRunControlPanel@8 ; @ 161 +SHSimpleIDListFromPath@4 ; @ 162 +StrToOleStr@8 ; @ 163 +Win32DeleteFile@4 ; @ 164 +SHCreateDirectory@8 ; @ 165 +CallCPLEntry16=CallCPLEntry16@24 ; @ 166 +SHAddFromPropSheetExtArray@12 ; @ 167 +SHCreatePropSheetExtArray@12 ; @ 168 +SHDestroyPropSheetExtArray@4 ; @ 169 +SHReplaceFromPropSheetExtArray@16 ; @ 170 +PathCleanupSpecA=PathCleanupSpecA@8 ; @ 171 +SHCreateLinks@0 ; @ 172 +SHValidateUNC@12 ; @ 173 +SHCreateShellFolderViewEx@8 ; @ 174 +SHGetSpecialFolderPath@16 ; @ 175 +SHSetInstanceExplorer@4 ; @ 176 +DAD_SetDragImageFromListView@0 ; @ 177 +SHObjectProperties@0 ; @ 178 +SHGetNewLinkInfoA@0 ; @ 179 +SHGetNewLinkInfoW@0 ; @ 180 +RegisterShellHook@8 ; @ 181 +ShellMessageBoxW ; @ 182 +ShellMessageBoxA ; @ 183 +ArrangeWindows@20 ; @ 184 +SHHandleDiskFull@0 ; @ 185 +SHFree@4 ; @ 195 +SHAlloc@4 ; @ 196 +SHGlobalDefect@0 ; @ 197 +SHAbortInvokeCommand@0 ; @ 198 +SHGetFileIcon@0 ; @ 199 +SHLocalAlloc@0 ; @ 200 +SHLocalFree@0 ; @ 201 +SHLocalReAlloc@0 ; @ 202 +AddCommasW@0 ; @ 203 +ShortSizeFormatW@0 ; @ 204 +Printer_LoadIconsW@0 ; @ 205 +Link_AddExtraDataSection@0 ; @ 206 +Link_ReadExtraDataSection@0 ; @ 207 +Link_RemoveExtraDataSection@0 ; @ 208 +Int64ToString@0 ; @ 209 +LargeIntegerToString@0 ; @ 210 +Printers_GetPidl@0 ; @ 211 +Printer_AddPrinterPropPages@0 ; @ 212 +Printers_RegisterWindowW@0 ; @ 213 +Printers_UnregisterWindow@0 ; @ 214 +SHStartNetConnectionDialog@12 ; @ 215 +shell32_243@8 ; @ 243 +SHInitRestricted@8 ; @ 244 +SHGetDataFromIDListA@20 ; @ 247 +SHGetDataFromIDListW@20 ; @ 248 +PathParseIconLocationA=PathParseIconLocationA@4 ; @ 249 +PathRemoveExtensionA=PathRemoveExtensionA@4 ; @ 250 +PathRemoveArgsA=PathRemoveArgsA@4 ; @ 251 +SheChangeDirA@0 ; @ 271 +SheChangeDirExA@0 ; @ 272 +SheChangeDirExW@0 ; @ 273 +SheChangeDirW@4 ; @ 274 +SheConvertPathW@0 ; @ 275 +SheFullPathA@0 ; @ 276 +SheFullPathW@0 ; @ 277 +SheGetCurDrive@0 ; @ 278 +SheGetDirA@8 ; @ 279 +SheGetDirExW@12 ; @ 280 +SheGetDirW@8 ; @ 281 +SheGetPathOffsetW@0 ; @ 282 +SheRemoveQuotesA@0 ; @ 283 +SheRemoveQuotesW@0 ; @ 284 +SheSetCurDrive@0 ; @ 285 +SheShortenPathA@0 ; @ 286 +SheShortenPathW@0 ; @ 287 +ShellAboutA=ShellAboutA@16 ; @ 288 +ShellAboutW=ShellAboutW@16 ; @ 289 +;ShellExecuteA=ShellExecuteA@24 ; @ 290 +;ShellExecuteEx@4 ; @ 291 +ShellExecuteExA=ShellExecuteExA@4 ; @ 292 +ShellExecuteExW@4 ; @ 293 +ShellExecuteW@24 ; @ 294 +;Shell_NotifyIcon@8 ; @ 296 +Shell_NotifyIconA@8 ; @ 297 +Shell_NotifyIconW@8 ; @ 298 +Shl1632_ThunkData32@0 ; @ 299 +Shl3216_ThunkData32@0 ; @ 300 +; StrChrA=shlwapi.StrChrA ; @ 301 +; StrChrIA=shlwapi.StrChrIA ; @ 302 +; StrChrIW=shlwapi.StrChrIW ; @ 303 +; StrChrW=shlwapi.StrChrW ; @ 304 +; StrCmpNA=shlwapi.StrCmpNA ; @ 305 +; StrCmpNIA=shlwapi.StrCmpNIA ; @ 306 +; StrCmpNIW=shlwapi.StrCmpNIW ; @ 307 +; StrCmpNW=shlwapi.StrCmpNW ; @ 308 +StrCpyNA=StrCpyNA@12 ; @ 309 +; StrCpyNW=shlwapi.StrCpyNW ; @ 310 +; StrNCmpA=shlwapi.StrCmpNA ; @ 311 +; StrNCmpIA=shlwapi.StrCmpNIA ; @ 312 +; StrNCmpIW=shlwapi.StrCmpNIW ; @ 313 +; StrNCmpW=shlwapi.StrCmpNW ; @ 314 +StrNCpyA@12 ; @ 315 +; StrNCpyW=shlwapi.StrNCpyW ; @ 316 +; StrRChrA=shlwapi.StrRChrA ; @ 317 +; StrRChrIA=shlwapi.StrRChrIA ; @ 318 +; StrRChrIW=shlwapi.StrRChrIW ; @ 319 +; StrRChrW=shlwapi.StrRChrW ; @ 320 +StrRStrA@0 ; @ 321 +; StrRStrIA=shlwapi.StrRStrIA ; @ 322 +; StrRStrIW=shlwapi.StrRStrIW ; @ 323 +StrRStrW@0 ; @ 324 +; StrStrA=shlwapi.StrStrA ; @ 325 +; StrStrIA=shlwapi.StrStrIA ; @ 326 +; StrStrIW=shlwapi.StrStrIW ; @ 327 +; StrStrW=shlwapi.StrStrW ; @ 328 +SHRegCloseKey@4 ; @ 505 +SHRegOpenKeyA@12 ; @ 506 +SHRegOpenKeyW@12 ; @ 507 +SHRegQueryValueA@16 ; @ 508 +SHRegQueryValueExA@24 ; @ 509 +SHRegQueryValueW@16 ; @ 510 +SHRegQueryValueExW@24 ; @ 511 +SHRegDeleteKeyW@8 ; @ 512 +SHAllocShared@12 ; @ 520 +SHLockShared@8 ; @ 521 +SHUnlockShared@4 ; @ 522 +SHFreeShared@8 ; @ 523 +RealDriveType@8 ; @ 524 +RealDriveTypeFlags@8 ; @ 525 +NTSHChangeNotifyRegister@24 ; @ 640 +NTSHChangeNotifyDeregister@4 ; @ 641 +SHChangeNotifyReceive@16 ; @ 643 +SHChangeNotification_Lock@16 ; @ 644 +SHChangeNotification_Unlock@4 ; @ 645 +SHChangeRegistrationReceive@8 ; @ 646 +ReceiveAddToRecentDocs@8 ; @ 647 +SHWaitOp_Operate@8 ; @ 648 +PathIsSameRootA=PathIsSameRootA@8 ; @ 650 +ReadCabinetState@8 ; @ 651 +WriteCabinetState@4 ; @ 652 +PathProcessCommand@16 ; @ 653 +shell32_654@8 ; @ 654 +FileIconInit@4 ; @ 660 +IsUserAdmin@0 ; @ 680 +shell32_714@4 ; @ 714 +FOOBAR1217@0 ; @ 1217 +CheckEscapesA@0 +CheckEscapesW@0 +CommandLineToArgvW@8 +;Control_FillCache_RunDLL=Control_FillCache_RunDLL@16 +Control_FillCache_RunDLLA=Control_FillCache_RunDLLA@16 +Control_FillCache_RunDLLW=Control_FillCache_RunDLLW@16 +;Control_RunDLL=Control_RunDLL@16 +Control_RunDLLA=Control_RunDLLA@16 +Control_RunDLLW=Control_RunDLLW@16 +DllInstall=DllInstall@8 +;DoEnvironmentSubstA=DoEnvironmentSubstA@8 +DoEnvironmentSubstW=DoEnvironmentSubstW@8 +DragQueryFileAorW@0 +DuplicateIcon@8 +ExtractAssociatedIconA@12 +ExtractAssociatedIconExA@0 +ExtractAssociatedIconExW@0 +ExtractAssociatedIconW@12 +ExtractIconA=ExtractIconA@12 +;ExtractIconEx@20 +ExtractIconExA@20 +ExtractIconExW@20 +ExtractIconW@12 +ExtractIconResInfoA@0 +ExtractIconResInfoW@0 +ExtractVersionResource16W@0 +FindExeDlgProc@0 +FindExecutableA@12 +FindExecutableW@12 +FreeIconList@4 +InternalExtractIconListA@0 +InternalExtractIconListW@0 +OpenAs_RunDLL@0 +OpenAs_RunDLLA@0 +OpenAs_RunDLLW@0 +PrintersGetCommand_RunDLL@0 +PrintersGetCommand_RunDLLA@0 +PrintersGetCommand_RunDLLW@0 +RealShellExecuteA@0 +RealShellExecuteExA@0 +RealShellExecuteExW@0 +RealShellExecuteW@0 +RegenerateUserEnvironment@0 +SHAddToRecentDocs@8 +SHAppBarMessage@8 +SHBrowseForFolder@4 +SHBrowseForFolderA@4 +SHBrowseForFolderW@4 +SHChangeNotify@16 +ShellHookProc@0 +SHEmptyRecycleBinA@12 +SHEmptyRecycleBinW@12 +;SHFileOperation@4 +SHFileOperationA@4 +SHFileOperationW@4 +SHFormatDrive@16 +SHFreeNameMappings@4 +SHGetDesktopFolder@4 +;SHGetFileInfo@20 +SHGetFileInfoA@20 +SHGetFileInfoW@20 +SHGetInstanceExplorer@4 +SHGetMalloc=SHGetMalloc@4 +;SHGetNewLinkInfo@20 +SHGetPathFromIDList=SHGetPathFromIDList@8 +SHGetPathFromIDListA=SHGetPathFromIDListA@8 +SHGetPathFromIDListW=SHGetPathFromIDListW@8 +SHGetSettings@8 +SHGetSpecialFolderLocation=SHGetSpecialFolderLocation@12 +SHHelpShortcuts_RunDLL@16 +SHHelpShortcuts_RunDLLA@16 +SHHelpShortcuts_RunDLLW@16 +SHLoadInProc@4 +SHQueryRecycleBinA@8 +SHQueryRecycleBinW@8 +SHUpdateRecycleBinIcon@0 +WOWShellExecute@28 +DllCanUnloadNow@0 +DllGetVersion@4 +SHGetFreeDiskSpace@0 +SHGetSpecialFolderPathA@16 +SHGetFolderPathA@20 +SHGetFolderPathW@20 +SHGetFolderLocation@20 + diff --git a/reactos/lib/shell32/shell32.h b/reactos/lib/shell32/shell32.h new file mode 100644 index 00000000000..2048498f61b --- /dev/null +++ b/reactos/lib/shell32/shell32.h @@ -0,0 +1,104 @@ +/* + * ReactOS shell32 - + * + * shell32.h + * + * Copyright (C) 2002 Robert Dickenson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __SHELL32_H__ +#define __SHELL32_H__ + + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#include + +#ifdef _MSC_VER +#define inline +#pragma warning (disable:4273) // : inconsistent dll linkage. dllexport assumed. +#pragma warning (disable:4018) // : signed/unsigned mismatch +#pragma warning (disable:4141) // : 'dllexport' : used more than once + +#undef WINAPI +#define WINAPI __declspec(dllexport) +#define STDCALL __stdcall +#define WINBOOL BOOL + +#else + +//#define WINAPI STDCALL + +typedef struct _SHQUERYRBINFO { + DWORD cbSize; + __int64 i64Size; + __int64 i64NumItems; +} SHQUERYRBINFO, *LPSHQUERYRBINFO; + +#define DWORD_PTR DWORD* + +/* +#define STDAPI long __stdcall + +typedef struct _SHELLEXECUTEINFO{ + DWORD cbSize; + ULONG fMask; + HWND hwnd; + LPCTSTR lpVerb; + LPCTSTR lpFile; + LPCTSTR lpParameters; + LPCTSTR lpDirectory; + int nShow; + HINSTANCE hInstApp; + + // Optional members + LPVOID lpIDList; + LPCSTR lpClass; + HKEY hkeyClass; + DWORD dwHotKey; + union { + HANDLE hIcon; + HANDLE hMonitor; + }; + HANDLE hProcess; +} SHELLEXECUTEINFO, *LPSHELLEXECUTEINFO; + +typedef struct _NOTIFYICONDATA { + DWORD cbSize; + HWND hWnd; + UINT uID; + UINT uFlags; + UINT uCallbackMessage; + HICON hIcon; + TCHAR szTip[64]; + DWORD dwState; //Version 5.0 + DWORD dwStateMask; //Version 5.0 + TCHAR szInfo[256]; //Version 5.0 + union { + UINT uTimeout; //Version 5.0 + UINT uVersion; //Version 5.0 + } DUMMYUNIONNAME; + TCHAR szInfoTitle[64]; //Version 5.0 + DWORD dwInfoFlags; //Version 5.0 +} NOTIFYICONDATA, *PNOTIFYICONDATA; + + */ +/* + */ +#endif + + +#endif /* __SHELL32_H__ */