2019-11-23 18:17:44 +00:00
|
|
|
#include "linux/windows/wincompat.h"
|
|
|
|
#include "linux/windows/stringcb.h"
|
2019-08-26 10:27:38 +01:00
|
|
|
#include "linux/interface.h"
|
|
|
|
|
|
|
|
BOOL RegLoadString (LPCTSTR section, LPCTSTR key, BOOL peruser, LPTSTR buffer, DWORD chars, LPCTSTR defaultValue)
|
|
|
|
{
|
|
|
|
BOOL success = RegLoadString(section, key, peruser, buffer, chars);
|
|
|
|
if (!success)
|
|
|
|
StringCbCopy(buffer, chars, defaultValue);
|
|
|
|
return success;
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL RegLoadValue (LPCTSTR section, LPCTSTR key, BOOL peruser, DWORD* value, DWORD defaultValue) {
|
|
|
|
BOOL success = RegLoadValue(section, key, peruser, value);
|
|
|
|
if (!success)
|
|
|
|
*value = defaultValue;
|
|
|
|
return success;
|
|
|
|
}
|