Page 1 of 4 1234 LastLast
Results 1 to 15 of 47

Thread: Low Level Graphics Programming Project

  1. #1
    the Lamer ? it's ME ! Yes SynApsus's Avatar
    Join Date
    Feb 2004
    Location
    France
    Posts
    30

    Low Level Graphics Programming Project

    Hello.
    I'm new in driver coding, I have yet some useful ( or not ) drivers written. But now i'm faced with a problem for which I don't have the answer.
    I want to display a colored and formatted text on the screen using my driver, a text who will be displayed OVER all the other windows, even Fullscreen ones.
    If someone could help me, by telling me what Native Apis can do that, for example... or just a link to a sourcecode or a compiled driver ( NT/2k/XP of course ) which I will be able to analyse.

    [EDIT JMI: As this Thread progressed it was suggested that a collaberative effort might be made to accomplish some of the things discussed here and I suggested it might make a good Mini-Project. At the parties request, I have moved it here, in the hope those interested and qualified might contribute to that effort.]

  2. #2
    son of Bungo & Belladonna bilbo's Avatar
    Join Date
    Mar 2004
    Location
    Rivendell
    Posts
    310
    Are you searching for an OSD (On Screen Display)?
    Look at http://www.codeproject.com/w2k/forecast.asp

    Regards, bilbo
    Non quia difficilia sunt, non audemus, sed quia non audemus, difficilia sunt.[Seneca, Epistulae Morales 104, 26]

  3. #3
    <script>alert(0)</script> disavowed's Avatar
    Join Date
    Apr 2002
    Posts
    1,281
    SynApsus, siwvid.sys does what you want (when it's used to display softice in a popup window, as opposed to fullscreen)

  4. #4
    : Code Injector : nikolatesla20's Avatar
    Join Date
    Apr 2002
    Location
    :ether:
    Posts
    815
    I think you need to write a video mini-driver. A mini-driver plugs into the larger driver architecture of windows and allows you to do such specialized tasks as video. Most video drivers and sound card drivers are mini-class drivers. If you have the DDK, then you should be looking in the class drivers sections. It's a very steep learning curve so get out some coffee and have fun!

    -nt20

  5. #5
    The only GDI/Windows graphics book you will ever need:

    Windows Graphics Programming Win32 GDI and DirectDraw®
    Feng Yuan
    Publisher: Prentice Hall PTR
    ISBN: 0-13-086985-6

    And it's floating around in .chm format too.
    Still here...

  6. #6
    the Lamer ? it's ME ! Yes SynApsus's Avatar
    Join Date
    Feb 2004
    Location
    France
    Posts
    30
    Thanks to all, especially for this excellent book which talks about Ring3 AND Ring0 graphical programming.
    bilbo, I tried before to do this with a topmost window in ring3 level... it is not convenient for me. It is a timer window ( injected in a process ) whose text is modified every second, and if the process who displays this text is resource-greedy, the seconds do not ravel as normal ( every real second, they come too late )
    More, if this text is displayed in a process who is in fullscreen mode, the fullscreen is disabled to display my text. I want she stays and the text to be displayed REALLY at the top. So, Ring0

    If you have other links or other help to give, that would be very cool : the book is very interesting but not very complete about ring0 graphic programming. It just talks a little about it.

    Excuse me for my english, I try to do as better as I can.
    Last edited by SynApsus; August 31st, 2004 at 16:16.

  7. #7
    son of Bungo & Belladonna bilbo's Avatar
    Join Date
    Mar 2004
    Location
    Rivendell
    Posts
    310
    Well, in that case disavowed is right... siwvid.sys has complete control of the current screen, because it knows the current pixel format and the current address at which the video memory is mapped.

    How it obtains this info? It reads from the registry a list of the video drivers used by the system (kernel DLLs), and hooks their entry point, which is DrvEnableDriver(), using a powerful hooking engine.
    In this way it obtains a pointer to the driver structure DRVENABLEDATA, and it can hooks all the interface functions exported by the driver.

    Regards, bilbo
    Non quia difficilia sunt, non audemus, sed quia non audemus, difficilia sunt.[Seneca, Epistulae Morales 104, 26]

  8. #8
    Quote Originally Posted by disavowed
    SynApsus, siwvid.sys does what you want (when it's used to display softice in a popup window, as opposed to fullscreen)
    it's the exact opposite, ddraw knowledge is inside ntice itself, siwvid is the legacy video mode switching stuff.

  9. #9
    I am interested in this aspect of graphics programming. Mainly how do you float a window inside a full screen mode game. This is probably doable with directx if the game itself uses directx engine. Could someone point me to some examples, pointers or tuts?

    thx!

  10. #10
    Homer, can you phrase your question a bit differently? "float a window"? You can make dialogs etc appear within a DX fullscreen app, but it's kludgy. The best way to make it appear as though a normal window is visible over a DX full screen app is to draw the window through the GDI normally, then blit it to a DX surface and use the surface as a texturemap for an RHW quad. I code a lot of DX/D3D stuff...
    Still here...

  11. #11
    Silver, something like an in game maphack is the kind of stuff I am aiming at. It's like an overlaying window on top of the full screen game interface.

  12. #12
    Hm, in that case I'd inject some code based around DrawPrimitiveUP using RHW to make life easy. Shouldn't be too difficult, providing you make absolutely sure to get the calls inside a BeginScene()/EndScene() segment, and not to change (or at least reset) the renderstates after your rendering. Thinking about it, your best bet would be to add you code immediately before the Present() call, which would allow you to mess with the transforms and the renderstates without having to reset them. Shaders and multipass rendering are a no-no for this however.

    If you have a live example, I'll be happy to code you a mini-DX app in C that you can rip the compiled code from to inject into something - would save you learning any DX (if you don't know any already?)...
    Still here...

  13. #13
    Silver, I found it hard to understand what you just said in your previous message even though I am a code injection guru, that just shows you how much I know about directX stuff Since I am fairly certain that a full screen mode windows media player uses directX (or not?), maybe you can demonstrate how to draw a text clock window over it? Besides being a demo, it's got some practical use as well.

  14. #14
    Hehe This could be interesting, because I'm a DirectX guru but firmly in the "noob" category for code injection.

    Here's my thoughts, if we can work together on this. I'll code a simple app in C++ (DX in asm is a bit of an arse because of the COM and object issues) that uses DX to draw something (a clock is fine). I'll tag the function that does the actual clock drawing with some easy to locate code. I'll give you the exe, and you can pull the disasm of the function out of it. I'll then code a second app that does some D3D rendering (a cube or something), which we can use as a target. I'll then help you find the right location in the assembled target to call my clock code, and you can handle the injection part of it. End result should be the target with the clock code injected into it.

    Windows Media Player is not necessarily a good target for our first attempt at this - it doesn't actually use D3D, it uses DShow. In simple terms, D3D is the 2D and 3D rendering interface for the DirectX suite, whereas DShow is the video rendering interface (hence the xvid/ffdshow *filter* - they are DShow filters). We can't use DShow COM methods to draw anything with ease, we need to use D3D. It's possible that WMP imports the D3D methods, but I'd rather try it on a sample exe where we can control both the target and the injection code - then move onto a live target.

    If that makes sense to you, I'll go ahead and do it. If you have other ideas let me know - I'm really interested to see how you inject this code into a working sample, and would really like to try this little project...
    Still here...

  15. #15
    Give some thought to making this a "mini-project" and moving the effort into that Forum and you might attract some additional help from others with some specialized knowledge on these topics. Just a thought.

    Regards,
    JMI

Similar Threads

  1. Key Level & Key Options
    By ironman in forum The Newbie Forum
    Replies: 10
    Last Post: March 15th, 2014, 08:59
  2. LINK: Steganography in Computer Graphics
    By Kayaker in forum RCE Cryptographics
    Replies: 1
    Last Post: March 29th, 2006, 09:50
  3. Recommended Graphics Card for Driversuite 3.1 ?
    By The SharK in forum The Newbie Forum
    Replies: 8
    Last Post: November 11th, 2004, 08:40
  4. It's Easy-Level... Everyone have a try...
    By JimmyClif in forum Mini Project Area
    Replies: 11
    Last Post: June 20th, 2001, 17:33
  5. Silicon Graphics Unix Flexlm
    By unix in forum Advanced Reversing and Programming
    Replies: 14
    Last Post: January 12th, 2001, 16:49

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •