2004-08-24 23:00:15 +02:00
|
|
|
/*
|
|
|
|
* ITSS Class Factory
|
|
|
|
*
|
|
|
|
* Copyright 2002 Lionel Ulmer
|
|
|
|
* Copyright 2004 Mike McCormack
|
|
|
|
*
|
|
|
|
* see http://bonedaddy.net/pabs3/hhm/#chmspec
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2004-08-24 23:00:15 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2004-10-07 05:06:48 +02:00
|
|
|
#define COBJMACROS
|
|
|
|
|
2004-08-24 23:00:15 +02:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winuser.h"
|
|
|
|
#include "winreg.h"
|
|
|
|
#include "ole2.h"
|
2010-12-13 21:18:15 +01:00
|
|
|
#include "rpcproxy.h"
|
2006-12-23 23:50:53 +01:00
|
|
|
#include "advpub.h"
|
2004-08-24 23:00:15 +02:00
|
|
|
|
|
|
|
#include "wine/unicode.h"
|
|
|
|
#include "wine/debug.h"
|
|
|
|
|
2004-08-25 19:30:18 +02:00
|
|
|
#include "itsstor.h"
|
|
|
|
|
2005-08-25 12:25:14 +02:00
|
|
|
#include "initguid.h"
|
|
|
|
#include "wine/itss.h"
|
2005-06-23 18:44:28 +02:00
|
|
|
|
2004-08-24 23:00:15 +02:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(itss);
|
|
|
|
|
|
|
|
static HRESULT ITSS_create(IUnknown *pUnkOuter, LPVOID *ppObj);
|
|
|
|
|
2005-07-13 13:59:15 +02:00
|
|
|
LONG dll_count = 0;
|
2006-12-23 23:50:53 +01:00
|
|
|
static HINSTANCE hInst;
|
2005-01-03 15:39:51 +01:00
|
|
|
|
2004-08-24 23:00:15 +02:00
|
|
|
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
|
|
|
{
|
|
|
|
switch(fdwReason) {
|
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
DisableThreadLibraryCalls(hInstDLL);
|
2006-12-23 23:50:53 +01:00
|
|
|
hInst = hInstDLL;
|
2004-08-24 23:00:15 +02:00
|
|
|
break;
|
|
|
|
case DLL_PROCESS_DETACH:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* ITSS ClassFactory
|
|
|
|
*/
|
|
|
|
typedef struct {
|
2010-12-05 15:16:28 +01:00
|
|
|
IClassFactory IClassFactory_iface;
|
2004-08-24 23:00:15 +02:00
|
|
|
HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj);
|
|
|
|
} IClassFactoryImpl;
|
|
|
|
|
2010-12-05 15:16:28 +01:00
|
|
|
static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface);
|
|
|
|
}
|
|
|
|
|
2004-08-24 23:00:15 +02:00
|
|
|
static HRESULT WINAPI
|
|
|
|
ITSSCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
|
|
|
|
{
|
2010-12-05 15:16:28 +01:00
|
|
|
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
2004-08-24 23:00:15 +02:00
|
|
|
|
2006-08-22 10:17:23 +02:00
|
|
|
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IClassFactory))
|
2004-08-24 23:00:15 +02:00
|
|
|
{
|
|
|
|
IClassFactory_AddRef(iface);
|
|
|
|
*ppobj = This;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2004-09-28 21:19:27 +02:00
|
|
|
static ULONG WINAPI ITSSCF_AddRef(LPCLASSFACTORY iface)
|
|
|
|
{
|
2006-12-23 23:51:55 +01:00
|
|
|
ITSS_LockModule();
|
2006-08-22 10:17:23 +02:00
|
|
|
return 2;
|
2004-08-24 23:00:15 +02:00
|
|
|
}
|
|
|
|
|
2004-09-28 21:19:27 +02:00
|
|
|
static ULONG WINAPI ITSSCF_Release(LPCLASSFACTORY iface)
|
|
|
|
{
|
2006-12-23 23:51:55 +01:00
|
|
|
ITSS_UnlockModule();
|
2006-08-22 10:17:23 +02:00
|
|
|
return 1;
|
2004-08-24 23:00:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static HRESULT WINAPI ITSSCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter,
|
2004-09-28 21:19:27 +02:00
|
|
|
REFIID riid, LPVOID *ppobj)
|
|
|
|
{
|
2010-12-05 15:16:28 +01:00
|
|
|
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
2004-08-24 23:00:15 +02:00
|
|
|
HRESULT hres;
|
|
|
|
LPUNKNOWN punk;
|
2006-08-22 10:17:23 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
|
2004-08-24 23:00:15 +02:00
|
|
|
|
2004-09-28 21:19:27 +02:00
|
|
|
*ppobj = NULL;
|
2004-08-24 23:00:15 +02:00
|
|
|
hres = This->pfnCreateInstance(pOuter, (LPVOID *) &punk);
|
2004-09-28 21:19:27 +02:00
|
|
|
if (SUCCEEDED(hres)) {
|
|
|
|
hres = IUnknown_QueryInterface(punk, riid, ppobj);
|
|
|
|
IUnknown_Release(punk);
|
2004-08-24 23:00:15 +02:00
|
|
|
}
|
|
|
|
return hres;
|
|
|
|
}
|
|
|
|
|
2005-02-22 20:30:24 +01:00
|
|
|
static HRESULT WINAPI ITSSCF_LockServer(LPCLASSFACTORY iface, BOOL dolock)
|
2004-09-28 21:19:27 +02:00
|
|
|
{
|
2005-02-22 20:30:24 +01:00
|
|
|
TRACE("(%p)->(%d)\n", iface, dolock);
|
|
|
|
|
2006-08-22 10:17:23 +02:00
|
|
|
if (dolock)
|
2006-12-23 23:51:55 +01:00
|
|
|
ITSS_LockModule();
|
2005-02-22 20:30:24 +01:00
|
|
|
else
|
2006-12-23 23:51:55 +01:00
|
|
|
ITSS_UnlockModule();
|
2005-02-22 20:30:24 +01:00
|
|
|
|
2004-08-24 23:00:15 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2005-06-01 21:57:42 +02:00
|
|
|
static const IClassFactoryVtbl ITSSCF_Vtbl =
|
2004-08-24 23:00:15 +02:00
|
|
|
{
|
|
|
|
ITSSCF_QueryInterface,
|
|
|
|
ITSSCF_AddRef,
|
|
|
|
ITSSCF_Release,
|
|
|
|
ITSSCF_CreateInstance,
|
|
|
|
ITSSCF_LockServer
|
|
|
|
};
|
|
|
|
|
2010-12-05 15:16:28 +01:00
|
|
|
static const IClassFactoryImpl ITStorage_factory = { { &ITSSCF_Vtbl }, ITSS_create };
|
|
|
|
static const IClassFactoryImpl MSITStore_factory = { { &ITSSCF_Vtbl }, ITS_IParseDisplayName_create };
|
|
|
|
static const IClassFactoryImpl ITSProtocol_factory = { { &ITSSCF_Vtbl }, ITSProtocol_create };
|
2004-08-24 23:00:15 +02:00
|
|
|
|
2005-03-21 11:55:13 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* DllGetClassObject (ITSS.@)
|
|
|
|
*/
|
2005-01-14 18:21:00 +01:00
|
|
|
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
|
2004-08-24 23:00:15 +02:00
|
|
|
{
|
2006-08-22 10:17:23 +02:00
|
|
|
const IClassFactoryImpl *factory;
|
2004-08-24 23:00:15 +02:00
|
|
|
|
2006-08-22 10:17:23 +02:00
|
|
|
TRACE("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
|
2004-08-24 23:00:15 +02:00
|
|
|
|
2006-08-22 10:17:23 +02:00
|
|
|
if (IsEqualGUID(&CLSID_ITStorage, rclsid))
|
|
|
|
factory = &ITStorage_factory;
|
2006-12-23 23:48:57 +01:00
|
|
|
else if (IsEqualGUID(&CLSID_MSITStore, rclsid))
|
|
|
|
factory = &MSITStore_factory;
|
2006-12-24 01:22:30 +01:00
|
|
|
else if (IsEqualGUID(&CLSID_ITSProtocol, rclsid))
|
|
|
|
factory = &ITSProtocol_factory;
|
2006-08-22 10:17:23 +02:00
|
|
|
else
|
2004-08-24 23:00:15 +02:00
|
|
|
{
|
|
|
|
FIXME("%s: no class found.\n", debugstr_guid(rclsid));
|
|
|
|
return CLASS_E_CLASSNOTAVAILABLE;
|
|
|
|
}
|
|
|
|
|
2006-08-22 10:17:23 +02:00
|
|
|
return IUnknown_QueryInterface( (IUnknown*) factory, iid, ppv );
|
2004-08-24 23:00:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
typedef struct {
|
2010-12-05 15:16:28 +01:00
|
|
|
IITStorage IITStorage_iface;
|
2005-07-12 21:21:36 +02:00
|
|
|
LONG ref;
|
2004-08-24 23:00:15 +02:00
|
|
|
} ITStorageImpl;
|
|
|
|
|
2010-12-05 15:16:28 +01:00
|
|
|
static inline ITStorageImpl *impl_from_IITStorage(IITStorage *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, ITStorageImpl, IITStorage_iface);
|
|
|
|
}
|
|
|
|
|
2004-08-24 23:00:15 +02:00
|
|
|
|
2006-06-10 11:58:27 +02:00
|
|
|
static HRESULT WINAPI ITStorageImpl_QueryInterface(
|
2004-08-24 23:00:15 +02:00
|
|
|
IITStorage* iface,
|
|
|
|
REFIID riid,
|
|
|
|
void** ppvObject)
|
|
|
|
{
|
2010-12-05 15:16:28 +01:00
|
|
|
ITStorageImpl *This = impl_from_IITStorage(iface);
|
2004-08-24 23:00:15 +02:00
|
|
|
if (IsEqualGUID(riid, &IID_IUnknown)
|
|
|
|
|| IsEqualGUID(riid, &IID_IITStorage))
|
|
|
|
{
|
2012-08-19 17:48:22 +02:00
|
|
|
IITStorage_AddRef(iface);
|
|
|
|
*ppvObject = iface;
|
2004-08-24 23:00:15 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2006-06-10 11:58:27 +02:00
|
|
|
static ULONG WINAPI ITStorageImpl_AddRef(
|
2004-08-24 23:00:15 +02:00
|
|
|
IITStorage* iface)
|
|
|
|
{
|
2010-12-05 15:16:28 +01:00
|
|
|
ITStorageImpl *This = impl_from_IITStorage(iface);
|
2004-08-24 23:00:15 +02:00
|
|
|
TRACE("%p\n", This);
|
2004-11-19 19:03:56 +01:00
|
|
|
return InterlockedIncrement(&This->ref);
|
2004-08-24 23:00:15 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:58:27 +02:00
|
|
|
static ULONG WINAPI ITStorageImpl_Release(
|
2004-08-24 23:00:15 +02:00
|
|
|
IITStorage* iface)
|
|
|
|
{
|
2010-12-05 15:16:28 +01:00
|
|
|
ITStorageImpl *This = impl_from_IITStorage(iface);
|
2004-11-19 19:03:56 +01:00
|
|
|
ULONG ref = InterlockedDecrement(&This->ref);
|
2004-08-24 23:00:15 +02:00
|
|
|
|
2005-01-03 15:39:51 +01:00
|
|
|
if (ref == 0) {
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
2006-12-23 23:51:55 +01:00
|
|
|
ITSS_UnlockModule();
|
2005-01-03 15:39:51 +01:00
|
|
|
}
|
2004-08-24 23:00:15 +02:00
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
2006-06-10 11:58:27 +02:00
|
|
|
static HRESULT WINAPI ITStorageImpl_StgCreateDocfile(
|
2004-08-24 23:00:15 +02:00
|
|
|
IITStorage* iface,
|
|
|
|
const WCHAR* pwcsName,
|
|
|
|
DWORD grfMode,
|
|
|
|
DWORD reserved,
|
|
|
|
IStorage** ppstgOpen)
|
|
|
|
{
|
2010-12-05 15:16:28 +01:00
|
|
|
ITStorageImpl *This = impl_from_IITStorage(iface);
|
2004-08-24 23:00:15 +02:00
|
|
|
|
2006-10-12 20:56:50 +02:00
|
|
|
TRACE("%p %s %u %u %p\n", This,
|
2004-08-24 23:00:15 +02:00
|
|
|
debugstr_w(pwcsName), grfMode, reserved, ppstgOpen );
|
|
|
|
|
|
|
|
return ITSS_StgOpenStorage( pwcsName, NULL, grfMode,
|
|
|
|
0, reserved, ppstgOpen);
|
|
|
|
}
|
|
|
|
|
2006-06-10 11:58:27 +02:00
|
|
|
static HRESULT WINAPI ITStorageImpl_StgCreateDocfileOnILockBytes(
|
2004-08-24 23:00:15 +02:00
|
|
|
IITStorage* iface,
|
|
|
|
ILockBytes* plkbyt,
|
|
|
|
DWORD grfMode,
|
|
|
|
DWORD reserved,
|
|
|
|
IStorage** ppstgOpen)
|
|
|
|
{
|
2010-12-05 15:16:28 +01:00
|
|
|
ITStorageImpl *This = impl_from_IITStorage(iface);
|
2004-08-24 23:00:15 +02:00
|
|
|
FIXME("%p\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2006-06-10 11:58:27 +02:00
|
|
|
static HRESULT WINAPI ITStorageImpl_StgIsStorageFile(
|
2004-08-24 23:00:15 +02:00
|
|
|
IITStorage* iface,
|
|
|
|
const WCHAR* pwcsName)
|
|
|
|
{
|
2010-12-05 15:16:28 +01:00
|
|
|
ITStorageImpl *This = impl_from_IITStorage(iface);
|
2004-08-24 23:00:15 +02:00
|
|
|
FIXME("%p\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2006-06-10 11:58:27 +02:00
|
|
|
static HRESULT WINAPI ITStorageImpl_StgIsStorageILockBytes(
|
2004-08-24 23:00:15 +02:00
|
|
|
IITStorage* iface,
|
|
|
|
ILockBytes* plkbyt)
|
|
|
|
{
|
2010-12-05 15:16:28 +01:00
|
|
|
ITStorageImpl *This = impl_from_IITStorage(iface);
|
2004-08-24 23:00:15 +02:00
|
|
|
FIXME("%p\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2006-06-10 11:58:27 +02:00
|
|
|
static HRESULT WINAPI ITStorageImpl_StgOpenStorage(
|
2004-08-24 23:00:15 +02:00
|
|
|
IITStorage* iface,
|
|
|
|
const WCHAR* pwcsName,
|
|
|
|
IStorage* pstgPriority,
|
|
|
|
DWORD grfMode,
|
|
|
|
SNB snbExclude,
|
|
|
|
DWORD reserved,
|
|
|
|
IStorage** ppstgOpen)
|
|
|
|
{
|
2010-12-05 15:16:28 +01:00
|
|
|
ITStorageImpl *This = impl_from_IITStorage(iface);
|
2004-08-24 23:00:15 +02:00
|
|
|
|
2006-10-12 20:56:50 +02:00
|
|
|
TRACE("%p %s %p %d %p\n", This, debugstr_w( pwcsName ),
|
2004-08-24 23:00:15 +02:00
|
|
|
pstgPriority, grfMode, snbExclude );
|
|
|
|
|
|
|
|
return ITSS_StgOpenStorage( pwcsName, pstgPriority, grfMode,
|
|
|
|
snbExclude, reserved, ppstgOpen);
|
|
|
|
}
|
|
|
|
|
2006-06-10 11:58:27 +02:00
|
|
|
static HRESULT WINAPI ITStorageImpl_StgOpenStorageOnILockBytes(
|
2004-08-24 23:00:15 +02:00
|
|
|
IITStorage* iface,
|
|
|
|
ILockBytes* plkbyt,
|
|
|
|
IStorage* pStgPriority,
|
|
|
|
DWORD grfMode,
|
|
|
|
SNB snbExclude,
|
|
|
|
DWORD reserved,
|
|
|
|
IStorage** ppstgOpen)
|
|
|
|
{
|
2010-12-05 15:16:28 +01:00
|
|
|
ITStorageImpl *This = impl_from_IITStorage(iface);
|
2004-08-24 23:00:15 +02:00
|
|
|
FIXME("%p\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2006-06-10 11:58:27 +02:00
|
|
|
static HRESULT WINAPI ITStorageImpl_StgSetTimes(
|
2004-08-24 23:00:15 +02:00
|
|
|
IITStorage* iface,
|
2008-04-30 11:45:21 +02:00
|
|
|
const WCHAR* lpszName,
|
|
|
|
const FILETIME* pctime,
|
|
|
|
const FILETIME* patime,
|
|
|
|
const FILETIME* pmtime)
|
2004-08-24 23:00:15 +02:00
|
|
|
{
|
2010-12-05 15:16:28 +01:00
|
|
|
ITStorageImpl *This = impl_from_IITStorage(iface);
|
2004-08-24 23:00:15 +02:00
|
|
|
FIXME("%p\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2006-06-10 11:58:27 +02:00
|
|
|
static HRESULT WINAPI ITStorageImpl_SetControlData(
|
2004-08-24 23:00:15 +02:00
|
|
|
IITStorage* iface,
|
|
|
|
PITS_Control_Data pControlData)
|
|
|
|
{
|
2010-12-05 15:16:28 +01:00
|
|
|
ITStorageImpl *This = impl_from_IITStorage(iface);
|
2004-08-24 23:00:15 +02:00
|
|
|
FIXME("%p\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2006-06-10 11:58:27 +02:00
|
|
|
static HRESULT WINAPI ITStorageImpl_DefaultControlData(
|
2004-08-24 23:00:15 +02:00
|
|
|
IITStorage* iface,
|
|
|
|
PITS_Control_Data* ppControlData)
|
|
|
|
{
|
2010-12-05 15:16:28 +01:00
|
|
|
ITStorageImpl *This = impl_from_IITStorage(iface);
|
2004-08-24 23:00:15 +02:00
|
|
|
FIXME("%p\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2006-06-10 11:58:27 +02:00
|
|
|
static HRESULT WINAPI ITStorageImpl_Compact(
|
2004-08-24 23:00:15 +02:00
|
|
|
IITStorage* iface,
|
|
|
|
const WCHAR* pwcsName,
|
|
|
|
ECompactionLev iLev)
|
|
|
|
{
|
2010-12-05 15:16:28 +01:00
|
|
|
ITStorageImpl *This = impl_from_IITStorage(iface);
|
2004-08-24 23:00:15 +02:00
|
|
|
FIXME("%p\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2005-06-01 21:57:42 +02:00
|
|
|
static const IITStorageVtbl ITStorageImpl_Vtbl =
|
2004-08-24 23:00:15 +02:00
|
|
|
{
|
|
|
|
ITStorageImpl_QueryInterface,
|
|
|
|
ITStorageImpl_AddRef,
|
|
|
|
ITStorageImpl_Release,
|
|
|
|
ITStorageImpl_StgCreateDocfile,
|
|
|
|
ITStorageImpl_StgCreateDocfileOnILockBytes,
|
|
|
|
ITStorageImpl_StgIsStorageFile,
|
|
|
|
ITStorageImpl_StgIsStorageILockBytes,
|
|
|
|
ITStorageImpl_StgOpenStorage,
|
|
|
|
ITStorageImpl_StgOpenStorageOnILockBytes,
|
|
|
|
ITStorageImpl_StgSetTimes,
|
|
|
|
ITStorageImpl_SetControlData,
|
|
|
|
ITStorageImpl_DefaultControlData,
|
|
|
|
ITStorageImpl_Compact,
|
|
|
|
};
|
|
|
|
|
|
|
|
static HRESULT ITSS_create(IUnknown *pUnkOuter, LPVOID *ppObj)
|
|
|
|
{
|
|
|
|
ITStorageImpl *its;
|
|
|
|
|
2004-10-18 23:21:19 +02:00
|
|
|
if( pUnkOuter )
|
|
|
|
return CLASS_E_NOAGGREGATION;
|
|
|
|
|
2004-08-24 23:00:15 +02:00
|
|
|
its = HeapAlloc( GetProcessHeap(), 0, sizeof(ITStorageImpl) );
|
2010-12-05 15:16:28 +01:00
|
|
|
its->IITStorage_iface.lpVtbl = &ITStorageImpl_Vtbl;
|
2004-08-24 23:00:15 +02:00
|
|
|
its->ref = 1;
|
|
|
|
|
|
|
|
TRACE("-> %p\n", its);
|
2009-01-26 11:01:19 +01:00
|
|
|
*ppObj = its;
|
2004-08-24 23:00:15 +02:00
|
|
|
|
2006-12-23 23:51:55 +01:00
|
|
|
ITSS_LockModule();
|
2004-08-24 23:00:15 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
2005-01-14 18:21:00 +01:00
|
|
|
HRESULT WINAPI DllCanUnloadNow(void)
|
2004-08-24 23:00:15 +02:00
|
|
|
{
|
2006-10-12 20:56:50 +02:00
|
|
|
TRACE("dll_count = %u\n", dll_count);
|
2005-01-03 15:39:51 +01:00
|
|
|
return dll_count ? S_FALSE : S_OK;
|
2004-08-24 23:00:15 +02:00
|
|
|
}
|
2006-12-23 23:50:53 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* DllRegisterServer (ITSS.@)
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI DllRegisterServer(void)
|
|
|
|
{
|
2011-08-02 15:51:55 +02:00
|
|
|
return __wine_register_resources( hInst );
|
2006-12-23 23:50:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* DllUnregisterServer (ITSS.@)
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI DllUnregisterServer(void)
|
|
|
|
{
|
2011-08-02 15:51:55 +02:00
|
|
|
return __wine_unregister_resources( hInst );
|
2006-12-23 23:50:53 +01:00
|
|
|
}
|