ReactOS 0.4.15-dev-7958-gcd0bb1a
factory.h
Go to the documentation of this file.
1/* Copyright (c) Mark Harmstone 2016-17
2 *
3 * This file is part of WinBtrfs.
4 *
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.
9 *
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.
14 *
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/>. */
17
18#pragma once
19
20extern LONG objs_loaded;
21
22typedef enum {
29
30class Factory : public IClassFactory {
31public:
33 refcount = 0;
36 }
37
38 virtual ~Factory() {
40 }
41
42 // IUnknown
43
45
48 }
49
52
53 if (rc == 0)
54 delete this;
55
56 return rc;
57 }
58
59 // IClassFactory
60
61 virtual HRESULT __stdcall CreateInstance(IUnknown* pUnknownOuter, const IID& iid, void** ppv);
62 virtual HRESULT __stdcall LockServer(BOOL bLock);
63
65
66private:
68};
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
HRESULT __stdcall QueryInterface(REFIID riid, void **ppObj)
Definition: factory.cpp:26
factory_type type
Definition: factory.h:64
virtual HRESULT __stdcall LockServer(BOOL bLock)
Definition: factory.cpp:39
LONG refcount
Definition: factory.h:67
virtual ~Factory()
Definition: factory.h:38
ULONG __stdcall Release()
Definition: factory.h:50
Factory()
Definition: factory.h:32
ULONG __stdcall AddRef()
Definition: factory.h:46
virtual HRESULT __stdcall CreateInstance(IUnknown *pUnknownOuter, const IID &iid, void **ppv)
Definition: factory.cpp:43
LONG objs_loaded
Definition: main.cpp:48
factory_type
Definition: factory.h:22
@ FactoryContextMenu
Definition: factory.h:25
@ FactoryUnknown
Definition: factory.h:23
@ FactoryIconHandler
Definition: factory.h:24
@ FactoryVolPropSheet
Definition: factory.h:27
@ FactoryPropSheet
Definition: factory.h:26
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
long LONG
Definition: pedump.c:60
#define REFIID
Definition: guiddef.h:118
#define __stdcall
Definition: typedefs.h:25
uint32_t ULONG
Definition: typedefs.h:59