mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[SDK][INCLUDE] Fix and improve comctl32_undoc.h
This commit is contained in:
parent
8da7fbc704
commit
9fc87dacdb
2 changed files with 101 additions and 41 deletions
|
@ -427,12 +427,12 @@ BOOL COpenWithList::LoadProgIdList(HKEY hKey, LPCWSTR pwszExt)
|
|||
|
||||
HANDLE COpenWithList::OpenMRUList(HKEY hKey)
|
||||
{
|
||||
CREATEMRULISTW Info;
|
||||
MRUINFOW Info;
|
||||
|
||||
/* Initialize mru list info */
|
||||
Info.cbSize = sizeof(Info);
|
||||
Info.nMaxItems = 32;
|
||||
Info.dwFlags = MRU_STRING;
|
||||
Info.uMax = 32;
|
||||
Info.fFlags = MRU_STRING;
|
||||
Info.hKey = hKey;
|
||||
Info.lpszSubKey = L"OpenWithList";
|
||||
Info.lpfnCompare = NULL;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
*
|
||||
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
|
||||
* Copyright 2013 Dominik Hornung
|
||||
* Copyright 2020 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -22,61 +23,120 @@
|
|||
#ifndef __COMCTL32_UNDOC__H
|
||||
#define __COMCTL32_UNDOC__H
|
||||
|
||||
/*
|
||||
* See also:
|
||||
* https://docs.microsoft.com/en-us/windows/win32/shell/mruinfo
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* defined(__cplusplus) */
|
||||
|
||||
typedef struct tagCREATEMRULISTA
|
||||
typedef INT (CALLBACK *MRUCMPPROCA)(LPCSTR, LPCSTR);
|
||||
typedef INT (CALLBACK *MRUCMPPROCW)(LPCWSTR, LPCWSTR);
|
||||
typedef INT (CALLBACK *MRUBINARYCMPPROC)(LPCVOID, LPCVOID);
|
||||
|
||||
typedef struct _MRUINFOA
|
||||
{
|
||||
DWORD cbSize;
|
||||
DWORD nMaxItems;
|
||||
DWORD dwFlags;
|
||||
DWORD uMax;
|
||||
DWORD fFlags;
|
||||
HKEY hKey;
|
||||
LPCSTR lpszSubKey;
|
||||
PROC lpfnCompare;
|
||||
} CREATEMRULISTA, *LPCREATEMRULISTA;
|
||||
typedef struct tagCREATEMRULISTW
|
||||
MRUCMPPROCA lpfnCompare;
|
||||
} MRUINFOA, *LPMRUINFOA;
|
||||
typedef struct _MRUINFOW
|
||||
{
|
||||
DWORD cbSize;
|
||||
DWORD nMaxItems;
|
||||
DWORD dwFlags;
|
||||
DWORD uMax;
|
||||
DWORD fFlags;
|
||||
HKEY hKey;
|
||||
LPCWSTR lpszSubKey;
|
||||
PROC lpfnCompare;
|
||||
} CREATEMRULISTW, *LPCREATEMRULISTW;
|
||||
|
||||
#define MRU_STRING 0x0
|
||||
#define MRU_BINARY 0x1
|
||||
#define MRU_CACHEWRITE 0x2
|
||||
|
||||
HANDLE WINAPI CreateMRUListW(LPCREATEMRULISTW);
|
||||
HANDLE WINAPI CreateMRUListA(LPCREATEMRULISTA);
|
||||
INT WINAPI AddMRUData(HANDLE,LPCVOID,DWORD);
|
||||
INT WINAPI FindMRUData(HANDLE,LPCVOID,DWORD,LPINT);
|
||||
VOID WINAPI FreeMRUList(HANDLE);
|
||||
|
||||
INT WINAPI AddMRUStringW(HANDLE hList, LPCWSTR lpszString);
|
||||
INT WINAPI AddMRUStringA(HANDLE hList, LPCSTR lpszString);
|
||||
BOOL WINAPI DelMRUString(HANDLE hList, INT nItemPos);
|
||||
INT WINAPI FindMRUStringW(HANDLE hList, LPCWSTR lpszString, LPINT lpRegNum);
|
||||
INT WINAPI FindMRUStringA(HANDLE hList, LPCSTR lpszString, LPINT lpRegNum);
|
||||
HANDLE WINAPI CreateMRUListLazyW(const CREATEMRULISTW *lpcml, DWORD dwParam2,
|
||||
DWORD dwParam3, DWORD dwParam4);
|
||||
HANDLE WINAPI CreateMRUListLazyA(const CREATEMRULISTA *lpcml, DWORD dwParam2,
|
||||
DWORD dwParam3, DWORD dwParam4);
|
||||
INT WINAPI EnumMRUListW(HANDLE hList, INT nItemPos, LPVOID lpBuffer,
|
||||
DWORD nBufferSize);
|
||||
INT WINAPI EnumMRUListA(HANDLE hList, INT nItemPos, LPVOID lpBuffer,
|
||||
DWORD nBufferSize);
|
||||
MRUCMPPROCW lpfnCompare;
|
||||
} MRUINFOW, *LPMRUINFOW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef CREATEMRULISTW CREATEMRULIST, *PCREATEMRULIST;
|
||||
#define CreateMRUList CreateMRUListW
|
||||
#define MRUINFO MRUINFOW
|
||||
#define LPMRUINFO LPMRUINFOW
|
||||
#else
|
||||
typedef CREATEMRULISTA CREATEMRULIST, *PCREATEMRULIST;
|
||||
#define CreateMRUList CreateMRUListA
|
||||
#define MRUINFO MRUINFOA
|
||||
#define LPMRUINFO LPMRUINFOA
|
||||
#endif
|
||||
|
||||
/* MRUINFO.fFlags */
|
||||
#define MRU_STRING 0x0
|
||||
#define MRU_BINARY 0x1
|
||||
#define MRU_CACHEWRITE 0x2
|
||||
|
||||
#ifndef NO_MRU_IMPORTS
|
||||
|
||||
HANDLE WINAPI CreateMRUListA(LPMRUINFOA);
|
||||
HANDLE WINAPI CreateMRUListW(LPMRUINFOW);
|
||||
HANDLE WINAPI CreateMRUListLazyW(const MRUINFOW *lpcml, DWORD dwParam2,
|
||||
DWORD dwParam3, DWORD dwParam4);
|
||||
HANDLE WINAPI CreateMRUListLazyA(const MRUINFOA *lpcml, DWORD dwParam2,
|
||||
DWORD dwParam3, DWORD dwParam4);
|
||||
INT WINAPI AddMRUData(HANDLE, LPCVOID, DWORD);
|
||||
INT WINAPI AddMRUStringA(HANDLE hList, LPCSTR lpszString);
|
||||
INT WINAPI AddMRUStringW(HANDLE hList, LPCWSTR lpszString);
|
||||
INT WINAPI EnumMRUListA(HANDLE hList, INT nItemPos, LPVOID lpBuffer,
|
||||
DWORD nBufferSize);
|
||||
INT WINAPI EnumMRUListW(HANDLE hList, INT nItemPos, LPVOID lpBuffer,
|
||||
DWORD nBufferSize);
|
||||
INT WINAPI FindMRUData(HANDLE,LPCVOID,DWORD,LPINT);
|
||||
INT WINAPI FindMRUStringW(HANDLE hList, LPCWSTR lpszString, LPINT lpRegNum);
|
||||
INT WINAPI FindMRUStringA(HANDLE hList, LPCSTR lpszString, LPINT lpRegNum);
|
||||
BOOL WINAPI DelMRUString(HANDLE hList, INT nItemPos);
|
||||
VOID WINAPI FreeMRUList(HANDLE);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define CreateMRUList CreateMRUListW
|
||||
#define CreateMRUListLazy CreateMRUListLazyW
|
||||
#define AddMRUString AddMRUStringW
|
||||
#define EnumMRUList EnumMRUListW
|
||||
#define FindMRUString FindMRUStringW
|
||||
#else
|
||||
#define CreateMRUList CreateMRUListA
|
||||
#define CreateMRUListLazy CreateMRUListLazyA
|
||||
#define AddMRUString AddMRUStringA
|
||||
#define EnumMRUList EnumMRUListA
|
||||
#define FindMRUString FindMRUStringA
|
||||
#endif
|
||||
|
||||
#endif /* ndef NO_MRU_IMPORTS */
|
||||
|
||||
typedef HANDLE (WINAPI *FN_CreateMRUListA)(const MRUINFOA *);
|
||||
typedef HANDLE (WINAPI *FN_CreateMRUListW)(const MRUINFOW *);
|
||||
typedef HANDLE (WINAPI *FN_CreateMRUListLazyA)(const MRUINFOA *, DWORD, DWORD, DWORD);
|
||||
typedef HANDLE (WINAPI *FN_CreateMRUListLazyW)(const MRUINFOW *, DWORD, DWORD, DWORD);
|
||||
typedef INT (WINAPI *FN_AddMRUStringA)(HANDLE, LPCSTR);
|
||||
typedef INT (WINAPI *FN_AddMRUStringW)(HANDLE, LPCWSTR);
|
||||
typedef INT (WINAPI *FN_AddMRUData)(HANDLE, LPCVOID, DWORD);
|
||||
typedef INT (WINAPI *FN_EnumMRUListA)(HANDLE, INT, LPVOID, DWORD);
|
||||
typedef INT (WINAPI *FN_EnumMRUListW)(HANDLE, INT, LPVOID, DWORD);
|
||||
typedef INT (WINAPI *FN_FindMRUData)(HANDLE, LPCVOID, DWORD, LPINT);
|
||||
typedef INT (WINAPI *FN_FindMRUStringA)(HANDLE, LPCSTR, LPINT);
|
||||
typedef INT (WINAPI *FN_FindMRUStringW)(HANDLE, LPCWSTR, LPINT);
|
||||
typedef BOOL (WINAPI *FN_DelMRUString)(HANDLE, INT);
|
||||
typedef INT (WINAPI *FN_FreeMRUList)(HANDLE);
|
||||
|
||||
#define I_CreateMRUListA 151
|
||||
#define I_CreateMRUListW 400
|
||||
#define I_CreateMRUListLazyA 157
|
||||
#define I_CreateMRUListLazyW 404
|
||||
#define I_AddMRUStringA 153
|
||||
#define I_AddMRUStringW 401
|
||||
#define I_AddMRUData 167
|
||||
#define I_EnumMRUListA 154
|
||||
#define I_EnumMRUListW 403
|
||||
#define I_FindMRUData 169
|
||||
#define I_FindMRUStringA 155
|
||||
#define I_FindMRUStringW 402
|
||||
#define I_DelMRUString 156
|
||||
#define I_FreeMRUList 152
|
||||
|
||||
// #define GET_PROC(hComCtl32, fn) fn = (FN_##fn)GetProcAddress((hComCtl32), I_##fn)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif /* defined(__cplusplus) */
|
||||
|
|
Loading…
Reference in a new issue