Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Monthly Seminars at OSR Headquarters

East Coast USA
Windows Internals and SW Drivers, Dulles (Sterling) VA, 13 November 2017

Kernel Debugging & Crash Analysis for Windows, Nashua (Amherst) NH, 4 December 2017

Writing WDF Drivers I: Core Concepts, Nashua (Amherst) NH, 8 January 2018

WDF Drivers II: Advanced Implementation Techniques, Nashua (Amherst) NH, 15 January 2018


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 5  
14 Nov 03 03:57
ntdev member 14020
xxxxxx@hotmail.com
Join Date:
Posts To This List: 2
How to access display memory in kernel mode ?

I am trying to read display contents from a kernel mode application. Is there any way to do this ? Most likely the source of call will be either display driver or a miniport driver..
  Message 2 of 5  
14 Nov 03 16:26
Don Burn
xxxxxx@acm.org
Join Date:
Posts To This List: 3179
How to access display memory in kernel mode ?

> I am trying to read display contents from a kernel mode application. Is > there any way to do this ? Most likely the source of call will be either > display driver or a miniport driver.. Seriously, think about the fact that if your driver is general purpose, Windows does not require a display. Also with a terminal services model which "display" do you want to model. In general have any dependency in your driver on displaying on a desktop is a bad idea. Don Burn (MVP for DDK) Windows Filesystem and Driver Consulting
  Message 3 of 5  
15 Nov 03 05:09
ntdev member 13850
xxxxxx@hanmir.com
Join Date:
Posts To This List: 8
How to access display memory in kernel mode ?

VideoPortMapMemory is mapping the video memory address to virtual address. But the caller is NOT Display driver... , You must access Video miniport dirver. How ? I don't know.... In general... video card provider prohibit... -.-; But, U can access video memory, by .... Memory mapping... If U know address space of Video Ram. Then How can I access video memory information or something....? The formal way... is through.. EngIoControl(?) in display driver.... But, as I mentioned... U can get the information from registry.... HKLM\SYSTEM\CurrentControlSet\Enum\PCI\VEN_????&DEV_????....\Control\AllocConfig Next, U can map the address to your user level application address, as follows PHYSICAL_ADDRESS PhysicalAddress; PhysicalAddress.u.HighPart = 0; PhysicalAddress.u.LowPart = 0x????????; // IoAddress of video card. if (!pBI->pBuf||pBI->nSize==0) return NULL; //Virtual address which driver can access pBI->pBuf = MmMapIoSpace( PhysicalAddress, pBI->nSize, FALSE ); if (pBI->pBuf == NULL) { return NULL; } pBI->pmdl = IoAllocateMdl( pBI->pBuf, pBI->nSize, 0, 0, 0 ); if (!pBI->pmdl) { MmUnmapIoSpace( pBI->pBuf, pBI->nSize); return NULL; } MmBuildMdlForNonPagedPool( pBI->pmdl ); pBI->pUserVa = MmMapLockedPages( pBI->pmdl, UserMode ); if (!pBI->pUserVa) { IoFreeMdl(pBI->pmdl); MmUnmapIoSpace( pBI->pBuf, pBI->nSize); return NULL; }
  Message 4 of 5  
17 Nov 03 07:51
ntdev member 14047
xxxxxx@mailinator.com
Join Date:
Posts To This List: 1
How to access display memory in kernel mode ?

You see the thing is I am not sure I need a driver. My goal is to have access to display data across Windows logics (locked workstation, fast user switching etc). If you ever tried to get display using GDI, GDI+, DirectX, or any other high level APIs, there is a problem which is like, display data handles, variables, or objects you use to access the data, become invalid when you hit 'Lock Workstation' or switch user... For me this is an indication, that i need to go deeper, to get under this logics, because my remote desktop application is not a user mode service but a terminal emulator. This means that a remote client can logon to a locked workstation and log in remotely... While Terminal Services EMULATES user login screens, I want to send those screens to client as-is and provide remote keyboard and mouse services. This is the only reason for my question ;) Hope I made this clear, i dont know how to explain it better !
  Message 5 of 5  
17 Nov 03 19:36
Maxim S. Shatskih
xxxxxx@storagecraft.com
Join Date: 20 Feb 2003
Posts To This List: 10395
How to access display memory in kernel mode ?

> in remotely... While Terminal Services EMULATES user login screens, I want > to send those screens to client as-is and provide remote keyboard and > mouse services. Add a mirror driver, and mirror the display drawing to some in-memory surface. Maxim Shatskih, Windows DDK MVP StorageCraft Corporation xxxxx@storagecraft.com http://www.storagecraft.com
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 11:57.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license