ReactOS  0.4.13-dev-563-g0561610
atlbase.h File Reference
#include <atliface.h>
#include <comcat.h>
Include dependency graph for atlbase.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _ATL_OBJMAP_ENTRYA_V1_TAG
 
struct  _ATL_OBJMAP_ENTRYW_V1_TAG
 
struct  _ATL_OBJMAP_ENTRYA_TAG
 
struct  _ATL_OBJMAP_ENTRYW_TAG
 
struct  _ATL_OBJMAP_CACHE
 
struct  _ATL_OBJMAP_ENTRY110
 
struct  _ATL_TERMFUNC_ELEM_TAG
 
struct  _AtlCreateWndData_TAG
 
struct  _ATL_MODULEA_TAG
 
struct  _ATL_MODULEW_TAG
 
struct  CSimpleArray
 
struct  _ATL_MODULE70
 
struct  _ATL_WIN_MODULE70
 
struct  _ATL_COM_MODULE70
 
struct  _ATL_INTMAP_ENTRY_TAG
 
struct  _ATL_REGMAP_ENTRY
 
struct  _ATL_CATMAP_ENTRY
 

Macros

#define _ATL_VER_30   0x0300
 
#define _ATL_VER_70   0x0700
 
#define _ATL_VER_80   0x0800
 
#define _ATL_VER_90   0x0900
 
#define _ATL_VER_100   0x0a00
 
#define _ATL_VER_110   0x0b00
 
#define _ATL_VER   _ATL_VER_100
 
#define _ATL_CATMAP_ENTRY_END   0
 
#define _ATL_CATMAP_ENTRY_IMPLEMENTED   1
 
#define _ATL_CATMAP_ENTRY_REQUIRED   2
 

Typedefs

typedef REFIID riid
 
typedef REFIID LPVOIDppv
 
typedef REFIID LPVOID DWORD dw
 
typedef const struct _ATL_CATMAP_ENTRY *() _ATL_CATMAPFUNC(void)
 
typedef CRITICAL_SECTION CComCriticalSection
 
typedef struct _ATL_OBJMAP_ENTRYA_V1_TAG _ATL_OBJMAP_ENTRYA_V1
 
typedef struct _ATL_OBJMAP_ENTRYW_V1_TAG _ATL_OBJMAP_ENTRYW_V1
 
typedef struct _ATL_OBJMAP_ENTRYA_TAG _ATL_OBJMAP_ENTRYA
 
typedef struct _ATL_OBJMAP_ENTRYW_TAG _ATL_OBJMAP_ENTRYW
 
typedef struct _ATL_OBJMAP_ENTRYW_TAG _ATL_OBJMAP_ENTRY30
 
typedef struct _ATL_OBJMAP_ENTRYW_TAG _ATL_OBJMAP_ENTRY
 
typedef struct _ATL_OBJMAP_CACHE _ATL_OBJMAP_CACHE
 
typedef struct _ATL_OBJMAP_ENTRY110 _ATL_OBJMAP_ENTRY110
 
typedef struct _ATL_OBJMAP_ENTRY110 _ATL_OBJMAP_ENTRY_EX
 
typedef struct _ATL_TERMFUNC_ELEM_TAG _ATL_TERMFUNC_ELEM
 
typedef struct _AtlCreateWndData_TAG _AtlCreateWndData
 
typedef struct _ATL_MODULEA_TAG _ATL_MODULEA
 
typedef struct _ATL_MODULEW_TAG _ATL_MODULEW
 
typedef struct _ATL_MODULE70 _ATL_MODULE70
 
typedef struct _ATL_WIN_MODULE70 _ATL_WIN_MODULE70
 
typedef struct _ATL_COM_MODULE70 _ATL_COM_MODULE70
 
typedef struct _ATL_COM_MODULE70 _ATL_COM_MODULE
 
typedef _ATL_MODULE70 _ATL_MODULE
 
typedef _ATL_WIN_MODULE70 _ATL_WIN_MODULE
 
typedef struct _ATL_INTMAP_ENTRY_TAG _ATL_INTMAP_ENTRY
 

Functions

typedef HRESULT (WINAPI _ATL_CREATORFUNC)(void *pv
 
typedef LPCSTR (WINAPI _ATL_DESCRIPTIONFUNCA)(void)
 
typedef LPCWSTR (WINAPI _ATL_DESCRIPTIONFUNCW)(void)
 
typedef void (WINAPI _ATL_TERMFUNC)(DWORD dw)
 
HRESULT WINAPI AtlAdvise (IUnknown *pUnkCP, IUnknown *pUnk, const IID *iid, LPDWORD dpw)
 
HRESULT WINAPI AtlAxAttachControl (IUnknown *, HWND, IUnknown **)
 
HRESULT WINAPI AtlAxCreateControl (LPCOLESTR, HWND, IStream *, IUnknown **)
 
HRESULT WINAPI AtlAxCreateControlEx (LPCOLESTR, HWND, IStream *, IUnknown **, IUnknown **, REFIID, IUnknown *)
 
HRESULT WINAPI AtlFreeMarshalStream (IStream *pStream)
 
HRESULT WINAPI AtlInternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 
HRESULT WINAPI AtlMarshalPtrInProc (IUnknown *pUnk, const IID *iid, IStream **ppStream)
 
void WINAPI AtlModuleAddCreateWndData (_ATL_MODULEW *pM, _AtlCreateWndData *pData, void *pvObject)
 
HRESULT WINAPI AtlWinModuleInit (_ATL_WIN_MODULE *)
 
void WINAPI AtlWinModuleAddCreateWndData (_ATL_WIN_MODULE *, _AtlCreateWndData *, void *)
 
void *WINAPI AtlWinModuleExtractCreateWndData (_ATL_WIN_MODULE *)
 
HRESULT WINAPI AtlModuleAddTermFunc (_ATL_MODULE *pM, _ATL_TERMFUNC *pFunc, DWORD_PTR dw)
 
void WINAPI AtlCallTermFunc (_ATL_MODULE *)
 
void *WINAPI AtlModuleExtractCreateWndData (_ATL_MODULEW *pM)
 
HRESULT WINAPI AtlModuleInit (_ATL_MODULEW *pM, _ATL_OBJMAP_ENTRYW *p, HINSTANCE h)
 
HRESULT WINAPI AtlModuleLoadTypeLib (_ATL_MODULEW *pM, LPCOLESTR lpszIndex, BSTR *pbstrPath, ITypeLib **ppTypeLib)
 
HRESULT WINAPI AtlModuleRegisterClassObjects (_ATL_MODULEW *pM, DWORD dwClsContext, DWORD dwFlags)
 
HRESULT WINAPI AtlModuleRegisterServer (_ATL_MODULEW *pM, BOOL bRegTypeLib, const CLSID *pCLSID)
 
HRESULT WINAPI AtlModuleRegisterTypeLib (_ATL_MODULEW *pM, LPCOLESTR lpszIndex)
 
HRESULT WINAPI AtlModuleUnregisterServer (_ATL_MODULEW *pM, const CLSID *pCLSID)
 
HRESULT WINAPI AtlModuleUpdateRegistryFromResourceD (_ATL_MODULEW *pM, LPCOLESTR lpszRes, BOOL bRegister, struct _ATL_REGMAP_ENTRY *pMapEntries, IRegistrar *pReg)
 
HRESULT WINAPI AtlModuleUnregisterServerEx (_ATL_MODULEW *pM, BOOL bUnRegTypeLib, const CLSID *pCLSID)
 
HRESULT WINAPI AtlModuleTerm (_ATL_MODULEW *pM)
 
HRESULT WINAPI AtlUnadvise (IUnknown *pUnkCP, const IID *iid, DWORD dw)
 
HRESULT WINAPI AtlUnmarshalPtr (IStream *pStream, const IID *iid, IUnknown **ppUnk)
 
HRESULT WINAPI AtlCreateRegistrar (IRegistrar **)
 
HRESULT WINAPI AtlUpdateRegistryFromResourceD (HINSTANCE, LPCOLESTR, BOOL, struct _ATL_REGMAP_ENTRY *, IRegistrar *)
 
HRESULT WINAPI AtlLoadTypeLib (HINSTANCE, LPCOLESTR, BSTR *, ITypeLib **)
 
HRESULT WINAPI AtlRegisterTypeLib (HINSTANCE, LPCOLESTR)
 
HRESULT WINAPI AtlRegisterClassCategoriesHelper (REFCLSID, const struct _ATL_CATMAP_ENTRY *, BOOL)
 
HRESULT WINAPI AtlComModuleGetClassObject (_ATL_COM_MODULE *, REFCLSID, REFIID, void **)
 
HRESULT WINAPI AtlComModuleRegisterClassObjects (_ATL_COM_MODULE *, DWORD, DWORD)
 
HRESULT WINAPI AtlComModuleUnregisterServer (_ATL_COM_MODULE *, BOOL, const CLSID *)
 
BOOL WINAPI AtlWaitWithMessageLoop (HANDLE)
 
HRESULT WINAPI AtlGetObjectSourceInterface (IUnknown *, GUID *, IID *, unsigned short *, unsigned short *)
 
HRESULT WINAPI AtlSetPerUserRegistration (unsigned char)
 
HRESULT WINAPI AtlGetPerUserRegistration (unsigned char *)
 

Macro Definition Documentation

◆ _ATL_CATMAP_ENTRY_END

#define _ATL_CATMAP_ENTRY_END   0

Definition at line 253 of file atlbase.h.

◆ _ATL_CATMAP_ENTRY_IMPLEMENTED

#define _ATL_CATMAP_ENTRY_IMPLEMENTED   1

Definition at line 254 of file atlbase.h.

◆ _ATL_CATMAP_ENTRY_REQUIRED

#define _ATL_CATMAP_ENTRY_REQUIRED   2

Definition at line 255 of file atlbase.h.

◆ _ATL_VER

#define _ATL_VER   _ATL_VER_100

Definition at line 36 of file atlbase.h.

◆ _ATL_VER_100

#define _ATL_VER_100   0x0a00

Definition at line 32 of file atlbase.h.

◆ _ATL_VER_110

#define _ATL_VER_110   0x0b00

Definition at line 33 of file atlbase.h.

◆ _ATL_VER_30

#define _ATL_VER_30   0x0300

Definition at line 28 of file atlbase.h.

◆ _ATL_VER_70

#define _ATL_VER_70   0x0700

Definition at line 29 of file atlbase.h.

◆ _ATL_VER_80

#define _ATL_VER_80   0x0800

Definition at line 30 of file atlbase.h.

◆ _ATL_VER_90

#define _ATL_VER_90   0x0900

Definition at line 31 of file atlbase.h.

Typedef Documentation

◆ _ATL_CATMAPFUNC

typedef const struct _ATL_CATMAP_ENTRY*() _ATL_CATMAPFUNC(void)

Definition at line 44 of file atlbase.h.

◆ _ATL_COM_MODULE

◆ _ATL_COM_MODULE70

◆ _ATL_INTMAP_ENTRY

◆ _ATL_MODULE

Definition at line 227 of file atlbase.h.

◆ _ATL_MODULE70

◆ _ATL_MODULEA

◆ _ATL_MODULEW

◆ _ATL_OBJMAP_CACHE

◆ _ATL_OBJMAP_ENTRY

◆ _ATL_OBJMAP_ENTRY110

◆ _ATL_OBJMAP_ENTRY30

◆ _ATL_OBJMAP_ENTRY_EX

◆ _ATL_OBJMAP_ENTRYA

◆ _ATL_OBJMAP_ENTRYA_V1

◆ _ATL_OBJMAP_ENTRYW

◆ _ATL_OBJMAP_ENTRYW_V1

◆ _ATL_TERMFUNC_ELEM

◆ _ATL_WIN_MODULE

Definition at line 228 of file atlbase.h.

◆ _ATL_WIN_MODULE70

◆ _AtlCreateWndData

◆ CComCriticalSection

Definition at line 47 of file atlbase.h.

◆ dw

typedef REFIID LPVOID DWORD dw

Definition at line 40 of file atlbase.h.

◆ ppv

typedef REFIID LPVOID * ppv

Definition at line 39 of file atlbase.h.

◆ riid

typedef REFIID riid

Definition at line 39 of file atlbase.h.

Function Documentation

◆ AtlAdvise()

HRESULT WINAPI AtlAdvise ( IUnknown pUnkCP,
IUnknown pUnk,
const IID iid,
LPDWORD  dpw 
)

◆ AtlAxAttachControl()

HRESULT WINAPI AtlAxAttachControl ( IUnknown ,
HWND  ,
IUnknown **   
)

Definition at line 1148 of file atl_ax.c.

1149 {
1150  HRESULT hr;
1151 
1152  TRACE("(%p %p %p)\n", control, hWnd, container);
1153 
1154  if (!control)
1155  return E_INVALIDARG;
1156 
1157  hr = IOCS_Create( hWnd, control, container );
1158  return hWnd ? hr : S_FALSE;
1159 }
HRESULT hr
Definition: shlfolder.c:183
HWND hWnd
Definition: settings.c:17
static HRESULT IOCS_Create(HWND hWnd, IUnknown *pUnkControl, IUnknown **container)
Definition: atl_ax.c:944
#define S_FALSE
Definition: winerror.h:2357
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77

Referenced by AtlAxCreateControlLicEx(), and test_AtlAxAttachControl().

◆ AtlAxCreateControl()

HRESULT WINAPI AtlAxCreateControl ( LPCOLESTR  ,
HWND  ,
IStream ,
IUnknown **   
)

Definition at line 987 of file atl_ax.c.

989 {
990  return AtlAxCreateControlEx( lpszName, hWnd, pStream, ppUnkContainer,
991  NULL, NULL, NULL );
992 }
HWND hWnd
Definition: settings.c:17
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI AtlAxCreateControlEx(const WCHAR *lpTricsData, HWND hwnd, IStream *stream, IUnknown **container, IUnknown **control, REFIID iidSink, IUnknown *punkSink)
Definition: atl_ax.c:1484

◆ AtlAxCreateControlEx()

HRESULT WINAPI AtlAxCreateControlEx ( LPCOLESTR  ,
HWND  ,
IStream ,
IUnknown **  ,
IUnknown **  ,
REFIID  ,
IUnknown  
)

◆ AtlCallTermFunc()

void WINAPI AtlCallTermFunc ( _ATL_MODULE )

◆ AtlComModuleGetClassObject()

HRESULT WINAPI AtlComModuleGetClassObject ( _ATL_COM_MODULE ,
REFCLSID  ,
REFIID  ,
void **   
)

◆ AtlComModuleRegisterClassObjects()

HRESULT WINAPI AtlComModuleRegisterClassObjects ( _ATL_COM_MODULE ,
DWORD  ,
DWORD   
)

◆ AtlComModuleUnregisterServer()

HRESULT WINAPI AtlComModuleUnregisterServer ( _ATL_COM_MODULE ,
BOOL  ,
const CLSID  
)

◆ AtlCreateRegistrar()

HRESULT WINAPI AtlCreateRegistrar ( IRegistrar **  )

Definition at line 688 of file registrar.c.

689 {
690  Registrar *registrar;
691 
692  registrar = HeapAlloc(GetProcessHeap(), 0, sizeof(*registrar));
693  if(!registrar)
694  return E_OUTOFMEMORY;
695 
696  registrar->IRegistrar_iface.lpVtbl = &RegistrarVtbl;
697  registrar->ref = 1;
698  registrar->rep = NULL;
699 
700  *ret = &registrar->IRegistrar_iface;
701  return S_OK;
702 }
LONG ref
Definition: registrar.c:68
IRegistrar IRegistrar_iface
Definition: registrar.c:67
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
rep_list * rep
Definition: registrar.c:69
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const IRegistrarVtbl RegistrarVtbl
Definition: registrar.c:669
int ret
#define S_OK
Definition: intsafe.h:59

Referenced by AtlUpdateRegistryFromResourceD(), and RegistrarCF_CreateInstance().

◆ AtlFreeMarshalStream()

HRESULT WINAPI AtlFreeMarshalStream ( IStream pStream)

Definition at line 102 of file atl.c.

103 {
104  FIXME("%p\n", stm);
105  return S_OK;
106 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59

◆ AtlGetObjectSourceInterface()

HRESULT WINAPI AtlGetObjectSourceInterface ( IUnknown ,
GUID ,
IID ,
unsigned short ,
unsigned short  
)

Definition at line 889 of file atl.c.

890 {
893  ITypeLib *typelib;
894  IPersist *persist;
895  IDispatch *disp;
896  HRESULT hres;
897 
898  TRACE("(%p %p %p %p %p)\n", unk, libid, iid, major, minor);
899 
900  hres = IUnknown_QueryInterface(unk, &IID_IDispatch, (void**)&disp);
901  if(FAILED(hres))
902  return hres;
903 
904  hres = IDispatch_GetTypeInfo(disp, 0, 0, &typeinfo);
905  IDispatch_Release(disp);
906  if(FAILED(hres))
907  return hres;
908 
909  hres = ITypeInfo_GetContainingTypeLib(typeinfo, &typelib, 0);
910  ITypeInfo_Release(typeinfo);
911  if(SUCCEEDED(hres)) {
912  TLIBATTR *attr;
913 
914  hres = ITypeLib_GetLibAttr(typelib, &attr);
915  if(SUCCEEDED(hres)) {
916  *libid = attr->guid;
917  *major = attr->wMajorVerNum;
918  *minor = attr->wMinorVerNum;
919  ITypeLib_ReleaseTLibAttr(typelib, attr);
920  }else {
921  ITypeLib_Release(typelib);
922  }
923  }
924  if(FAILED(hres))
925  return hres;
926 
927  hres = IUnknown_QueryInterface(unk, &IID_IProvideClassInfo2, (void**)&classinfo);
928  if(SUCCEEDED(hres)) {
929  hres = IProvideClassInfo2_GetGUID(classinfo, GUIDKIND_DEFAULT_SOURCE_DISP_IID, iid);
930  IProvideClassInfo2_Release(classinfo);
931  ITypeLib_Release(typelib);
932  return hres;
933  }
934 
935  hres = IUnknown_QueryInterface(unk, &IID_IPersist, (void**)&persist);
936  if(SUCCEEDED(hres)) {
937  CLSID clsid;
938 
939  hres = IPersist_GetClassID(persist, &clsid);
940  if(SUCCEEDED(hres))
942  IPersist_Release(persist);
943  }
944 
945  return hres;
946 }
disp
Definition: i386-dis.c:3181
const GUID IID_IPersist
Definition: proxy.cpp:14
static ITypeLib * typelib
Definition: apps.c:105
classinfo
Definition: clsfactory.c:43
const GUID IID_IProvideClassInfo2
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
Definition: cookie.c:170
const GUID IID_IDispatch
REFCLSID clsid
Definition: msctf.c:84
__u8 attr
Definition: mkdosfs.c:359
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:106
#define major(rdev)
Definition: propsheet.cpp:879
#define minor(rdev)
Definition: propsheet.cpp:880
static HRESULT get_default_source(ITypeLib *typelib, const CLSID *clsid, IID *iid)
Definition: atl.c:837
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by test_source_iface().

◆ AtlGetPerUserRegistration()

HRESULT WINAPI AtlGetPerUserRegistration ( unsigned char )

◆ AtlInternalQueryInterface()

HRESULT WINAPI AtlInternalQueryInterface ( void pThis,
const _ATL_INTMAP_ENTRY pEntries,
REFIID  iid,
void **  ppvObject 
)

Definition at line 205 of file atl.c.

206 {
207  int i = 0;
208  HRESULT rc = E_NOINTERFACE;
209  TRACE("(%p, %p, %s, %p)\n",this, pEntries, debugstr_guid(iid), ppvObject);
210 
211  if (IsEqualGUID(iid,&IID_IUnknown))
212  {
213  TRACE("Returning IUnknown\n");
214  *ppvObject = ((LPSTR)this+pEntries[0].dw);
215  IUnknown_AddRef((IUnknown*)*ppvObject);
216  return S_OK;
217  }
218 
219  while (pEntries[i].pFunc != 0)
220  {
221  TRACE("Trying entry %i (%s %i %p)\n",i,debugstr_guid(pEntries[i].piid),
222  pEntries[i].dw, pEntries[i].pFunc);
223 
224  if (!pEntries[i].piid || IsEqualGUID(iid,pEntries[i].piid))
225  {
226  TRACE("MATCH\n");
227  if (pEntries[i].pFunc == (_ATL_CREATORARGFUNC*)1)
228  {
229  TRACE("Offset\n");
230  *ppvObject = ((LPSTR)this+pEntries[i].dw);
231  IUnknown_AddRef((IUnknown*)*ppvObject);
232  return S_OK;
233  }
234  else
235  {
236  TRACE("Function\n");
237  rc = pEntries[i].pFunc(this, iid, ppvObject, pEntries[i].dw);
238  if(rc==S_OK || pEntries[i].piid)
239  return rc;
240  }
241  }
242  i++;
243  }
244  TRACE("Done returning (0x%x)\n",rc);
245  return rc;
246 }
#define E_NOINTERFACE
Definition: winerror.h:2364
_ATL_CREATORARGFUNC * pFunc
Definition: atlbase.h:238
char * LPSTR
Definition: xmlstorage.h:182
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
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
REFIID LPVOID DWORD dw
Definition: atlbase.h:40
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ AtlLoadTypeLib()

HRESULT WINAPI AtlLoadTypeLib ( HINSTANCE  ,
LPCOLESTR  ,
BSTR ,
ITypeLib **   
)
inline

Definition at line 342 of file atl.c.

344 {
345  size_t path_len, index_len;
346  ITypeLib *typelib = NULL;
347  WCHAR *path;
348  HRESULT hres;
349 
350  static const WCHAR tlb_extW[] = {'.','t','l','b',0};
351 
352  TRACE("(%p %s %p %p)\n", inst, debugstr_w(lpszIndex), pbstrPath, ppTypeLib);
353 
354  index_len = lpszIndex ? strlenW(lpszIndex) : 0;
355  path = heap_alloc((MAX_PATH+index_len)*sizeof(WCHAR) + sizeof(tlb_extW));
356  if(!path)
357  return E_OUTOFMEMORY;
358 
360  if(!path_len) {
361  heap_free(path);
363  }
364 
365  if(index_len)
366  memcpy(path+path_len, lpszIndex, (index_len+1)*sizeof(WCHAR));
367 
369  if(FAILED(hres)) {
370  WCHAR *ptr;
371 
372  for(ptr = path+path_len-1; ptr > path && *ptr != '\\' && *ptr != '.'; ptr--);
373  if(*ptr != '.')
374  ptr = path+path_len;
375  memcpy(ptr, tlb_extW, sizeof(tlb_extW));
377  }
378 
379  if(SUCCEEDED(hres)) {
380  *pbstrPath = SysAllocString(path);
381  if(!*pbstrPath) {
382  ITypeLib_Release(typelib);
384  }
385  }
386 
387  heap_free(path);
388  if(FAILED(hres))
389  return hres;
390 
391  *ppTypeLib = typelib;
392  return S_OK;
393 }
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:607
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
GLsizei const GLchar ** path
Definition: glext.h:7234
static ITypeLib * typelib
Definition: apps.c:105
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
HRESULT WINAPI LoadTypeLib(const OLECHAR *szFile, ITypeLib **pptLib)
Definition: typelib.c:461
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define MAX_PATH
Definition: compat.h:26
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define S_OK
Definition: intsafe.h:59
static DWORD path_len
Definition: batch.c:31
Definition: services.c:325
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by ATL::AtlComModuleUnregisterServer(), AtlModuleLoadTypeLib(), AtlRegisterTypeLib(), ATL::AtlRegisterTypeLib(), and test_typelib().

◆ AtlMarshalPtrInProc()

HRESULT WINAPI AtlMarshalPtrInProc ( IUnknown pUnk,
const IID iid,
IStream **  ppStream 
)

Definition at line 111 of file atl.c.

112 {
113  FIXME("%p %p %p\n", pUnk, iid, pstm);
114  return E_FAIL;
115 }
#define E_FAIL
Definition: ddrawi.h:102
#define FIXME(fmt,...)
Definition: debug.h:110
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30

◆ AtlModuleAddCreateWndData()

void WINAPI AtlModuleAddCreateWndData ( _ATL_MODULEW pM,
_AtlCreateWndData pData,
void pvObject 
)

Definition at line 403 of file atl30.c.

404 {
405  TRACE("(%p, %p, %p)\n", pM, pData, pvObject);
406 
407  pData->m_pThis = pvObject;
408  pData->m_dwThreadID = GetCurrentThreadId();
409 
411  pData->m_pNext = pM->m_pCreateWndList;
412  pM->m_pCreateWndList = pData;
414 }
CRITICAL_SECTION m_csWindowCreate
Definition: atlbase.h:170
_AtlCreateWndData * m_pCreateWndList
Definition: atlbase.h:174
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:420
#define TRACE(s)
Definition: solgame.cpp:4
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827

Referenced by test_winmodule().

◆ AtlModuleAddTermFunc()

HRESULT WINAPI AtlModuleAddTermFunc ( _ATL_MODULE pM,
_ATL_TERMFUNC *  pFunc,
DWORD_PTR  dw 
)

Definition at line 298 of file atl.c.

299 {
300  _ATL_TERMFUNC_ELEM *termfunc_elem;
301 
302  TRACE("version %04x (%p %p %ld)\n", _ATL_VER, pM, pFunc, dw);
303 
304  if (_ATL_VER > _ATL_VER_30 || pM->cbSize > ATLVer1Size) {
305  termfunc_elem = HeapAlloc(GetProcessHeap(), 0, sizeof(_ATL_TERMFUNC_ELEM));
306  termfunc_elem->pFunc = pFunc;
307  termfunc_elem->dw = dw;
308  termfunc_elem->pNext = pM->m_pTermFuncs;
309 
310  pM->m_pTermFuncs = termfunc_elem;
311  }
312 
313  return S_OK;
314 }
#define ATLVer1Size
Definition: atl.c:35
#define _ATL_VER_30
Definition: atlbase.h:28
_ATL_TERMFUNC_ELEM * m_pTermFuncs
Definition: atlbase.h:194
_ATL_TERMFUNC * pFunc
Definition: atlbase.h:117
UINT cbSize
Definition: atlbase.h:192
#define _ATL_VER
Definition: atlbase.h:36
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
struct _ATL_TERMFUNC_ELEM_TAG * pNext
Definition: atlbase.h:119
REFIID LPVOID DWORD dw
Definition: atlbase.h:40
#define S_OK
Definition: intsafe.h:59

Referenced by test_term().

◆ AtlModuleExtractCreateWndData()

void* WINAPI AtlModuleExtractCreateWndData ( _ATL_MODULEW pM)

Definition at line 423 of file atl30.c.

424 {
426  void *ret = NULL;
427 
428  TRACE("(%p)\n", pM);
429 
431 
432  for(ppData = &pM->m_pCreateWndList; *ppData!=NULL; ppData = &(*ppData)->m_pNext)
433  {
434  if ((*ppData)->m_dwThreadID == GetCurrentThreadId())
435  {
437  *ppData = pData->m_pNext;
438  ret = pData->m_pThis;
439  break;
440  }
441  }
442 
444  return ret;
445 }
CRITICAL_SECTION m_csWindowCreate
Definition: atlbase.h:170
_AtlCreateWndData * m_pCreateWndList
Definition: atlbase.h:174
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
smooth NULL
Definition: ftsmooth.c:416
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:420
#define TRACE(s)
Definition: solgame.cpp:4
PSDBQUERYRESULT_VISTA PVOID * ppData
Definition: env.c:54
int ret
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827

Referenced by test_winmodule().

◆ AtlModuleInit()

HRESULT WINAPI AtlModuleInit ( _ATL_MODULEW pM,
_ATL_OBJMAP_ENTRYW p,
HINSTANCE  h 
)

Definition at line 40 of file atl30.c.

41 {
42  INT i;
43  UINT size;
44 
45  TRACE("(%p %p %p)\n", pM, p, h);
46 
47  size = pM->cbSize;
48  switch (size)
49  {
50  case ATLVer1Size:
51  case sizeof(_ATL_MODULEW):
52 #ifdef _WIN64
53  case sizeof(_ATL_MODULEW) + sizeof(void *):
54 #endif
55  break;
56  default:
57  WARN("Unknown structure version (size %i)\n",size);
58  return E_INVALIDARG;
59  }
60 
61  memset(pM,0,pM->cbSize);
62  pM->cbSize = size;
63  pM->m_hInst = h;
64  pM->m_hInstResource = h;
65  pM->m_hInstTypeLib = h;
66  pM->m_pObjMap = p;
67  pM->m_hHeap = GetProcessHeap();
68 
72 
73  /* call mains */
74  i = 0;
75  if (pM->m_pObjMap != NULL && size > ATLVer1Size)
76  {
77  while (pM->m_pObjMap[i].pclsid != NULL)
78  {
79  TRACE("Initializing object %i %p\n",i,p[i].pfnObjectMain);
80  if (p[i].pfnObjectMain)
81  p[i].pfnObjectMain(TRUE);
82  i++;
83  }
84  }
85 
86  return S_OK;
87 }
#define TRUE
Definition: types.h:120
CRITICAL_SECTION m_csWindowCreate
Definition: atlbase.h:170
#define WARN(fmt,...)
Definition: debug.h:111
int32_t INT
Definition: typedefs.h:56
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
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
#define E_INVALIDARG
Definition: ddrawi.h:101
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:697
smooth NULL
Definition: ftsmooth.c:416
union _ATL_MODULEW_TAG::@3410 u
CRITICAL_SECTION m_csObjMap
Definition: atlbase.h:171
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:395
const CLSID * pclsid
Definition: atlbase.h:86
HINSTANCE m_hInstResource
Definition: atlbase.h:160
HINSTANCE m_hInstTypeLib
Definition: atlbase.h:161
CRITICAL_SECTION m_csTypeInfoHolder
Definition: atlbase.h:167
HINSTANCE m_hInst
Definition: atlbase.h:159
#define ATLVer1Size
Definition: atl30.c:38
#define S_OK
Definition: intsafe.h:59
struct _ATL_MODULEW_TAG _ATL_MODULEW
HANDLE m_hHeap
Definition: atlbase.h:164
unsigned int UINT
Definition: ndis.h:50
_ATL_OBJMAP_ENTRYW * m_pObjMap
Definition: atlbase.h:162
GLfloat GLfloat p
Definition: glext.h:8902
#define memset(x, y, z)
Definition: compat.h:39

Referenced by test_StructSize(), test_term(), and test_winmodule().

◆ AtlModuleLoadTypeLib()

HRESULT WINAPI AtlModuleLoadTypeLib ( _ATL_MODULEW pM,
LPCOLESTR  lpszIndex,
BSTR pbstrPath,
ITypeLib **  ppTypeLib 
)

Definition at line 102 of file atl30.c.

104 {
105  TRACE("(%p, %s, %p, %p)\n", pM, debugstr_w(lpszIndex), pbstrPath, ppTypeLib);
106 
107  if (!pM)
108  return E_INVALIDARG;
109 
110  return AtlLoadTypeLib(pM->m_hInstTypeLib, lpszIndex, pbstrPath, ppTypeLib);
111 }
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
HINSTANCE m_hInstTypeLib
Definition: atlbase.h:161
HRESULT WINAPI AtlLoadTypeLib(HINSTANCE inst, LPCOLESTR lpszIndex, BSTR *pbstrPath, ITypeLib **ppTypeLib)
Definition: atl.c:342

◆ AtlModuleRegisterClassObjects()

HRESULT WINAPI AtlModuleRegisterClassObjects ( _ATL_MODULEW pM,
DWORD  dwClsContext,
DWORD  dwFlags 
)

Definition at line 134 of file atl30.c.

136 {
138  int i=0;
139 
140  TRACE("(%p %i %i)\n",pM, dwClsContext, dwFlags);
141 
142  if (pM == NULL)
143  return E_INVALIDARG;
144 
145  while ((obj = get_objmap_entry( pM, i++ )))
146  {
148  HRESULT rc;
149 
150  TRACE("Registering object %i\n",i);
151  if (obj->pfnGetClassObject)
152  {
153  rc = obj->pfnGetClassObject(obj->pfnCreateInstance, &IID_IUnknown,
154  (LPVOID*)&pUnknown);
155  if (SUCCEEDED (rc) )
156  {
157  rc = CoRegisterClassObject(obj->pclsid, pUnknown, dwClsContext,
158  dwFlags, &obj->dwRegister);
159 
160  if (FAILED (rc) )
161  WARN("Failed to register object %i: 0x%08x\n", i, rc);
162 
163  if (pUnknown)
164  IUnknown_Release(pUnknown);
165  }
166  }
167  }
168 
169  return S_OK;
170 }
#define WARN(fmt,...)
Definition: debug.h:111
GLsizei GLsizei GLuint * obj
Definition: glext.h:6042
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
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
_In_ PUNKNOWN pUnknown
Definition: drmk.h:76
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static _ATL_OBJMAP_ENTRYW_V1 * get_objmap_entry(_ATL_MODULEW *mod, unsigned int index)
Definition: atl30.c:89
const GUID IID_IUnknown
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister)
Definition: compobj.c:2806
#define S_OK
Definition: intsafe.h:59
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ AtlModuleRegisterServer()

HRESULT WINAPI AtlModuleRegisterServer ( _ATL_MODULEW pM,
BOOL  bRegTypeLib,
const CLSID pCLSID 
)

Definition at line 182 of file atl30.c.

183 {
184  const _ATL_OBJMAP_ENTRYW_V1 *obj;
185  int i;
186  HRESULT hRes;
187 
188  TRACE("%p %d %s\n", pM, bRegTypeLib, debugstr_guid(clsid));
189 
190  if (pM == NULL)
191  return E_INVALIDARG;
192 
193  for (i = 0; (obj = get_objmap_entry( pM, i )) != NULL; i++) /* register CLSIDs */
194  {
195  if (!clsid || IsEqualCLSID(obj->pclsid, clsid))
196  {
197  TRACE("Registering clsid %s\n", debugstr_guid(obj->pclsid));
198  hRes = obj->pfnUpdateRegistry(TRUE); /* register */
199  if (FAILED(hRes))
200  return hRes;
201 
202  if(pM->cbSize > ATLVer1Size) {
203  const struct _ATL_CATMAP_ENTRY *catmap;
204 
205  catmap = ((const _ATL_OBJMAP_ENTRYW*)obj)->pfnGetCategoryMap();
206  if(catmap) {
207  hRes = AtlRegisterClassCategoriesHelper(obj->pclsid, catmap, TRUE);
208  if(FAILED(hRes))
209  return hRes;
210  }
211  }
212  }
213  }
214 
215  if (bRegTypeLib)
216  {
218  if (FAILED(hRes))
219  return hRes;
220  }
221 
222  return S_OK;
223 }
#define TRUE
Definition: types.h:120
GLsizei GLsizei GLuint * obj
Definition: glext.h:6042
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
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE inst, const WCHAR *index)
Definition: atl.c:400
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static _ATL_OBJMAP_ENTRYW_V1 * get_objmap_entry(_ATL_MODULEW *mod, unsigned int index)
Definition: atl30.c:89
HINSTANCE m_hInstTypeLib
Definition: atlbase.h:161
REFCLSID clsid
Definition: msctf.c:84
#define ATLVer1Size
Definition: atl30.c:38
#define S_OK
Definition: intsafe.h:59
HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID clsid, const struct _ATL_CATMAP_ENTRY *catmap, BOOL reg)
Definition: atl.c:748
Definition: atlbase.h:247
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:91

◆ AtlModuleRegisterTypeLib()

HRESULT WINAPI AtlModuleRegisterTypeLib ( _ATL_MODULEW pM,
LPCOLESTR  lpszIndex 
)

Definition at line 266 of file atl30.c.

267 {
268  TRACE("%p %s\n", pm, debugstr_w(lpszIndex));
269 
270  if (!pm)
271  return E_INVALIDARG;
272 
273  return AtlRegisterTypeLib(pm->m_hInstTypeLib, lpszIndex);
274 }
static LPMONITOREX pm
Definition: localmon.c:42
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE inst, const WCHAR *index)
Definition: atl.c:400
#define TRACE(s)
Definition: solgame.cpp:4

◆ AtlModuleTerm()

HRESULT WINAPI AtlModuleTerm ( _ATL_MODULEW pM)

◆ AtlModuleUnregisterServer()

HRESULT WINAPI AtlModuleUnregisterServer ( _ATL_MODULEW pM,
const CLSID pCLSID 
)

Definition at line 288 of file atl30.c.

289 {
290  FIXME("%p %s\n", pm, debugstr_guid(clsid));
291  return E_FAIL;
292 }
static LPMONITOREX pm
Definition: localmon.c:42
#define E_FAIL
Definition: ddrawi.h:102
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
REFCLSID clsid
Definition: msctf.c:84

◆ AtlModuleUnregisterServerEx()

HRESULT WINAPI AtlModuleUnregisterServerEx ( _ATL_MODULEW pM,
BOOL  bUnRegTypeLib,
const CLSID pCLSID 
)

Definition at line 172 of file atl30.c.

173 {
174  FIXME("(%p, %i, %p) stub\n", pM, bUnRegTypeLib, pCLSID);
175  return S_OK;
176 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59

◆ AtlModuleUpdateRegistryFromResourceD()

HRESULT WINAPI AtlModuleUpdateRegistryFromResourceD ( _ATL_MODULEW pM,
LPCOLESTR  lpszRes,
BOOL  bRegister,
struct _ATL_REGMAP_ENTRY pMapEntries,
IRegistrar pReg 
)

Definition at line 451 of file atl30.c.

453 {
454  TRACE("(%p %s %d %p %p)\n", pM, debugstr_w(lpszRes), bRegister, pMapEntries, pReg);
455 
456  return AtlUpdateRegistryFromResourceD(pM->m_hInst, lpszRes, bRegister, pMapEntries, pReg);
457 }
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
HINSTANCE m_hInst
Definition: atlbase.h:159
HRESULT WINAPI AtlUpdateRegistryFromResourceD(HINSTANCE inst, LPCOLESTR res, BOOL bRegister, struct _ATL_REGMAP_ENTRY *pMapEntries, IRegistrar *pReg)
Definition: registrar.c:707

◆ AtlRegisterClassCategoriesHelper()

HRESULT WINAPI AtlRegisterClassCategoriesHelper ( REFCLSID  ,
const struct _ATL_CATMAP_ENTRY ,
BOOL   
)

Definition at line 748 of file atl.c.

749 {
750  const struct _ATL_CATMAP_ENTRY *iter;
751  HRESULT hres;
752 
753  TRACE("(%s %p %x)\n", debugstr_guid(clsid), catmap, reg);
754 
755  if(!catmap)
756  return S_OK;
757 
758  if(!catreg) {
759  ICatRegister *new_catreg;
760 
761  hres = CoCreateInstance(&CLSID_StdComponentCategoriesMgr, NULL, CLSCTX_INPROC_SERVER,
762  &IID_ICatRegister, (void**)&new_catreg);
763  if(FAILED(hres))
764  return hres;
765 
766  if(InterlockedCompareExchangePointer((void**)&catreg, new_catreg, NULL))
767  ICatRegister_Release(new_catreg);
768  }
769 
770  for(iter = catmap; iter->iType != _ATL_CATMAP_ENTRY_END; iter++) {
771  CATID catid = *iter->pcatid; /* For stupid lack of const in ICatRegister declaration. */
772 
773  if(iter->iType == _ATL_CATMAP_ENTRY_IMPLEMENTED) {
774  if(reg)
775  hres = ICatRegister_RegisterClassImplCategories(catreg, clsid, 1, &catid);
776  else
777  hres = ICatRegister_UnRegisterClassImplCategories(catreg, clsid, 1, &catid);
778  }else {
779  if(reg)
780  hres = ICatRegister_RegisterClassReqCategories(catreg, clsid, 1, &catid);
781  else
782  hres = ICatRegister_UnRegisterClassReqCategories(catreg, clsid, 1, &catid);
783  }
784  if(FAILED(hres))
785  return hres;
786  }
787 
788  if(!reg) {
789  WCHAR reg_path[256] = {'C','L','S','I','D','\\'}, *ptr = reg_path+6;
790 
791  static const WCHAR implemented_catW[] =
792  {'I','m','p','l','e','m','e','n','t','e','d',' ','C','a','t','e','g','o','r','i','e','s',0};
793  static const WCHAR required_catW[] =
794  {'R','e','q','u','i','r','e','d',' ','C','a','t','e','g','o','r','i','e','s',0};
795 
796  ptr += StringFromGUID2(clsid, ptr, 64)-1;
797  *ptr++ = '\\';
798 
799  memcpy(ptr, implemented_catW, sizeof(implemented_catW));
800  RegDeleteKeyW(HKEY_CLASSES_ROOT, reg_path);
801 
802  memcpy(ptr, required_catW, sizeof(required_catW));
803  RegDeleteKeyW(HKEY_CLASSES_ROOT, reg_path);
804  }
805 
806  return S_OK;
807 }
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
Definition: reg.c:1237
const CATID * pcatid
Definition: atlbase.h:250
static ICatRegister * catreg
Definition: atl.c:41
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
GUID catid
Definition: msctf.idl:608
#define debugstr_guid
Definition: kernel32.h:35
int iType
Definition: atlbase.h:249
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
Definition: compobj.c:2343
REFCLSID clsid
Definition: msctf.c:84
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3234
#define S_OK
Definition: intsafe.h:59
#define _ATL_CATMAP_ENTRY_IMPLEMENTED
Definition: atlbase.h:254
static int reg
Definition: i386-dis.c:1275
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define _ATL_CATMAP_ENTRY_END
Definition: atlbase.h:253
Definition: atlbase.h:247

Referenced by AtlComModuleRegisterServer(), AtlModuleRegisterServer(), and test_regcat().

◆ AtlRegisterTypeLib()

HRESULT WINAPI AtlRegisterTypeLib ( HINSTANCE  ,
LPCOLESTR   
)

◆ AtlSetPerUserRegistration()

HRESULT WINAPI AtlSetPerUserRegistration ( unsigned char  )

◆ AtlUnadvise()

HRESULT WINAPI AtlUnadvise ( IUnknown pUnkCP,
const IID iid,
DWORD  dw 
)

Definition at line 74 of file atl.c.

75 {
78  HRESULT hres;
79 
80  TRACE("%p %p %d\n", pUnkCP, iid, dw);
81 
82  if(!pUnkCP)
83  return E_INVALIDARG;
84 
85  hres = IUnknown_QueryInterface(pUnkCP, &IID_IConnectionPointContainer, (void**)&container);
86  if(FAILED(hres))
87  return hres;
88 
89  hres = IConnectionPointContainer_FindConnectionPoint(container, iid, &cp);
90  IConnectionPointContainer_Release(container);
91  if(FAILED(hres))
92  return hres;
93 
94  hres = IConnectionPoint_Unadvise(cp, dw);
95  IConnectionPoint_Release(cp);
96  return hres;
97 }
const GUID IID_IConnectionPointContainer
struct container container
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
REFIID LPVOID DWORD dw
Definition: atlbase.h:40
POINT cp
Definition: magnifier.c:59

Referenced by CExplorerBand::DestroyExplorerBand(), CAddressEditBox::SetOwner(), CBrandBand::SetSite(), CInternetToolbar::SetSite(), and test_cp().

◆ AtlUnmarshalPtr()

HRESULT WINAPI AtlUnmarshalPtr ( IStream pStream,
const IID iid,
IUnknown **  ppUnk 
)

Definition at line 120 of file atl.c.

121 {
122  FIXME("%p %p %p\n", stm, iid, ppUnk);
123  return E_FAIL;
124 }
#define E_FAIL
Definition: ddrawi.h:102
#define FIXME(fmt,...)
Definition: debug.h:110

◆ AtlUpdateRegistryFromResourceD()

HRESULT WINAPI AtlUpdateRegistryFromResourceD ( HINSTANCE  ,
LPCOLESTR  ,
BOOL  ,
struct _ATL_REGMAP_ENTRY ,
IRegistrar  
)

Definition at line 707 of file registrar.c.

709 {
710  const struct _ATL_REGMAP_ENTRY *iter;
712  IRegistrar *registrar;
713  HRESULT hres;
714 
715  static const WCHAR moduleW[] = {'M','O','D','U','L','E',0};
716  static const WCHAR registryW[] = {'R','E','G','I','S','T','R','Y',0};
717 
719  FIXME("hinst %p: did not get module name\n", inst);
720  return E_FAIL;
721  }
722 
723  TRACE("%p (%s), %s, %d, %p, %p\n", inst, debugstr_w(module_name),
724  debugstr_w(res), bRegister, pMapEntries, pReg);
725 
726  if(pReg) {
727  registrar = pReg;
728  }else {
729  hres = AtlCreateRegistrar(&registrar);
730  if(FAILED(hres))
731  return hres;
732  }
733 
734  IRegistrar_AddReplacement(registrar, moduleW, module_name);
735 
736  for (iter = pMapEntries; iter && iter->szKey; iter++)
737  IRegistrar_AddReplacement(registrar, iter->szKey, iter->szData);
738 
739  if(bRegister)
740  hres = IRegistrar_ResourceRegisterSz(registrar, module_name, res, registryW);
741  else
742  hres = IRegistrar_ResourceUnregisterSz(registrar, module_name, res, registryW);
743 
744  if(registrar != pReg)
745  IRegistrar_Release(registrar);
746  return hres;
747 }
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:607
LPCOLESTR szData
Definition: atlbase.h:244
HRESULT WINAPI AtlCreateRegistrar(IRegistrar **ret)
Definition: registrar.c:688
static LPCWSTR LPCWSTR module_name
Definition: db.cpp:168
#define E_FAIL
Definition: ddrawi.h:102
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
LPCOLESTR szKey
Definition: atlbase.h:243
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define MAX_PATH
Definition: compat.h:26
Definition: atlbase.h:241
static const WCHAR moduleW[]
Definition: register.c:35
GLuint res
Definition: glext.h:9613

Referenced by AtlModuleUpdateRegistryFromResourceD().

◆ AtlWaitWithMessageLoop()

BOOL WINAPI AtlWaitWithMessageLoop ( HANDLE  )

Definition at line 812 of file atl.c.

813 {
814  MSG msg;
815  DWORD res;
816 
817  TRACE("(%p)\n", handle);
818 
819  while(1) {
821  switch(res) {
822  case WAIT_OBJECT_0:
823  return TRUE;
824  case WAIT_OBJECT_0+1:
825  if(GetMessageW(&msg, NULL, 0, 0) < 0)
826  return FALSE;
827 
830  break;
831  default:
832  return FALSE;
833  }
834  }
835 }
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define TRUE
Definition: types.h:120
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define WAIT_OBJECT_0
Definition: winbase.h:387
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
#define QS_ALLINPUT
Definition: winuser.h:874
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
#define msg(x)
Definition: auth_time.c:54
GLuint res
Definition: glext.h:9613
#define INFINITE
Definition: serial.h:102

◆ AtlWinModuleAddCreateWndData()

void WINAPI AtlWinModuleAddCreateWndData ( _ATL_WIN_MODULE ,
_AtlCreateWndData ,
void  
)

Referenced by test_winmodule().

◆ AtlWinModuleExtractCreateWndData()

void* WINAPI AtlWinModuleExtractCreateWndData ( _ATL_WIN_MODULE )

Referenced by test_winmodule().

◆ AtlWinModuleInit()

HRESULT WINAPI AtlWinModuleInit ( _ATL_WIN_MODULE )

Referenced by test_winmodule().

◆ HRESULT()

typedef HRESULT ( WINAPI  _ATL_CREATORFUNC)

◆ LPCSTR()

typedef LPCSTR ( WINAPI  _ATL_DESCRIPTIONFUNCA)

◆ LPCWSTR()

typedef LPCWSTR ( WINAPI  _ATL_DESCRIPTIONFUNCW)

◆ void()

typedef void ( WINAPI  _ATL_TERMFUNC)