1 /* Copyright (c) Mark Harmstone 2016
3 * This file is part of WinBtrfs.
5 * WinBtrfs is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public Licence as published by
7 * the Free Software Foundation, either version 3 of the Licence, or
8 * (at your option) any later version.
10 * WinBtrfs is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public Licence for more details.
15 * You should have received a copy of the GNU Lesser General Public Licence
16 * along with WinBtrfs. If not, see <http://www.gnu.org/licenses/>. */
18 extern LONG objs_loaded
;
27 class Factory
: public IClassFactory
{
31 type
= FactoryUnknown
;
32 InterlockedIncrement(&objs_loaded
);
36 InterlockedDecrement(&objs_loaded
);
41 HRESULT __stdcall
QueryInterface(REFIID riid
, void **ppObj
);
43 ULONG __stdcall
AddRef() {
44 return InterlockedIncrement(&refcount
);
47 ULONG __stdcall
Release() {
48 LONG rc
= InterlockedDecrement(&refcount
);
58 virtual HRESULT __stdcall
CreateInstance(IUnknown
* pUnknownOuter
, const IID
& iid
, void** ppv
);
59 virtual HRESULT __stdcall
LockServer(BOOL bLock
);