ReactOS  0.4.13-dev-79-gcd489d8
CShellDispatch.cpp File Reference
#include "precomp.h"
#include "winsvc.h"
#include <traycmd.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 422 of file CShellDispatch.cpp.

423 {
424  return ShellObjectCreatorInit<CShellDispatch>(riid, ppvOut);
425 }
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 93 of file CShellDispatch.cpp.

94 {
95  return V_VT(arg) == VT_ERROR && V_ERROR(arg) == DISP_E_PARAMNOTFOUND;
96 }
#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 56 of file CShellDispatch.cpp.

57 {
58  HRESULT hr = S_FALSE;
59  if(V_VT(var) == VT_I4)
60  {
61  hr = SHGetSpecialFolderLocation(NULL, V_I4(var), idlist);
62  }
63  else if(V_VT(var) == VT_BSTR)
64  {
65  hr = SHILCreateFromPathW(V_BSTR(var), idlist, NULL);
66  }
67  return hr;
68 }
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  )