📄 bpcreg.h
字号:
#pragma option push -b -a8 -pc -A- /*P_O_Push*/
#if _MSC_VER > 1000
#pragma once
#endif
#ifndef BPCREG_H
#define BPCREG_H
#include <tchar.h>
//-----------------------------------------------------------------------------
//
// Registry usage:
//
// HKLM = HKEY_LOCAL_MACHINE
// HKCU = HKEY_CURRENT_USER
//
// HKLM\Software\Microsoft\TV System Services
//
// REG_SZ (Default) - Not used.
// REG_SZ ProductDir - Root directory for BPC software
// REG_SZ DBFile - Full path to tss.mdb
// REG_SZ DBReplacementFile - Full path to the empty replacement tss.mdb
// REG_SZ EPGDBFile - Full path to epg.mdb
// REG_SZ SystemDB - Full path to tss.mdw
// REG_SZ AMFilter - Full path to dss.grf
//
// HKLM\Software\Microsoft\TV System Services\Tuning Spaces
//
// REG_SZ (Default) - Not used.
//
// HKLM\Software\Microsoft\TV System Services\Tuning Spaces\<iTuningSpace>
//
// REG_SZ (Default) - Not used.
// REG_SZ Name - UNDONE
// REG_SZ Description - UNDONE
// REG_SZ Loader - UNDONE
// REG_SZ MinChannel - UNDONE
// REG_SZ MaxChannel - UNDONE
// REG_SZ Devices - UNDONE
// REG_SZ MediaType - UNDONE
//
// HKLM\Software\Microsoft\TV System Services\Tuning Spaces\1
//
// REG_SZ Messages - UNDONE
// REG_SZ History - UNDONE
//
// HKLM\Software\Microsoft\TV System Services\EPG Loaders
//
// REG_SZ (Default) - Not used.
// REG_SZ LastAttempt - UNDONE
// REG_BINARY LastAttemptTime - UNDONE
// REG_SZ LastCompletion - UNDONE
// REG_BINARY LastCompletionTime - UNDONE
// REG_DWORD LastCompletionResult - UNDONE
// REG_BINARY EngineeringByte - UNDONE
//
// HKLM\Software\Microsoft\TV System Services\EPG Loaders\<guid>
//
// REG_SZ (Default) - Not used.
// REG_SZ Name - UNDONE
// REG_SZ TuningID - UNDONE
// REG_BINARY LastAttemptTime - UNDONE
// REG_BINARY LastCompletionTime - UNDONE
// REG_DWORD LastCompletionResult - UNDONE
//
// HKCU\Software\Microsoft\TV System Services
//
// REG_SZ (Default) - Not used.
//
// HKCU\Software\Microsoft\Microsoft TVExplorer
//
// REG_SZ (Default) - Not used.
//
// HKCU\Software\Microsoft\Microsoft TVExplorer\RemoteKeys
//
// REG_SZ (Default) - Not used.
//
// HKCU\Software\Microsoft\Microsoft TVExplorer\RemoteKeys\CommandLines
//
// REG_SZ (Default) - Not used.
// REG_SZ Guide - UNDONE
// REG_SZ TV - UNDONE
//
// HKCU\Software\Microsoft\Microsoft TVExplorer\RemoteKeys\WakeupKeys
//
// REG_SZ (Default) - Not used.
// REG_SZ Guide - UNDONE
// REG_SZ TV - UNDONE
//
// HKCU\AppEvents\Schemes\Apps\TVExplorer
//
// REG_SZ (Default) - "TV Explorer"
//
//-----------------------------------------------------------------------------
extern const LPCTSTR g_strBaseRegKey;
extern const LPCTSTR g_strProductDir;
extern const LPCTSTR g_strDBFile;
extern const LPCTSTR g_strDBReplacementFile;
extern const LPCTSTR g_strEPGDBFile;
extern const LPCTSTR g_strDefVBITS;
extern const LPCTSTR g_strDefVBIChan;
extern const LPCTSTR g_strSysFile;
extern const LPCTSTR g_strAMFilter;
extern const LPCTSTR g_strAMFClass;
extern const LPCTSTR g_strAMFCategory;
extern const LPCTSTR g_strAMFName;
extern const LPCTSTR g_strTSInputType;
extern const LPCTSTR g_strCountryCode;
extern const LPCTSTR g_strVolume;
extern const LPCTSTR g_strBalance;
extern const LPCTSTR g_strAudioPin;
extern const LPCTSTR g_strTVXRegKey;
extern const LPCTSTR g_strNTSC;
extern const LPCTSTR g_strDistanceViewing;
extern const LPCTSTR g_strConfigRegKey;
extern const LPCTSTR g_strConfigLastPage;
extern const LPCTSTR g_strTuningSpaceRegKey;
extern const LPCTSTR g_strTuningSpaceName;
extern const LPCTSTR g_strTuningSpaceDescription;
extern const LPCTSTR g_strMinChannel;
extern const LPCTSTR g_strMaxChannel;
extern const LPCTSTR g_strCurTVTuningSpace;
extern const LPCTSTR g_strDSSTuningSpaceRegKey;
extern const LPCTSTR g_strLCIDToSTYPE;
extern const LPCTSTR g_strCAProviderRegKey;
extern const LPCTSTR g_strCAProviderName;
extern const LPCTSTR g_strCAProviderDesc;
extern const LPCTSTR g_strVenPrefix;
extern const LPCTSTR g_strDevPrefix;
extern const LPCTSTR g_strEPGRegKey;
extern const LPCTSTR g_strEPGLoadersRegKey;
extern const LPCTSTR g_strEPGLoaderAttempt;
extern const LPCTSTR g_strEPGLoaderAttemptTime;
extern const LPCTSTR g_strEPGLoaderCompletion;
extern const LPCTSTR g_strEPGLoaderCompletionTime;
extern const LPCTSTR g_strEPGLoaderCompletionResult;
extern const LPCTSTR g_strEPGLoaderName;
extern const LPCTSTR g_strEPGLoaderTuningID;
extern const LPCTSTR g_strLoaderPostalCode;
extern const LPCTSTR g_strLoaderLastCompactSize;
extern const LPCTSTR g_strLoaderReadPrefix;
extern const LPCTSTR g_strLoaderWritePrefix;
extern const LPCTSTR g_strLoaderReadFile;
extern const LPCTSTR g_strDTVLoaderCSSByte;
extern const LPCTSTR g_strSSLoaderRegionID;
extern const LPCTSTR g_strSSLoaderRegionIDValid;
extern const LPCTSTR g_strSSLoaderPreviousRegionID;
extern const LPCTSTR g_strSSLoaderChannel;
extern const LPCTSTR g_strSSLoaderLine;
extern const LPCTSTR g_strSSLoaderScanReturnCode;
extern const LPCTSTR g_strSSLoaderScanPostalCode;
extern const LPCTSTR g_strSSLoaderListenReturnCode;
extern const LPCTSTR g_strSSLoaderListenReturnCodeCount;
#ifdef _DEBUG
extern const LPCTSTR g_strDEBUG;
extern const LPCTSTR g_strTrace;
#endif
//-----------------------------------------------------------------------------
// OpenRegKey
//
// Opens a registry HKEY. There are several overloads of this function
// that basically just provide defaults for the arguments to this function.
//
// Please use the overload that defaults as much as possible.
//
// The registry key is a combination of the following four parts.
//
// HKEY hkeyRoot = Optional root hkey.
// Default: HKEY_LOCAL_MACHINE
//
// LPCTSTR szKey = Optional key to be set.
// Default: g_strBaseRegKey
//
// LPCTSTR szSubKey1
// LPCTSTR szSubKey2 = Optional sub keys that are concatenated after
// szKey to form the full key.
// Backward slashes are added as necessary.
//
// Default: NULL
//
// Note: if only one or two strings are specified they are assumed to be
// szSubKey1 and szSubKey2.
// i.e. szKey defaults to g_strBaseRegKey before szSubKey1 and
// szSubKey2 default to NULL.
//
// If szKey, szSubKey1, and szSubKey2 are NULL then this will open
// a duplicate of hkeyRoot.
//
// The only required argument is the destination for the returned HKEY.
//
// HKEY *pkey = The returned HKEY.
// Remember to use RegCloseKey(*pkey) when you are finished
// with this registry key.
//
// The last two arguments are optional.
//
// REGSAM sam = Desired access mask.
// Default: KEY_ALL_ACCESS
//
// BOOL fCreate = TRUE if the key should be created.
// Default: FALSE
//
// Returns:
// ERROR_SUCCESS or an error code.
//-----------------------------------------------------------------------------
long OpenRegKey(HKEY hkeyRoot, LPCTSTR szKey, LPCTSTR szSubKey1,
LPCTSTR szSubKey2, HKEY *pkey,
REGSAM sam = KEY_ALL_ACCESS, BOOL fCreate = FALSE);
inline long OpenRegKey(LPCTSTR szKey, LPCTSTR szSubKey1, LPCTSTR szSubKey2,
HKEY *pkey, REGSAM sam = KEY_ALL_ACCESS, BOOL fCreate = FALSE)
{
return OpenRegKey(HKEY_LOCAL_MACHINE, szKey, szSubKey1, szSubKey2, pkey,
sam, fCreate);
}
inline long OpenRegKey(LPCTSTR szSubKey1, LPCTSTR szSubKey2,
HKEY *pkey, REGSAM sam = KEY_ALL_ACCESS, BOOL fCreate = FALSE)
{
return OpenRegKey(HKEY_LOCAL_MACHINE, g_strBaseRegKey, szSubKey1,
szSubKey2, pkey, sam, fCreate);
}
inline long OpenRegKey(LPCTSTR szSubKey, HKEY *pkey,
REGSAM sam = KEY_ALL_ACCESS, BOOL fCreate = FALSE)
{
return OpenRegKey(HKEY_LOCAL_MACHINE, g_strBaseRegKey, szSubKey, NULL,
pkey, sam, fCreate);
}
inline long OpenRegKey(HKEY *pkey, REGSAM sam = KEY_ALL_ACCESS,
BOOL fCreate = FALSE)
{
return OpenRegKey(HKEY_LOCAL_MACHINE, g_strBaseRegKey, NULL, NULL,
pkey, sam, fCreate);
}
//-----------------------------------------------------------------------------
// OpenUserRegKey
//
// Same as OpenRegKey except hkeyRoot defaults to HKEY_CURRENT_USER.
//-----------------------------------------------------------------------------
inline long OpenUserRegKey(LPCTSTR szKey, LPCTSTR szSubKey1, LPCTSTR szSubKey2,
HKEY *pkey, REGSAM sam = KEY_ALL_ACCESS, BOOL fCreate = FALSE)
{
return OpenRegKey(HKEY_CURRENT_USER, szKey, szSubKey1, szSubKey2, pkey,
sam, fCreate);
}
inline long OpenUserRegKey(LPCTSTR szSubKey1, LPCTSTR szSubKey2,
HKEY *pkey, REGSAM sam = KEY_ALL_ACCESS, BOOL fCreate = FALSE)
{
return OpenRegKey(HKEY_CURRENT_USER, g_strBaseRegKey, szSubKey1,
szSubKey2, pkey, sam, fCreate);
}
inline long OpenUserRegKey(LPCTSTR szSubKey, HKEY *pkey,
REGSAM sam = KEY_ALL_ACCESS, BOOL fCreate = FALSE)
{
return OpenRegKey(HKEY_CURRENT_USER, g_strBaseRegKey, szSubKey, NULL,
pkey, sam, fCreate);
}
inline long OpenUserRegKey(HKEY *pkey, REGSAM sam = KEY_ALL_ACCESS,
BOOL fCreate = FALSE)
{
return OpenRegKey(HKEY_CURRENT_USER, g_strBaseRegKey, NULL, NULL,
pkey, sam, fCreate);
}
//-----------------------------------------------------------------------------
// GetRegValue
//
// Gets data from the registry. There are numerous overloads of this function
// that basically just provide defaults for the arguments to this function.
//
// Please use the overload that defaults as much as possible.
//
// The registry key/value is a combination of the following five parts.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -