|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Intercepting system calls in .NETIs there any way to intercept system calls to windows such as TextOut and DrawText?
what kinds of system calls can be intercepted, and what is the mechanism to accomplish this? Peter,
Short of actually replacing user32.dll with a shim that calls the originals, there isn't a way I can think of to do this. Also, with the new windows protection scheme (windows knows when you try to replace system dlls and whatnot), I doubt you could even do that. And if you could, I certainly wouldn't want (nor could you do it easily) with .NET, and you definitely couldn't do it with C#. Hope this helps. -- - Nicholas Paldino [.NET/C# MVP] - mvp@spam.guard.caspershouse.com "Peter Olcott" <olc***@att.net> wrote in message news:2ZN3f.5212$bt2.2196@okepread05...Show quote > Is there any way to intercept system calls to windows such as TextOut and > DrawText? > what kinds of system calls can be intercepted, and what is the mechanism > to accomplish this? >
Show quote
"Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote in message news:urGn1gM0FHA.2792@tk2msftngp13.phx.gbl... Can you double check this answer for me please?> Peter, > > Short of actually replacing user32.dll with a shim that calls the originals, there isn't a way I can think of to do this. > Also, with the new windows protection scheme (windows knows when you try to replace system dlls and whatnot), I doubt you could > even do that. > > And if you could, I certainly wouldn't want (nor could you do it easily) with .NET, and you definitely couldn't do it with C#. > > Hope this helps. > > > -- > - Nicholas Paldino [.NET/C# MVP] > - mvp@spam.guard.caspershouse.com > > "Peter Olcott" <olc***@att.net> wrote in message news:2ZN3f.5212$bt2.2196@okepread05... >> Is there any way to intercept system calls to windows such as TextOut and DrawText? >> what kinds of system calls can be intercepted, and what is the mechanism to accomplish this? >> > > Peter,
I wouldn't have responded if I didn't think that it was correct. You could easily look for this information on your own, now that I have given you some specifics, as well as potential concerns. It probably would be helpful to know what you are trying to do, as well, so we could provide alternatives, since the solution I gave isn't desirable, by any means. -- - Nicholas Paldino [.NET/C# MVP] - mvp@spam.guard.caspershouse.com "Peter Olcott" <olc***@att.net> wrote in message news:a4Q3f.5217$bt2.167@okepread05...Show quote > > "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote > in message news:urGn1gM0FHA.2792@tk2msftngp13.phx.gbl... >> Peter, >> >> Short of actually replacing user32.dll with a shim that calls the >> originals, there isn't a way I can think of to do this. Also, with the >> new windows protection scheme (windows knows when you try to replace >> system dlls and whatnot), I doubt you could even do that. >> >> And if you could, I certainly wouldn't want (nor could you do it >> easily) with .NET, and you definitely couldn't do it with C#. >> >> Hope this helps. >> >> >> -- >> - Nicholas Paldino [.NET/C# MVP] >> - mvp@spam.guard.caspershouse.com >> >> "Peter Olcott" <olc***@att.net> wrote in message >> news:2ZN3f.5212$bt2.2196@okepread05... >>> Is there any way to intercept system calls to windows such as TextOut >>> and DrawText? >>> what kinds of system calls can be intercepted, and what is the mechanism >>> to accomplish this? >>> >> >> > Can you double check this answer for me please? > I want to be able to consistently be able to have an application
"see" exactly what is on the screen. Show quote "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote in message news:OkIloiN0FHA.3180@TK2MSFTNGP14.phx.gbl... > Peter, > > I wouldn't have responded if I didn't think that it was correct. You could easily look for this information on your own, now > that I have given you some specifics, as well as potential concerns. > > It probably would be helpful to know what you are trying to do, as well, so we could provide alternatives, since the solution I > gave isn't desirable, by any means. > > -- > - Nicholas Paldino [.NET/C# MVP] > - mvp@spam.guard.caspershouse.com > > "Peter Olcott" <olc***@att.net> wrote in message news:a4Q3f.5217$bt2.167@okepread05... >> >> "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote in message news:urGn1gM0FHA.2792@tk2msftngp13.phx.gbl... >>> Peter, >>> >>> Short of actually replacing user32.dll with a shim that calls the originals, there isn't a way I can think of to do this. >>> Also, with the new windows protection scheme (windows knows when you try to replace system dlls and whatnot), I doubt you could >>> even do that. >>> >>> And if you could, I certainly wouldn't want (nor could you do it easily) with .NET, and you definitely couldn't do it with >>> C#. >>> >>> Hope this helps. >>> >>> >>> -- >>> - Nicholas Paldino [.NET/C# MVP] >>> - mvp@spam.guard.caspershouse.com >>> >>> "Peter Olcott" <olc***@att.net> wrote in message news:2ZN3f.5212$bt2.2196@okepread05... >>>> Is there any way to intercept system calls to windows such as TextOut and DrawText? >>>> what kinds of system calls can be intercepted, and what is the mechanism to accomplish this? >>>> >>> >>> >> Can you double check this answer for me please? >> > > To what end? You can easily get the device context for the desktop or
any window in the system and "see" that. Can you be more specific? -- - Nicholas Paldino [.NET/C# MVP] - mvp@spam.guard.caspershouse.com "Peter Olcott" <olc***@att.net> wrote in message news:iLQ3f.5222$bt2.4976@okepread05...Show quote >I want to be able to consistently be able to have an application > "see" exactly what is on the screen. > > "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote > in message news:OkIloiN0FHA.3180@TK2MSFTNGP14.phx.gbl... >> Peter, >> >> I wouldn't have responded if I didn't think that it was correct. You >> could easily look for this information on your own, now that I have given >> you some specifics, as well as potential concerns. >> >> It probably would be helpful to know what you are trying to do, as >> well, so we could provide alternatives, since the solution I gave isn't >> desirable, by any means. >> >> -- >> - Nicholas Paldino [.NET/C# MVP] >> - mvp@spam.guard.caspershouse.com >> >> "Peter Olcott" <olc***@att.net> wrote in message >> news:a4Q3f.5217$bt2.167@okepread05... >>> >>> "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote >>> in message news:urGn1gM0FHA.2792@tk2msftngp13.phx.gbl... >>>> Peter, >>>> >>>> Short of actually replacing user32.dll with a shim that calls the >>>> originals, there isn't a way I can think of to do this. Also, with the >>>> new windows protection scheme (windows knows when you try to replace >>>> system dlls and whatnot), I doubt you could even do that. >>>> >>>> And if you could, I certainly wouldn't want (nor could you do it >>>> easily) with .NET, and you definitely couldn't do it with C#. >>>> >>>> Hope this helps. >>>> >>>> >>>> -- >>>> - Nicholas Paldino [.NET/C# MVP] >>>> - mvp@spam.guard.caspershouse.com >>>> >>>> "Peter Olcott" <olc***@att.net> wrote in message >>>> news:2ZN3f.5212$bt2.2196@okepread05... >>>>> Is there any way to intercept system calls to windows such as TextOut >>>>> and DrawText? >>>>> what kinds of system calls can be intercepted, and what is the >>>>> mechanism to accomplish this? >>>>> >>>> >>>> >>> Can you double check this answer for me please? >>> >> >> > > Can you grab any text from any these device contexts?
If so, can you get the font information? Is there any way to recognize a specific icon on the desktop? Show quote "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote in message news:uGVSksN0FHA.460@TK2MSFTNGP15.phx.gbl... > To what end? You can easily get the device context for the desktop or any window in the system and "see" that. Can you be > more specific? > > -- > - Nicholas Paldino [.NET/C# MVP] > - mvp@spam.guard.caspershouse.com > > "Peter Olcott" <olc***@att.net> wrote in message news:iLQ3f.5222$bt2.4976@okepread05... >>I want to be able to consistently be able to have an application >> "see" exactly what is on the screen. >> >> "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote in message news:OkIloiN0FHA.3180@TK2MSFTNGP14.phx.gbl... >>> Peter, >>> >>> I wouldn't have responded if I didn't think that it was correct. You could easily look for this information on your own, now >>> that I have given you some specifics, as well as potential concerns. >>> >>> It probably would be helpful to know what you are trying to do, as well, so we could provide alternatives, since the solution >>> I gave isn't desirable, by any means. >>> >>> -- >>> - Nicholas Paldino [.NET/C# MVP] >>> - mvp@spam.guard.caspershouse.com >>> >>> "Peter Olcott" <olc***@att.net> wrote in message news:a4Q3f.5217$bt2.167@okepread05... >>>> >>>> "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote in message >>>> news:urGn1gM0FHA.2792@tk2msftngp13.phx.gbl... >>>>> Peter, >>>>> >>>>> Short of actually replacing user32.dll with a shim that calls the originals, there isn't a way I can think of to do this. >>>>> Also, with the new windows protection scheme (windows knows when you try to replace system dlls and whatnot), I doubt you >>>>> could even do that. >>>>> >>>>> And if you could, I certainly wouldn't want (nor could you do it easily) with .NET, and you definitely couldn't do it with >>>>> C#. >>>>> >>>>> Hope this helps. >>>>> >>>>> >>>>> -- >>>>> - Nicholas Paldino [.NET/C# MVP] >>>>> - mvp@spam.guard.caspershouse.com >>>>> >>>>> "Peter Olcott" <olc***@att.net> wrote in message news:2ZN3f.5212$bt2.2196@okepread05... >>>>>> Is there any way to intercept system calls to windows such as TextOut and DrawText? >>>>>> what kinds of system calls can be intercepted, and what is the mechanism to accomplish this? >>>>>> >>>>> >>>>> >>>> Can you double check this answer for me please? >>>> >>> >>> >> >> > > Peter,
It would be easier for you to actually enumerate through the users desktop directory to see what is displayed on the desktop. If you are trying to do this, just find the users desktop directory, and enumerate through the items in the directory, and it should give you a good idea of what is there. As for the font information, for what is displayed on the desktop, that is the system font, and you can get that easily. -- - Nicholas Paldino [.NET/C# MVP] - mvp@spam.guard.caspershouse.com "Peter Olcott" <olc***@att.net> wrote in message news:CYQ3f.5224$bt2.4102@okepread05...Show quote > Can you grab any text from any these device contexts? > If so, can you get the font information? > Is there any way to recognize a specific icon on the desktop? > > "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote > in message news:uGVSksN0FHA.460@TK2MSFTNGP15.phx.gbl... >> To what end? You can easily get the device context for the desktop or >> any window in the system and "see" that. Can you be more specific? >> >> -- >> - Nicholas Paldino [.NET/C# MVP] >> - mvp@spam.guard.caspershouse.com >> >> "Peter Olcott" <olc***@att.net> wrote in message >> news:iLQ3f.5222$bt2.4976@okepread05... >>>I want to be able to consistently be able to have an application >>> "see" exactly what is on the screen. >>> >>> "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote >>> in message news:OkIloiN0FHA.3180@TK2MSFTNGP14.phx.gbl... >>>> Peter, >>>> >>>> I wouldn't have responded if I didn't think that it was correct. >>>> You could easily look for this information on your own, now that I have >>>> given you some specifics, as well as potential concerns. >>>> >>>> It probably would be helpful to know what you are trying to do, as >>>> well, so we could provide alternatives, since the solution I gave isn't >>>> desirable, by any means. >>>> >>>> -- >>>> - Nicholas Paldino [.NET/C# MVP] >>>> - mvp@spam.guard.caspershouse.com >>>> >>>> "Peter Olcott" <olc***@att.net> wrote in message >>>> news:a4Q3f.5217$bt2.167@okepread05... >>>>> >>>>> "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> >>>>> wrote in message news:urGn1gM0FHA.2792@tk2msftngp13.phx.gbl... >>>>>> Peter, >>>>>> >>>>>> Short of actually replacing user32.dll with a shim that calls the >>>>>> originals, there isn't a way I can think of to do this. Also, with >>>>>> the new windows protection scheme (windows knows when you try to >>>>>> replace system dlls and whatnot), I doubt you could even do that. >>>>>> >>>>>> And if you could, I certainly wouldn't want (nor could you do it >>>>>> easily) with .NET, and you definitely couldn't do it with C#. >>>>>> >>>>>> Hope this helps. >>>>>> >>>>>> >>>>>> -- >>>>>> - Nicholas Paldino [.NET/C# MVP] >>>>>> - mvp@spam.guard.caspershouse.com >>>>>> >>>>>> "Peter Olcott" <olc***@att.net> wrote in message >>>>>> news:2ZN3f.5212$bt2.2196@okepread05... >>>>>>> Is there any way to intercept system calls to windows such as >>>>>>> TextOut and DrawText? >>>>>>> what kinds of system calls can be intercepted, and what is the >>>>>>> mechanism to accomplish this? >>>>>>> >>>>>> >>>>>> >>>>> Can you double check this answer for me please? >>>>> >>>> >>>> >>> >>> >> >> > > What about all the text and font info contained within
any other program's window? Show quote "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote in message news:eSKoXyN0FHA.2752@TK2MSFTNGP12.phx.gbl... > Peter, > > It would be easier for you to actually enumerate through the users desktop directory to see what is displayed on the desktop. > If you are trying to do this, just find the users desktop directory, and enumerate through the items in the directory, and it > should give you a good idea of what is there. > > As for the font information, for what is displayed on the desktop, that is the system font, and you can get that easily. > > > -- > - Nicholas Paldino [.NET/C# MVP] > - mvp@spam.guard.caspershouse.com > > > "Peter Olcott" <olc***@att.net> wrote in message news:CYQ3f.5224$bt2.4102@okepread05... >> Can you grab any text from any these device contexts? >> If so, can you get the font information? >> Is there any way to recognize a specific icon on the desktop? >> >> "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote in message news:uGVSksN0FHA.460@TK2MSFTNGP15.phx.gbl... >>> To what end? You can easily get the device context for the desktop or any window in the system and "see" that. Can you be >>> more specific? >>> >>> -- >>> - Nicholas Paldino [.NET/C# MVP] >>> - mvp@spam.guard.caspershouse.com >>> >>> "Peter Olcott" <olc***@att.net> wrote in message news:iLQ3f.5222$bt2.4976@okepread05... >>>>I want to be able to consistently be able to have an application >>>> "see" exactly what is on the screen. >>>> >>>> "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote in message >>>> news:OkIloiN0FHA.3180@TK2MSFTNGP14.phx.gbl... >>>>> Peter, >>>>> >>>>> I wouldn't have responded if I didn't think that it was correct. You could easily look for this information on your own, >>>>> now that I have given you some specifics, as well as potential concerns. >>>>> >>>>> It probably would be helpful to know what you are trying to do, as well, so we could provide alternatives, since the >>>>> solution I gave isn't desirable, by any means. >>>>> >>>>> -- >>>>> - Nicholas Paldino [.NET/C# MVP] >>>>> - mvp@spam.guard.caspershouse.com >>>>> >>>>> "Peter Olcott" <olc***@att.net> wrote in message news:a4Q3f.5217$bt2.167@okepread05... >>>>>> >>>>>> "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote in message >>>>>> news:urGn1gM0FHA.2792@tk2msftngp13.phx.gbl... >>>>>>> Peter, >>>>>>> >>>>>>> Short of actually replacing user32.dll with a shim that calls the originals, there isn't a way I can think of to do this. >>>>>>> Also, with the new windows protection scheme (windows knows when you try to replace system dlls and whatnot), I doubt you >>>>>>> could even do that. >>>>>>> >>>>>>> And if you could, I certainly wouldn't want (nor could you do it easily) with .NET, and you definitely couldn't do it >>>>>>> with C#. >>>>>>> >>>>>>> Hope this helps. >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> - Nicholas Paldino [.NET/C# MVP] >>>>>>> - mvp@spam.guard.caspershouse.com >>>>>>> >>>>>>> "Peter Olcott" <olc***@att.net> wrote in message news:2ZN3f.5212$bt2.2196@okepread05... >>>>>>>> Is there any way to intercept system calls to windows such as TextOut and DrawText? >>>>>>>> what kinds of system calls can be intercepted, and what is the mechanism to accomplish this? >>>>>>>> >>>>>>> >>>>>>> >>>>>> Can you double check this answer for me please? >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > |
|||||||||||||||||||||||