473,396 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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?
Nov 17 '05 #1
8 1606
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?

Nov 17 '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?
Nov 17 '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?

Nov 17 '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?


Nov 17 '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?



Nov 17 '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?



Nov 17 '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?
>



Nov 17 '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?
>>
>
>



Nov 17 '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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.