95 if (
lstrcmpiW(pszPropName,
L"RECTL2.top") == 0)
118 V_UI4(pvari) = 0xDEADFACE;
125 ok(
FALSE,
"Unexpected call\n");
140 if (
lstrcmpiW(pszPropName,
L"RECTL2.bottom") == 0)
150 ok(
FALSE,
"Unexpected call\n");
160 BOOL bValue = 0xDEADFACE;
161 SHORT sValue = 0xDEADu;
162 LONG lValue = 0xDEADDEAD;
163 DWORD dwValue = 0xFEEDF00D;
165 POINTL ptl = { 0xEEEE, 0xDDDD };
166 POINTS pts = { 0x2222, 0x3333 };
167 RECTL rcl = { 123, 456, 789, 101112 };
295 POINTL ptl = { 0xEEEE, 0xDDDD };
302 POINTS pts = { 0x2222, 0x3333 };
309 RECTL rcl = { 123, 456, 789, 101112 };
338 if (pPropBag ==
NULL)
340 skip(
"pPropBag was NULL\n");
351 V_UI4(&vari) = 0xDEADFACE;
352 hr = pPropBag->
Write(
L"Name1", &vari);
371 V_UI4(&vari) = 0xDEADFACE;
372 hr = pPropBag->
Write(
L"Name1", &vari);
378 V_UI4(&vari) = 0xFEEDF00D;
402 V_UI4(&vari) = 0xDEADFACE;
403 hr = pPropBag->
Write(
L"Name1", &vari);
409 V_UI4(&vari) = 0xFEEDF00D;
475 skip(
"FAILED to create HKCU\\Software\\ReactOS\n");
500 skip(
"SHCreatePropertyBagOnRegKey FAILED\n");
508 V_UI4(&vari) = 0xDEADFACE;
509 hr = pPropBag->
Write(
L"Name1", &vari);
525 hr = pPropBag->
Write(
L"Name2", &vari);
542 hr = pPropBag->
Write(
L"Name4", &vari);
572 DWORD dwType, dwValue, cbValue =
sizeof(dwValue);
578 cbValue =
sizeof(szText);
583 cbValue =
sizeof(guid_and_extra);
607 V_UI4(&vari) = 0xDEADFACE;
608 hr = pPropBag->
Write(
L"Name1", &vari);
616 IID_IPropertyBag2, (
void **)&pPropBag);
622 V_UI4(&vari) = 0xDEADFACE;
623 hr = pPropBag->
Write(
L"Name3", &vari);
629 V_UI4(&vari) = 0xFEEDF00D;
681 ok_wstr(szValue,
L"ABC\x3042\x3044\x3046\x2665");
720 V_UI4(&vari) = 0xDEADFACE;
721 hr = pPropBag->
Write(
L"Name1", &vari);
729 hr = pPropBag->
Write(
L"Name2", &vari);
737 hr = pPropBag->
Write(
L"@Name3", &vari);
745 hr = pPropBag->
Write(
L"@Name4", &vari);
770 ok_wstr(szValue,
L"ABC+MEIwRDBGJmU-");
793 hr = pPropBag->
Read(
L"TestSection\\Name1", &vari,
NULL);
801 hr = pPropBag->
Read(
L"TestSection\\Name2", &vari,
NULL);
809 hr = pPropBag->
Read(
L"TestSection\\@Name3", &vari,
NULL);
817 hr = pPropBag->
Read(
L"TestSection\\@Name4", &vari,
NULL);
835 WCHAR szBuff1[64], szBuff2[64];
static void SHPropertyBag_SHSetIniStringW(void)
static void SHPropertyBag_OnIniFile(void)
static void SHPropertyBag_WriteTest(void)
static void SHPropertyBag_PerScreenRes(void)
static void SHPropertyBag_ReadTest(void)
static LPCWSTR s_pszPropNames[4]
static void SHPropertyBag_OnMemory(void)
static void SHPropertyBag_OnRegKey(void)
static SAFEARRAY * CreateByteArray(LPCVOID pvSrc, DWORD cbSize)
static void ResetTest(VARTYPE vt, LPCWSTR pszName0=NULL, LPCWSTR pszName1=NULL, LPCWSTR pszName2=NULL, LPCWSTR pszName3=NULL)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define ok_long(expression, result)
#define ok_int(expression, result)
#define RegCloseKey(hKey)
STDMETHODIMP Write(LPCWSTR pszPropName, VARIANT *pvari) override
STDMETHODIMP_(ULONG) Release() override
STDMETHODIMP Read(LPCWSTR pszPropName, VARIANT *pvari, IErrorLog *pErrorLog) override
STDMETHODIMP_(ULONG) AddRef() override
STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject) override
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI WritePrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR string, LPCWSTR filename)
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
HRESULT WINAPI SafeArrayAccessData(SAFEARRAY *psa, void **ppvData)
HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY *psa)
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
SAFEARRAY *WINAPI SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound)
BOOL WINAPI SHSetIniStringW(LPCWSTR appName, LPCWSTR keyName, LPCWSTR str, LPCWSTR filename)
DWORD WINAPI SHGetIniStringW(LPCWSTR appName, LPCWSTR keyName, LPWSTR out, DWORD outLen, LPCWSTR filename)
HRESULT WINAPI SHCreatePropertyBagOnRegKey(HKEY hKey, LPCWSTR subkey, DWORD grfMode, REFIID riid, void **ppv)
HRESULT WINAPI SHPropertyBag_ReadLONG(IPropertyBag *ppb, LPCWSTR pszPropName, LPLONG pValue)
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
#define FillMemory(BUF, SIZ, MASK)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_ _CRTIMP FILE *__cdecl _wfopen(_In_z_ const wchar_t *_Filename, _In_z_ const wchar_t *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
HRESULT Write([in] LPCOLESTR pszPropName, [in] VARIANT *pVar)
HRESULT Read([in] LPCOLESTR pszPropName, [in, out] VARIANT *pVar, [in] IErrorLog *pErrorLog)
HRESULT Read([out, size_is(cb), length_is(*pcbRead)] void *pv, [in] ULONG cb, [out] ULONG *pcbRead)
#define ERROR_FILE_NOT_FOUND
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
const GUID IID_IPropertyBag
EXTERN_C INT WINAPI SHGetPerScreenResName(_Out_writes_(cchBuffer) LPWSTR pszBuffer, _In_ INT cchBuffer, _In_ DWORD dwReserved)
EXTERN_C HRESULT WINAPI SHCreatePropertyBagOnProfileSection(_In_z_ LPCWSTR lpFileName, _In_opt_z_ LPCWSTR pszSection, _In_ DWORD dwMode, _In_ REFIID riid, _Out_ void **ppvObj)
EXTERN_C HRESULT WINAPI SHCreatePropertyBagOnMemory(_In_ DWORD dwMode, _In_ REFIID riid, _Out_ void **ppvObj)
#define IsEqualGUID(rguid1, rguid2)
IStream *WINAPI SHCreateMemStream(const BYTE *lpbData, UINT dwDataLen)
HRESULT WINAPI SHPropertyBag_WriteRECTL(IPropertyBag *ppb, LPCWSTR pszPropName, const RECTL *prcl)
HRESULT WINAPI SHPropertyBag_ReadDWORD(IPropertyBag *ppb, LPCWSTR pszPropName, DWORD *pdwValue)
HRESULT WINAPI SHPropertyBag_ReadSHORT(IPropertyBag *ppb, LPCWSTR pszPropName, SHORT *psValue)
HRESULT WINAPI SHPropertyBag_ReadGUID(IPropertyBag *ppb, LPCWSTR pszPropName, GUID *pguid)
HRESULT WINAPI SHPropertyBag_ReadPOINTS(IPropertyBag *ppb, LPCWSTR pszPropName, POINTS *ppts)
HRESULT WINAPI SHPropertyBag_WriteBOOL(IPropertyBag *ppb, LPCWSTR pszPropName, BOOL bValue)
HRESULT WINAPI SHPropertyBag_ReadPOINTL(IPropertyBag *ppb, LPCWSTR pszPropName, POINTL *pptl)
HRESULT WINAPI SHPropertyBag_WriteGUID(IPropertyBag *ppb, LPCWSTR pszPropName, const GUID *pguid)
HRESULT WINAPI SHPropertyBag_WriteSHORT(IPropertyBag *ppb, LPCWSTR pszPropName, SHORT sValue)
HRESULT WINAPI SHPropertyBag_ReadBSTR(IPropertyBag *ppb, LPCWSTR pszPropName, BSTR *pbstr)
HRESULT WINAPI SHPropertyBag_ReadRECTL(IPropertyBag *ppb, LPCWSTR pszPropName, RECTL *prcl)
HRESULT WINAPI SHPropertyBag_Delete(IPropertyBag *ppb, LPCWSTR pszPropName)
HRESULT WINAPI SHPropertyBag_ReadBOOL(IPropertyBag *ppb, LPCWSTR pszPropName, BOOL *pbValue)
HRESULT WINAPI SHPropertyBag_WriteStr(IPropertyBag *ppb, LPCWSTR pszPropName, LPCWSTR pszValue)
HRESULT WINAPI SHPropertyBag_WritePOINTL(IPropertyBag *ppb, LPCWSTR pszPropName, const POINTL *pptl)
HRESULT WINAPI SHPropertyBag_WritePOINTS(IPropertyBag *ppb, LPCWSTR pszPropName, const POINTS *ppts)
HRESULT WINAPI SHPropertyBag_WriteLONG(IPropertyBag *ppb, LPCWSTR pszPropName, LONG lValue)
HRESULT WINAPI SHPropertyBag_WriteDWORD(IPropertyBag *ppb, LPCWSTR pszPropName, DWORD dwValue)
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
void WINAPI VariantInit(VARIANTARG *pVarg)
VERSIONHELPERAPI IsWindowsVistaOrGreater()
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
_In_ ULONG _In_opt_ PVOID pvData
#define HRESULT_FROM_WIN32(x)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define HKEY_CURRENT_USER
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)
int WINAPI GetSystemMetrics(_In_ int)