ReactOS 0.4.15-dev-8080-g044f181
moniker.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 DEFINE_OLEGUID (CLSID_FileMoniker, 0x303, 0, 0)
 
 DEFINE_OLEGUID (CLSID_ItemMoniker, 0x304, 0, 0)
 
 DEFINE_OLEGUID (CLSID_AntiMoniker, 0x305, 0, 0)
 
 DEFINE_OLEGUID (CLSID_CompositeMoniker, 0x309, 0, 0)
 
 DEFINE_OLEGUID (CLSID_ClassMoniker, 0x31a, 0, 0)
 
 DEFINE_OLEGUID (CLSID_PointerMoniker, 0x306, 0, 0)
 
HRESULT WINAPI FileMoniker_CreateInstance (IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)
 
HRESULT WINAPI ItemMoniker_CreateInstance (IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)
 
HRESULT WINAPI AntiMoniker_CreateInstance (IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)
 
HRESULT WINAPI CompositeMoniker_CreateInstance (IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)
 
HRESULT WINAPI ClassMoniker_CreateInstance (IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)
 
HRESULT WINAPI PointerMoniker_CreateInstance (IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)
 
HRESULT WINAPI ComCat_CreateInstance (IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)
 
int FileMonikerImpl_DecomposePath (LPCOLESTR str, LPOLESTR **stringTable) DECLSPEC_HIDDEN
 
HRESULT FileMoniker_CreateFromDisplayName (LPBC pbc, LPCOLESTR szDisplayName, LPDWORD pchEaten, LPMONIKER *ppmk) DECLSPEC_HIDDEN
 
HRESULT ClassMoniker_CreateFromDisplayName (LPBC pbc, LPCOLESTR szDisplayName, LPDWORD pchEaten, LPMONIKER *ppmk) DECLSPEC_HIDDEN
 
HRESULT MonikerMarshal_Create (IMoniker *inner, IUnknown **outer) DECLSPEC_HIDDEN
 

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

◆ ClassMoniker_CreateFromDisplayName()

HRESULT ClassMoniker_CreateFromDisplayName ( LPBC  pbc,
LPCOLESTR  szDisplayName,
LPDWORD  pchEaten,
LPMONIKER ppmk 
)

◆ ClassMoniker_CreateInstance()

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

Definition at line 806 of file classmoniker.c.

808{
809 HRESULT hr;
810 IMoniker *pmk;
811
812 TRACE("(%p, %s, %p)\n", pUnk, debugstr_guid(riid), ppv);
813
814 *ppv = NULL;
815
816 if (pUnk)
818
820 if (FAILED(hr)) return hr;
821
822 hr = IMoniker_QueryInterface(pmk, riid, ppv);
823 IMoniker_Release(pmk);
824
825 return hr;
826}
HRESULT WINAPI CreateClassMoniker(REFCLSID rclsid, IMoniker **ppmk)
Definition: classmoniker.c:701
#define CLSID_NULL
Definition: guiddef.h:99

◆ ComCat_CreateInstance()

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

Definition at line 702 of file comcat.c.

703{
704 HRESULT res;
705 TRACE("%s\n",debugstr_guid(riid));
706
707 if (ppvObj == NULL) return E_POINTER;
708
709 /* Don't support aggregation (Windows doesn't) */
710 if (pUnkOuter != NULL) return CLASS_E_NOAGGREGATION;
711
712 res = ICatRegister_QueryInterface(&COMCAT_ComCatMgr.ICatRegister_iface, riid, ppvObj);
713 if (SUCCEEDED(res)) {
714 return res;
715 }
716
718}
static ComCatMgrImpl COMCAT_ComCatMgr
Definition: comcat.c:50
GLuint res
Definition: glext.h:9613
#define SUCCEEDED(hr)
Definition: intsafe.h:50
ICatRegister ICatRegister_iface
Definition: comcat.c:45
#define E_POINTER
Definition: winerror.h:2365
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663

◆ CompositeMoniker_CreateInstance()

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

Definition at line 1999 of file compositemoniker.c.

2001{
2002 IMoniker* pMoniker;
2003 HRESULT hr;
2004
2005 TRACE("(%p, %s, %p)\n", pUnk, debugstr_guid(riid), ppv);
2006
2007 *ppv = NULL;
2008
2009 if (pUnk)
2010 return CLASS_E_NOAGGREGATION;
2011
2013
2014 if (SUCCEEDED(hr))
2015 {
2016 hr = IMoniker_QueryInterface(pMoniker, riid, ppv);
2017 IMoniker_Release(pMoniker);
2018 }
2019
2020 return hr;
2021}
static HRESULT CompositeMonikerImpl_Construct(IMoniker **ppMoniker, IMoniker *pmkFirst, IMoniker *pmkRest)

◆ DEFINE_OLEGUID() [1/6]

DEFINE_OLEGUID ( CLSID_AntiMoniker  ,
0x305  ,
,
 
)

◆ DEFINE_OLEGUID() [2/6]

DEFINE_OLEGUID ( CLSID_ClassMoniker  ,
0x31a  ,
,
 
)

◆ DEFINE_OLEGUID() [3/6]

DEFINE_OLEGUID ( CLSID_CompositeMoniker  ,
0x309  ,
,
 
)

◆ DEFINE_OLEGUID() [4/6]

DEFINE_OLEGUID ( CLSID_FileMoniker  ,
0x303  ,
,
 
)

◆ DEFINE_OLEGUID() [5/6]

DEFINE_OLEGUID ( CLSID_ItemMoniker  ,
0x304  ,
,
 
)

◆ DEFINE_OLEGUID() [6/6]

DEFINE_OLEGUID ( CLSID_PointerMoniker  ,
0x306  ,
,
 
)

◆ FileMoniker_CreateFromDisplayName()

HRESULT FileMoniker_CreateFromDisplayName ( LPBC  pbc,
LPCOLESTR  szDisplayName,
LPDWORD  pchEaten,
LPMONIKER ppmk 
)

◆ FileMoniker_CreateInstance()

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

Definition at line 1543 of file filemoniker.c.

1544{
1545 FileMonikerImpl* newFileMoniker;
1546 HRESULT hr;
1547 static const WCHAR wszEmpty[] = { 0 };
1548
1549 TRACE("(%p, %s, %p)\n", pUnk, debugstr_guid(riid), ppv);
1550
1551 *ppv = NULL;
1552
1553 if (pUnk)
1554 return CLASS_E_NOAGGREGATION;
1555
1556 newFileMoniker = HeapAlloc(GetProcessHeap(), 0, sizeof(FileMonikerImpl));
1557 if (!newFileMoniker)
1558 return E_OUTOFMEMORY;
1559
1560 hr = FileMonikerImpl_Construct(newFileMoniker, wszEmpty);
1561
1562 if (SUCCEEDED(hr))
1563 hr = IMoniker_QueryInterface(&newFileMoniker->IMoniker_iface, riid, ppv);
1564 if (FAILED(hr))
1565 HeapFree(GetProcessHeap(),0,newFileMoniker);
1566
1567 return hr;
1568}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
static HRESULT FileMonikerImpl_Construct(FileMonikerImpl *iface, LPCOLESTR lpszPathName)
Definition: filemoniker.c:1344
static const WCHAR wszEmpty[]
Definition: misc.c:327
IMoniker IMoniker_iface
Definition: filemoniker.c:43
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ FileMonikerImpl_DecomposePath()

int FileMonikerImpl_DecomposePath ( LPCOLESTR  str,
LPOLESTR **  stringTable 
)

Definition at line 1023 of file filemoniker.c.

1024{
1025 static const WCHAR bSlash[] = {'\\',0};
1026 LPOLESTR word;
1027 int i=0,j,tabIndex=0, ret=0;
1028 LPOLESTR *strgtable ;
1029
1030 int len=lstrlenW(str);
1031
1032 TRACE("%s, %p\n", debugstr_w(str), *stringTable);
1033
1034 strgtable = CoTaskMemAlloc((len + 1)*sizeof(*strgtable));
1035
1036 if (strgtable==NULL)
1037 return E_OUTOFMEMORY;
1038
1039 word = CoTaskMemAlloc((len + 1)*sizeof(WCHAR));
1040
1041 if (word==NULL)
1042 {
1044 goto lend;
1045 }
1046
1047 while(str[i]!=0){
1048
1049 if(str[i]==bSlash[0]){
1050
1051 strgtable[tabIndex]=CoTaskMemAlloc(2*sizeof(WCHAR));
1052
1053 if (strgtable[tabIndex]==NULL)
1054 {
1056 goto lend;
1057 }
1058
1059 lstrcpyW(strgtable[tabIndex++],bSlash);
1060
1061 i++;
1062
1063 }
1064 else {
1065
1066 for(j=0; str[i]!=0 && str[i]!=bSlash[0] ; i++,j++)
1067 word[j]=str[i];
1068
1069 word[j]=0;
1070
1071 strgtable[tabIndex]=CoTaskMemAlloc(sizeof(WCHAR)*(j+1));
1072
1073 if (strgtable[tabIndex]==NULL)
1074 {
1076 goto lend;
1077 }
1078
1079 lstrcpyW(strgtable[tabIndex++],word);
1080 }
1081 }
1082 strgtable[tabIndex]=NULL;
1083
1084 *stringTable=strgtable;
1085
1086 ret = tabIndex;
1087
1088lend:
1089 if (ret < 0)
1090 {
1091 for (i = 0; i < tabIndex; i++)
1092 CoTaskMemFree(strgtable[i]);
1093
1094 CoTaskMemFree(strgtable);
1095 }
1096
1098
1099 return ret;
1100}
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
const WCHAR * word
Definition: lex.c:36
#define debugstr_w
Definition: kernel32.h:32
static LPOLESTR
Definition: stg_prop.c:27
const WCHAR * str
int ret

Referenced by FileMonikerImpl_CommonPrefixWith(), FileMonikerImpl_ComposeWith(), FileMonikerImpl_Construct(), FileMonikerImpl_RelativePathTo(), and GetClassFile().

◆ ItemMoniker_CreateInstance()

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

Definition at line 958 of file itemmoniker.c.

960{
961 ItemMonikerImpl* newItemMoniker;
962 HRESULT hr;
963 static const WCHAR wszEmpty[] = { 0 };
964
965 TRACE("(%p, %s, %p)\n", pUnk, debugstr_guid(riid), ppv);
966
967 *ppv = NULL;
968
969 if (pUnk)
971
972 newItemMoniker = HeapAlloc(GetProcessHeap(), 0, sizeof(ItemMonikerImpl));
973 if (!newItemMoniker)
974 return E_OUTOFMEMORY;
975
976 hr = ItemMonikerImpl_Construct(newItemMoniker, wszEmpty, wszEmpty);
977
978 if (SUCCEEDED(hr))
980 if (FAILED(hr))
981 HeapFree(GetProcessHeap(),0,newItemMoniker);
982
983 return hr;
984}
static HRESULT ItemMonikerImpl_Construct(ItemMonikerImpl *This, LPCOLESTR lpszDelim, LPCOLESTR lpszItem)
Definition: itemmoniker.c:882
static HRESULT WINAPI ItemMonikerImpl_QueryInterface(IMoniker *iface, REFIID riid, void **ppvObject)
Definition: itemmoniker.c:64
IMoniker IMoniker_iface
Definition: itemmoniker.c:41

◆ MonikerMarshal_Create()

HRESULT MonikerMarshal_Create ( IMoniker inner,
IUnknown **  outer 
)

Definition at line 1677 of file moniker.c.

1678{
1679 MonikerMarshal *This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
1680 if (!This) return E_OUTOFMEMORY;
1681
1682 This->IUnknown_iface.lpVtbl = &VT_MonikerMarshalInner;
1683 This->IMarshal_iface.lpVtbl = &VT_MonikerMarshal;
1684 This->ref = 1;
1685 This->moniker = inner;
1686
1687 *outer = &This->IUnknown_iface;
1688 return S_OK;
1689}
static const IUnknownVtbl VT_MonikerMarshalInner
Definition: moniker.c:1569
static const IMarshalVtbl VT_MonikerMarshal
Definition: moniker.c:1664
#define S_OK
Definition: intsafe.h:52

Referenced by AntiMonikerImpl_QueryInterface(), ClassMoniker_QueryInterface(), FileMonikerImpl_QueryInterface(), and ItemMonikerImpl_QueryInterface().

◆ 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)
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 WINAPI CreatePointerMoniker(LPUNKNOWN punk, LPMONIKER *ppmk)