ReactOS  0.4.14-dev-52-g6116262
CShellDispatch.cpp File Reference
#include "precomp.h"
#include "winsvc.h"
Include dependency graph for CShellDispatch.cpp:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (shell)
 
HRESULT VariantToIdlist (VARIANT *var, LPITEMIDLIST *idlist)
 
static BOOL is_optional_argument (const VARIANT *arg)
 
HRESULT WINAPI CShellDispatch_Constructor (REFIID riid, LPVOID *ppvOut)
 

Function Documentation

◆ CShellDispatch_Constructor()

HRESULT WINAPI CShellDispatch_Constructor ( REFIID  riid,
LPVOID ppvOut 
)

Definition at line 421 of file CShellDispatch.cpp.

422 {
423  return ShellObjectCreatorInit<CShellDispatch>(riid, ppvOut);
424 }
REFIID riid
Definition: precomp.h:44

Referenced by CDefViewDual::get_Application(), and CFolder::Initialize().

◆ is_optional_argument()

static BOOL is_optional_argument ( const VARIANT arg)
static

Definition at line 92 of file CShellDispatch.cpp.

93 {
94  return V_VT(arg) == VT_ERROR && V_ERROR(arg) == DISP_E_PARAMNOTFOUND;
95 }
#define DISP_E_PARAMNOTFOUND
Definition: winerror.h:2513
#define V_VT(A)
Definition: oleauto.h:211
#define V_ERROR(A)
Definition: oleauto.h:241

Referenced by CShellDispatch::BrowseForFolder().

◆ VariantToIdlist()

HRESULT VariantToIdlist ( VARIANT var,
LPITEMIDLIST idlist 
)

Definition at line 55 of file CShellDispatch.cpp.

56 {
57  HRESULT hr = S_FALSE;
58  if(V_VT(var) == VT_I4)
59  {
60  hr = SHGetSpecialFolderLocation(NULL, V_I4(var), idlist);
61  }
62  else if(V_VT(var) == VT_BSTR)
63  {
64  hr = SHILCreateFromPathW(V_BSTR(var), idlist, NULL);
65  }
66  return hr;
67 }
Definition: compat.h:1939
HRESULT hr
Definition: shlfolder.c:183
#define V_I4(A)
Definition: oleauto.h:247
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:2687
LONG HRESULT
Definition: typedefs.h:77
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
HRESULT WINAPI SHILCreateFromPathW(LPCWSTR path, LPITEMIDLIST *ppidl, DWORD *attributes)
Definition: pidl.c:392

Referenced by CShellDispatch::NameSpace().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( shell  )