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 .
19 // MfcControl.cpp : Implementation of CMfcControlApp and DLL registration.
22 #include "MfcControl.h"
27 static char THIS_FILE
[] = __FILE__
;
30 CMfcControlApp theApp
;
32 const GUID CDECL BASED_CODE _tlid
33 = { 0xac221fb3, 0xa0d8, 0x11d4, { 0x83, 0x3b, 0, 0x50, 0x4, 0x52, 0x6a, 0xb4 } };
34 const WORD _wVerMajor
= 1;
35 const WORD _wVerMinor
= 0;
37 // CMfcControlApp::InitInstance - DLL initialization
39 BOOL
CMfcControlApp::InitInstance()
41 BOOL bInit
= COleControlModule::InitInstance();
45 // TODO: Add your own module initialization code here.
51 // CMfcControlApp::ExitInstance - DLL termination
53 int CMfcControlApp::ExitInstance()
55 // TODO: Add your own module termination code here.
57 return COleControlModule::ExitInstance();
60 // DllRegisterServer - Adds entries to the system registry
62 STDAPI
DllRegisterServer(void)
64 AFX_MANAGE_STATE(_afxModuleAddrThis
);
66 if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid
))
67 return ResultFromScode(SELFREG_E_TYPELIB
);
69 if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE
))
70 return ResultFromScode(SELFREG_E_CLASS
);
75 // DllUnregisterServer - Removes entries from the system registry
77 STDAPI
DllUnregisterServer(void)
79 AFX_MANAGE_STATE(_afxModuleAddrThis
);
81 if (!AfxOleUnregisterTypeLib(_tlid
, _wVerMajor
, _wVerMinor
))
82 return ResultFromScode(SELFREG_E_TYPELIB
);
84 if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE
))
85 return ResultFromScode(SELFREG_E_CLASS
);
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */