- Real Time Clock vs System Time
- Posted by Ansel on November 20th, 2003
I am trying to develop an application to report Time-
Dates other than the CMOS Time-Date to user programs.
Can anyone help me find a central point to catch requests
to the Windows 'System Time' functions.
The idea is, basiclly, to compare the requesting program
against a list, and for those programs on the list return
a time offset based on a user defined table.
Any help would be GREATLY appreciated.
Ansel
- Posted by Ray Trent on November 20th, 2003
Arg!!! Don't do this!!!
Among many, many, many other things, how are you going to "determine the
process" in a way that doesn't screw up drivers that happen to be
running in the context of that process's thread in their ISR (some of
the time).
This kind of hack is the sort of thing that really screws up Windows
reliability. In fact, just about *any* implementation of the OPs "idea"
is asking for a ton of trouble.
Additionally, I can't think of *any* valid reason to do this. If you're
doing it with the app's knowledge, modify the app. If you're doing it
without the app's knowledge (let me guess, to get around an expired
license), it's both wrong and inadvisable.
Serguei Narojnyi wrote:
--
.../ray\..
- Posted by Serguei Narojnyi on November 20th, 2003
Rename original kernel32.dll, create a kernel32.dll dummy that forwards all
entries to renamed one except for time-related ones. Inside time-related
ones, call original ones from renamed kernel32.dll, find the name of the
calling process, fudge the time, return the time.
- Posted by Alexander Grigoriev on November 20th, 2003
See MS Detours library for hooking Win32 API.
"Serguei Narojnyi" <n@snaar.net> wrote in message
news:uBSnvL4rDHA.2208@TK2MSFTNGP10.phx.gbl...
- Posted by Serguei Narojnyi on November 20th, 2003
This is all happening in user mode, you can't screw it up much. Actually an
even better (it's all relative of course) way would be to just make a
kernel32.dll like that and stick it into apps path before system path.
It's quite obvious that the motives are not the pure ones, you have to be
blind not to see that. But hey, it's a valid question and a valid answer (as
valid as you can get with this sort of question). I would also add that if
you don't know what you are doing it would actually be cheaper to buy that
software.
- Posted by Serguei Narojnyi on November 21st, 2003
Hey, this is pretty handy. Haven't checked research site for ages.