Changeset 773 in dev
- Timestamp:
- Jan 15, 2011, 6:04:58 PM (14 years ago)
- Location:
- trunk/ab5.0/abdev
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/BasicCompiler.cpp
r750 r773 581 581 char temporary[1024],temp2[MAX_PATH]; 582 582 583 ActiveBasic::Common::EnableNX(); 584 ActiveBasic::Common::SetHeapOptions(); 585 583 586 hInst = GetModuleHandle( NULL ); 584 587 -
trunk/ab5.0/abdev/ab_common/include/Environment.h
r719 r773 52 52 }; 53 53 54 BOOL EnableNX(); 55 void SetHeapOptions(); 54 56 55 57 }} -
trunk/ab5.0/abdev/ab_common/src/Environment.cpp
r763 r773 35 35 } 36 36 throw; 37 }38 39 BOOL EnableLFH(HANDLE hHeap)40 {41 ULONG enableLFH = 2;42 return HeapSetInformation(hHeap, HeapCompatibilityInformation, &enableLFH, sizeof enableLFH);43 37 } 44 38 … … 84 78 return E_NOTIMPL; 85 79 } 80 81 BOOL ActiveBasic::Common::EnableNX() 82 { 83 typedef BOOL (WINAPI* PFNSETDEP)(DWORD); 84 85 HMODULE hmodKernel = GetModuleHandle(TEXT("KERNEL32.DLL")); 86 if (PFNSETDEP pfnSetDEP = reinterpret_cast<PFNSETDEP>(GetProcAddress(hmodKernel, "SetProcessDEPPolicy"))) 87 { 88 return pfnSetDEP(PROCESS_DEP_ENABLE); 89 } 90 else 91 { 92 return FALSE; 93 } 94 } 95 96 void ActiveBasic::Common::SetHeapOptions() 97 { 98 // SetDllDirectory(_T("")); 99 HMODULE hmodKernel = GetModuleHandle(TEXT("KERNEL32.DLL")); 100 101 typedef BOOL (WINAPI* HSI)(HANDLE, HEAP_INFORMATION_CLASS ,PVOID, SIZE_T); 102 HSI pHsi = reinterpret_cast<HSI>(GetProcAddress(hmodKernel, "HeapSetInformation")); 103 if (!pHsi) 104 { 105 return; 106 } 107 108 ULONG enableLFH = 2; 109 pHsi(GetProcessHeap(), HeapCompatibilityInformation, &enableLFH, sizeof enableLFH); 110 111 #ifndef HeapEnableTerminationOnCorruption 112 # define HeapEnableTerminationOnCorruption (HEAP_INFORMATION_CLASS)1 113 #endif 114 115 pHsi(NULL, HeapEnableTerminationOnCorruption, NULL, 0); 116 } -
trunk/ab5.0/abdev/ab_common/stdafx.h
r763 r773 1 1 #pragma once 2 #pragma strict_gs_check(on) 2 3 3 4 #include <map> -
trunk/ab5.0/abdev/abdev/abdev.cpp
r772 r773 1498 1498 HACCEL hAccel; 1499 1499 1500 ActiveBasic::Common::EnableNX(); 1501 ActiveBasic::Common::SetHeapOptions(); 1502 1500 1503 hInst=hThisInst; 1501 1504 if(!SetupProjectEditor()) return 0; -
trunk/ab5.0/abdev/abdev/abdev.vcproj
r772 r773 178 178 <Tool 179 179 Name="VCLinkerTool" 180 AdditionalOptions="/NXCOMPAT /DYNAMICBASE" 180 181 AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib imagehlp.lib tinyxmld_STL.lib" 181 182 OutputFile="$(OutDir)\abdev.exe" … … 279 280 <Tool 280 281 Name="VCLinkerTool" 282 AdditionalOptions="/NXCOMPAT /DYNAMICBASE /SAFESEH" 281 283 AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib imagehlp.lib tinyxml_STL.lib" 282 284 OutputFile="$(OutDir)\abdev.exe" -
trunk/ab5.0/abdev/compiler_x64/compiler_x64.vcproj
r650 r773 81 81 <Tool 82 82 Name="VCLinkerTool" 83 AdditionalOptions="/MACHINE:AMD64 "83 AdditionalOptions="/MACHINE:AMD64 /NXCOMPAT /DYNAMICBASE" 84 84 AdditionalDependencies="comctl32.lib psapi.lib imagehlp.lib shlwapi.lib" 85 85 OutputFile="$(OutDir)\abc.exe" … … 194 194 <Tool 195 195 Name="VCLinkerTool" 196 AdditionalOptions="/MACHINE:AMD64 "196 AdditionalOptions="/MACHINE:AMD64 /NXCOMPAT /DYNAMICBASE" 197 197 AdditionalDependencies="comctl32.lib psapi.lib imagehlp.lib shlwapi.lib" 198 198 OutputFile="$(OutDir)\abc.exe" … … 238 238 <ProjectReference 239 239 ReferencedProjectIdentifier="{F01805B6-65B4-4708-88F4-A5E07DEA9FBD}" 240 RelativePathToProject="..\jenga\projects\jenga\jenga.vcproj"241 240 /> 242 241 <ProjectReference 243 242 ReferencedProjectIdentifier="{87835C33-64C9-4BA5-9B39-608BA5394387}" 244 RelativePathToProject=".\ab_common\ab_common.vcproj"245 243 /> 246 244 </References> -
trunk/ab5.0/abdev/compiler_x86/compiler_x86.vcproj
r648 r773 77 77 <Tool 78 78 Name="VCLinkerTool" 79 AdditionalOptions="/NXCOMPAT /DYNAMICBASE" 79 80 AdditionalDependencies="comctl32.lib psapi.lib imagehlp.lib shlwapi.lib" 80 81 OutputFile="$(OutDir)\abc.exe" … … 182 183 <Tool 183 184 Name="VCLinkerTool" 185 AdditionalOptions="/NXCOMPAT /DYNAMICBASE /SAFESEH" 184 186 AdditionalDependencies="comctl32.lib psapi.lib imagehlp.lib shlwapi.lib" 185 187 OutputFile="$(OutDir)\abc.exe"
Note:
See TracChangeset
for help on using the changeset viewer.