ReactOS 0.4.15-dev-8241-g63935f8
antimoniker.c File Reference
#include <assert.h>
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "objbase.h"
#include "wine/debug.h"
#include "moniker.h"
Include dependency graph for antimoniker.c:

Go to the source code of this file.

Classes

struct  AntiMonikerImpl
 

Macros

#define COBJMACROS
 
#define NONAMELESSUNION
 

Typedefs

typedef struct AntiMonikerImpl AntiMonikerImpl
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ole)
 
static AntiMonikerImplimpl_from_IMoniker (IMoniker *iface)
 
static AntiMonikerImplimpl_from_IROTData (IROTData *iface)
 
static HRESULT WINAPI AntiMonikerImpl_QueryInterface (IMoniker *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI AntiMonikerImpl_AddRef (IMoniker *iface)
 
static ULONG WINAPI AntiMonikerImpl_Release (IMoniker *iface)
 
static HRESULT WINAPI AntiMonikerImpl_GetClassID (IMoniker *iface, CLSID *pClassID)
 
static HRESULT WINAPI AntiMonikerImpl_IsDirty (IMoniker *iface)
 
static HRESULT WINAPI AntiMonikerImpl_Load (IMoniker *iface, IStream *pStm)
 
static HRESULT WINAPI AntiMonikerImpl_Save (IMoniker *iface, IStream *pStm, BOOL fClearDirty)
 
static HRESULT WINAPI AntiMonikerImpl_GetSizeMax (IMoniker *iface, ULARGE_INTEGER *pcbSize)
 
static HRESULT WINAPI AntiMonikerImpl_BindToObject (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, VOID **ppvResult)
 
static HRESULT WINAPI AntiMonikerImpl_BindToStorage (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, VOID **ppvResult)
 
static HRESULT WINAPI AntiMonikerImpl_Reduce (IMoniker *iface, IBindCtx *pbc, DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced)
 
static HRESULT WINAPI AntiMonikerImpl_ComposeWith (IMoniker *iface, IMoniker *pmkRight, BOOL fOnlyIfNotGeneric, IMoniker **ppmkComposite)
 
static HRESULT WINAPI AntiMonikerImpl_Enum (IMoniker *iface, BOOL fForward, IEnumMoniker **ppenumMoniker)
 
static HRESULT WINAPI AntiMonikerImpl_IsEqual (IMoniker *iface, IMoniker *pmkOtherMoniker)
 
static HRESULT WINAPI AntiMonikerImpl_Hash (IMoniker *iface, DWORD *pdwHash)
 
static HRESULT WINAPI AntiMonikerImpl_IsRunning (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, IMoniker *pmkNewlyRunning)
 
static HRESULT WINAPI AntiMonikerImpl_GetTimeOfLastChange (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, FILETIME *pAntiTime)
 
static HRESULT WINAPI AntiMonikerImpl_Inverse (IMoniker *iface, IMoniker **ppmk)
 
static HRESULT WINAPI AntiMonikerImpl_CommonPrefixWith (IMoniker *iface, IMoniker *pmkOther, IMoniker **ppmkPrefix)
 
static HRESULT WINAPI AntiMonikerImpl_RelativePathTo (IMoniker *iface, IMoniker *pmOther, IMoniker **ppmkRelPath)
 
static HRESULT WINAPI AntiMonikerImpl_GetDisplayName (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR *ppszDisplayName)
 
static HRESULT WINAPI AntiMonikerImpl_ParseDisplayName (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)
 
static HRESULT WINAPI AntiMonikerImpl_IsSystemMoniker (IMoniker *iface, DWORD *pwdMksys)
 
static HRESULT WINAPI AntiMonikerROTDataImpl_QueryInterface (IROTData *iface, REFIID riid, VOID **ppvObject)
 
static ULONG WINAPI AntiMonikerROTDataImpl_AddRef (IROTData *iface)
 
static ULONG WINAPI AntiMonikerROTDataImpl_Release (IROTData *iface)
 
static HRESULT WINAPI AntiMonikerROTDataImpl_GetComparisonData (IROTData *iface, BYTE *pbData, ULONG cbMax, ULONG *pcbData)
 
static HRESULT AntiMonikerImpl_Construct (AntiMonikerImpl *This)
 
HRESULT WINAPI CreateAntiMoniker (IMoniker **ppmk)
 
HRESULT WINAPI AntiMoniker_CreateInstance (IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)
 

Variables

static const IMonikerVtbl VT_AntiMonikerImpl
 
static const IROTDataVtbl VT_ROTDataImpl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 25 of file antimoniker.c.

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 26 of file antimoniker.c.

Typedef Documentation

◆ AntiMonikerImpl

Function Documentation

◆ AntiMoniker_CreateInstance()

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

Definition at line 631 of file antimoniker.c.

633{
634 IMoniker *pMoniker;
635 HRESULT hr;
636
637 TRACE("(%p, %s, %p)\n", pUnk, debugstr_guid(riid), ppv);
638
639 *ppv = NULL;
640
641 if (pUnk)
643
644 hr = CreateAntiMoniker(&pMoniker);
645 if (FAILED(hr))
646 return hr;
647
648 hr = IMoniker_QueryInterface(pMoniker, riid, ppv);
649
650 if (FAILED(hr))
651 IMoniker_Release(pMoniker);
652
653 return hr;
654}
HRESULT WINAPI CreateAntiMoniker(IMoniker **ppmk)
Definition: antimoniker.c:608
#define NULL
Definition: types.h:112
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662

◆ AntiMonikerImpl_AddRef()

static ULONG WINAPI AntiMonikerImpl_AddRef ( IMoniker iface)
static

Definition at line 105 of file antimoniker.c.

106{
108
109 TRACE("(%p)\n",This);
110
111 return InterlockedIncrement(&This->ref);
112}
static AntiMonikerImpl * impl_from_IMoniker(IMoniker *iface)
Definition: antimoniker.c:45
#define InterlockedIncrement
Definition: armddk.h:53

Referenced by AntiMonikerImpl_Reduce(), and AntiMonikerROTDataImpl_AddRef().

◆ AntiMonikerImpl_BindToObject()

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

Definition at line 229 of file antimoniker.c.

231{
232 TRACE("(%p,%p,%p,%s,%p)\n",iface,pbc,pmkToLeft,debugstr_guid(riid),ppvResult);
233 return E_NOTIMPL;
234}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ AntiMonikerImpl_BindToStorage()

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

Definition at line 240 of file antimoniker.c.

242{
243 TRACE("(%p,%p,%p,%s,%p)\n",iface,pbc,pmkToLeft,debugstr_guid(riid),ppvResult);
244 return E_NOTIMPL;
245}

◆ AntiMonikerImpl_CommonPrefixWith()

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

Definition at line 395 of file antimoniker.c.

396{
397 DWORD mkSys;
398
399 IMoniker_IsSystemMoniker(pmkOther,&mkSys);
400
401 if(mkSys==MKSYS_ANTIMONIKER){
402
403 IMoniker_AddRef(iface);
404
405 *ppmkPrefix=iface;
406
407 IMoniker_AddRef(iface);
408
409 return MK_S_US;
410 }
411 else
412 return MonikerCommonPrefixWith(iface,pmkOther,ppmkPrefix);
413}
HRESULT WINAPI MonikerCommonPrefixWith(IMoniker *pmkThis, IMoniker *pmkOther, IMoniker **ppmkCommon)
unsigned long DWORD
Definition: ntddk_ex.h:95
#define MK_S_US
Definition: winerror.h:2776

◆ AntiMonikerImpl_ComposeWith()

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

Definition at line 269 of file antimoniker.c.

271{
272
273 TRACE("(%p,%p,%d,%p)\n",iface,pmkRight,fOnlyIfNotGeneric,ppmkComposite);
274
275 if ((ppmkComposite==NULL)||(pmkRight==NULL))
276 return E_POINTER;
277
278 *ppmkComposite=0;
279
280 if (fOnlyIfNotGeneric)
281 return MK_E_NEEDGENERIC;
282 else
283 return CreateGenericComposite(iface,pmkRight,ppmkComposite);
284}
HRESULT WINAPI CreateGenericComposite(IMoniker *pmkFirst, IMoniker *pmkRest, IMoniker **ppmkComposite)
#define MK_E_NEEDGENERIC
Definition: winerror.h:2783
#define E_POINTER
Definition: winerror.h:2365

◆ AntiMonikerImpl_Construct()

static HRESULT AntiMonikerImpl_Construct ( AntiMonikerImpl This)
static

Definition at line 591 of file antimoniker.c.

592{
593
594 TRACE("(%p)\n",This);
595
596 /* Initialize the virtual function table. */
597 This->IMoniker_iface.lpVtbl = &VT_AntiMonikerImpl;
598 This->IROTData_iface.lpVtbl = &VT_ROTDataImpl;
599 This->ref = 0;
600 This->pMarshal = NULL;
601
602 return S_OK;
603}
static const IMonikerVtbl VT_AntiMonikerImpl
Definition: antimoniker.c:551
static const IROTDataVtbl VT_ROTDataImpl
Definition: antimoniker.c:580
#define S_OK
Definition: intsafe.h:52

Referenced by CreateAntiMoniker().

◆ AntiMonikerImpl_Enum()

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

Definition at line 290 of file antimoniker.c.

291{
292 TRACE("(%p,%d,%p)\n",iface,fForward,ppenumMoniker);
293
294 if (ppenumMoniker == NULL)
295 return E_POINTER;
296
297 *ppenumMoniker = NULL;
298
299 return S_OK;
300}

◆ AntiMonikerImpl_GetClassID()

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

Definition at line 141 of file antimoniker.c.

142{
143 TRACE("(%p,%p)\n",iface,pClassID);
144
145 if (pClassID==NULL)
146 return E_POINTER;
147
148 *pClassID = CLSID_AntiMoniker;
149
150 return S_OK;
151}

◆ AntiMonikerImpl_GetDisplayName()

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

Definition at line 437 of file antimoniker.c.

439{
440 static const WCHAR back[]={'\\','.','.',0};
441
442 TRACE("(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,ppszDisplayName);
443
444 if (ppszDisplayName==NULL)
445 return E_POINTER;
446
447 if (pmkToLeft!=NULL){
448 FIXME("() pmkToLeft!=NULL not implemented\n");
449 return E_NOTIMPL;
450 }
451
452 *ppszDisplayName=CoTaskMemAlloc(sizeof(back));
453
454 if (*ppszDisplayName==NULL)
455 return E_OUTOFMEMORY;
456
457 lstrcpyW(*ppszDisplayName,back);
458
459 return S_OK;
460}
#define FIXME(fmt,...)
Definition: debug.h:114
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define lstrcpyW
Definition: compat.h:749
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ AntiMonikerImpl_GetSizeMax()

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

Definition at line 204 of file antimoniker.c.

205{
206 TRACE("(%p,%p)\n",iface,pcbSize);
207
208 if (!pcbSize)
209 return E_POINTER;
210
211 /* for more details see AntiMonikerImpl_Save comments */
212
213 /*
214 * Normally the sizemax must be sizeof DWORD, but
215 * I tested this function it usually return 16 bytes
216 * more than the number of bytes used by AntiMoniker::Save function
217 */
218 pcbSize->u.LowPart = sizeof(DWORD)+16;
219
220 pcbSize->u.HighPart=0;
221
222 return S_OK;
223}
#define DWORD
Definition: nt_native.h:44
struct _ULARGE_INTEGER::@4153 u

◆ AntiMonikerImpl_GetTimeOfLastChange()

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

Definition at line 366 of file antimoniker.c.

370{
371 TRACE("(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,pAntiTime);
372 return E_NOTIMPL;
373}

◆ AntiMonikerImpl_Hash()

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

Definition at line 326 of file antimoniker.c.

327{
328 if (pdwHash==NULL)
329 return E_POINTER;
330
331 *pdwHash = 0x80000001;
332
333 return S_OK;
334}

◆ AntiMonikerImpl_Inverse()

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

Definition at line 379 of file antimoniker.c.

380{
381 TRACE("(%p,%p)\n",iface,ppmk);
382
383 if (ppmk==NULL)
384 return E_POINTER;
385
386 *ppmk=0;
387
388 return MK_E_NOINVERSE;
389}
#define MK_E_NOINVERSE
Definition: winerror.h:2793

◆ AntiMonikerImpl_IsDirty()

static HRESULT WINAPI AntiMonikerImpl_IsDirty ( IMoniker iface)
static

Definition at line 157 of file antimoniker.c.

158{
159 /* Note that the OLE-provided implementations of the IPersistStream::IsDirty
160 method in the OLE-provided moniker interfaces always return S_FALSE because
161 their internal state never changes. */
162
163 TRACE("(%p)\n",iface);
164
165 return S_FALSE;
166}
#define S_FALSE
Definition: winerror.h:2357

◆ AntiMonikerImpl_IsEqual()

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

Definition at line 306 of file antimoniker.c.

307{
308 DWORD mkSys;
309
310 TRACE("(%p,%p)\n",iface,pmkOtherMoniker);
311
312 if (pmkOtherMoniker==NULL)
313 return S_FALSE;
314
315 IMoniker_IsSystemMoniker(pmkOtherMoniker,&mkSys);
316
317 if (mkSys==MKSYS_ANTIMONIKER)
318 return S_OK;
319 else
320 return S_FALSE;
321}

◆ AntiMonikerImpl_IsRunning()

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

Definition at line 340 of file antimoniker.c.

342{
344 HRESULT res;
345
346 TRACE("(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,pmkNewlyRunning);
347
348 if (pbc==NULL)
349 return E_INVALIDARG;
350
351 res=IBindCtx_GetRunningObjectTable(pbc,&rot);
352
353 if (FAILED(res))
354 return res;
355
356 res = IRunningObjectTable_IsRunning(rot,iface);
357
358 IRunningObjectTable_Release(rot);
359
360 return res;
361}
GLfloat rot
Definition: 3dtext.c:36
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint res
Definition: glext.h:9613

◆ AntiMonikerImpl_IsSystemMoniker()

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

Definition at line 478 of file antimoniker.c.

479{
480 TRACE("(%p,%p)\n",iface,pwdMksys);
481
482 if (!pwdMksys)
483 return E_POINTER;
484
485 (*pwdMksys)=MKSYS_ANTIMONIKER;
486
487 return S_OK;
488}

◆ AntiMonikerImpl_Load()

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

Definition at line 172 of file antimoniker.c.

173{
174 DWORD constant=1,dwbuffer;
175 HRESULT res;
176
177 /* data read by this function is only a DWORD constant (must be 1) ! */
178 res=IStream_Read(pStm,&dwbuffer,sizeof(DWORD),NULL);
179
180 if (SUCCEEDED(res)&& dwbuffer!=constant)
181 return E_FAIL;
182
183 return res;
184}
#define E_FAIL
Definition: ddrawi.h:102
#define SUCCEEDED(hr)
Definition: intsafe.h:50

◆ AntiMonikerImpl_ParseDisplayName()

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

Definition at line 466 of file antimoniker.c.

469{
470 TRACE("(%p,%p,%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,pszDisplayName,pchEaten,ppmkOut);
471 return E_NOTIMPL;
472}

◆ AntiMonikerImpl_QueryInterface()

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

Definition at line 60 of file antimoniker.c.

61{
63
64 TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppvObject);
65
66 /* Perform a sanity check on the parameters.*/
67 if ( ppvObject==0 )
68 return E_INVALIDARG;
69
70 /* Initialize the return parameter */
71 *ppvObject = 0;
72
73 /* Compare the riid with the interface IDs implemented by this object.*/
77 IsEqualIID(&IID_IMoniker, riid))
78 *ppvObject = iface;
79 else if (IsEqualIID(&IID_IROTData, riid))
80 *ppvObject = &This->IROTData_iface;
81 else if (IsEqualIID(&IID_IMarshal, riid))
82 {
83 HRESULT hr = S_OK;
84 if (!This->pMarshal)
85 hr = MonikerMarshal_Create(iface, &This->pMarshal);
86 if (hr != S_OK)
87 return hr;
88 return IUnknown_QueryInterface(This->pMarshal, riid, ppvObject);
89 }
90
91 /* Check that we obtained an interface.*/
92 if ((*ppvObject)==0)
93 return E_NOINTERFACE;
94
95 /* always increase the reference count by one when it is successful */
96 IMoniker_AddRef(iface);
97
98 return S_OK;
99}
const GUID IID_IUnknown
HRESULT MonikerMarshal_Create(IMoniker *inner, IUnknown **outer)
Definition: moniker.c:1677
const GUID IID_IPersist
Definition: proxy.cpp:14
const GUID IID_IPersistStream
Definition: proxy.cpp:13
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define E_NOINTERFACE
Definition: winerror.h:2364

Referenced by AntiMonikerROTDataImpl_QueryInterface(), and CreateAntiMoniker().

◆ AntiMonikerImpl_Reduce()

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

Definition at line 251 of file antimoniker.c.

253{
254 TRACE("(%p,%p,%d,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced);
255
256 if (ppmkReduced==NULL)
257 return E_POINTER;
258
260
261 *ppmkReduced=iface;
262
264}
static ULONG WINAPI AntiMonikerImpl_AddRef(IMoniker *iface)
Definition: antimoniker.c:105
#define MK_S_REDUCED_TO_SELF
Definition: winerror.h:2773

◆ AntiMonikerImpl_RelativePathTo()

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

Definition at line 419 of file antimoniker.c.

420{
421 TRACE("(%p,%p,%p)\n",iface,pmOther,ppmkRelPath);
422
423 if (ppmkRelPath==NULL)
424 return E_POINTER;
425
426 IMoniker_AddRef(pmOther);
427
428 *ppmkRelPath=pmOther;
429
430 return MK_S_HIM;
431}
#define MK_S_HIM
Definition: winerror.h:2775

◆ AntiMonikerImpl_Release()

static ULONG WINAPI AntiMonikerImpl_Release ( IMoniker iface)
static

Definition at line 118 of file antimoniker.c.

119{
121 ULONG ref;
122
123 TRACE("(%p)\n",This);
124
126
127 /* destroy the object if there are no more references to it */
128 if (ref == 0)
129 {
130 if (This->pMarshal) IUnknown_Release(This->pMarshal);
132 }
133
134 return ref;
135}
#define InterlockedDecrement
Definition: armddk.h:52
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

Referenced by AntiMonikerROTDataImpl_Release().

◆ AntiMonikerImpl_Save()

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

Definition at line 190 of file antimoniker.c.

191{
192 static const DWORD constant = 1;
193 /* data written by this function is only a DWORD constant set to 1 ! */
194 return IStream_Write(pStm,&constant,sizeof(constant),NULL);
195}

◆ AntiMonikerROTDataImpl_AddRef()

static ULONG WINAPI AntiMonikerROTDataImpl_AddRef ( IROTData iface)
static

Definition at line 506 of file antimoniker.c.

507{
509
510 TRACE("(%p)\n",iface);
511
512 return AntiMonikerImpl_AddRef(&This->IMoniker_iface);
513}
static AntiMonikerImpl * impl_from_IROTData(IROTData *iface)
Definition: antimoniker.c:50

◆ AntiMonikerROTDataImpl_GetComparisonData()

static HRESULT WINAPI AntiMonikerROTDataImpl_GetComparisonData ( IROTData iface,
BYTE pbData,
ULONG  cbMax,
ULONG pcbData 
)
static

Definition at line 531 of file antimoniker.c.

533{
534 DWORD constant = 1;
535
536 TRACE("(%p, %u, %p)\n", pbData, cbMax, pcbData);
537
538 *pcbData = sizeof(CLSID) + sizeof(DWORD);
539 if (cbMax < *pcbData)
540 return E_OUTOFMEMORY;
541
542 memcpy(pbData, &CLSID_AntiMoniker, sizeof(CLSID));
543 memcpy(pbData+sizeof(CLSID), &constant, sizeof(DWORD));
544
545 return S_OK;
546}
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
IID CLSID
Definition: mstsclib_i.c:62
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_updates_bytes_to_ pdwDataLen BYTE * pbData
Definition: wincrypt.h:4201
_In_ DWORD _Out_writes_bytes_to_opt_ pcbData void _Inout_ DWORD * pcbData
Definition: wincrypt.h:4950

◆ AntiMonikerROTDataImpl_QueryInterface()

static HRESULT WINAPI AntiMonikerROTDataImpl_QueryInterface ( IROTData iface,
REFIID  riid,
VOID **  ppvObject 
)
static

Definition at line 494 of file antimoniker.c.

495{
497
498 TRACE("(%p,%s,%p)\n",iface,debugstr_guid(riid),ppvObject);
499
500 return AntiMonikerImpl_QueryInterface(&This->IMoniker_iface, riid, ppvObject);
501}
static HRESULT WINAPI AntiMonikerImpl_QueryInterface(IMoniker *iface, REFIID riid, void **ppvObject)
Definition: antimoniker.c:60

◆ AntiMonikerROTDataImpl_Release()

static ULONG WINAPI AntiMonikerROTDataImpl_Release ( IROTData iface)
static

Definition at line 518 of file antimoniker.c.

519{
521
522 TRACE("(%p)\n",iface);
523
524 return AntiMonikerImpl_Release(&This->IMoniker_iface);
525}
static ULONG WINAPI AntiMonikerImpl_Release(IMoniker *iface)
Definition: antimoniker.c:118

◆ CreateAntiMoniker()

HRESULT WINAPI CreateAntiMoniker ( IMoniker **  ppmk)

Definition at line 608 of file antimoniker.c.

609{
610 AntiMonikerImpl* newAntiMoniker;
611 HRESULT hr;
612
613 TRACE("(%p)\n",ppmk);
614
615 newAntiMoniker = HeapAlloc(GetProcessHeap(), 0, sizeof(AntiMonikerImpl));
616
617 if (newAntiMoniker == 0)
619
620 hr = AntiMonikerImpl_Construct(newAntiMoniker);
621 if (FAILED(hr))
622 {
623 HeapFree(GetProcessHeap(),0,newAntiMoniker);
624 return hr;
625 }
626
627 return AntiMonikerImpl_QueryInterface(&newAntiMoniker->IMoniker_iface, &IID_IMoniker,
628 (void**)ppmk);
629}
static HRESULT AntiMonikerImpl_Construct(AntiMonikerImpl *This)
Definition: antimoniker.c:591
#define HeapAlloc
Definition: compat.h:733
IMoniker IMoniker_iface
Definition: antimoniker.c:39
#define STG_E_INSUFFICIENTMEMORY
Definition: winerror.h:2570

Referenced by AntiMoniker_CreateInstance(), ClassMoniker_Inverse(), CompositeMonikerImpl_BindToObject(), CompositeMonikerImpl_BindToStorage(), CompositeMonikerImpl_GetTimeOfLastChange(), CompositeMonikerImpl_Inverse(), CompositeMonikerImpl_IsRunning(), CompositeMonikerImpl_ParseDisplayName(), CompositeMonikerImpl_Reduce(), FileMonikerImpl_Inverse(), ItemMonikerImpl_Inverse(), ParseDisplayName_ParseDisplayName(), PointerMonikerImpl_Inverse(), and test_anti_moniker().

◆ impl_from_IMoniker()

static AntiMonikerImpl * impl_from_IMoniker ( IMoniker iface)
inlinestatic

Definition at line 45 of file antimoniker.c.

46{
47 return CONTAINING_RECORD(iface, AntiMonikerImpl, IMoniker_iface);
48}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by AntiMonikerImpl_AddRef(), AntiMonikerImpl_QueryInterface(), and AntiMonikerImpl_Release().

◆ impl_from_IROTData()

static AntiMonikerImpl * impl_from_IROTData ( IROTData iface)
inlinestatic

Definition at line 50 of file antimoniker.c.

51{
52 return CONTAINING_RECORD(iface, AntiMonikerImpl, IROTData_iface);
53}

Referenced by AntiMonikerROTDataImpl_AddRef(), AntiMonikerROTDataImpl_QueryInterface(), and AntiMonikerROTDataImpl_Release().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( ole  )

Variable Documentation

◆ VT_AntiMonikerImpl

const IMonikerVtbl VT_AntiMonikerImpl
static
Initial value:
=
{
}
static HRESULT WINAPI AntiMonikerImpl_Enum(IMoniker *iface, BOOL fForward, IEnumMoniker **ppenumMoniker)
Definition: antimoniker.c:290
static HRESULT WINAPI AntiMonikerImpl_IsEqual(IMoniker *iface, IMoniker *pmkOtherMoniker)
Definition: antimoniker.c:306
static HRESULT WINAPI AntiMonikerImpl_IsSystemMoniker(IMoniker *iface, DWORD *pwdMksys)
Definition: antimoniker.c:478
static HRESULT WINAPI AntiMonikerImpl_GetSizeMax(IMoniker *iface, ULARGE_INTEGER *pcbSize)
Definition: antimoniker.c:204
static HRESULT WINAPI AntiMonikerImpl_BindToObject(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, VOID **ppvResult)
Definition: antimoniker.c:229
static HRESULT WINAPI AntiMonikerImpl_RelativePathTo(IMoniker *iface, IMoniker *pmOther, IMoniker **ppmkRelPath)
Definition: antimoniker.c:419
static HRESULT WINAPI AntiMonikerImpl_GetDisplayName(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR *ppszDisplayName)
Definition: antimoniker.c:437
static HRESULT WINAPI AntiMonikerImpl_Inverse(IMoniker *iface, IMoniker **ppmk)
Definition: antimoniker.c:379
static HRESULT WINAPI AntiMonikerImpl_IsRunning(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, IMoniker *pmkNewlyRunning)
Definition: antimoniker.c:340
static HRESULT WINAPI AntiMonikerImpl_Hash(IMoniker *iface, DWORD *pdwHash)
Definition: antimoniker.c:326
static HRESULT WINAPI AntiMonikerImpl_GetTimeOfLastChange(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, FILETIME *pAntiTime)
Definition: antimoniker.c:366
static HRESULT WINAPI AntiMonikerImpl_CommonPrefixWith(IMoniker *iface, IMoniker *pmkOther, IMoniker **ppmkPrefix)
Definition: antimoniker.c:395
static HRESULT WINAPI AntiMonikerImpl_Load(IMoniker *iface, IStream *pStm)
Definition: antimoniker.c:172
static HRESULT WINAPI AntiMonikerImpl_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced)
Definition: antimoniker.c:251
static HRESULT WINAPI AntiMonikerImpl_BindToStorage(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, VOID **ppvResult)
Definition: antimoniker.c:240
static HRESULT WINAPI AntiMonikerImpl_GetClassID(IMoniker *iface, CLSID *pClassID)
Definition: antimoniker.c:141
static HRESULT WINAPI AntiMonikerImpl_ParseDisplayName(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)
Definition: antimoniker.c:466
static HRESULT WINAPI AntiMonikerImpl_ComposeWith(IMoniker *iface, IMoniker *pmkRight, BOOL fOnlyIfNotGeneric, IMoniker **ppmkComposite)
Definition: antimoniker.c:269
static HRESULT WINAPI AntiMonikerImpl_Save(IMoniker *iface, IStream *pStm, BOOL fClearDirty)
Definition: antimoniker.c:190
static HRESULT WINAPI AntiMonikerImpl_IsDirty(IMoniker *iface)
Definition: antimoniker.c:157

Definition at line 551 of file antimoniker.c.

Referenced by AntiMonikerImpl_Construct().

◆ VT_ROTDataImpl

const IROTDataVtbl VT_ROTDataImpl
static
Initial value:
=
{
}
static HRESULT WINAPI AntiMonikerROTDataImpl_QueryInterface(IROTData *iface, REFIID riid, VOID **ppvObject)
Definition: antimoniker.c:494
static ULONG WINAPI AntiMonikerROTDataImpl_Release(IROTData *iface)
Definition: antimoniker.c:518
static ULONG WINAPI AntiMonikerROTDataImpl_AddRef(IROTData *iface)
Definition: antimoniker.c:506
static HRESULT WINAPI AntiMonikerROTDataImpl_GetComparisonData(IROTData *iface, BYTE *pbData, ULONG cbMax, ULONG *pcbData)
Definition: antimoniker.c:531

Definition at line 580 of file antimoniker.c.

Referenced by AntiMonikerImpl_Construct().