Fix crash in x64 due to C style cast
This commit is contained in:
parent
6dab6621ba
commit
472d54d7c9
@ -125,18 +125,18 @@ HGLOBAL StaticDialog::makeRTLResource(int dialogID, DLGTEMPLATE **ppMyDlgTemplat
|
|||||||
if (!hDlgTemplate)
|
if (!hDlgTemplate)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
DLGTEMPLATE *pDlgTemplate = (DLGTEMPLATE *)::LockResource(hDlgTemplate);
|
DLGTEMPLATE *pDlgTemplate = reinterpret_cast<DLGTEMPLATE *>(::LockResource(hDlgTemplate));
|
||||||
if (!pDlgTemplate)
|
if (!pDlgTemplate)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
// Duplicate Dlg Template resource
|
// Duplicate Dlg Template resource
|
||||||
unsigned long sizeDlg = ::SizeofResource(_hInst, hDialogRC);
|
unsigned long sizeDlg = ::SizeofResource(_hInst, hDialogRC);
|
||||||
HGLOBAL hMyDlgTemplate = ::GlobalAlloc(GPTR, sizeDlg);
|
HGLOBAL hMyDlgTemplate = ::GlobalAlloc(GPTR, sizeDlg);
|
||||||
*ppMyDlgTemplate = (DLGTEMPLATE *)::GlobalLock(hMyDlgTemplate);
|
*ppMyDlgTemplate = reinterpret_cast<DLGTEMPLATE *>(::GlobalLock(hMyDlgTemplate));
|
||||||
|
|
||||||
::memcpy(*ppMyDlgTemplate, pDlgTemplate, sizeDlg);
|
::memcpy(*ppMyDlgTemplate, pDlgTemplate, sizeDlg);
|
||||||
|
|
||||||
DLGTEMPLATEEX *pMyDlgTemplateEx = (DLGTEMPLATEEX *)*ppMyDlgTemplate;
|
DLGTEMPLATEEX *pMyDlgTemplateEx = reinterpret_cast<DLGTEMPLATEEX *>(*ppMyDlgTemplate);
|
||||||
if (pMyDlgTemplateEx->signature == 0xFFFF)
|
if (pMyDlgTemplateEx->signature == 0xFFFF)
|
||||||
pMyDlgTemplateEx->exStyle |= WS_EX_LAYOUTRTL;
|
pMyDlgTemplateEx->exStyle |= WS_EX_LAYOUTRTL;
|
||||||
else
|
else
|
||||||
|
@ -188,7 +188,7 @@
|
|||||||
<Version>1.0</Version>
|
<Version>1.0</Version>
|
||||||
<TypeLibraryFile />
|
<TypeLibraryFile />
|
||||||
<TypeLibraryResourceID>1</TypeLibraryResourceID>
|
<TypeLibraryResourceID>1</TypeLibraryResourceID>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
<ProgramDatabaseFile>$(OutDir)npp.pdb</ProgramDatabaseFile>
|
<ProgramDatabaseFile>$(OutDir)npp.pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
@ -239,7 +239,7 @@ copy ..\src\contextMenu.xml ..\bin\contextMenu.xml
|
|||||||
<TypeLibraryFile>
|
<TypeLibraryFile>
|
||||||
</TypeLibraryFile>
|
</TypeLibraryFile>
|
||||||
<TypeLibraryResourceID>1</TypeLibraryResourceID>
|
<TypeLibraryResourceID>1</TypeLibraryResourceID>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
<ProgramDatabaseFile>$(OutDir)npp.pdb</ProgramDatabaseFile>
|
<ProgramDatabaseFile>$(OutDir)npp.pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
Loading…
Reference in New Issue
Block a user