add GetMachineId

This commit is contained in:
Chris Danford
2006-05-04 05:13:06 +00:00
parent d284692d64
commit 3cb84a61b5
3 changed files with 17 additions and 0 deletions
@@ -9,6 +9,7 @@
#include "archutils/win32/DebugInfoHunt.h"
#include "archutils/win32/RestartProgram.h"
#include "archutils/win32/GotoURL.h"
#include "archutils/Win32/RegistryAccess.h"
static HANDLE g_hInstanceMutex;
static bool g_bIsMultipleInstance = false;
@@ -72,6 +73,16 @@ static BOOL CALLBACK GetEnabledPopup( HWND hWnd, LPARAM lParam )
return FALSE;
}
static const RString CURRENT_VERSION_KEY = "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion";
RString ArchHooks_Win32::GetMachineId()
{
RString s;
if( RegistryAccess::GetRegValue( CURRENT_VERSION_KEY, "ProductID", s ) )
return s;
return RString();
}
bool ArchHooks_Win32::CheckForMultipleInstances()
{
if( !g_bIsMultipleInstance )