* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <precomp.h>
-
#include <stdio.h>
-#include <rpcproxy.h>
+
+#define COBJMACROS
+
+#include "objidl.h"
+#include "rpcproxy.h"
+#include "wine/atlbase.h"
+#include "wine/atlwin.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(atl);
extern HINSTANCE atl_instance;
if (!wci->m_wc.lpszClassName)
{
- snprintf(wci->m_szAutoName, sizeof(wci->m_szAutoName), "ATL%08lx", (UINT_PTR)wci);
+#ifdef __REACTOS__
+ sprintf(wci->m_szAutoName, "ATL:%p", wci);
+#else
+ sprintf(wci->m_szAutoName, "ATL%08lx", (UINT_PTR)wci);
+#endif
TRACE("auto-generated class name %s\n", wci->m_szAutoName);
wci->m_wc.lpszClassName = wci->m_szAutoName;
}
if (!wci->m_wc.lpszClassName)
{
+#ifdef __REACTOS__
+ static const WCHAR szFormat[] = {'A','T','L',':','%','p',0};
+#else
static const WCHAR szFormat[] = {'A','T','L','%','0','8','l','x',0};
- snprintfW(wci->m_szAutoName, sizeof(wci->m_szAutoName)/sizeof(WCHAR), szFormat, (UINT_PTR)wci);
+#endif
+ swprintf(wci->m_szAutoName, szFormat, (UINT_PTR)wci);
TRACE("auto-generated class name %s\n", debugstr_w(wci->m_szAutoName));
wci->m_wc.lpszClassName = wci->m_szAutoName;
}
*/
HRESULT WINAPI DllRegisterServer(void)
{
+#ifdef __REACTOS__
/* Note: we can't use __wine_register_server here because it uses CLSID_Registrar which isn't registred yet */
return do_register_server(TRUE);
+#else
+ return __wine_register_resources( atl_instance );
+#endif
}
/***********************************************************************
*/
HRESULT WINAPI DllUnregisterServer(void)
{
+#ifdef __REACTOS__
return do_register_server(FALSE);
+#else
+ return __wine_unregister_resources( atl_instance );
+#endif
}
/***********************************************************************