DXGL r445 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r444‎ | r445 | r446 >
Date:17:41, 24 May 2014
Author:admin
Status:new
Tags:
Comment:
Fix mistake in version info detection.
Add memory leak debug support to dxglcfg.
Modified paths:
  • /dxglcfg/dxglcfg.c (modified) (history)

Diff [purge]

Index: dxglcfg/dxglcfg.c
@@ -18,6 +18,9 @@
1919 #define _WIN32_WINNT 0x0600
2020 #define _WIN32_IE 0x0300
2121 #define _CRT_SECURE_NO_WARNINGS
 22+#define _CRTDBG_MAP_ALLOC
 23+#include <stdlib.h>
 24+#include <crtdbg.h>
2225 #include <windows.h>
2326 #include <HtmlHelp.h>
2427 #include <CommCtrl.h>
@@ -786,7 +789,7 @@
787790 if(VerQueryValue(verinfo,_T("\\VarFileInfo\\Translation"),(LPVOID*)&outbuffer,&outlen))
788791 {
789792 memcpy(translation,outbuffer,4);
790 - _sntprintf(verpath,64,_T("\\StringFileInfo\\%04x%04x\\"),translation[0],translation[1]);
 793+ _sntprintf(verpath,64,_T("\\StringFileInfo\\%04x%04x\\FileDescription"),translation[0],translation[1]);
791794 if(VerQueryValue(verinfo,verpath,(LPVOID*)&outbuffer,&outlen))
792795 {
793796 hasname = TRUE;
@@ -1299,5 +1302,8 @@
13001303 GetDirFromPath(hlppath);
13011304 _tcscat(hlppath,_T("\\dxgl.chm"));
13021305 DialogBox(hInstance,MAKEINTRESOURCE(IDD_DXGLCFG),0,(DLGPROC)DXGLCfgCallback);
 1306+#ifdef _DEBUG
 1307+ _CrtDumpMemoryLeaks();
 1308+#endif
13031309 return 0;
13041310 }