Click here to Skip to main content
15,902,835 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to detect an USB Mass Storage or Digital Camera connection Pin
Member 30919816-Jul-03 9:28
Member 30919816-Jul-03 9:28 
Generalregistry api Pin
YaronNir16-Jul-03 9:09
YaronNir16-Jul-03 9:09 
GeneralRe: registry api Pin
David Crow16-Jul-03 9:35
David Crow16-Jul-03 9:35 
GeneralRe: registry api Pin
YaronNir17-Jul-03 4:20
YaronNir17-Jul-03 4:20 
GeneralRe: registry api Pin
David Crow17-Jul-03 5:23
David Crow17-Jul-03 5:23 
GeneralRe: registry api Pin
Iain Clarke, Warrior Programmer16-Jul-03 10:27
Iain Clarke, Warrior Programmer16-Jul-03 10:27 
GeneralRe: registry api Pin
YaronNir17-Jul-03 4:20
YaronNir17-Jul-03 4:20 
GeneralRe: registry api Pin
Iain Clarke, Warrior Programmer17-Jul-03 4:38
Iain Clarke, Warrior Programmer17-Jul-03 4:38 
A few seconds reading of the sysinternals[^] website gives the following explanation of how regmon works:

How Regmon Works  
The heart of Regmon on Windows 9x is in the virtual device driver, Regvxd.vxd. It is dynamically loaded,
and in its initialization it uses VxD service hooking (see our May 1996 Dr. Dobb's Journal article on VxD
= service hooking for more information) to insert itself onto the call chain of 16 registry access functions
in the Windows 95 kernel (Virtual Machine Manager). All registry activity, be it from 16-bit programs, Win32
applications, or device drivers, are directed at these routines, so Regmon catches all registry activity
taking place on a machine. 

On Windows NT, 2000 and XP the Regmon loads a device driver that uses a technique we pioneered for NT called
system-call hooking. When a user-mode component makes a privileged system call, control is transfered to a
software interrupt handler in NTOSKRNL.EXE (the core of the Windows NT operating system). This handler takes
a system call number, which is passed in a machine register, and indexes into a system service table to find
the address of the NT function that will handle the request. By replacing entries in this table with pointers
to hooking functions, it is possible to intercept and replace, augment, or monitor NT system services.

Regmon, which obviously hooks just the Registry-related services, is merely one example of this capability in
action.

On Windows .NET Server Regmon takes advantage of a new operating system Registry callback mechanism to
register for and receive information about Registry accesses as they occur. When you run Regmon on .NET
Server it loads a version of the Regmon driver utlizing the callbacks.

When Regmon sees an open, create or close call, it updates an internal hash table that serves as the mapping
between key handles and registry path names. Whenever it sees calls that are handle based, it looks up the
handle in the hash table to obtain the full name for display. If a handle-based access references a key
opened before Regmon started, Regmon will fail to find the mapping in it hash table and will simply present
the key's value instead.

Information on accesses is dumped into an ASCII buffer that is periodically copied up to the GUI for it to
print in its listbox. 


In short, it cheats, and grabs the information at a very low level. Not for the faint hearted...

Iain.
GeneralRe: registry api Pin
YaronNir17-Jul-03 4:54
YaronNir17-Jul-03 4:54 
GeneralRadio Button groups Pin
act_x16-Jul-03 8:49
act_x16-Jul-03 8:49 
GeneralRe: Radio Button groups Pin
John R. Shaw16-Jul-03 9:17
John R. Shaw16-Jul-03 9:17 
GeneralRe: Radio Button groups Pin
act_x16-Jul-03 10:43
act_x16-Jul-03 10:43 
GeneralRe: Radio Button groups Pin
John R. Shaw16-Jul-03 11:16
John R. Shaw16-Jul-03 11:16 
GeneralRe: SHBrowseForFolder works only one time when connecting to SQL server in between when using a manifest file Pin
Jens Doose16-Jul-03 8:18
Jens Doose16-Jul-03 8:18 
GeneralRe: SHBrowseForFolder works only one time when connecting to SQL server in between when using a manifest file Pin
David Crow16-Jul-03 9:42
David Crow16-Jul-03 9:42 
GeneralRe: SHBrowseForFolder works only one time when connecting to SQL server in between when using a manifest file Pin
Jens Doose16-Jul-03 20:21
Jens Doose16-Jul-03 20:21 
GeneralRe: SHBrowseForFolder works only one time when connecting to SQL server in between when using a manifest file Pin
David Crow17-Jul-03 5:49
David Crow17-Jul-03 5:49 
GeneralRe: SHBrowseForFolder works only one time when connecting to SQL server in between when using a manifest file Pin
Jens Doose17-Jul-03 19:34
Jens Doose17-Jul-03 19:34 
GeneralRe: SHBrowseForFolder works only one time when connecting to SQL server in between when using a manifest file Pin
David Crow18-Jul-03 5:54
David Crow18-Jul-03 5:54 
GeneralWM_CONTEXTMENU Pin
pranavamhari16-Jul-03 7:34
pranavamhari16-Jul-03 7:34 
QuestionMFC - How to print ? Pin
Exim16-Jul-03 6:55
Exim16-Jul-03 6:55 
GeneralHeapValidate question Pin
Anonymous16-Jul-03 6:27
Anonymous16-Jul-03 6:27 
GeneralRe: HeapValidate question Pin
Mike Dimmick16-Jul-03 6:48
Mike Dimmick16-Jul-03 6:48 
GeneralRe: HeapValidate question Pin
Anonymous16-Jul-03 7:09
Anonymous16-Jul-03 7:09 
GeneralRe: HeapValidate question Pin
Peter Weyzen16-Jul-03 7:52
Peter Weyzen16-Jul-03 7:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.