Exemplo n.º 1
0
/*
 *  ======== REG_GetValue ========
 *  Retrieve a value from the registry.
 */
DSP_STATUS REG_GetValue(IN CONST char *pstrValue, OUT u8 *pbData,
			IN OUT u32 *pdwDataSize)
{
	DSP_STATUS status;

	DBC_Require(pstrValue && pbData);
       DBC_Require(strlen(pstrValue) < REG_MAXREGPATHLENGTH);

	SYNC_EnterCS(reglock);
	/*  We need to use regsup calls...  */
	/*  ...for now we don't need the key handle or  */
	/*  the subkey, all we need is the value to lookup.  */
	if (regsupGetValue((char *)pstrValue, pbData, pdwDataSize) == DSP_SOK)
		status = DSP_SOK;
	else
		status = DSP_EFAIL;

	SYNC_LeaveCS(reglock);
	return status;
}
Exemplo n.º 2
0
/*
 *  ======== REG_GetValue ========
 *  Retrieve a value from the registry.
 */
DSP_STATUS REG_GetValue(OPTIONAL IN HANDLE *phKey, IN CONST char *pstrSubkey,
			IN CONST char *pstrValue, OUT u8 *pbData,
			IN OUT u32 *pdwDataSize)
{
	DSP_STATUS status;

	DBC_Require(pstrSubkey && pstrValue && pbData);
	DBC_Require(phKey == NULL);
	DBC_Require(strlen(pstrSubkey) < REG_MAXREGPATHLENGTH);
	DBC_Require(strlen(pstrValue) < REG_MAXREGPATHLENGTH);

	GT_0trace(REG_debugMask, GT_ENTER, "REG_GetValue: entered\n");

	/*  We need to use regsup calls...  */
	/*  ...for now we don't need the key handle or  */
	/*  the subkey, all we need is the value to lookup.  */
	if (regsupGetValue((char *)pstrValue, pbData, pdwDataSize) == DSP_SOK)
		status = DSP_SOK;
	else
		status = DSP_EFAIL;

	return status;
}