2121
2222uintptr_t GetSectionStart (HMODULE hModule, const char * sectionName)
2323{
24- if (!hModule)
24+ if (!hModule)
2525 return 0 ;
2626
2727 auto base = reinterpret_cast <BYTE *>(hModule);
@@ -42,15 +42,16 @@ uintptr_t GetSectionStart(HMODULE hModule, const char* sectionName)
4242
4343int main (int argc, char ** argv)
4444{
45- std::list<std::wstring> lAllowedParents = { L" steam.exe" , L" explorer.exe" , L" VsDebugConsole.exe" , L" powershell.exe" , L" pwsh.exe" , L" cmd.exe" };
45+ std::list<std::wstring> lAllowedParents = { L" steam.exe" , L" explorer.exe" , L" VsDebugConsole.exe" , L" powershell.exe" , L" pwsh.exe" , L" cmd.exe" };
4646
4747 const std::string LicenseServerEndpoint = " https://example.com/api/license" ; // replace with your actual license server endpoint
4848 const bool bAllowOfflineUsage = true ;
4949 const bool bUsingLicensing = false ;
5050 const bool bEnforceHypervisorCheck = false ; // having this set to true will cause Github Actions tests to fail, since they run on a VM
5151 const bool bRequireCodeSigning = false ; // in production code, this should be set to true
52+ const bool bShutdownOnViolation = false ; // throws runtime error if integrity violation is found
5253
53- DRM * drm = new DRM (LicenseServerEndpoint, bAllowOfflineUsage, bUsingLicensing, bEnforceHypervisorCheck, bRequireCodeSigning, lAllowedParents);
54+ DRM * drm = new DRM (LicenseServerEndpoint, bAllowOfflineUsage, bUsingLicensing, bEnforceHypervisorCheck, bRequireCodeSigning, lAllowedParents, bShutdownOnViolation );
5455
5556 try
5657 {
@@ -105,4 +106,4 @@ int main(int argc, char** argv)
105106 std::cout << " Closing DRM Test program...\n " ;
106107
107108 return 0 ;
108- }
109+ }
0 commit comments