[SDK][UNDOCUSER] Add undocumented user32.dll SoftModalMessageBox() definition and its structure MSGBOXDATA.

Documented on http://www.vbforums.com/showthread.php?840593-Message-Box-with-Four-Buttons
and augmented from my own testings.

In addition, add also MessageBoxTimeoutA/W() and MB_GetString().
This commit is contained in:
Hermès Bélusca-Maïto 2018-02-20 23:07:11 +01:00
parent 7bfd6858fb
commit ed1de7184c
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -216,6 +216,83 @@ typedef struct _BALLOON_HARD_ERROR_DATA
ULONG_PTR MessageOffset;
} BALLOON_HARD_ERROR_DATA, *PBALLOON_HARD_ERROR_DATA;
//
// Undocumented SoftModalMessageBox() API, which constitutes
// the basis of all implementations of the MessageBox*() APIs.
//
typedef struct _MSGBOXDATA
{
MSGBOXPARAMSW mbp; // Size: 0x28 (on x86), 0x50 (on x64)
HWND hwndOwner;
#if defined(_WIN32) && (_WIN32_WINNT >= _WIN32_WINNT_WIN7) /* (NTDDI_VERSION >= NTDDI_WIN7) */
DWORD dwPadding;
#endif
WORD wLanguageId;
INT* pidButton; // Array of button IDs
LPCWSTR* ppszButtonText; // Array of button text strings
DWORD dwButtons; // Number of buttons
UINT uDefButton; // Default button ID
UINT uCancelId; // Button ID for Cancel action
#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP) /* (NTDDI_VERSION >= NTDDI_WINXP) */
DWORD dwTimeout; // Message box timeout
#endif
DWORD dwReserved0;
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7) /* (NTDDI_VERSION >= NTDDI_WIN7) */
DWORD dwReserved[4];
#endif
} MSGBOXDATA, *PMSGBOXDATA, *LPMSGBOXDATA;
#if defined(_WIN64)
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7) /* (NTDDI_VERSION >= NTDDI_WIN7) */
C_ASSERT(sizeof(MSGBOXDATA) == 0x98);
#elif (_WIN32_WINNT <= _WIN32_WINNT_WS03) /* (NTDDI_VERSION <= NTDDI_WS03) */
C_ASSERT(sizeof(MSGBOXDATA) == 0x88);
#endif
#else
#if (_WIN32_WINNT <= _WIN32_WINNT_WIN2K) /* (NTDDI_VERSION <= NTDDI_WIN2KSP4) */
C_ASSERT(sizeof(MSGBOXDATA) == 0x48);
#elif (_WIN32_WINNT >= _WIN32_WINNT_WIN7) /* (NTDDI_VERSION >= NTDDI_WIN7) */
C_ASSERT(sizeof(MSGBOXDATA) == 0x60);
#else // (_WIN32_WINNT == _WIN32_WINNT_WINXP || _WIN32_WINNT == _WIN32_WINNT_WS03) /* (NTDDI_VERSION == NTDDI_WS03) */
C_ASSERT(sizeof(MSGBOXDATA) == 0x4C);
#endif
#endif /* defined(_WIN64) */
int WINAPI SoftModalMessageBox(IN LPMSGBOXDATA lpMsgBoxData);
int
WINAPI
MessageBoxTimeoutA(
IN HWND hWnd,
IN LPCSTR lpText,
IN LPCSTR lpCaption,
IN UINT uType,
IN WORD wLanguageId,
IN DWORD dwTimeout);
int
WINAPI
MessageBoxTimeoutW(
IN HWND hWnd,
IN LPCWSTR lpText,
IN LPCWSTR lpCaption,
IN UINT uType,
IN WORD wLanguageId,
IN DWORD dwTimeout);
#ifdef UNICODE
#define MessageBoxTimeout MessageBoxTimeoutW
#else
#define MessageBoxTimeout MessageBoxTimeoutA
#endif
LPCWSTR WINAPI MB_GetString(IN UINT wBtn);
//
// User api hook
//