ReactOS  0.4.14-dev-593-g1793dcc
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 1147 of file atl_ax.c.

1148 {
1149  HRESULT hr;
1150 
1151  TRACE("(%p %p %p)\n", control, hWnd, container);
1152 
1153  if (!control)
1154  return E_INVALIDARG;
1155 
1156  hr = IOCS_Create( hWnd, control, container );
1157  return hWnd ? hr : S_FALSE;
1158 }
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:943
#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 986 of file atl_ax.c.

988 {
989  return AtlAxCreateControlEx( lpszName, hWnd, pStream, ppUnkContainer,
990  NULL, NULL, NULL );
991 }
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:1483

◆ 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 687 of file registrar.c.

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

Referenced by AtlUpdateRegistryFromResourceD(), and RegistrarCF_CreateInstance().

◆ AtlFreeMarshalStream()

HRESULT WINAPI AtlFreeMarshalStream ( IStream pStream)

Definition at line 101 of file atl.c.

102 {
103  FIXME("%p\n", stm);
104  return S_OK;
105 }
#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 888 of file atl.c.

889 {
892  ITypeLib *typelib;
893  IPersist *persist;
894  IDispatch *disp;
895  HRESULT hres;
896 
897  TRACE("(%p %p %p %p %p)\n", unk, libid, iid, major, minor);
898 
899  hres = IUnknown_QueryInterface(unk, &IID_IDispatch, (void**)&disp);
900  if(FAILED(hres))
901  return hres;
902 
903  hres = IDispatch_GetTypeInfo(disp, 0, 0, &typeinfo);
904  IDispatch_Release(disp);
905  if(FAILED(hres))
906  return hres;
907 
908  hres = ITypeInfo_GetContainingTypeLib(typeinfo, &typelib, 0);
909  ITypeInfo_Release(typeinfo);
910  if(SUCCEEDED(hres)) {
911  TLIBATTR *attr;
912 
913  hres = ITypeLib_GetLibAttr(typelib, &attr);
914  if(SUCCEEDED(hres)) {
915  *libid = attr->guid;
916  *major = attr->wMajorVerNum;
917  *minor = attr->wMinorVerNum;
918  ITypeLib_ReleaseTLibAttr(typelib, attr);
919  }else {
920  ITypeLib_Release(typelib);
921  }
922  }
923  if(FAILED(hres))
924  return hres;
925 
926  hres = IUnknown_QueryInterface(unk, &IID_IProvideClassInfo2, (void**)&classinfo);
927  if(SUCCEEDED(hres)) {
928  hres = IProvideClassInfo2_GetGUID(classinfo, GUIDKIND_DEFAULT_SOURCE_DISP_IID, iid);
929  IProvideClassInfo2_Release(classinfo);
930  ITypeLib_Release(typelib);
931  return hres;
932  }
933 
934  hres = IUnknown_QueryInterface(unk, &IID_IPersist, (void**)&persist);
935  if(SUCCEEDED(hres)) {
936  CLSID clsid;
937 
938  hres = IPersist_GetClassID(persist, &clsid);
939  if(SUCCEEDED(hres))
941  IPersist_Release(persist);
942  }
943 
944  return hres;
945 }
disp
Definition: i386-dis.c:3181
const GUID IID_IPersist
Definition: proxy.cpp:14
static ITypeLib * typelib
Definition: apps.c:108
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:201
const GUID IID_IDispatch
REFCLSID clsid
Definition: msctf.c:82
__u8 attr
Definition: mkdosfs.c:359
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109
#define major(rdev)
Definition: propsheet.cpp:916
#define minor(rdev)
Definition: propsheet.cpp:917
static HRESULT get_default_source(ITypeLib *typelib, const CLSID *clsid, IID *iid)
Definition: atl.c:836
#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 204 of file atl.c.

205 {
206  int i = 0;
207  HRESULT rc = E_NOINTERFACE;
208  TRACE("(%p, %p, %s, %p)\n",this, pEntries, debugstr_guid(iid), ppvObject);
209 
210  if (IsEqualGUID(iid,&IID_IUnknown))
211  {
212  TRACE("Returning IUnknown\n");
213  *ppvObject = ((LPSTR)this+pEntries[0].dw);
214  IUnknown_AddRef((IUnknown*)*ppvObject);
215  return S_OK;
216  }
217 
218  while (pEntries[i].pFunc != 0)
219  {
220  TRACE("Trying entry %i (%s %i %p)\n",i,debugstr_guid(pEntries[i].piid),
221  pEntries[i].dw, pEntries[i].pFunc);
222 
223  if (!pEntries[i].piid || IsEqualGUID(iid,pEntries[i].piid))
224  {
225  TRACE("MATCH\n");
226  if (pEntries[i].pFunc == (_ATL_CREATORARGFUNC*)1)
227  {
228  TRACE("Offset\n");
229  *ppvObject = ((LPSTR)this+pEntries[i].dw);
230  IUnknown_AddRef((IUnknown*)*ppvObject);
231  return S_OK;
232  }
233  else
234  {
235  TRACE("Function\n");
236  rc = pEntries[i].pFunc(this, iid, ppvObject, pEntries[i].dw);
237  if(rc==S_OK || pEntries[i].piid)
238  return rc;
239  }
240  }
241  i++;
242  }
243  TRACE("Done returning (0x%x)\n",rc);
244  return rc;
245 }
#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:4112

◆ AtlLoadTypeLib()

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

Definition at line 341 of file atl.c.

343 {
344  size_t path_len, index_len;
345  ITypeLib *typelib = NULL;
346  WCHAR *path;
347  HRESULT hres;
348 
349  static const WCHAR tlb_extW[] = {'.','t','l','b',0};
350 
351  TRACE("(%p %s %p %p)\n", inst, debugstr_w(lpszIndex), pbstrPath, ppTypeLib);
352 
353  index_len = lpszIndex ? lstrlenW(lpszIndex) : 0;
354  path = heap_alloc((MAX_PATH+index_len)*sizeof(WCHAR) + sizeof(tlb_extW));
355  if(!path)
356  return E_OUTOFMEMORY;
357 
359  if(!path_len) {
360  heap_free(path);
362  }
363 
364  if(index_len)
365  memcpy(path+path_len, lpszIndex, (index_len+1)*sizeof(WCHAR));
366 
368  if(FAILED(hres)) {
369  WCHAR *ptr;
370 
371  for(ptr = path+path_len-1; ptr > path && *ptr != '\\' && *ptr != '.'; ptr--);
372  if(*ptr != '.')
373  ptr = path+path_len;
374  memcpy(ptr, tlb_extW, sizeof(tlb_extW));
376  }
377 
378  if(SUCCEEDED(hres)) {
379  *pbstrPath = SysAllocString(path);
380  if(!*pbstrPath) {
381  ITypeLib_Release(typelib);
383  }
384  }
385 
386  heap_free(path);
387  if(FAILED(hres))
388  return hres;
389 
390  *ppTypeLib = typelib;
391  return S_OK;
392 }
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:609
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
GLsizei const GLchar ** path
Definition: glext.h:7234
static ITypeLib * typelib
Definition: apps.c:108
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
HRESULT WINAPI LoadTypeLib(const OLECHAR *szFile, ITypeLib **pptLib)
Definition: typelib.c:458
#define lstrlenW
Definition: compat.h:415
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:238
#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
#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 110 of file atl.c.

111 {
112  FIXME("%p %p %p\n", pUnk, iid, pstm);
113  return E_FAIL;
114 }
#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 402 of file atl30.c.

403 {
404  TRACE("(%p, %p, %p)\n", pM, pData, pvObject);
405 
406  pData->m_pThis = pvObject;
407  pData->m_dwThreadID = GetCurrentThreadId();
408 
410  pData->m_pNext = pM->m_pCreateWndList;
411  pM->m_pCreateWndList = pData;
413 }
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:458
#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 297 of file atl.c.

298 {
299  _ATL_TERMFUNC_ELEM *termfunc_elem;
300 
301  TRACE("version %04x (%p %p %ld)\n", _ATL_VER, pM, pFunc, dw);
302 
303  if (_ATL_VER > _ATL_VER_30 || pM->cbSize > ATLVer1Size) {
304  termfunc_elem = HeapAlloc(GetProcessHeap(), 0, sizeof(_ATL_TERMFUNC_ELEM));
305  termfunc_elem->pFunc = pFunc;
306  termfunc_elem->dw = dw;
307  termfunc_elem->pNext = pM->m_pTermFuncs;
308 
309  pM->m_pTermFuncs = termfunc_elem;
310  }
311 
312  return S_OK;
313 }
#define ATLVer1Size
Definition: atl.c:34
#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:403
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 422 of file atl30.c.

423 {
425  void *ret = NULL;
426 
427  TRACE("(%p)\n", pM);
428 
430 
431  for(ppData = &pM->m_pCreateWndList; *ppData!=NULL; ppData = &(*ppData)->m_pNext)
432  {
433  if ((*ppData)->m_dwThreadID == GetCurrentThreadId())
434  {
436  *ppData = pData->m_pNext;
437  ret = pData->m_pThis;
438  break;
439  }
440  }
441 
443  return ret;
444 }
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:458
#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 39 of file atl30.c.

40 {
41  INT i;
42  UINT size;
43 
44  TRACE("(%p %p %p)\n", pM, p, h);
45 
46  size = pM->cbSize;
47  switch (size)
48  {
49  case ATLVer1Size:
50  case sizeof(_ATL_MODULEW):
51 #ifdef _WIN64
52  case sizeof(_ATL_MODULEW) + sizeof(void *):
53 #endif
54  break;
55  default:
56  WARN("Unknown structure version (size %i)\n",size);
57  return E_INVALIDARG;
58  }
59 
60  memset(pM,0,pM->cbSize);
61  pM->cbSize = size;
62  pM->m_hInst = h;
63  pM->m_hInstResource = h;
64  pM->m_hInstTypeLib = h;
65  pM->m_pObjMap = p;
66  pM->m_hHeap = GetProcessHeap();
67 
71 
72  /* call mains */
73  i = 0;
74  if (pM->m_pObjMap != NULL && size > ATLVer1Size)
75  {
76  while (pM->m_pObjMap[i].pclsid != NULL)
77  {
78  TRACE("Initializing object %i %p\n",i,p[i].pfnObjectMain);
79  if (p[i].pfnObjectMain)
80  p[i].pfnObjectMain(TRUE);
81  i++;
82  }
83  }
84 
85  return S_OK;
86 }
#define TRUE
Definition: types.h:120
CRITICAL_SECTION m_csWindowCreate
Definition: atlbase.h:170
union _ATL_MODULEW_TAG::@3435 u
#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:751
smooth NULL
Definition: ftsmooth.c:416
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:403
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:37
#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 101 of file atl30.c.

103 {
104  TRACE("(%p, %s, %p, %p)\n", pM, debugstr_w(lpszIndex), pbstrPath, ppTypeLib);
105 
106  if (!pM)
107  return E_INVALIDARG;
108 
109  return AtlLoadTypeLib(pM->m_hInstTypeLib, lpszIndex, pbstrPath, ppTypeLib);
110 }
#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:341

◆ AtlModuleRegisterClassObjects()

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

Definition at line 133 of file atl30.c.

135 {
137  int i=0;
138 
139  TRACE("(%p %i %i)\n",pM, dwClsContext, dwFlags);
140 
141  if (pM == NULL)
142  return E_INVALIDARG;
143 
144  while ((obj = get_objmap_entry( pM, i++ )))
145  {
147  HRESULT rc;
148 
149  TRACE("Registering object %i\n",i);
150  if (obj->pfnGetClassObject)
151  {
152  rc = obj->pfnGetClassObject(obj->pfnCreateInstance, &IID_IUnknown,
153  (LPVOID*)&pUnknown);
154  if (SUCCEEDED (rc) )
155  {
156  rc = CoRegisterClassObject(obj->pclsid, pUnknown, dwClsContext,
157  dwFlags, &obj->dwRegister);
158 
159  if (FAILED (rc) )
160  WARN("Failed to register object %i: 0x%08x\n", i, rc);
161 
162  if (pUnknown)
163  IUnknown_Release(pUnknown);
164  }
165  }
166  }
167 
168  return S_OK;
169 }
#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:88
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:2897
#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 181 of file atl30.c.

182 {
183  const _ATL_OBJMAP_ENTRYW_V1 *obj;
184  int i;
185  HRESULT hRes;
186 
187  TRACE("%p %d %s\n", pM, bRegTypeLib, debugstr_guid(clsid));
188 
189  if (pM == NULL)
190  return E_INVALIDARG;
191 
192  for (i = 0; (obj = get_objmap_entry( pM, i )) != NULL; i++) /* register CLSIDs */
193  {
194  if (!clsid || IsEqualCLSID(obj->pclsid, clsid))
195  {
196  TRACE("Registering clsid %s\n", debugstr_guid(obj->pclsid));
197  hRes = obj->pfnUpdateRegistry(TRUE); /* register */
198  if (FAILED(hRes))
199  return hRes;
200 
201  if(pM->cbSize > ATLVer1Size) {
202  const struct _ATL_CATMAP_ENTRY *catmap;
203 
204  catmap = ((const _ATL_OBJMAP_ENTRYW*)obj)->pfnGetCategoryMap();
205  if(catmap) {
206  hRes = AtlRegisterClassCategoriesHelper(obj->pclsid, catmap, TRUE);
207  if(FAILED(hRes))
208  return hRes;
209  }
210  }
211  }
212  }
213 
214  if (bRegTypeLib)
215  {
217  if (FAILED(hRes))
218  return hRes;
219  }
220 
221  return S_OK;
222 }
#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:399
#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:88
HINSTANCE m_hInstTypeLib
Definition: atlbase.h:161
REFCLSID clsid
Definition: msctf.c:82
#define ATLVer1Size
Definition: atl30.c:37
#define S_OK
Definition: intsafe.h:59
HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID clsid, const struct _ATL_CATMAP_ENTRY *catmap, BOOL reg)
Definition: atl.c:747
Definition: atlbase.h:247
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96

◆ AtlModuleRegisterTypeLib()

HRESULT WINAPI AtlModuleRegisterTypeLib ( _ATL_MODULEW pM,
LPCOLESTR  lpszIndex 
)

Definition at line 265 of file atl30.c.

266 {
267  TRACE("%p %s\n", pm, debugstr_w(lpszIndex));
268 
269  if (!pm)
270  return E_INVALIDARG;
271 
272  return AtlRegisterTypeLib(pm->m_hInstTypeLib, lpszIndex);
273 }
static LPMONITOREX pm
Definition: localmon.c:45
#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:399
#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 287 of file atl30.c.

288 {
289  FIXME("%p %s\n", pm, debugstr_guid(clsid));
290  return E_FAIL;
291 }
static LPMONITOREX pm
Definition: localmon.c:45
#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:82

◆ AtlModuleUnregisterServerEx()

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

Definition at line 171 of file atl30.c.

172 {
173  FIXME("(%p, %i, %p) stub\n", pM, bUnRegTypeLib, pCLSID);
174  return S_OK;
175 }
#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 450 of file atl30.c.

452 {
453  TRACE("(%p %s %d %p %p)\n", pM, debugstr_w(lpszRes), bRegister, pMapEntries, pReg);
454 
455  return AtlUpdateRegistryFromResourceD(pM->m_hInst, lpszRes, bRegister, pMapEntries, pReg);
456 }
#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:706

◆ AtlRegisterClassCategoriesHelper()

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

Definition at line 747 of file atl.c.

748 {
749  const struct _ATL_CATMAP_ENTRY *iter;
750  HRESULT hres;
751 
752  TRACE("(%s %p %x)\n", debugstr_guid(clsid), catmap, reg);
753 
754  if(!catmap)
755  return S_OK;
756 
757  if(!catreg) {
758  ICatRegister *new_catreg;
759 
760  hres = CoCreateInstance(&CLSID_StdComponentCategoriesMgr, NULL, CLSCTX_INPROC_SERVER,
761  &IID_ICatRegister, (void**)&new_catreg);
762  if(FAILED(hres))
763  return hres;
764 
765  if(InterlockedCompareExchangePointer((void**)&catreg, new_catreg, NULL))
766  ICatRegister_Release(new_catreg);
767  }
768 
769  for(iter = catmap; iter->iType != _ATL_CATMAP_ENTRY_END; iter++) {
770  CATID catid = *iter->pcatid; /* For stupid lack of const in ICatRegister declaration. */
771 
772  if(iter->iType == _ATL_CATMAP_ENTRY_IMPLEMENTED) {
773  if(reg)
774  hres = ICatRegister_RegisterClassImplCategories(catreg, clsid, 1, &catid);
775  else
776  hres = ICatRegister_UnRegisterClassImplCategories(catreg, clsid, 1, &catid);
777  }else {
778  if(reg)
779  hres = ICatRegister_RegisterClassReqCategories(catreg, clsid, 1, &catid);
780  else
781  hres = ICatRegister_UnRegisterClassReqCategories(catreg, clsid, 1, &catid);
782  }
783  if(FAILED(hres))
784  return hres;
785  }
786 
787  if(!reg) {
788  WCHAR reg_path[256] = {'C','L','S','I','D','\\'}, *ptr = reg_path+6;
789 
790  static const WCHAR implemented_catW[] =
791  {'I','m','p','l','e','m','e','n','t','e','d',' ','C','a','t','e','g','o','r','i','e','s',0};
792  static const WCHAR required_catW[] =
793  {'R','e','q','u','i','r','e','d',' ','C','a','t','e','g','o','r','i','e','s',0};
794 
795  ptr += StringFromGUID2(clsid, ptr, 64)-1;
796  *ptr++ = '\\';
797 
798  memcpy(ptr, implemented_catW, sizeof(implemented_catW));
799  RegDeleteKeyW(HKEY_CLASSES_ROOT, reg_path);
800 
801  memcpy(ptr, required_catW, sizeof(required_catW));
802  RegDeleteKeyW(HKEY_CLASSES_ROOT, reg_path);
803  }
804 
805  return S_OK;
806 }
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:40
#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:2434
REFCLSID clsid
Definition: msctf.c:82
#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:3325
#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 73 of file atl.c.

74 {
77  HRESULT hres;
78 
79  TRACE("%p %p %d\n", pUnkCP, iid, dw);
80 
81  if(!pUnkCP)
82  return E_INVALIDARG;
83 
84  hres = IUnknown_QueryInterface(pUnkCP, &IID_IConnectionPointContainer, (void**)&container);
85  if(FAILED(hres))
86  return hres;
87 
88  hres = IConnectionPointContainer_FindConnectionPoint(container, iid, &cp);
89  IConnectionPointContainer_Release(container);
90  if(FAILED(hres))
91  return hres;
92 
93  hres = IConnectionPoint_Unadvise(cp, dw);
94  IConnectionPoint_Release(cp);
95  return hres;
96 }
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 119 of file atl.c.

120 {
121  FIXME("%p %p %p\n", stm, iid, ppUnk);
122  return E_FAIL;
123 }
#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 706 of file registrar.c.

708 {
709  const struct _ATL_REGMAP_ENTRY *iter;
711  IRegistrar *registrar;
712  HRESULT hres;
713 
714  static const WCHAR moduleW[] = {'M','O','D','U','L','E',0};
715  static const WCHAR registryW[] = {'R','E','G','I','S','T','R','Y',0};
716 
718  FIXME("hinst %p: did not get module name\n", inst);
719  return E_FAIL;
720  }
721 
722  TRACE("%p (%s), %s, %d, %p, %p\n", inst, debugstr_w(module_name),
723  debugstr_w(res), bRegister, pMapEntries, pReg);
724 
725  if(pReg) {
726  registrar = pReg;
727  }else {
728  hres = AtlCreateRegistrar(&registrar);
729  if(FAILED(hres))
730  return hres;
731  }
732 
733  IRegistrar_AddReplacement(registrar, moduleW, module_name);
734 
735  for (iter = pMapEntries; iter && iter->szKey; iter++)
736  IRegistrar_AddReplacement(registrar, iter->szKey, iter->szData);
737 
738  if(bRegister)
739  hres = IRegistrar_ResourceRegisterSz(registrar, module_name, res, registryW);
740  else
741  hres = IRegistrar_ResourceUnregisterSz(registrar, module_name, res, registryW);
742 
743  if(registrar != pReg)
744  IRegistrar_Release(registrar);
745  return hres;
746 }
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:609
LPCOLESTR szData
Definition: atlbase.h:244
HRESULT WINAPI AtlCreateRegistrar(IRegistrar **ret)
Definition: registrar.c:687
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 811 of file atl.c.

812 {
813  MSG msg;
814  DWORD res;
815 
816  TRACE("(%p)\n", handle);
817 
818  while(1) {
820  switch(res) {
821  case WAIT_OBJECT_0:
822  return TRUE;
823  case WAIT_OBJECT_0+1:
824  if(GetMessageW(&msg, NULL, 0, 0) < 0)
825  return FALSE;
826 
829  break;
830  default:
831  return FALSE;
832  }
833  }
834 }
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)