bump product version to 6.3.0.0.beta1
[LibreOffice.git] / extensions / test / ole / MfcControl / MfcControl.cpp
blob74f10830e927ca7e09fbd494c6cde56299b6678b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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.
21 #include "stdafx.h"
22 #include "MfcControl.h"
24 #ifdef _DEBUG
25 #define new DEBUG_NEW
26 #undef THIS_FILE
27 static char THIS_FILE[] = __FILE__;
28 #endif
31 CMfcControlApp NEAR theApp;
33 const GUID CDECL BASED_CODE _tlid =
34 { 0xac221fb3, 0xa0d8, 0x11d4, { 0x83, 0x3b, 0, 0x50, 0x4, 0x52, 0x6a, 0xb4 } };
35 const WORD _wVerMajor = 1;
36 const WORD _wVerMinor = 0;
40 // CMfcControlApp::InitInstance - DLL initialization
42 BOOL CMfcControlApp::InitInstance()
44 BOOL bInit = COleControlModule::InitInstance();
46 if (bInit)
48 // TODO: Add your own module initialization code here.
51 return bInit;
56 // CMfcControlApp::ExitInstance - DLL termination
58 int CMfcControlApp::ExitInstance()
60 // TODO: Add your own module termination code here.
62 return COleControlModule::ExitInstance();
67 // DllRegisterServer - Adds entries to the system registry
69 STDAPI DllRegisterServer(void)
71 AFX_MANAGE_STATE(_afxModuleAddrThis);
73 if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
74 return ResultFromScode(SELFREG_E_TYPELIB);
76 if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
77 return ResultFromScode(SELFREG_E_CLASS);
79 return NOERROR;
84 // DllUnregisterServer - Removes entries from the system registry
86 STDAPI DllUnregisterServer(void)
88 AFX_MANAGE_STATE(_afxModuleAddrThis);
90 if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
91 return ResultFromScode(SELFREG_E_TYPELIB);
93 if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
94 return ResultFromScode(SELFREG_E_CLASS);
96 return NOERROR;
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */