1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 // Note: Proxy/Stub Information
22 // To build a separate proxy/stub DLL,
23 // run nmake -f AxTestComponentsps.mk in the project directory.
35 BEGIN_OBJECT_MAP(ObjectMap
)
36 OBJECT_ENTRY(CLSID_Basic
, CBasic
)
37 OBJECT_ENTRY(CLSID_Foo
, CFoo
)
44 BOOL WINAPI
DllMain(HINSTANCE hInstance
, DWORD dwReason
, LPVOID
/*lpReserved*/)
46 if (dwReason
== DLL_PROCESS_ATTACH
)
48 _Module
.Init(ObjectMap
, hInstance
, &LIBID_AXTESTCOMPONENTSLib
);
49 DisableThreadLibraryCalls(hInstance
);
51 else if (dwReason
== DLL_PROCESS_DETACH
)
57 // Used to determine whether the DLL can be unloaded by OLE
59 STDAPI
DllCanUnloadNow(void)
61 return (_Module
.GetLockCount()==0) ? S_OK
: S_FALSE
;
65 // Returns a class factory to create an object of the requested type
67 STDAPI
DllGetClassObject(REFCLSID rclsid
, REFIID riid
, LPVOID
* ppv
)
69 return _Module
.GetClassObject(rclsid
, riid
, ppv
);
73 // DllRegisterServer - Adds entries to the system registry
75 STDAPI
DllRegisterServer(void)
77 // registers object, typelib and all interfaces in typelib
78 return _Module
.RegisterServer(TRUE
);
82 // DllUnregisterServer - Removes entries from the system registry
84 STDAPI
DllUnregisterServer(void)
86 return _Module
.UnregisterServer(TRUE
);
90 //VT_I4 size_t V_ERROR VARIANT VARIANT_FALSE CComVariant FADF_EMBEDDED
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */