24#if defined(BI_APP_DLL)
37static const _TCHAR* OcRegTemplates[] = {
38 _T(
"CLSID\\<clsid>\\<serverctx>Server32 = <debugger> <path> <cmdline><extraopt>"),
39 _T(
"CLSID\\<clsid>\\ProgID = <progid>"),
40 _T(
"CLSID\\<clsid> = <description>"),
41 _T(
"CLSID\\<clsid>\\DefaultIcon = <path>,<iconindex>"),
42 _T(
"CLSID\\<clsid>\\InprocHandler32 = <handler>"),
43 _T(
"<progid>\\CLSID = <clsid>"),
44 _T(
"<progid> = <description>"),
46 _T(
"<progid>\\protocol\\StdFileEditing\\verb\\0 = <verb0>"),
47 _T(
"<progid>\\protocol\\StdFileEditing\\verb\\1 = <verb1>"),
48 _T(
"<progid>\\protocol\\StdFileEditing\\verb\\2 = <verb2>"),
49 _T(
"<progid>\\protocol\\StdFileEditing\\verb\\3 = <verb3>"),
50 _T(
"<progid>\\protocol\\StdFileEditing\\verb\\4 = <verb4>"),
51 _T(
"<progid>\\protocol\\StdFileEditing\\verb\\5 = <verb5>"),
52 _T(
"<progid>\\protocol\\StdFileEditing\\verb\\6 = <verb6>"),
53 _T(
"<progid>\\protocol\\StdFileEditing\\verb\\7 = <verb7>"),
55 _T(
"CLSID\\<clsid>\\Verb\\0 = <verb0>,<verb0opt>"),
56 _T(
"CLSID\\<clsid>\\Verb\\1 = <verb1>,<verb1opt>"),
57 _T(
"CLSID\\<clsid>\\Verb\\2 = <verb2>,<verb2opt>"),
58 _T(
"CLSID\\<clsid>\\Verb\\3 = <verb3>,<verb3opt>"),
59 _T(
"CLSID\\<clsid>\\Verb\\4 = <verb4>,<verb4opt>"),
60 _T(
"CLSID\\<clsid>\\Verb\\5 = <verb5>,<verb5opt>"),
61 _T(
"CLSID\\<clsid>\\Verb\\6 = <verb6>,<verb6opt>"),
62 _T(
"CLSID\\<clsid>\\Verb\\7 = <verb7>,<verb7opt>"),
64 _T(
"CLSID\\<clsid>\\DataFormats\\GetSet\\0 = <format0>"),
65 _T(
"CLSID\\<clsid>\\DataFormats\\GetSet\\1 = <format1>"),
66 _T(
"CLSID\\<clsid>\\DataFormats\\GetSet\\2 = <format2>"),
67 _T(
"CLSID\\<clsid>\\DataFormats\\GetSet\\3 = <format3>"),
68 _T(
"CLSID\\<clsid>\\DataFormats\\GetSet\\4 = <format4>"),
69 _T(
"CLSID\\<clsid>\\DataFormats\\GetSet\\5 = <format5>"),
70 _T(
"CLSID\\<clsid>\\DataFormats\\GetSet\\6 = <format6>"),
71 _T(
"CLSID\\<clsid>\\DataFormats\\GetSet\\7 = <format7>"),
73 _T(
"CLSID\\<clsid>\\MiscStatus = <aspectall>"),
74 _T(
"CLSID\\<clsid>\\MiscStatus\\1 = <aspectcontent>"),
75 _T(
"CLSID\\<clsid>\\MiscStatus\\2 = <aspectthumbnail>"),
76 _T(
"CLSID\\<clsid>\\MiscStatus\\4 = <aspecticon>"),
77 _T(
"CLSID\\<clsid>\\MiscStatus\\8 = <aspectdocprint>"),
78 _T(
"CLSID\\<clsid>\\AuxUserType\\2 = <menuname>"),
79 _T(
"CLSID\\<clsid>\\AuxUserType\\3 = <appname>"),
80 _T(
"CLSID\\<clsid>\\Insertable"),
82 _T(
"<permid> = <permname>"),
83 _T(
"<permid>\\CLSID = <clsid>"),
84 _T(
"<permid>\\CurVer = <progid>"),
85 _T(
"CLSID\\<clsid>\\VersionIndependentProgID = <permid>"),
87 _T(
"CLSID\\<clsid>\\Version = <version>"),
88 _T(
"CLSID\\<clsid>\\DataFormats\\DefaultFile = <filefmt>"),
89 _T(
"CLSID\\<clsid>\\Ole1Class = <progid>"),
90 _T(
".<extension> = <progid>"),
92 _T(
"<progid>\\Shell\\Print\\Command = <path> \"%1\""),
93 _T(
"<progid>\\Shell\\Open\\Command = <path> \"%1\""),
94 _T(
"<progid>\\protocol\\StdFileEditing\\server = <debugger> <path><extraopt>"),
95 _T(
"<progid>\\Insertable"),
100 _T(
"CLSID\\<clsid>\\Control"),
101 _T(
"CLSID\\<clsid>\\ToolBoxBitmap32 = <path>,<toolbmpindex>"),
109 {
_T(
"clsid"), 0,
_T(
"") },
110 {
_T(
"progid"), 0,
_T(
"\001\002\003\005\006\007")},
111 {
_T(
"insertable"), 0,
_T(
"\046\047\062\063")},
112 {
_T(
"control"), 0,
_T(
"\064\065") },
114 {
_T(
"description"), 0,
_T(
"") },
115 {
_T(
"handler"),
_T(
"ole32.dll"),
_T(
"\005") },
116 {
_T(
"serverctx"), 0,
_T(
"\001") },
117 {
_T(
"path"), 0,
_T(
"") },
118 {
_T(
"cmdline"),
_T(
""),
_T(
"") },
119 {
_T(
"debugger"),
_T(
""),
_T(
"") },
120 {
_T(
"permid"), 0,
_T(
"\050\051\053") },
121 {
_T(
"permname"), 0,
_T(
"\052") },
122 {
_T(
"iconindex"),
_T(
"0"),
_T(
"\004") },
123 {
_T(
"toolbmpindex"),
_T(
"1"),
_T(
"\065") },
124 {
_T(
"menuname"),
_T(
""),
_T(
"\045") },
125 {
_T(
"appname"), 0,
_T(
"") },
126 {
_T(
"verb0"), 0,
_T(
"\010\020") },
127 {
_T(
"verb1"), 0,
_T(
"\011\021") },
128 {
_T(
"verb2"), 0,
_T(
"\012\022") },
129 {
_T(
"verb3"), 0,
_T(
"\013\023") },
130 {
_T(
"verb4"), 0,
_T(
"\014\024") },
131 {
_T(
"verb5"), 0,
_T(
"\015\025") },
132 {
_T(
"verb6"), 0,
_T(
"\016\026") },
133 {
_T(
"verb7"), 0,
_T(
"\017\027") },
134 {
_T(
"verb8"), 0,
_T(
"\018\028") },
135 {
_T(
"verb0opt"),
_T(
"0,2"),
_T(
"\020") },
136 {
_T(
"verb1opt"),
_T(
"0,2"),
_T(
"\021") },
137 {
_T(
"verb2opt"),
_T(
"0,2"),
_T(
"\022") },
138 {
_T(
"verb3opt"),
_T(
"0,2"),
_T(
"\023") },
139 {
_T(
"verb4opt"),
_T(
"0,2"),
_T(
"\024") },
140 {
_T(
"verb5opt"),
_T(
"0,2"),
_T(
"\025") },
141 {
_T(
"verb6opt"),
_T(
"0,2"),
_T(
"\026") },
142 {
_T(
"verb7opt"),
_T(
"0,2"),
_T(
"\027") },
143 {
_T(
"verb8opt"),
_T(
"0,2"),
_T(
"\028") },
144 {
_T(
"format0"), 0,
_T(
"\030") },
145 {
_T(
"format1"), 0,
_T(
"\031") },
146 {
_T(
"format2"), 0,
_T(
"\032") },
147 {
_T(
"format3"), 0,
_T(
"\033") },
148 {
_T(
"format4"), 0,
_T(
"\034") },
149 {
_T(
"format5"), 0,
_T(
"\035") },
150 {
_T(
"format6"), 0,
_T(
"\036") },
151 {
_T(
"format7"), 0,
_T(
"\037") },
152 {
_T(
"format8"), 0,
_T(
"\038") },
153 {
_T(
"filefmt"), 0,
_T(
"\055") },
154 {
_T(
"aspectall"),
_T(
"0"),
_T(
"\040") },
155 {
_T(
"aspectcontent"), 0,
_T(
"\041") },
156 {
_T(
"aspectthumbnail"), 0,
_T(
"\042") },
157 {
_T(
"aspecticon"), 0,
_T(
"\043") },
158 {
_T(
"aspectdocprint"), 0,
_T(
"\044") },
159 {
_T(
"extension"), 0,
_T(
"\057\060\061") },
160 {
_T(
"version"), 0,
_T(
"\054") },
161 {
_T(
"helpdir"), 0,
_T(
"") },
162 {
_T(
"typehelp"), 0,
_T(
"") },
163 {
_T(
"language"), 0,
_T(
"") },
164 {
_T(
"docflags"),
_T(
"0"),
_T(
"") },
165 {
_T(
"directory"), 0,
_T(
"") },
166 {
_T(
"docfilter"), 0,
_T(
"") },
167 {
_T(
"debugclsid"), 0,
_T(
"")},
168 {
_T(
"extraopt"),
_T(
""),
_T(
"")},
169 {
_T(
"debugprogid"), 0,
_T(
"") },
170 {
_T(
"debugdesc"), 0,
_T(
"") },
217 module = &GetGlobalModule();
218 module->GetModuleFileName(path, pathSize);
260 {
"description", {
_T(
"OCF default description")}},
312 _T(
"\020\021\022\023\024\025\026\027")
\
313 _T(
"\030\031\032\033\034\035\036\037")
\
314 _T(
"\040\041\042\043\044\045\046\047")
\
315 _T(
"\054\055\062\063");
320struct TDebugRegKey {
enum { progid, clsid, description, extraopt};};
349 case TDebugRegKey::progid:
351 case TDebugRegKey::extraopt:
354 case TDebugRegKey::clsid:
360 case TDebugRegKey::description:
389 Next = RegistrarList;
390 RegistrarList =
this;
401 Next = RegistrarList;
402 RegistrarList =
this;
421 return reg ?
reg->Next : RegistrarList;
492# if defined(BI_COMP_MSC)
548 TRACEX(
OcfDll, 1,
"DllCanUnloadNow returning HR_FALSE");
572#if defined(BI_COMP_MSC)
577#if !defined(OWL_DLLNAME)
578# if defined (_UNICODE)
579# if defined(__TRACE) || defined(__WARN)
580# define OWL_DLLNAME "owl620vud.dll"
582# define OWL_DLLNAME "owl620vu.dll"
585# if defined(__TRACE) || defined(__WARN)
586# define OWL_DLLNAME "owl620vd.dll"
588# define OWL_DLLNAME "owl620v.dll"
TAppDescriptor - OLE application descriptor definitions.
#define DIAG_DECLARE_GROUP(group)
#define TRACEX(group, level, message)
#define DIAG_DEFINE_GROUP_INIT(f, g, e, l)
TComponentFactory GetFactory() const
Application registration manager interface class.
bool IsOptionSet(owl::uint32 option) const
owl::uint32 GetOptions() const
virtual void Shutdown(IUnknown *releasedObj, owl::uint32 options)
static TRegistrar * GetNext(TRegistrar *reg)
virtual void * GetFactory(const GUID &clsid, const GUID &iid)
TRegistrar(owl::TRegList ®Info, TComponentFactory callback, owl::tstring &cmdLine, owl::TModule *module=&owl::GetGlobalModule())
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
static auto GetClassesRoot() -> TRegKey &
Special predefined root key used by shell and OLE applications (HKEY_CLASSES_ROOT).
static auto GetClassesRootClsid() -> TRegKey &
Commonly used subkey by shell and OLE applications (HKEY_CLASSES_ROOT\CLSID).
A registration parameter table, composed of a list of TRegItems.
High level symbol-based registry entry manipulation.
static int Unregister(TRegList ®Info, const TUnregParams *params, const TRegItem *overrides=nullptr)
Unregisters entries given a reglist.
Thrown for errors within the Registry classes.
THandle GetHandle() const
Return the instance handle of the library module represented by the TModule obect.
#define ocrSingleUse
Single client per instance.
Include for OC, gets common headers when precompiled headers are enabled.
Definition of class TModule.
bool OWLInitUserDLL(HINSTANCE hInstance, LPCTSTR cmdLine)
Initialization routine that must be called from User DLL if DLL provides it's own entry point [i....
Object Component Framework (COM encapsulation)
const GUID void ** retObj
IUnknown *(* TComponentFactory)(IUnknown *outer, owl::uint32 options, owl::uint32 id)
const TCHAR * OcDebugKeys[]
int OcSetupDebugReg(owl::TRegList ®Info, owl::TRegItem *regDebug, owl::TLangId lang, TCHAR *clsid)
Walk thru a reginfo list using debug entries to create a parallel non-debug set for alternate,...
owl::TRegItem OcRegNotDll[]
owl::TRegItem OcRegNoDebug[]
long OcRegisterClass(owl::TRegList ®Info, owl::TModule *module, owl::tostream &out, owl::TLangId lang, LPCTSTR filter=0, owl::TRegItem *defaults=0, owl::TRegItem *overrides=0)
Generate OLE registration file image to an output stream.
const TCHAR * OcReplaceKeys[]
@ amAutomation
set from cmdline when EXE lauched for automation
@ amShutdown
set in factory call to shutdown/delete app
@ amServedApp
per instance flag, app refcnt held by container
@ amExeModule
set for EXE components, 0 if DLL inproc server
@ amDebug
user requested launching for debugging
@ amRun
set in factory call to run application msg loop
int OcUnregisterClass(owl::TRegList ®Info, owl::TRegItem *overrides=0)
Unregister application or class from registration database.
Object Windows Library (OWLNext Core)
owl::uint16 TLangId
Holds a language ID, a predefined number that represents a base language and dialect.
const TLangId LangUserDefault
const TLangId LangSysDefault
STDAPI DllRegisterServer()
OLE 2.0 entry point for registering DLL, no locale info passed.
STDAPI DllCanUnloadNow()
OLE 2.0 entry point for checking if DLL has no clients and can be unloaded.
STDAPI DllUnregisterServer()
OLE 2.0 entry point for unregistering DLL.
STDAPI __declspec(dllexport) DllRegisterCommand(LPCTSTR cmdLine)
Entry point for complete registration management via command line Don't let any exceptions blow back ...
STDAPI DllGetClassObject(const GUID &clsid, const GUID &iid, void **retObj)
OLE 2.0 entry point for obtaining a class factory for a particular CLSID Don't let any exceptions blo...
int WINAPI DllEntryPoint(HINSTANCE hInstance, uint32 reason, LPVOID)
OLE Registration definitions.
#define COUNTOF(s)
Array element count Important: Only use this with an argument of array type.
Various types of smart pointer templatized classes.
Definition of class TString, a flexible universal string envelope class.
static TLangId SystemDefaultLangId
The default language identifier.
static TLangId UserDefaultLangId
The user-defined default language identifier.
A single registration list entry.