Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Screen capture of DirectX surface

Posted on 2002-05-12
15
Medium Priority
?
551 Views
Last Modified: 2013-12-03
How to do the subj?
Is there any more or less documented way?
I need to make screen capture containing e.g. RealPlayer or the like video window.
Of course I'm speaking about how to that from my own application!
0
Comment
Question by:abb1
15 Comments
 
LVL 9

Expert Comment

by:BeyondWu
ID: 7005091
I found there no difference between GDI and DirectX screen capture under Win2K.
0
 
LVL 3

Author Comment

by:abb1
ID: 7005133
And what about others (9x/Me)?
0
 
LVL 9

Expert Comment

by:BeyondWu
ID: 7007439
It maybe has some problems under win9x/me, I don't know:o(
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 3

Author Comment

by:abb1
ID: 7007702
Please omit "maybe" and you'll be completely right! :) Hence is my Q.
0
 
LVL 9

Expert Comment

by:BeyondWu
ID: 7007800
Really? I don't know:o(
Now, I don't know other method except implement a tiny driver.
*: I don't know the LCD(maybe same as VGA), so the following is about VGA only.

In you tiny driver, you can use MmMapIoSpace map the physical address 0xA0000(which is VGA screen memory) to system address space, then you can save the content in a file. Remember, the content of memory depend on the VGA mode, If the DirectX always under 640*480*256, your code will simple, otherwise you should detect the mode first and then save it in some different ways.
0
 
LVL 3

Author Comment

by:abb1
ID: 7007872
As I know that A000 was for pure VGA only... SVGA's use more space. Am I wrong?
0
 
LVL 9

Expert Comment

by:BeyondWu
ID: 7009940
No, All VGA compatible card use the same address under Windows, actually I have tested it on my DELL P4 computer. But I havn't tested it on laptop.
0
 
LVL 3

Author Comment

by:abb1
ID: 7010385
So, well.
The next step: can I achieve that without a driver? As I know it is possible to access the hardware ports under W9x via ring0 jump. Is it possible to do something similar with memory addresses?
And is there any doc about video memory structure?
Shorter -- give me link to some at least very raw sample and we'll stop this thread :)
0
 
LVL 9

Expert Comment

by:BeyondWu
ID: 7012778
Yeah, you jump to ring0 just like CIH virus. But I don't know how find the VGA physical address with this method. You can try it.
Sorry, I don't know any link or sample about this.
Actually, If there are some applications that can do this, you can analyse(with SoftICE, IDA and other great tools) it and find the way.
Can you find the sample of SoftICE or other famous tools? :-)
Not everything has the link or sample. :O(
You can refer to the http://www.bsdg.org/swag/EGAVGA for VGA info.
0
 

Expert Comment

by:mov
ID: 7072373
Hmm.. If you are trying to capture video picture which is shown by realplayer or windows mediaplayer, and then you notice hey, it didn't capture anything, its cause videocard draws it straight to screen without having it first in vidmem. So its useless trying to capture picture from videolayer. First you have to tell system to draw it in mem, and then it gets little slower put capturing is then made possible.

But as in your topic, capturing directx surface in your own program is to just take pointer to your surface and start reading it from start to end and writing those down as your X and Y sizes and remembering the colourdepth.

hmm... was there something else I wanted to say.. yeah, I'm not sure what we are talking overhere and why we are talking about old historic a000:0000 realmode address space, that scares me. Usually I'm avoiding to write straight into display memory cause of synchronization and other issues, which will come with todays hardware, thats why believing into drivers that handle those are the most best way to get speed and power out of your vidcard.

ok, I'm off, mov.
0
 
LVL 3

Author Comment

by:abb1
ID: 7073095
As I've found, all goes well (with a capture) when I decrease a hardware acceleration (from the maximum to some medium value). Then all goes well with a simple capturing like PrtScreen does!
So, I apologize, maybe my question was incorrect -- no DX stuff needed here! But maybe anybody of the above could explain me what happens when I Decrease acceleration and whether can I do that without rebooting?
Otherwise I don't see (even in theory) any programmical solution here...
Sorry again!
0
 
LVL 3

Author Comment

by:abb1
ID: 10706760
Agree. Thanks.
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 10743452
PAQed, with points refunded (400)

CetusMOD
Community Support Moderator
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question