ReactOS 0.4.17-dev-444-g71ee754
prop.cpp File Reference
#include "precomp.h"
#include "prop.h"
Include dependency graph for prop.cpp:

Go to the source code of this file.

Classes

struct  SHELL32PKEYMAP
 

Macros

#define SHELL32_PROP_IMPL
 
#define MKSH32PKEYMAP(sysname, legacyname, pkey)   { (L##legacyname), &(pkey) },
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (shell_prop)
 
static const PROPERTYKEY * SHELL_GetPropertyKeyFromLegacyName (_In_ PCWSTR pszString)
 
static HRESULT SHELL_PropertyKeyFromPropertyKeyString (_In_ PCWSTR pszString, _Out_ PROPERTYKEY *pkey)
 
const PROPERTYKEY * SHELL_GetPropertyKeyFromString (_In_ PCWSTR pszString, _Out_ PROPERTYKEY *pkey)
 
HRESULT VariantToIdlist (_In_ VARIANT *pV, _Out_ LPITEMIDLIST *ppidl)
 

Variables

static const struct SHELL32PKEYMAP g_PkMap []
 

Macro Definition Documentation

◆ MKSH32PKEYMAP

#define MKSH32PKEYMAP (   sysname,
  legacyname,
  pkey 
)    { (L##legacyname), &(pkey) },

◆ SHELL32_PROP_IMPL

#define SHELL32_PROP_IMPL

Definition at line 8 of file prop.cpp.

Function Documentation

◆ SHELL_GetPropertyKeyFromLegacyName()

static const PROPERTYKEY * SHELL_GetPropertyKeyFromLegacyName ( _In_ PCWSTR  pszString)
static

Definition at line 31 of file prop.cpp.

32{
33 for (SIZE_T i = 0; i < _countof(g_PkMap); ++i)
34 {
35 if (!_wcsicmp(g_PkMap[i].pszLegacyName, pszString))
36 return g_PkMap[i].pkey;
37 }
38 return NULL;
39}
#define NULL
Definition: types.h:112
_ACRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:164
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
Definition: glfuncs.h:248
static const struct SHELL32PKEYMAP g_PkMap[]
#define _countof(array)
Definition: sndvol32.h:70
ULONG_PTR SIZE_T
Definition: typedefs.h:80

Referenced by SHELL_GetPropertyKeyFromString().

◆ SHELL_GetPropertyKeyFromString()

const PROPERTYKEY * SHELL_GetPropertyKeyFromString ( _In_ PCWSTR  pszString,
_Out_ PROPERTYKEY *  pkey 
)

Definition at line 60 of file prop.cpp.

61{
63 return pkey;
64 return SHELL_GetPropertyKeyFromLegacyName(pszString);
65}
#define SUCCEEDED(hr)
Definition: intsafe.h:50
static HRESULT SHELL_PropertyKeyFromPropertyKeyString(_In_ PCWSTR pszString, _Out_ PROPERTYKEY *pkey)
Definition: prop.cpp:45
static const PROPERTYKEY * SHELL_GetPropertyKeyFromLegacyName(_In_ PCWSTR pszString)
Definition: prop.cpp:31

Referenced by CFolderItem::ExtendedProperty().

◆ SHELL_PropertyKeyFromPropertyKeyString()

static HRESULT SHELL_PropertyKeyFromPropertyKeyString ( _In_ PCWSTR  pszString,
_Out_ PROPERTYKEY *  pkey 
)
static

Definition at line 45 of file prop.cpp.

46{
47 if (GUIDFromStringW(pszString, &pkey->fmtid))
48 {
49 for (pszString += 38; *pszString == ',' || *pszString == ' ';)
50 ++pszString;
51 pkey->pid = StrToInt(pszString);
52 if (pkey->pid)
53 return S_OK;
54 }
55 return E_INVALIDARG;
56}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define S_OK
Definition: intsafe.h:52
BOOL WINAPI GUIDFromStringW(_In_ PCWSTR psz, _Out_ LPGUID pguid)
#define StrToInt
Definition: shlwapi.h:1256

Referenced by SHELL_GetPropertyKeyFromString().

◆ VariantToIdlist()

HRESULT VariantToIdlist ( _In_ VARIANT pV,
_Out_ LPITEMIDLIST ppidl 
)

Definition at line 68 of file prop.cpp.

69{
71 if (V_VT(pV) == VT_I4)
72 {
74 }
75 else if (V_VT(pV) == VT_BSTR)
76 {
77 hr = SHILCreateFromPathW(V_BSTR(pV), ppidl, NULL);
78 }
79 return hr;
80}
#define E_FAIL
Definition: ddrawi.h:102
HRESULT hr
Definition: delayimp.cpp:582
@ VT_BSTR
Definition: compat.h:2303
@ VT_I4
Definition: compat.h:2298
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:3384
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define V_I4(A)
Definition: oleauto.h:247
HRESULT WINAPI SHILCreateFromPathW(LPCWSTR path, LPITEMIDLIST *ppidl, DWORD *attributes)
Definition: pidl.c:404

Referenced by CShellDispatch::AddToRecent(), CShellDispatch::BrowseForFolder(), GetUIObjectFromVariant(), CShellDispatch::NameSpace(), and OpenFolder().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( shell_prop  )

Variable Documentation

◆ g_PkMap

const struct SHELL32PKEYMAP g_PkMap[]
static
Initial value:
=
{
#define MKSH32PKEYMAP(sysname, legacyname, pkey)
}

Referenced by SHELL_GetPropertyKeyFromLegacyName().