Commit 9d404dda authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/propsheet: Double size of a template buffer passed to PSCB_PRECREATE.

parent e48d7586
......@@ -639,7 +639,7 @@ static INT_PTR PROPSHEET_CreateDialog(PropSheetInfo* psInfo)
*/
resSize = SizeofResource(COMCTL32_hModule, hRes);
temp = Alloc(resSize);
temp = Alloc(2 * resSize);
if (!temp)
return -1;
......
......@@ -55,6 +55,21 @@ static int CALLBACK sheet_callback(HWND hwnd, UINT msg, LPARAM lparam)
{
switch(msg)
{
case PSCB_PRECREATE:
{
HMODULE module = GetModuleHandleA("comctl32.dll");
DWORD size, buffer_size;
HRSRC hrsrc;
hrsrc = FindResourceA(module, MAKEINTRESOURCEA(1006 /* IDD_PROPSHEET */),
(LPSTR)RT_DIALOG);
size = SizeofResource(module, hrsrc);
ok(size != 0, "Failed to get size of propsheet dialog resource\n");
buffer_size = HeapSize(GetProcessHeap(), 0, (void *)lparam);
ok(buffer_size == 2 * size, "Unexpected template buffer size %u, resource size %u\n",
buffer_size, size);
break;
}
case PSCB_INITIALIZED:
{
char caption[256];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment