CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Registrar.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24
25// Registrar.h: interface for the OdAxTypeLibRegistrar class.
26//
28
29#if !defined(AFX_REGISTRAR_H__233580DF_A612_4625_A3AA_2336FCE65460__INCLUDED_)
30#define AFX_REGISTRAR_H__233580DF_A612_4625_A3AA_2336FCE65460__INCLUDED_
31
32#if _MSC_VER > 1000
33#pragma once
34#endif // _MSC_VER > 1000
35
36#include "TD_PackPush.h"
37
38#if !defined(__APPLE__)
39#include <atlbase.h>
40#include <comdef.h>
41
42#include "OdString.h"
43#include "RegExport.h"
44
48{
49 ITypeLibPtr m_pLib;
50 TLIBATTR m_tlbAttr;
51 OdString m_sDLLPath;
52 OdString m_sEXEPath;
53 OdString m_sTlbGUID;
54 OdString m_sNameSpace;
55 OdString m_sCurVer;
56 OdString m_sCurVerHex;
57 OdString m_sCurVerUpdate; // To update Version-Independent ProgID values
58 int m_nToolBoxBitmap;
59 DWORD m_nMiscStatus;
60 bool m_bPerUser;
61
62 UINT openTypeLib(const OdString& sDLLPath);
63
64 void regTypeLib();
65 void unregTypeLib();
66 void registerType(ITypeInfo2* pType);
67 void registerCoClass(ITypeInfo2* pType);
68 void unregisterType(ITypeInfo2* pType, OdString ver);
69 void unregisterCoClass(ITypeInfo2* pType, OdString ver);
70 void registerVersionIndependentProgid(
71 LPCTSTR vi_progid, LPCTSTR name, LPCTSTR guid, LPCTSTR progid ) const;
72 bool isVersionHigher( int major, int minor ) const;
73 // determine the youngest tlb left (for CurVer replacement)
74 OdString getMaxVersionLeft();
75 int majorVer() const { return m_tlbAttr.wMajorVerNum; }
76 int minorVer() const { return m_tlbAttr.wMinorVerNum; }
77 const OdString& decimalVerStr() const { return m_sCurVer; }
78 const OdString& hexVerStr() const { return m_sCurVerHex; }
79public:
80 OdAxTypeLibRegistrar(bool bPerUser = false);
82
83 void regTypeLib(const OdString& sDLLPath, int toolBoxBitmap = 1, DWORD nMiscStatus = OLEMISC_RECOMPOSEONRESIZE,
84 const OdString& sEXEPath = OdString::kEmpty);
85
86 void unregTypeLib(const OdString& sDLLPath);
87};
88extern "C"
89{
90 TDREG_API HRESULT odAxRegisterTypeLib(const OdString& sPath, int toolBoxBitmap = 1, DWORD nMiscStatus = OLEMISC_RECOMPOSEONRESIZE );
92};
93#endif
94
95#include "TD_PackPop.h"
96
97#endif // !defined(AFX_REGISTRAR_H__233580DF_A612_4625_A3AA_2336FCE65460__INCLUDED_)
#define TDREG_API
Definition: RegExport.h:39
TDREG_API HRESULT odAxRegisterTypeLib(const OdString &sPath, int toolBoxBitmap=1, DWORD nMiscStatus=OLEMISC_RECOMPOSEONRESIZE)
TDREG_API HRESULT odAxUnregisterTypeLib(const OdString &sPath)
void regTypeLib(const OdString &sDLLPath, int toolBoxBitmap=1, DWORD nMiscStatus=OLEMISC_RECOMPOSEONRESIZE, const OdString &sEXEPath=OdString::kEmpty)
virtual ~OdAxTypeLibRegistrar()
OdAxTypeLibRegistrar(bool bPerUser=false)
void unregTypeLib(const OdString &sDLLPath)
FIRSTDLL_EXPORT_STATIC static const OdString kEmpty
Definition: OdString.h:98
GLuint const GLchar * name
Definition: gles2_ext.h:265