Desktop Duplication API (IDXGIOutputDuplication)
Posted: Sun May 25, 2014 4:14 pm
Hi,
I'm trying to use the IID_IDXGIOutputDuplication Interface to get an image of my desktop on Windows 8 but i can't find the CLSID and IID to use with CoCreateInstance.
Help needed please, i'm totaly noob with COM
Here is what i have already done :
I'm trying to use the IID_IDXGIOutputDuplication Interface to get an image of my desktop on Windows 8 but i can't find the CLSID and IID to use with CoCreateInstance.
Help needed please, i'm totaly noob with COM

Here is what i have already done :
Code: Select all
Structure DXGI_RATIONAL
Numerator.i
Denominator.i
EndStructure
Structure DXGI_MODE_DESC
Width.i
Height.i
RefreshRate.DXGI_RATIONAL
Format.i
ScanlineOrdering.i
Scaling.i
EndStructure
Structure DXGI_OUTDUPL_POINTER_POSITION
Position.POINT
Visible.b
EndStructure
Structure DXGI_OUTDUPL_DESC
ModeDesc.DXGI_MODE_DESC
Rotation.i
DesktopImageInSystemMemory.b
EndStructure
Structure DXGI_OUTDUPL_FRAME_INFO
LastPresentTime.q
LastMouseUpdateTime.q
AccumulatedFrames.i
RectsCoalesced.b
ProtectedContentMaskedOut.b
PointerPosition.DXGI_OUTDUPL_POINTER_POSITION
TotalMetadataBufferSize.i
PointerShapeBufferSize.i
EndStructure
Structure DXGI_OUTDUPL_MOVE_RECT
SourcePoint.POINT
DestinationRect.RECT
EndStructure
Structure DXGI_OUTDUPL_POINTER_SHAPE_INFO
Type.i
Width.i
Height.i
Pitch.i
HotSpot.POINT
EndStructure
Structure DXGI_MAPPED_RECT
Pitch.i
*pBits
EndStructure
Interface IDXGIResource
GetEvictionPriority(*pEvictionPriority)
GetSharedHandle(*pSharedHandle)
GetUsage(*pUsage)
SetEvictionPriority(EvictionPriority.i)
EndInterface
Interface IDXGIOutputDuplication
GetDesc(*pDesc.DXGI_OUTDUPL_DESC)
AcquireNextFrame(TimeoutInMilliseconds.i, *pFrameInfo.DXGI_OUTDUPL_FRAME_INFO, *ppDesktopResource.IDXGIResource)
GetFrameDirtyRects(DirtyRectsBufferSize.i, *pDirtyRectsBuffer.RECT, *pDirtyRectsBufferSizeRequired)
GetFrameMoveRects(MoveRectsBufferSize.i, *pMoveRectBuffer.DXGI_OUTDUPL_MOVE_RECT, *pMoveRectsBufferSizeRequired)
GetFramePointerShape(PointerShapeBufferSize.i, *pPointerShapeBuffer, *pPointerShapeBufferSizeRequired, *pPointerShapeInfo.DXGI_OUTDUPL_POINTER_SHAPE_INFO)
MapDesktopSurface(*pLockedRect.DXGI_MAPPED_RECT)
UnMapDesktopSurface()
ReleaseFrame()
EndInterface