6 #define WIN32_NO_STATUS
8 #define COM_NO_WINDOWS_H
15 #include <shlobj_undoc.h>
16 #include <shlguid_undoc.h>
17 #include <shdeprecated.h>
25 #include <shlwapi_undoc.h>
26 #include <wine/debug.h>
31 #include "addressband.h"
32 #include "addresseditbox.h"
33 #include "bandproxy.h"
35 #include "bandsitemenu.h"
36 #include "brandband.h"
37 #include "internettoolbar.h"
38 #include "commonbrowser.h"
39 #include "globalfoldersettings.h"
40 #include "regtreeoptions.h"
44 Win32DbgPrint(const char *filename
, int line
, const char *lpFormat
, ...)
52 fname
= strrchr(filename
, '\\');
55 fname
= strrchr(filename
, '/');
65 szMsgStart
= szMsg
+ sprintf(szMsg
, "%s:%d: ", fname
, line
);
67 va_start(vl
, lpFormat
);
68 uRet
= (ULONG
) vsprintf(szMsgStart
, lpFormat
, vl
);
71 OutputDebugStringA(szMsg
);
76 #define DbgPrint(fmt, ...) \
77 Win32DbgPrint(__FILE__, __LINE__, fmt, ##__VA_ARGS__)
80 #define FAILED_UNEXPECTEDLY(hr) (FAILED(hr) && (DbgPrint("Unexpected failure %08x.\n", hr), TRUE))
82 #define FAILED_UNEXPECTEDLY(hr) FAILED(hr)
87 class CComDebugObject
: public Base
90 CComDebugObject(void * = NULL
)
95 virtual ~CComDebugObject()
98 _pAtlModule
->Unlock();
101 STDMETHOD_(ULONG
, AddRef
)()
103 int rc
= this->InternalAddRef();
104 DbgPrint("RefCount is now %d(++)!\n", rc
);
108 STDMETHOD_(ULONG
, Release
)()
112 newRefCount
= this->InternalRelease();
113 DbgPrint("RefCount is now %d(--)!\n", newRefCount
);
114 if (newRefCount
== 0)
119 STDMETHOD(QueryInterface
)(REFIID iid
, void **ppvObject
)
121 return this->_InternalQueryInterface(iid
, ppvObject
);
124 static HRESULT WINAPI
CreateInstance(CComDebugObject
<Base
> **pp
)
126 CComDebugObject
<Base
> *newInstance
;
129 ATLASSERT(pp
!= NULL
);
133 hResult
= E_OUTOFMEMORY
;
135 ATLTRY(newInstance
= new CComDebugObject
<Base
>())
136 if (newInstance
!= NULL
)
138 newInstance
->SetVoid(NULL
);
139 newInstance
->InternalFinalConstructAddRef();
140 hResult
= newInstance
->_AtlInitialConstruct();
141 if (SUCCEEDED(hResult
))
142 hResult
= newInstance
->FinalConstruct();
143 if (SUCCEEDED(hResult
))
144 hResult
= newInstance
->_AtlFinalConstruct();
145 newInstance
->InternalFinalConstructRelease();
157 WINE_DEFAULT_DEBUG_CHANNEL(browseui
);
159 #endif /* _BROWSEUI_PCH_ */