473,473 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Intercepting system calls in .NET

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?
Oct 14 '05 #1
8 2239
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]
- mv*@spam.guard.caspershouse.com

"Peter Olcott" <ol****@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?

Oct 14 '05 #2

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:ur**************@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]
- mv*@spam.guard.caspershouse.com

"Peter Olcott" <ol****@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?
Oct 14 '05 #3
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]
- mv*@spam.guard.caspershouse.com

"Peter Olcott" <ol****@att.net> wrote in message
news:a4Q3f.5217$bt2.167@okepread05...

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:ur**************@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]
- mv*@spam.guard.caspershouse.com

"Peter Olcott" <ol****@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?

Oct 14 '05 #4
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]" <mv*@spam.guard.caspershouse.com> wrote in message news:Ok**************@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]
- mv*@spam.guard.caspershouse.com

"Peter Olcott" <ol****@att.net> wrote in message news:a4Q3f.5217$bt2.167@okepread05...

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:ur**************@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]
- mv*@spam.guard.caspershouse.com

"Peter Olcott" <ol****@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?


Oct 14 '05 #5
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]
- mv*@spam.guard.caspershouse.com

"Peter Olcott" <ol****@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]" <mv*@spam.guard.caspershouse.com> wrote
in message news:Ok**************@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]
- mv*@spam.guard.caspershouse.com

"Peter Olcott" <ol****@att.net> wrote in message
news:a4Q3f.5217$bt2.167@okepread05...

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:ur**************@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]
- mv*@spam.guard.caspershouse.com

"Peter Olcott" <ol****@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?



Oct 14 '05 #6
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]" <mv*@spam.guard.caspershouse.com> wrote in message news:uG*************@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]
- mv*@spam.guard.caspershouse.com

"Peter Olcott" <ol****@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]" <mv*@spam.guard.caspershouse.com> wrote in message news:Ok**************@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]
- mv*@spam.guard.caspershouse.com

"Peter Olcott" <ol****@att.net> wrote in message news:a4Q3f.5217$bt2.167@okepread05...

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message
news:ur**************@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]
> - mv*@spam.guard.caspershouse.com
>
> "Peter Olcott" <ol****@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?



Oct 14 '05 #7
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]
- mv*@spam.guard.caspershouse.com
"Peter Olcott" <ol****@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]" <mv*@spam.guard.caspershouse.com> wrote
in message news:uG*************@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]
- mv*@spam.guard.caspershouse.com

"Peter Olcott" <ol****@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]" <mv*@spam.guard.caspershouse.com> wrote
in message news:Ok**************@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]
- mv*@spam.guard.caspershouse.com

"Peter Olcott" <ol****@att.net> wrote in message
news:a4Q3f.5217$bt2.167@okepread05...
>
> "Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com>
> wrote in message news:ur**************@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]
>> - mv*@spam.guard.caspershouse.com
>>
>> "Peter Olcott" <ol****@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?
>



Oct 14 '05 #8
What about all the text and font info contained within
any other program's window?

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:eS**************@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]
- mv*@spam.guard.caspershouse.com
"Peter Olcott" <ol****@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]" <mv*@spam.guard.caspershouse.com> wrote in message news:uG*************@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]
- mv*@spam.guard.caspershouse.com

"Peter Olcott" <ol****@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]" <mv*@spam.guard.caspershouse.com> wrote in message
news:Ok**************@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]
> - mv*@spam.guard.caspershouse.com
>
> "Peter Olcott" <ol****@att.net> wrote in message news:a4Q3f.5217$bt2.167@okepread05...
>>
>> "Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message
>> news:ur**************@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]
>>> - mv*@spam.guard.caspershouse.com
>>>
>>> "Peter Olcott" <ol****@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?
>>
>
>



Oct 14 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Peter Olcott | last post by:
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?
8
by: Peter Olcott | last post by:
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?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.