Sei sulla pagina 1di 13

The Essentials of COM – Part 2

Registration

Kenny Kerr
@kennykerr
http://kennykerr.ca
The Registry

 HKEY_LOCAL_MACHINE
 Software
 Classes

 CLSID
 {GUID}
 {GUID}
 …
 Interface
 {GUID}
 {GUID}
 …

 HKEY_CURRENT_USER
 Software
 Classes
 …
DLLs and Self-Registration

 DllRegisterServer

 DllUnregisterServer

 RegSvr32.exe <file name>


Demo: DLLs and Self-Registration
Transactions

 The registry is a database

 Atomic, consistent, isolated, and durable (ACID)

 Kernel Transaction Manager


Demo: Transactions and Handles
The Registry API

 RegCreateKeyTransacted & RegOpenKeyTransacted

 RegSetValueEx & RegDeleteTree

 RegCloseKey & unique_handle


Demo: Opening or Creating Registry Keys
Table-Driven Registration
Demo: Table-Driven Registration
Registration-Free Activation

 Application and assembly manifests

 Allows “XCOPY” deployment


Demo: Registration-Free Activation
Summary

 The registry

 Self-registration

 Kernel Transaction Manager

 Registration-free activation

Potrebbero piacerti anche