ole32/tests: Add test for OleRun.
[wine] / dlls / ole32 / antimoniker.c
1 /*
2  *                            AntiMonikers implementation
3  *
4  *               Copyright 1999  Noomen Hamza
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20
21 #include <assert.h>
22 #include <stdarg.h>
23 #include <string.h>
24
25 #define COBJMACROS
26 #define NONAMELESSUNION
27 #define NONAMELESSSTRUCT
28
29 #include "windef.h"
30 #include "winbase.h"
31 #include "winerror.h"
32 #include "objbase.h"
33 #include "wine/debug.h"
34 #include "moniker.h"
35
36 WINE_DEFAULT_DEBUG_CHANNEL(ole);
37
38 /* AntiMoniker data structure */
39 typedef struct AntiMonikerImpl{
40     IMoniker IMoniker_iface;
41     IROTData IROTData_iface;
42     LONG ref;
43     IUnknown *pMarshal; /* custom marshaler */
44 } AntiMonikerImpl;
45
46 static inline AntiMonikerImpl *impl_from_IMoniker(IMoniker *iface)
47 {
48     return CONTAINING_RECORD(iface, AntiMonikerImpl, IMoniker_iface);
49 }
50
51 static inline AntiMonikerImpl *impl_from_IROTData(IROTData *iface)
52 {
53     return CONTAINING_RECORD(iface, AntiMonikerImpl, IROTData_iface);
54 }
55
56
57 /*******************************************************************************
58  *        AntiMoniker_QueryInterface
59  *******************************************************************************/
60 static HRESULT WINAPI
61 AntiMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,void** ppvObject)
62 {
63     AntiMonikerImpl *This = impl_from_IMoniker(iface);
64
65     TRACE("(%p,%p,%p)\n",This,riid,ppvObject);
66
67     /* Perform a sanity check on the parameters.*/
68     if ( ppvObject==0 )
69         return E_INVALIDARG;
70
71     /* Initialize the return parameter */
72     *ppvObject = 0;
73
74     /* Compare the riid with the interface IDs implemented by this object.*/
75     if (IsEqualIID(&IID_IUnknown, riid) ||
76         IsEqualIID(&IID_IPersist, riid) ||
77         IsEqualIID(&IID_IPersistStream, riid) ||
78         IsEqualIID(&IID_IMoniker, riid))
79         *ppvObject = iface;
80     else if (IsEqualIID(&IID_IROTData, riid))
81         *ppvObject = &This->IROTData_iface;
82     else if (IsEqualIID(&IID_IMarshal, riid))
83     {
84         HRESULT hr = S_OK;
85         if (!This->pMarshal)
86             hr = MonikerMarshal_Create(iface, &This->pMarshal);
87         if (hr != S_OK)
88             return hr;
89         return IUnknown_QueryInterface(This->pMarshal, riid, ppvObject);
90     }
91
92     /* Check that we obtained an interface.*/
93     if ((*ppvObject)==0)
94         return E_NOINTERFACE;
95
96     /* always increase the reference count by one when it is successful */
97     IMoniker_AddRef(iface);
98
99     return S_OK;
100 }
101
102 /******************************************************************************
103  *        AntiMoniker_AddRef
104  ******************************************************************************/
105 static ULONG WINAPI
106 AntiMonikerImpl_AddRef(IMoniker* iface)
107 {
108     AntiMonikerImpl *This = impl_from_IMoniker(iface);
109
110     TRACE("(%p)\n",This);
111
112     return InterlockedIncrement(&This->ref);
113 }
114
115 /******************************************************************************
116  *        AntiMoniker_Release
117  ******************************************************************************/
118 static ULONG WINAPI
119 AntiMonikerImpl_Release(IMoniker* iface)
120 {
121     AntiMonikerImpl *This = impl_from_IMoniker(iface);
122     ULONG ref;
123
124     TRACE("(%p)\n",This);
125
126     ref = InterlockedDecrement(&This->ref);
127
128     /* destroy the object if there's no more reference on it */
129     if (ref == 0)
130     {
131         if (This->pMarshal) IUnknown_Release(This->pMarshal);
132         HeapFree(GetProcessHeap(),0,This);
133     }
134
135     return ref;
136 }
137
138 /******************************************************************************
139  *        AntiMoniker_GetClassID
140  ******************************************************************************/
141 static HRESULT WINAPI
142 AntiMonikerImpl_GetClassID(IMoniker* iface,CLSID *pClassID)
143 {
144     TRACE("(%p,%p)\n",iface,pClassID);
145
146     if (pClassID==NULL)
147         return E_POINTER;
148
149     *pClassID = CLSID_AntiMoniker;
150
151     return S_OK;
152 }
153
154 /******************************************************************************
155  *        AntiMoniker_IsDirty
156  ******************************************************************************/
157 static HRESULT WINAPI
158 AntiMonikerImpl_IsDirty(IMoniker* iface)
159 {
160     /* Note that the OLE-provided implementations of the IPersistStream::IsDirty
161        method in the OLE-provided moniker interfaces always return S_FALSE because
162        their internal state never changes. */
163
164     TRACE("(%p)\n",iface);
165
166     return S_FALSE;
167 }
168
169 /******************************************************************************
170  *        AntiMoniker_Load
171  ******************************************************************************/
172 static HRESULT WINAPI
173 AntiMonikerImpl_Load(IMoniker* iface,IStream* pStm)
174 {
175     DWORD constant=1,dwbuffer;
176     HRESULT res;
177
178     /* data read by this function is only a DWORD constant (must be 1) ! */
179     res=IStream_Read(pStm,&dwbuffer,sizeof(DWORD),NULL);
180
181     if (SUCCEEDED(res)&& dwbuffer!=constant)
182         return E_FAIL;
183
184     return res;
185 }
186
187 /******************************************************************************
188  *        AntiMoniker_Save
189  ******************************************************************************/
190 static HRESULT WINAPI
191 AntiMonikerImpl_Save(IMoniker* iface,IStream* pStm,BOOL fClearDirty)
192 {
193     static const DWORD constant = 1;
194     /* data written by this function is only a DWORD constant set to 1 ! */
195     return IStream_Write(pStm,&constant,sizeof(constant),NULL);
196 }
197
198 /******************************************************************************
199  *        AntiMoniker_GetSizeMax
200  *
201  * PARAMS
202  * pcbSize [out] Pointer to size of stream needed to save object
203  ******************************************************************************/
204 static HRESULT WINAPI
205 AntiMonikerImpl_GetSizeMax(IMoniker* iface, ULARGE_INTEGER* pcbSize)
206 {
207     TRACE("(%p,%p)\n",iface,pcbSize);
208
209     if (!pcbSize)
210         return E_POINTER;
211
212     /* for more details see AntiMonikerImpl_Save comments */
213
214     /*
215      * Normally the sizemax must be sizeof DWORD, but
216      * I tested this function it usually return 16 bytes
217      * more than the number of bytes used by AntiMoniker::Save function
218      */
219     pcbSize->u.LowPart =  sizeof(DWORD)+16;
220
221     pcbSize->u.HighPart=0;
222
223     return S_OK;
224 }
225
226 /******************************************************************************
227  *                  AntiMoniker_BindToObject
228  ******************************************************************************/
229 static HRESULT WINAPI
230 AntiMonikerImpl_BindToObject(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLeft,
231                              REFIID riid, VOID** ppvResult)
232 {
233     TRACE("(%p,%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,riid,ppvResult);
234     return E_NOTIMPL;
235 }
236
237 /******************************************************************************
238  *        AntiMoniker_BindToStorage
239  ******************************************************************************/
240 static HRESULT WINAPI
241 AntiMonikerImpl_BindToStorage(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLeft,
242                               REFIID riid, VOID** ppvResult)
243 {
244     TRACE("(%p,%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,riid,ppvResult);
245     return E_NOTIMPL;
246 }
247
248 /******************************************************************************
249  *        AntiMoniker_Reduce
250  ******************************************************************************/
251 static HRESULT WINAPI
252 AntiMonikerImpl_Reduce(IMoniker* iface, IBindCtx* pbc, DWORD dwReduceHowFar,
253                        IMoniker** ppmkToLeft, IMoniker** ppmkReduced)
254 {
255     TRACE("(%p,%p,%d,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced);
256
257     if (ppmkReduced==NULL)
258         return E_POINTER;
259
260     AntiMonikerImpl_AddRef(iface);
261
262     *ppmkReduced=iface;
263
264     return MK_S_REDUCED_TO_SELF;
265 }
266 /******************************************************************************
267  *        AntiMoniker_ComposeWith
268  ******************************************************************************/
269 static HRESULT WINAPI
270 AntiMonikerImpl_ComposeWith(IMoniker* iface, IMoniker* pmkRight,
271                             BOOL fOnlyIfNotGeneric, IMoniker** ppmkComposite)
272 {
273
274     TRACE("(%p,%p,%d,%p)\n",iface,pmkRight,fOnlyIfNotGeneric,ppmkComposite);
275
276     if ((ppmkComposite==NULL)||(pmkRight==NULL))
277         return E_POINTER;
278
279     *ppmkComposite=0;
280
281     if (fOnlyIfNotGeneric)
282         return MK_E_NEEDGENERIC;
283     else
284         return CreateGenericComposite(iface,pmkRight,ppmkComposite);
285 }
286
287 /******************************************************************************
288  *        AntiMoniker_Enum
289  ******************************************************************************/
290 static HRESULT WINAPI
291 AntiMonikerImpl_Enum(IMoniker* iface,BOOL fForward, IEnumMoniker** ppenumMoniker)
292 {
293     TRACE("(%p,%d,%p)\n",iface,fForward,ppenumMoniker);
294
295     if (ppenumMoniker == NULL)
296         return E_POINTER;
297
298     *ppenumMoniker = NULL;
299
300     return S_OK;
301 }
302
303 /******************************************************************************
304  *        AntiMoniker_IsEqual
305  ******************************************************************************/
306 static HRESULT WINAPI
307 AntiMonikerImpl_IsEqual(IMoniker* iface,IMoniker* pmkOtherMoniker)
308 {
309     DWORD mkSys;
310
311     TRACE("(%p,%p)\n",iface,pmkOtherMoniker);
312
313     if (pmkOtherMoniker==NULL)
314         return S_FALSE;
315
316     IMoniker_IsSystemMoniker(pmkOtherMoniker,&mkSys);
317
318     if (mkSys==MKSYS_ANTIMONIKER)
319         return S_OK;
320     else
321         return S_FALSE;
322 }
323
324 /******************************************************************************
325  *        AntiMoniker_Hash
326  ******************************************************************************/
327 static HRESULT WINAPI AntiMonikerImpl_Hash(IMoniker* iface,DWORD* pdwHash)
328 {
329     if (pdwHash==NULL)
330         return E_POINTER;
331
332     *pdwHash = 0x80000001;
333
334     return S_OK;
335 }
336
337 /******************************************************************************
338  *        AntiMoniker_IsRunning
339  ******************************************************************************/
340 static HRESULT WINAPI
341 AntiMonikerImpl_IsRunning(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLeft,
342                           IMoniker* pmkNewlyRunning)
343 {
344     IRunningObjectTable* rot;
345     HRESULT res;
346
347     TRACE("(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,pmkNewlyRunning);
348
349     if (pbc==NULL)
350         return E_INVALIDARG;
351
352     res=IBindCtx_GetRunningObjectTable(pbc,&rot);
353
354     if (FAILED(res))
355         return res;
356
357     res = IRunningObjectTable_IsRunning(rot,iface);
358
359     IRunningObjectTable_Release(rot);
360
361     return res;
362 }
363
364 /******************************************************************************
365  *        AntiMoniker_GetTimeOfLastChange
366  ******************************************************************************/
367 static HRESULT WINAPI AntiMonikerImpl_GetTimeOfLastChange(IMoniker* iface,
368                                                    IBindCtx* pbc,
369                                                    IMoniker* pmkToLeft,
370                                                    FILETIME* pAntiTime)
371 {
372     TRACE("(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,pAntiTime);
373     return E_NOTIMPL;
374 }
375
376 /******************************************************************************
377  *        AntiMoniker_Inverse
378  ******************************************************************************/
379 static HRESULT WINAPI
380 AntiMonikerImpl_Inverse(IMoniker* iface,IMoniker** ppmk)
381 {
382     TRACE("(%p,%p)\n",iface,ppmk);
383
384     if (ppmk==NULL)
385         return E_POINTER;
386
387     *ppmk=0;
388
389     return MK_E_NOINVERSE;
390 }
391
392 /******************************************************************************
393  *        AntiMoniker_CommonPrefixWith
394  ******************************************************************************/
395 static HRESULT WINAPI
396 AntiMonikerImpl_CommonPrefixWith(IMoniker* iface,IMoniker* pmkOther,IMoniker** ppmkPrefix)
397 {
398     DWORD mkSys;
399
400     IMoniker_IsSystemMoniker(pmkOther,&mkSys);
401
402     if(mkSys==MKSYS_ANTIMONIKER){
403
404         IMoniker_AddRef(iface);
405
406         *ppmkPrefix=iface;
407
408         IMoniker_AddRef(iface);
409
410         return MK_S_US;
411     }
412     else
413         return MonikerCommonPrefixWith(iface,pmkOther,ppmkPrefix);
414 }
415
416 /******************************************************************************
417  *        AntiMoniker_RelativePathTo
418  ******************************************************************************/
419 static HRESULT WINAPI
420 AntiMonikerImpl_RelativePathTo(IMoniker* iface,IMoniker* pmOther, IMoniker** ppmkRelPath)
421 {
422     TRACE("(%p,%p,%p)\n",iface,pmOther,ppmkRelPath);
423
424     if (ppmkRelPath==NULL)
425         return E_POINTER;
426
427     IMoniker_AddRef(pmOther);
428
429     *ppmkRelPath=pmOther;
430
431     return MK_S_HIM;
432 }
433
434 /******************************************************************************
435  *        AntiMoniker_GetDisplayName
436  ******************************************************************************/
437 static HRESULT WINAPI
438 AntiMonikerImpl_GetDisplayName(IMoniker* iface, IBindCtx* pbc,
439                                IMoniker* pmkToLeft, LPOLESTR *ppszDisplayName)
440 {
441     static const WCHAR back[]={'\\','.','.',0};
442
443     TRACE("(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,ppszDisplayName);
444
445     if (ppszDisplayName==NULL)
446         return E_POINTER;
447
448     if (pmkToLeft!=NULL){
449         FIXME("() pmkToLeft!=NULL not implemented\n");
450         return E_NOTIMPL;
451     }
452
453     *ppszDisplayName=CoTaskMemAlloc(sizeof(back));
454
455     if (*ppszDisplayName==NULL)
456         return E_OUTOFMEMORY;
457
458     lstrcpyW(*ppszDisplayName,back);
459
460     return S_OK;
461 }
462
463 /******************************************************************************
464  *        AntiMoniker_ParseDisplayName
465  ******************************************************************************/
466 static HRESULT WINAPI
467 AntiMonikerImpl_ParseDisplayName(IMoniker* iface, IBindCtx* pbc,
468                                  IMoniker* pmkToLeft, LPOLESTR pszDisplayName,
469                                  ULONG* pchEaten, IMoniker** ppmkOut)
470 {
471     TRACE("(%p,%p,%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,pszDisplayName,pchEaten,ppmkOut);
472     return E_NOTIMPL;
473 }
474
475 /******************************************************************************
476  *        AntiMoniker_IsSystemMoniker
477  ******************************************************************************/
478 static HRESULT WINAPI
479 AntiMonikerImpl_IsSystemMoniker(IMoniker* iface,DWORD* pwdMksys)
480 {
481     TRACE("(%p,%p)\n",iface,pwdMksys);
482
483     if (!pwdMksys)
484         return E_POINTER;
485
486     (*pwdMksys)=MKSYS_ANTIMONIKER;
487
488     return S_OK;
489 }
490
491 /*******************************************************************************
492  *        AntiMonikerIROTData_QueryInterface
493  *******************************************************************************/
494 static HRESULT WINAPI
495 AntiMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObject)
496 {
497     AntiMonikerImpl *This = impl_from_IROTData(iface);
498
499     TRACE("(%p,%p,%p)\n",iface,riid,ppvObject);
500
501     return AntiMonikerImpl_QueryInterface(&This->IMoniker_iface, riid, ppvObject);
502 }
503
504 /***********************************************************************
505  *        AntiMonikerIROTData_AddRef
506  */
507 static ULONG WINAPI AntiMonikerROTDataImpl_AddRef(IROTData *iface)
508 {
509     AntiMonikerImpl *This = impl_from_IROTData(iface);
510
511     TRACE("(%p)\n",iface);
512
513     return AntiMonikerImpl_AddRef(&This->IMoniker_iface);
514 }
515
516 /***********************************************************************
517  *        AntiMonikerIROTData_Release
518  */
519 static ULONG WINAPI AntiMonikerROTDataImpl_Release(IROTData* iface)
520 {
521     AntiMonikerImpl *This = impl_from_IROTData(iface);
522
523     TRACE("(%p)\n",iface);
524
525     return AntiMonikerImpl_Release(&This->IMoniker_iface);
526 }
527
528 /******************************************************************************
529  *        AntiMonikerIROTData_GetComparisonData
530  ******************************************************************************/
531 static HRESULT WINAPI
532 AntiMonikerROTDataImpl_GetComparisonData(IROTData* iface, BYTE* pbData,
533                                           ULONG cbMax, ULONG* pcbData)
534 {
535     DWORD constant = 1;
536
537     TRACE("(%p, %u, %p)\n", pbData, cbMax, pcbData);
538
539     *pcbData = sizeof(CLSID) + sizeof(DWORD);
540     if (cbMax < *pcbData)
541         return E_OUTOFMEMORY;
542
543     memcpy(pbData, &CLSID_AntiMoniker, sizeof(CLSID));
544     memcpy(pbData+sizeof(CLSID), &constant, sizeof(DWORD));
545
546     return S_OK;
547 }
548
549 /********************************************************************************/
550 /* Virtual function table for the AntiMonikerImpl class which  include IPersist,*/
551 /* IPersistStream and IMoniker functions.                                       */
552 static const IMonikerVtbl VT_AntiMonikerImpl =
553 {
554     AntiMonikerImpl_QueryInterface,
555     AntiMonikerImpl_AddRef,
556     AntiMonikerImpl_Release,
557     AntiMonikerImpl_GetClassID,
558     AntiMonikerImpl_IsDirty,
559     AntiMonikerImpl_Load,
560     AntiMonikerImpl_Save,
561     AntiMonikerImpl_GetSizeMax,
562     AntiMonikerImpl_BindToObject,
563     AntiMonikerImpl_BindToStorage,
564     AntiMonikerImpl_Reduce,
565     AntiMonikerImpl_ComposeWith,
566     AntiMonikerImpl_Enum,
567     AntiMonikerImpl_IsEqual,
568     AntiMonikerImpl_Hash,
569     AntiMonikerImpl_IsRunning,
570     AntiMonikerImpl_GetTimeOfLastChange,
571     AntiMonikerImpl_Inverse,
572     AntiMonikerImpl_CommonPrefixWith,
573     AntiMonikerImpl_RelativePathTo,
574     AntiMonikerImpl_GetDisplayName,
575     AntiMonikerImpl_ParseDisplayName,
576     AntiMonikerImpl_IsSystemMoniker
577 };
578
579 /********************************************************************************/
580 /* Virtual function table for the IROTData class.                               */
581 static const IROTDataVtbl VT_ROTDataImpl =
582 {
583     AntiMonikerROTDataImpl_QueryInterface,
584     AntiMonikerROTDataImpl_AddRef,
585     AntiMonikerROTDataImpl_Release,
586     AntiMonikerROTDataImpl_GetComparisonData
587 };
588
589 /******************************************************************************
590  *         AntiMoniker_Construct (local function)
591  *******************************************************************************/
592 static HRESULT AntiMonikerImpl_Construct(AntiMonikerImpl* This)
593 {
594
595     TRACE("(%p)\n",This);
596
597     /* Initialize the virtual function table. */
598     This->IMoniker_iface.lpVtbl = &VT_AntiMonikerImpl;
599     This->IROTData_iface.lpVtbl = &VT_ROTDataImpl;
600     This->ref          = 0;
601     This->pMarshal     = NULL;
602
603     return S_OK;
604 }
605
606 /******************************************************************************
607  *        CreateAntiMoniker     [OLE32.@]
608  ******************************************************************************/
609 HRESULT WINAPI CreateAntiMoniker(IMoniker **ppmk)
610 {
611     AntiMonikerImpl* newAntiMoniker;
612     HRESULT hr;
613
614     TRACE("(%p)\n",ppmk);
615
616     newAntiMoniker = HeapAlloc(GetProcessHeap(), 0, sizeof(AntiMonikerImpl));
617
618     if (newAntiMoniker == 0)
619         return STG_E_INSUFFICIENTMEMORY;
620
621     hr = AntiMonikerImpl_Construct(newAntiMoniker);
622     if (FAILED(hr))
623     {
624         HeapFree(GetProcessHeap(),0,newAntiMoniker);
625         return hr;
626     }
627
628     return AntiMonikerImpl_QueryInterface(&newAntiMoniker->IMoniker_iface, &IID_IMoniker,
629             (void**)ppmk);
630 }
631
632 static HRESULT WINAPI AntiMonikerCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
633 {
634     *ppv = NULL;
635     if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory))
636     {
637         *ppv = iface;
638         IClassFactory_AddRef(iface);
639         return S_OK;
640     }
641     return E_NOINTERFACE;
642 }
643
644 static ULONG WINAPI AntiMonikerCF_AddRef(LPCLASSFACTORY iface)
645 {
646     return 2; /* non-heap based object */
647 }
648
649 static ULONG WINAPI AntiMonikerCF_Release(LPCLASSFACTORY iface)
650 {
651     return 1; /* non-heap based object */
652 }
653
654 static HRESULT WINAPI AntiMonikerCF_CreateInstance(LPCLASSFACTORY iface,
655     LPUNKNOWN pUnk, REFIID riid, LPVOID *ppv)
656 {
657     IMoniker *pMoniker;
658     HRESULT  hr;
659
660     TRACE("(%p, %s, %p)\n", pUnk, debugstr_guid(riid), ppv);
661
662     *ppv = NULL;
663
664     if (pUnk)
665         return CLASS_E_NOAGGREGATION;
666
667     hr = CreateAntiMoniker(&pMoniker);
668     if (FAILED(hr))
669         return hr;
670
671     hr = IMoniker_QueryInterface(pMoniker, riid, ppv);
672
673     if (FAILED(hr))
674         IMoniker_Release(pMoniker);
675
676     return hr;
677 }
678
679 static HRESULT WINAPI AntiMonikerCF_LockServer(LPCLASSFACTORY iface, BOOL fLock)
680 {
681     FIXME("(%d), stub!\n",fLock);
682     return S_OK;
683 }
684
685 static const IClassFactoryVtbl AntiMonikerCFVtbl =
686 {
687     AntiMonikerCF_QueryInterface,
688     AntiMonikerCF_AddRef,
689     AntiMonikerCF_Release,
690     AntiMonikerCF_CreateInstance,
691     AntiMonikerCF_LockServer
692 };
693 static const IClassFactoryVtbl *AntiMonikerCF = &AntiMonikerCFVtbl;
694
695 HRESULT AntiMonikerCF_Create(REFIID riid, LPVOID *ppv)
696 {
697     return IClassFactory_QueryInterface((IClassFactory *)&AntiMonikerCF, riid, ppv);
698 }