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

Go to the source code of this file.

Classes

class  CFileSysBindData
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (pidl)
 
HRESULT WINAPI IFileSystemBindData_Constructor (const WIN32_FIND_DATAW *pfd, LPBC *ppV)
 
HRESULT WINAPI FileSystemBindData_GetFindData (LPBC pbc, WIN32_FIND_DATAW *pfd)
 
HRESULT WINAPI FileSystemBindData_SetFindData (LPBC pbc, const WIN32_FIND_DATAW *pfd)
 

Function Documentation

◆ FileSystemBindData_GetFindData()

HRESULT WINAPI FileSystemBindData_GetFindData ( LPBC  pbc,
WIN32_FIND_DATAW pfd 
)

Definition at line 92 of file CFileSysBindData.cpp.

93 {
96  HRESULT ret;
97 
98  TRACE("%p, %p\n", pbc, pfd);
99 
100  if (!pfd)
101  return E_INVALIDARG;
102 
103  ret = pbc->GetObjectParam((LPOLESTR)STR_FILE_SYS_BIND_DATA, &pUnk);
104  if (SUCCEEDED(ret))
105  {
107  if (SUCCEEDED(ret))
108  ret = pfsbd->GetFindData(pfd);
109  }
110  return ret;
111 }
static LPOLESTR
Definition: stg_prop.c:27
#define IID_PPV_ARG(Itype, ppType)
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static PIXELFORMATDESCRIPTOR pfd
Definition: ssstars.c:67
int ret
nsresult QueryInterface(nsIIDRef riid, void **result)
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ FileSystemBindData_SetFindData()

HRESULT WINAPI FileSystemBindData_SetFindData ( LPBC  pbc,
const WIN32_FIND_DATAW pfd 
)

Definition at line 113 of file CFileSysBindData.cpp.

114 {
117  HRESULT ret;
118 
119  TRACE("%p, %p\n", pbc, pfd);
120 
121  ret = pbc->GetObjectParam((LPOLESTR)STR_FILE_SYS_BIND_DATA, &pUnk);
122  if (SUCCEEDED(ret))
123  {
125  if (SUCCEEDED(ret))
126  ret = pfsbd->SetFindData(pfd);
127  }
128  return ret;
129 }
static LPOLESTR
Definition: stg_prop.c:27
#define IID_PPV_ARG(Itype, ppType)
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static PIXELFORMATDESCRIPTOR pfd
Definition: ssstars.c:67
int ret
nsresult QueryInterface(nsIIDRef riid, void **result)
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ IFileSystemBindData_Constructor()

HRESULT WINAPI IFileSystemBindData_Constructor ( const WIN32_FIND_DATAW pfd,
LPBC ppV 
)

Definition at line 52 of file CFileSysBindData.cpp.

53 {
54  CComPtr<IFileSystemBindData> fileSystemBindData;
55  CComPtr<IBindCtx> bindContext;
56  BIND_OPTS bindOpts;
57  HRESULT hResult;
58 
59  TRACE("%p, %p\n", pfd, ppV);
60 
61  if (ppV == NULL)
62  return E_INVALIDARG;
63 
64  *ppV = NULL;
65 
66  hResult = CFileSysBindData::_CreatorClass::CreateInstance(NULL, IID_PPV_ARG(IFileSystemBindData, &fileSystemBindData));
67  if (FAILED(hResult))
68  return hResult;
69  hResult = fileSystemBindData->SetFindData(pfd);
70  if (FAILED(hResult))
71  return hResult;
72 
73  hResult = CreateBindCtx(0, &bindContext);
74  if (FAILED(hResult))
75  return hResult;
76  bindOpts.cbStruct = sizeof(BIND_OPTS);
77  bindOpts.grfFlags = 0;
78  bindOpts.grfMode = STGM_CREATE;
79  bindOpts.dwTickCountDeadline = 0;
80  hResult = bindContext->SetBindOptions(&bindOpts);
81  if (FAILED(hResult))
82  return hResult;
83  hResult = bindContext->RegisterObjectParam((LPOLESTR)STR_FILE_SYS_BIND_DATA, fileSystemBindData);
84  if (FAILED(hResult))
85  return hResult;
86 
87  *ppV = bindContext.Detach();
88 
89  return S_OK;
90 }
#define STGM_CREATE
Definition: objbase.h:925
static LPOLESTR
Definition: stg_prop.c:27
#define IID_PPV_ARG(Itype, ppType)
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC *ppbc)
Definition: bindctx.c:556
LONG HRESULT
Definition: typedefs.h:77
static PIXELFORMATDESCRIPTOR pfd
Definition: ssstars.c:67
#define S_OK
Definition: intsafe.h:59
T * Detach()
Definition: atlcomcli.h:156

Referenced by _ILParsePathW().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( pidl  )