From d897b32598db0864a2188adc12fb3cca66f648ff Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 26 May 2014 21:03:54 +0400 Subject: [PATCH] propsys: Implement PSGetPropertySystem(). --- dlls/propsys/propsys.spec | 2 +- dlls/propsys/propsys_main.c | 108 ++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+), 1 deletion(-) diff --git a/dlls/propsys/propsys.spec b/dlls/propsys/propsys.spec index a64d53a8627..92b6d7c7c07 100644 --- a/dlls/propsys/propsys.spec +++ b/dlls/propsys/propsys.spec @@ -84,7 +84,7 @@ @ stdcall PSGetPropertyDescriptionListFromString(ptr ptr ptr) @ stub PSGetPropertyFromPropertyStorage @ stub PSGetPropertyKeyFromName -@ stub PSGetPropertySystem +@ stdcall PSGetPropertySystem(ptr ptr) @ stub PSGetPropertyValue @ stub PSLookupPropertyHandlerCLSID @ stdcall PSPropertyKeyFromString(wstr ptr) diff --git a/dlls/propsys/propsys_main.c b/dlls/propsys/propsys_main.c index ad96aab2284..4bb9d2691ce 100644 --- a/dlls/propsys/propsys_main.c +++ b/dlls/propsys/propsys_main.c @@ -139,6 +139,114 @@ HRESULT WINAPI DllCanUnloadNow(void) return S_FALSE; } +static HRESULT WINAPI propsys_QueryInterface(IPropertySystem *iface, REFIID riid, void **obj) +{ + *obj = NULL; + + if (IsEqualIID(riid, &IID_IPropertySystem) || IsEqualIID(riid, &IID_IUnknown)) { + *obj = iface; + IPropertySystem_AddRef(iface); + return S_OK; + } + + FIXME("%s\n", debugstr_guid(riid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI propsys_AddRef(IPropertySystem *iface) +{ + return 2; +} + +static ULONG WINAPI propsys_Release(IPropertySystem *iface) +{ + return 1; +} + +static HRESULT WINAPI propsys_GetPropertyDescription(IPropertySystem *iface, + REFPROPERTYKEY propkey, REFIID riid, void **ppv) +{ + FIXME("%p %s %p: stub\n", propkey, debugstr_guid(riid), ppv); + return E_NOTIMPL; +} + +static HRESULT WINAPI propsys_GetPropertyDescriptionByName(IPropertySystem *iface, + LPCWSTR canonical_name, REFIID riid, void **ppv) +{ + FIXME("%s %s %p: stub\n", debugstr_w(canonical_name), debugstr_guid(riid), ppv); + return E_NOTIMPL; +} + +static HRESULT WINAPI propsys_GetPropertyDescriptionListFromString(IPropertySystem *iface, + LPCWSTR proplist, REFIID riid, void **ppv) +{ + FIXME("%s %s %p: stub\n", debugstr_w(proplist), debugstr_guid(riid), ppv); + return E_NOTIMPL; +} + +static HRESULT WINAPI propsys_EnumeratePropertyDescriptions(IPropertySystem *iface, + PROPDESC_ENUMFILTER filter, REFIID riid, void **ppv) +{ + FIXME("%d %s %p: stub\n", filter, debugstr_guid(riid), ppv); + return E_NOTIMPL; +} + +static HRESULT WINAPI propsys_FormatForDisplay(IPropertySystem *iface, + REFPROPERTYKEY key, REFPROPVARIANT propvar, PROPDESC_FORMAT_FLAGS flags, + LPWSTR dest, DWORD destlen) +{ + FIXME("%p %p %x %p %d: stub\n", key, propvar, flags, dest, destlen); + return E_NOTIMPL; +} + +static HRESULT WINAPI propsys_FormatForDisplayAlloc(IPropertySystem *iface, + REFPROPERTYKEY key, REFPROPVARIANT propvar, PROPDESC_FORMAT_FLAGS flags, + LPWSTR *text) +{ + FIXME("%p %p %x %p: stub\n", key, propvar, flags, text); + return E_NOTIMPL; +} + +static HRESULT WINAPI propsys_RegisterPropertySchema(IPropertySystem *iface, LPCWSTR path) +{ + FIXME("%s: stub\n", debugstr_w(path)); + return E_NOTIMPL; +} + +static HRESULT WINAPI propsys_UnregisterPropertySchema(IPropertySystem *iface, LPCWSTR path) +{ + FIXME("%s: stub\n", debugstr_w(path)); + return E_NOTIMPL; +} + +static HRESULT WINAPI propsys_RefreshPropertySchema(IPropertySystem *iface) +{ + FIXME("refresh: stub\n"); + return E_NOTIMPL; +} + +static const IPropertySystemVtbl propsysvtbl = { + propsys_QueryInterface, + propsys_AddRef, + propsys_Release, + propsys_GetPropertyDescription, + propsys_GetPropertyDescriptionByName, + propsys_GetPropertyDescriptionListFromString, + propsys_EnumeratePropertyDescriptions, + propsys_FormatForDisplay, + propsys_FormatForDisplayAlloc, + propsys_RegisterPropertySchema, + propsys_UnregisterPropertySchema, + propsys_RefreshPropertySchema +}; + +static IPropertySystem propsys = { &propsysvtbl }; + +HRESULT WINAPI PSGetPropertySystem(REFIID riid, void **obj) +{ + return IPropertySystem_QueryInterface(&propsys, riid, obj); +} + HRESULT WINAPI PSRegisterPropertySchema(PCWSTR path) { FIXME("%s stub\n", debugstr_w(path));