LibreOffice Module shell (master) 1
registrar.hpp
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3* This file is part of the LibreOffice project.
4*
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/.
8*/
9
10#ifndef INCLUDED_SHELL_INC_SPSUPP_REGISTRAR_H
11#define INCLUDED_SHELL_INC_SPSUPP_REGISTRAR_H
12
13#include <initializer_list>
14
15#if !defined WIN32_LEAN_AND_MEAN
16# define WIN32_LEAN_AND_MEAN
17#endif
18#include <windows.h>
19
20class Registrar {
21public:
22 explicit Registrar(REFIID riidCLSID);
23 // First version in list becomes default
24 HRESULT RegisterObject(REFIID riidTypeLib,
25 const wchar_t* sProgram,
26 const wchar_t* sComponent,
27 std::initializer_list<int> aVersions,
28 const wchar_t* Path);
29 HRESULT UnRegisterObject(const wchar_t* sProgram, const wchar_t* sComponent,
30 std::initializer_list<int> aVersions);
31 // First version in list becomes the default
32 HRESULT RegisterProgIDs(const wchar_t* sProgram, const wchar_t* sComponent,
33 std::initializer_list<int> aVersions);
34 HRESULT UnRegisterProgIDs(const wchar_t* sProgram, const wchar_t* sComponent,
35 std::initializer_list<int> aVersions);
36
37private:
38 HRESULT RegisterProgID(const wchar_t* sProgram, const wchar_t* sComponent, int nVersion,
39 bool bSetDefault);
40 HRESULT UnRegisterProgID(const wchar_t* sProgram, const wchar_t* sComponent, int nVersion);
41
42 static const size_t nGUIDlen = 40;
45};
46
47#endif
48
49/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
HRESULT RegisterProgIDs(const wchar_t *sProgram, const wchar_t *sComponent, std::initializer_list< int > aVersions)
Definition: registrar.cxx:224
static const size_t nGUIDlen
Definition: registrar.hpp:42
HRESULT m_ConstructionResult
Definition: registrar.hpp:44
HRESULT RegisterProgID(const wchar_t *sProgram, const wchar_t *sComponent, int nVersion, bool bSetDefault)
Definition: registrar.cxx:192
HRESULT UnRegisterProgID(const wchar_t *sProgram, const wchar_t *sComponent, int nVersion)
Definition: registrar.cxx:240
HRESULT RegisterObject(REFIID riidTypeLib, const wchar_t *sProgram, const wchar_t *sComponent, std::initializer_list< int > aVersions, const wchar_t *Path)
Definition: registrar.cxx:91
HRESULT UnRegisterObject(const wchar_t *sProgram, const wchar_t *sComponent, std::initializer_list< int > aVersions)
Definition: registrar.cxx:170
Registrar(REFIID riidCLSID)
Definition: registrar.cxx:85
HRESULT UnRegisterProgIDs(const wchar_t *sProgram, const wchar_t *sComponent, std::initializer_list< int > aVersions)
Definition: registrar.cxx:276
wchar_t m_sCLSID[nGUIDlen]
Definition: registrar.hpp:43
sal_Int16 nVersion