ReactOS  0.4.15-dev-1384-g878186b
pointermoniker.c File Reference
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "winuser.h"
#include "objbase.h"
#include "oleidl.h"
#include "wine/debug.h"
#include "moniker.h"
Include dependency graph for pointermoniker.c:

Go to the source code of this file.

Classes

struct  PointerMonikerImpl
 

Macros

#define COBJMACROS
 
#define NONAMELESSUNION
 

Typedefs

typedef struct PointerMonikerImpl PointerMonikerImpl
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ole)
 
static PointerMonikerImplimpl_from_IMoniker (IMoniker *iface)
 
static HRESULT WINAPI PointerMonikerImpl_QueryInterface (IMoniker *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI PointerMonikerImpl_AddRef (IMoniker *iface)
 
static ULONG WINAPI PointerMonikerImpl_Release (IMoniker *iface)
 
static HRESULT WINAPI PointerMonikerImpl_GetClassID (IMoniker *iface, CLSID *pClassID)
 
static HRESULT WINAPI PointerMonikerImpl_IsDirty (IMoniker *iface)
 
static HRESULT WINAPI PointerMonikerImpl_Load (IMoniker *iface, IStream *pStm)
 
static HRESULT WINAPI PointerMonikerImpl_Save (IMoniker *iface, IStream *pStm, BOOL fClearDirty)
 
static HRESULT WINAPI PointerMonikerImpl_GetSizeMax (IMoniker *iface, ULARGE_INTEGER *pcbSize)
 
static HRESULT WINAPI PointerMonikerImpl_BindToObject (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, VOID **ppvResult)
 
static HRESULT WINAPI PointerMonikerImpl_BindToStorage (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, VOID **ppvResult)
 
static HRESULT WINAPI PointerMonikerImpl_Reduce (IMoniker *iface, IBindCtx *pbc, DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced)
 
static HRESULT WINAPI PointerMonikerImpl_ComposeWith (IMoniker *iface, IMoniker *pmkRight, BOOL fOnlyIfNotGeneric, IMoniker **ppmkComposite)
 
static HRESULT WINAPI PointerMonikerImpl_Enum (IMoniker *iface, BOOL fForward, IEnumMoniker **ppenumMoniker)
 
static HRESULT WINAPI PointerMonikerImpl_IsEqual (IMoniker *iface, IMoniker *pmkOtherMoniker)
 
static HRESULT WINAPI PointerMonikerImpl_Hash (IMoniker *iface, DWORD *pdwHash)
 
static HRESULT WINAPI PointerMonikerImpl_IsRunning (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, IMoniker *pmkNewlyRunning)
 
static HRESULT WINAPI PointerMonikerImpl_GetTimeOfLastChange (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, FILETIME *pAntiTime)
 
static HRESULT WINAPI PointerMonikerImpl_Inverse (IMoniker *iface, IMoniker **ppmk)
 
static HRESULT WINAPI PointerMonikerImpl_CommonPrefixWith (IMoniker *iface, IMoniker *pmkOther, IMoniker **ppmkPrefix)
 
static HRESULT WINAPI PointerMonikerImpl_RelativePathTo (IMoniker *iface, IMoniker *pmOther, IMoniker **ppmkRelPath)
 
static HRESULT WINAPI PointerMonikerImpl_GetDisplayName (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR *ppszDisplayName)
 
static HRESULT WINAPI PointerMonikerImpl_ParseDisplayName (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)
 
static HRESULT WINAPI PointerMonikerImpl_IsSystemMoniker (IMoniker *iface, DWORD *pwdMksys)
 
static void PointerMonikerImpl_Construct (PointerMonikerImpl *This, IUnknown *punk)
 
HRESULT WINAPI CreatePointerMoniker (LPUNKNOWN punk, LPMONIKER *ppmk)
 
HRESULT WINAPI PointerMoniker_CreateInstance (IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)
 

Variables

static const IMonikerVtbl VT_PointerMonikerImpl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 25 of file pointermoniker.c.

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 26 of file pointermoniker.c.

Typedef Documentation

◆ PointerMonikerImpl

Function Documentation

◆ CreatePointerMoniker()

HRESULT WINAPI CreatePointerMoniker ( LPUNKNOWN  punk,
LPMONIKER ppmk 
)

Definition at line 570 of file pointermoniker.c.

571 {
573 
574  TRACE("(%p, %p)\n", punk, ppmk);
575 
576  if (!ppmk)
577  return E_INVALIDARG;
578 
579  This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
580  if (!This)
581  {
582  *ppmk = NULL;
583  return E_OUTOFMEMORY;
584  }
585 
587  *ppmk = &This->IMoniker_iface;
588  return S_OK;
589 }
static void PointerMonikerImpl_Construct(PointerMonikerImpl *This, IUnknown *punk)
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112

Referenced by PointerMoniker_CreateInstance(), and test_pointer_moniker().

◆ impl_from_IMoniker()

static PointerMonikerImpl* impl_from_IMoniker ( IMoniker iface)
inlinestatic

Definition at line 49 of file pointermoniker.c.

50 {
51 return CONTAINING_RECORD(iface, PointerMonikerImpl, IMoniker_iface);
52 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by PointerMonikerImpl_AddRef(), PointerMonikerImpl_BindToObject(), PointerMonikerImpl_BindToStorage(), PointerMonikerImpl_Hash(), PointerMonikerImpl_IsEqual(), PointerMonikerImpl_ParseDisplayName(), PointerMonikerImpl_QueryInterface(), and PointerMonikerImpl_Release().

◆ PointerMoniker_CreateInstance()

HRESULT WINAPI PointerMoniker_CreateInstance ( IClassFactory iface,
IUnknown pUnk,
REFIID  riid,
void **  ppv 
)

Definition at line 591 of file pointermoniker.c.

593 {
594  IMoniker *pMoniker;
595  HRESULT hr;
596 
597  TRACE("(%p, %s, %p)\n", pUnk, debugstr_guid(riid), ppv);
598 
599  *ppv = NULL;
600 
601  if (pUnk)
602  return CLASS_E_NOAGGREGATION;
603 
604  hr = CreatePointerMoniker(NULL, &pMoniker);
605  if (FAILED(hr))
606  return hr;
607 
608  hr = IMoniker_QueryInterface(pMoniker, riid, ppv);
609 
610  if (FAILED(hr))
611  IMoniker_Release(pMoniker);
612 
613  return hr;
614 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
HRESULT WINAPI CreatePointerMoniker(LPUNKNOWN punk, LPMONIKER *ppmk)
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
#define NULL
Definition: types.h:112
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30

◆ PointerMonikerImpl_AddRef()

static ULONG WINAPI PointerMonikerImpl_AddRef ( IMoniker iface)
static

Definition at line 89 of file pointermoniker.c.

90 {
92 
93  TRACE("(%p)\n",This);
94 
95  return InterlockedIncrement(&This->ref);
96 }
#define TRACE(s)
Definition: solgame.cpp:4
static PointerMonikerImpl * impl_from_IMoniker(IMoniker *iface)
#define InterlockedIncrement
Definition: armddk.h:53

Referenced by PointerMonikerImpl_Reduce().

◆ PointerMonikerImpl_BindToObject()

static HRESULT WINAPI PointerMonikerImpl_BindToObject ( IMoniker iface,
IBindCtx pbc,
IMoniker pmkToLeft,
REFIID  riid,
VOID **  ppvResult 
)
static

Definition at line 198 of file pointermoniker.c.

200 {
202 
203  TRACE("(%p,%p,%p,%s,%p)\n",iface,pbc,pmkToLeft,debugstr_guid(riid),ppvResult);
204 
205  if (!This->pObject)
206  return E_UNEXPECTED;
207 
208  return IUnknown_QueryInterface(This->pObject, riid, ppvResult);
209 }
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static PointerMonikerImpl * impl_from_IMoniker(IMoniker *iface)
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ PointerMonikerImpl_BindToStorage()

static HRESULT WINAPI PointerMonikerImpl_BindToStorage ( IMoniker iface,
IBindCtx pbc,
IMoniker pmkToLeft,
REFIID  riid,
VOID **  ppvResult 
)
static

Definition at line 215 of file pointermoniker.c.

217 {
219 
220  TRACE("(%p,%p,%p,%s,%p)\n",iface,pbc,pmkToLeft,debugstr_guid(riid),ppvResult);
221 
222  if (!This->pObject)
223  return E_UNEXPECTED;
224 
225  return IUnknown_QueryInterface(This->pObject, riid, ppvResult);
226 }
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static PointerMonikerImpl * impl_from_IMoniker(IMoniker *iface)
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ PointerMonikerImpl_CommonPrefixWith()

static HRESULT WINAPI PointerMonikerImpl_CommonPrefixWith ( IMoniker iface,
IMoniker pmkOther,
IMoniker **  ppmkPrefix 
)
static

Definition at line 416 of file pointermoniker.c.

417 {
418  TRACE("(%p, %p)\n", pmkOther, ppmkPrefix);
419 
420  *ppmkPrefix = NULL;
421 
422  if (PointerMonikerImpl_IsEqual(iface, pmkOther))
423  {
424  IMoniker_AddRef(iface);
425 
426  *ppmkPrefix=iface;
427 
428  return MK_S_US;
429  }
430  else
431  return MK_E_NOPREFIX;
432 }
static HRESULT WINAPI PointerMonikerImpl_IsEqual(IMoniker *iface, IMoniker *pmkOtherMoniker)
#define TRACE(s)
Definition: solgame.cpp:4
#define MK_E_NOPREFIX
Definition: winerror.h:2795
#define MK_S_US
Definition: winerror.h:2776
#define NULL
Definition: types.h:112

◆ PointerMonikerImpl_ComposeWith()

static HRESULT WINAPI PointerMonikerImpl_ComposeWith ( IMoniker iface,
IMoniker pmkRight,
BOOL  fOnlyIfNotGeneric,
IMoniker **  ppmkComposite 
)
static

Definition at line 250 of file pointermoniker.c.

252 {
253 
254  HRESULT res=S_OK;
255  DWORD mkSys,mkSys2;
256  IEnumMoniker* penumMk=0;
257  IMoniker *pmostLeftMk=0;
258  IMoniker* tempMkComposite=0;
259 
260  TRACE("(%p,%d,%p)\n", pmkRight, fOnlyIfNotGeneric, ppmkComposite);
261 
262  if ((ppmkComposite==NULL)||(pmkRight==NULL))
263  return E_POINTER;
264 
265  *ppmkComposite=0;
266 
267  IMoniker_IsSystemMoniker(pmkRight,&mkSys);
268 
269  /* If pmkRight is an anti-moniker, the returned moniker is NULL */
270  if(mkSys==MKSYS_ANTIMONIKER)
271  return res;
272 
273  else
274  /* if pmkRight is a composite whose leftmost component is an anti-moniker, */
275  /* the returned moniker is the composite after the leftmost anti-moniker is removed. */
276 
277  if(mkSys==MKSYS_GENERICCOMPOSITE){
278 
279  res=IMoniker_Enum(pmkRight,TRUE,&penumMk);
280 
281  if (FAILED(res))
282  return res;
283 
284  res=IEnumMoniker_Next(penumMk,1,&pmostLeftMk,NULL);
285 
286  IMoniker_IsSystemMoniker(pmostLeftMk,&mkSys2);
287 
288  if(mkSys2==MKSYS_ANTIMONIKER){
289 
290  IMoniker_Release(pmostLeftMk);
291 
292  tempMkComposite=iface;
293  IMoniker_AddRef(iface);
294 
295  while(IEnumMoniker_Next(penumMk,1,&pmostLeftMk,NULL)==S_OK){
296 
297  res=CreateGenericComposite(tempMkComposite,pmostLeftMk,ppmkComposite);
298 
299  IMoniker_Release(tempMkComposite);
300  IMoniker_Release(pmostLeftMk);
301 
302  tempMkComposite=*ppmkComposite;
303  IMoniker_AddRef(tempMkComposite);
304  }
305  return res;
306  }
307  else
308  return CreateGenericComposite(iface,pmkRight,ppmkComposite);
309  }
310  /* If pmkRight is not an anti-moniker, the method combines the two monikers into a generic
311  composite if fOnlyIfNotGeneric is FALSE; if fOnlyIfNotGeneric is TRUE, the method returns
312  a NULL moniker and a return value of MK_E_NEEDGENERIC */
313  else
314  if (!fOnlyIfNotGeneric)
315  return CreateGenericComposite(iface,pmkRight,ppmkComposite);
316 
317  else
318  return MK_E_NEEDGENERIC;
319 }
#define TRUE
Definition: types.h:120
#define MK_E_NEEDGENERIC
Definition: winerror.h:2783
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
unsigned long DWORD
Definition: ntddk_ex.h:95
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
GLuint res
Definition: glext.h:9613
HRESULT WINAPI CreateGenericComposite(IMoniker *pmkFirst, IMoniker *pmkRest, IMoniker **ppmkComposite)
#define E_POINTER
Definition: winerror.h:2365

◆ PointerMonikerImpl_Construct()

static void PointerMonikerImpl_Construct ( PointerMonikerImpl This,
IUnknown punk 
)
static

Definition at line 545 of file pointermoniker.c.

546 {
547  TRACE("(%p)\n",This);
548 
549  /* Initialize the virtual function table. */
550  This->IMoniker_iface.lpVtbl = &VT_PointerMonikerImpl;
551  This->ref = 1;
552  if (punk)
553  IUnknown_AddRef(punk);
554  This->pObject = punk;
555 }
#define TRACE(s)
Definition: solgame.cpp:4
static const IMonikerVtbl VT_PointerMonikerImpl

Referenced by CreatePointerMoniker().

◆ PointerMonikerImpl_Enum()

static HRESULT WINAPI PointerMonikerImpl_Enum ( IMoniker iface,
BOOL  fForward,
IEnumMoniker **  ppenumMoniker 
)
static

Definition at line 325 of file pointermoniker.c.

326 {
327  TRACE("(%p,%d,%p)\n",iface,fForward,ppenumMoniker);
328 
329  if (ppenumMoniker == NULL)
330  return E_POINTER;
331 
332  *ppenumMoniker = NULL;
333 
334  return S_OK;
335 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
#define E_POINTER
Definition: winerror.h:2365

◆ PointerMonikerImpl_GetClassID()

static HRESULT WINAPI PointerMonikerImpl_GetClassID ( IMoniker iface,
CLSID pClassID 
)
static

Definition at line 125 of file pointermoniker.c.

126 {
127  TRACE("(%p,%p)\n",iface,pClassID);
128 
129  if (pClassID==NULL)
130  return E_POINTER;
131 
132  *pClassID = CLSID_PointerMoniker;
133 
134  return S_OK;
135 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
#define E_POINTER
Definition: winerror.h:2365

◆ PointerMonikerImpl_GetDisplayName()

static HRESULT WINAPI PointerMonikerImpl_GetDisplayName ( IMoniker iface,
IBindCtx pbc,
IMoniker pmkToLeft,
LPOLESTR ppszDisplayName 
)
static

Definition at line 454 of file pointermoniker.c.

456 {
457  TRACE("(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,ppszDisplayName);
458 
459  if (ppszDisplayName==NULL)
460  return E_POINTER;
461 
462  *ppszDisplayName = NULL;
463  return E_NOTIMPL;
464 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
#define E_POINTER
Definition: winerror.h:2365

◆ PointerMonikerImpl_GetSizeMax()

static HRESULT WINAPI PointerMonikerImpl_GetSizeMax ( IMoniker iface,
ULARGE_INTEGER pcbSize 
)
static

Definition at line 181 of file pointermoniker.c.

182 {
183  TRACE("(%p,%p)\n",iface,pcbSize);
184 
185  if (!pcbSize)
186  return E_POINTER;
187 
188  pcbSize->u.LowPart = 0;
189  pcbSize->u.HighPart = 0;
190 
191  return E_NOTIMPL;
192 }
struct _ULARGE_INTEGER::@3949 u
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_POINTER
Definition: winerror.h:2365

◆ PointerMonikerImpl_GetTimeOfLastChange()

static HRESULT WINAPI PointerMonikerImpl_GetTimeOfLastChange ( IMoniker iface,
IBindCtx pbc,
IMoniker pmkToLeft,
FILETIME pAntiTime 
)
static

Definition at line 392 of file pointermoniker.c.

396 {
397  TRACE("(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,pAntiTime);
398  return E_NOTIMPL;
399 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ PointerMonikerImpl_Hash()

static HRESULT WINAPI PointerMonikerImpl_Hash ( IMoniker iface,
DWORD pdwHash 
)
static

Definition at line 365 of file pointermoniker.c.

366 {
368 
369  if (pdwHash==NULL)
370  return E_POINTER;
371 
372  *pdwHash = PtrToUlong(This->pObject);
373 
374  return S_OK;
375 }
#define PtrToUlong(u)
Definition: config.h:107
static PointerMonikerImpl * impl_from_IMoniker(IMoniker *iface)
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
#define E_POINTER
Definition: winerror.h:2365

◆ PointerMonikerImpl_Inverse()

static HRESULT WINAPI PointerMonikerImpl_Inverse ( IMoniker iface,
IMoniker **  ppmk 
)
static

Definition at line 405 of file pointermoniker.c.

406 {
407  TRACE("(%p,%p)\n",iface,ppmk);
408 
409  return CreateAntiMoniker(ppmk);
410 }
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI CreateAntiMoniker(IMoniker **ppmk)
Definition: antimoniker.c:608

◆ PointerMonikerImpl_IsDirty()

static HRESULT WINAPI PointerMonikerImpl_IsDirty ( IMoniker iface)
static

Definition at line 141 of file pointermoniker.c.

142 {
143  /* Note that the OLE-provided implementations of the IPersistStream::IsDirty
144  method in the OLE-provided moniker interfaces always return S_FALSE because
145  their internal state never changes. */
146 
147  TRACE("(%p)\n",iface);
148 
149  return S_FALSE;
150 }
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4

◆ PointerMonikerImpl_IsEqual()

static HRESULT WINAPI PointerMonikerImpl_IsEqual ( IMoniker iface,
IMoniker pmkOtherMoniker 
)
static

Definition at line 341 of file pointermoniker.c.

342 {
344  DWORD mkSys;
345 
346  TRACE("(%p,%p)\n",iface,pmkOtherMoniker);
347 
348  if (pmkOtherMoniker==NULL)
349  return S_FALSE;
350 
351  IMoniker_IsSystemMoniker(pmkOtherMoniker,&mkSys);
352 
353  if (mkSys==MKSYS_POINTERMONIKER)
354  {
355  PointerMonikerImpl *pOtherMoniker = impl_from_IMoniker(pmkOtherMoniker);
356  return This->pObject == pOtherMoniker->pObject ? S_OK : S_FALSE;
357  }
358  else
359  return S_FALSE;
360 }
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
static PointerMonikerImpl * impl_from_IMoniker(IMoniker *iface)
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112

Referenced by PointerMonikerImpl_CommonPrefixWith().

◆ PointerMonikerImpl_IsRunning()

static HRESULT WINAPI PointerMonikerImpl_IsRunning ( IMoniker iface,
IBindCtx pbc,
IMoniker pmkToLeft,
IMoniker pmkNewlyRunning 
)
static

Definition at line 381 of file pointermoniker.c.

383 {
384  TRACE("(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,pmkNewlyRunning);
385 
386  return S_OK;
387 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51

◆ PointerMonikerImpl_IsSystemMoniker()

static HRESULT WINAPI PointerMonikerImpl_IsSystemMoniker ( IMoniker iface,
DWORD pwdMksys 
)
static

Definition at line 500 of file pointermoniker.c.

501 {
502  TRACE("(%p,%p)\n",iface,pwdMksys);
503 
504  if (!pwdMksys)
505  return E_POINTER;
506 
507  *pwdMksys = MKSYS_POINTERMONIKER;
508 
509  return S_OK;
510 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
#define E_POINTER
Definition: winerror.h:2365

◆ PointerMonikerImpl_Load()

static HRESULT WINAPI PointerMonikerImpl_Load ( IMoniker iface,
IStream pStm 
)
static

Definition at line 156 of file pointermoniker.c.

157 {
158  TRACE("(%p)\n", pStm);
159 
160  return E_NOTIMPL;
161 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ PointerMonikerImpl_ParseDisplayName()

static HRESULT WINAPI PointerMonikerImpl_ParseDisplayName ( IMoniker iface,
IBindCtx pbc,
IMoniker pmkToLeft,
LPOLESTR  pszDisplayName,
ULONG pchEaten,
IMoniker **  ppmkOut 
)
static

Definition at line 470 of file pointermoniker.c.

473 {
475  HRESULT hr;
476  IParseDisplayName *pPDN;
477 
478  TRACE("(%p,%p,%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,pszDisplayName,pchEaten,ppmkOut);
479 
480  if (pmkToLeft)
481  return MK_E_SYNTAX;
482 
483  if (!This->pObject)
484  return E_UNEXPECTED;
485 
486  hr = IUnknown_QueryInterface(This->pObject, &IID_IParseDisplayName, (void **)&pPDN);
487  if (FAILED(hr))
488  return hr;
489 
490  hr = IParseDisplayName_ParseDisplayName(pPDN, pbc, pszDisplayName, pchEaten, ppmkOut);
491  IParseDisplayName_Release(pPDN);
492 
493  return hr;
494 }
HRESULT hr
Definition: shlfolder.c:183
const GUID IID_IParseDisplayName
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static PointerMonikerImpl * impl_from_IMoniker(IMoniker *iface)
#define E_UNEXPECTED
Definition: winerror.h:2456
#define MK_E_SYNTAX
Definition: winerror.h:2785

◆ PointerMonikerImpl_QueryInterface()

static HRESULT WINAPI PointerMonikerImpl_QueryInterface ( IMoniker iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 55 of file pointermoniker.c.

56 {
58 
59  TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppvObject);
60 
61  /* Perform a sanity check on the parameters.*/
62  if ( (This==0) || (ppvObject==0) )
63  return E_INVALIDARG;
64 
65  /* Initialize the return parameter */
66  *ppvObject = 0;
67 
68  /* Compare the riid with the interface IDs implemented by this object.*/
69  if (IsEqualIID(&IID_IUnknown, riid) ||
72  IsEqualIID(&IID_IMoniker, riid))
73  *ppvObject = iface;
74 
75  /* Check that we obtained an interface.*/
76  if ((*ppvObject)==0)
77  return E_NOINTERFACE;
78 
79  /* always increase the reference count by one when it is successful */
80  IMoniker_AddRef(iface);
81 
82  return S_OK;
83 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const GUID IID_IPersist
Definition: proxy.cpp:14
#define E_INVALIDARG
Definition: ddrawi.h:101
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IPersistStream
Definition: proxy.cpp:13
static PointerMonikerImpl * impl_from_IMoniker(IMoniker *iface)
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:51
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ PointerMonikerImpl_Reduce()

static HRESULT WINAPI PointerMonikerImpl_Reduce ( IMoniker iface,
IBindCtx pbc,
DWORD  dwReduceHowFar,
IMoniker **  ppmkToLeft,
IMoniker **  ppmkReduced 
)
static

Definition at line 232 of file pointermoniker.c.

234 {
235  TRACE("(%p,%p,%d,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced);
236 
237  if (ppmkReduced==NULL)
238  return E_POINTER;
239 
241 
242  *ppmkReduced=iface;
243 
244  return MK_S_REDUCED_TO_SELF;
245 }
#define MK_S_REDUCED_TO_SELF
Definition: winerror.h:2773
static ULONG WINAPI PointerMonikerImpl_AddRef(IMoniker *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define NULL
Definition: types.h:112
#define E_POINTER
Definition: winerror.h:2365

◆ PointerMonikerImpl_RelativePathTo()

static HRESULT WINAPI PointerMonikerImpl_RelativePathTo ( IMoniker iface,
IMoniker pmOther,
IMoniker **  ppmkRelPath 
)
static

Definition at line 438 of file pointermoniker.c.

439 {
440  TRACE("(%p,%p,%p)\n",iface,pmOther,ppmkRelPath);
441 
442  if (ppmkRelPath==NULL)
443  return E_POINTER;
444 
445  *ppmkRelPath = NULL;
446 
447  return E_NOTIMPL;
448 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
#define E_POINTER
Definition: winerror.h:2365

◆ PointerMonikerImpl_Release()

static ULONG WINAPI PointerMonikerImpl_Release ( IMoniker iface)
static

Definition at line 102 of file pointermoniker.c.

103 {
105  ULONG ref;
106 
107  TRACE("(%p)\n",This);
108 
109  ref = InterlockedDecrement(&This->ref);
110 
111  /* destroy the object if there are no more references on it */
112  if (ref == 0)
113  {
114  if (This->pObject) IUnknown_Release(This->pObject);
116  }
117 
118  return ref;
119 }
Definition: send.c:48
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
static PointerMonikerImpl * impl_from_IMoniker(IMoniker *iface)
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:594

◆ PointerMonikerImpl_Save()

static HRESULT WINAPI PointerMonikerImpl_Save ( IMoniker iface,
IStream pStm,
BOOL  fClearDirty 
)
static

Definition at line 167 of file pointermoniker.c.

168 {
169  TRACE("(%p, %d)\n", pStm, fClearDirty);
170 
171  return E_NOTIMPL;
172 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( ole  )

Variable Documentation

◆ VT_PointerMonikerImpl

const IMonikerVtbl VT_PointerMonikerImpl
static
Initial value:
=
{
}
static HRESULT WINAPI PointerMonikerImpl_Hash(IMoniker *iface, DWORD *pdwHash)
static HRESULT WINAPI PointerMonikerImpl_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced)
static HRESULT WINAPI PointerMonikerImpl_IsDirty(IMoniker *iface)
static HRESULT WINAPI PointerMonikerImpl_IsEqual(IMoniker *iface, IMoniker *pmkOtherMoniker)
static ULONG WINAPI PointerMonikerImpl_AddRef(IMoniker *iface)
static HRESULT WINAPI PointerMonikerImpl_BindToObject(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, VOID **ppvResult)
static HRESULT WINAPI PointerMonikerImpl_GetClassID(IMoniker *iface, CLSID *pClassID)
static HRESULT WINAPI PointerMonikerImpl_GetDisplayName(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR *ppszDisplayName)
static HRESULT WINAPI PointerMonikerImpl_BindToStorage(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, VOID **ppvResult)
static ULONG WINAPI PointerMonikerImpl_Release(IMoniker *iface)
static HRESULT WINAPI PointerMonikerImpl_GetTimeOfLastChange(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, FILETIME *pAntiTime)
static HRESULT WINAPI PointerMonikerImpl_RelativePathTo(IMoniker *iface, IMoniker *pmOther, IMoniker **ppmkRelPath)
static HRESULT WINAPI PointerMonikerImpl_IsRunning(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, IMoniker *pmkNewlyRunning)
static HRESULT WINAPI PointerMonikerImpl_GetSizeMax(IMoniker *iface, ULARGE_INTEGER *pcbSize)
static HRESULT WINAPI PointerMonikerImpl_CommonPrefixWith(IMoniker *iface, IMoniker *pmkOther, IMoniker **ppmkPrefix)
static HRESULT WINAPI PointerMonikerImpl_QueryInterface(IMoniker *iface, REFIID riid, void **ppvObject)
static HRESULT WINAPI PointerMonikerImpl_Inverse(IMoniker *iface, IMoniker **ppmk)
static HRESULT WINAPI PointerMonikerImpl_Save(IMoniker *iface, IStream *pStm, BOOL fClearDirty)
static HRESULT WINAPI PointerMonikerImpl_Load(IMoniker *iface, IStream *pStm)
static HRESULT WINAPI PointerMonikerImpl_ComposeWith(IMoniker *iface, IMoniker *pmkRight, BOOL fOnlyIfNotGeneric, IMoniker **ppmkComposite)
static HRESULT WINAPI PointerMonikerImpl_IsSystemMoniker(IMoniker *iface, DWORD *pwdMksys)
static HRESULT WINAPI PointerMonikerImpl_Enum(IMoniker *iface, BOOL fForward, IEnumMoniker **ppenumMoniker)
static HRESULT WINAPI PointerMonikerImpl_ParseDisplayName(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)

Definition at line 515 of file pointermoniker.c.

Referenced by PointerMonikerImpl_Construct().