Path: news.mitre.org!blanket.mitre.org!philabs!newsjunkie.ans.net!newsfeeds.ans.net!newsxfer.itd.umich.edu!newsxfer3.itd.umich.edu!howland.erols.net!usc!newshub.cts.com!newsfeed.cts.com!cmkrnl!jeh From: jeh@cmkrnl.com (Jamie Hanrahan) Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode Subject: Re: Context Switch Callback Message-ID: <1997Dec10.222453.8363@cmkrnl> Date: 10 Dec 97 22:24:53 PST References: <348f1d9f.0@news.mei.com> Organization: Kernel Mode Systems, San Diego, CA Lines: 20 In article <348f1d9f.0@news.mei.com>, "Mark Stephen Krueger" writes: > Is there any documented or undocumented way to install a small callback to > be called whenever a thread context switch occurs? I am assuming this would > have to be done in a kernal mode driver, but I was unable to find anything > in the DDK. This lead me to suspect that if it can be done it is > undocumented. Obviously, this callback would probably have a negative > impact on performance, but its just for development purposes. A perusal of the output of LINK /DUMP /EXPORTS NTOSKRNL.EXE reveals KeSetThreadSelectNotifyRoutine . No idea of the calling sequence, but it seems likely that one of the arguments (maybe the only one) is a pointer to a routine to be called. --- Jamie Hanrahan, Kernel Mode Systems, San Diego CA Internet: jeh@cmkrnl.com (JH645) CompuServe: 74140,2055 drivers, internals, networks, applications, and training for VMS and Windows NT NT driver FAQ, links, and other information: http://www.cmkrnl.com/ If you post a reply in news, please don't e-mail it too.