### C# DXGICapture Usage Example Source: https://context7.com/murkyyt/dxgicapture/llms.txt An example demonstrating how to use the DXGICapture wrapper class in C#. It shows initialization, querying monitor and adapter counts, capturing all screens, and capturing individual monitors, saving them as PNG files. This example utilizes the `using` statement for proper resource management. ```csharp class Program { static void Main() { using (var capture = new DXGICapture()) { if (!capture.Init()) { Console.WriteLine("Failed to initialize capture"); return; } Console.WriteLine($"Monitors: {capture.MonitorCount}"); Console.WriteLine($"Adapters: {capture.AdapterCount}"); // Capture all screens combined using (Bitmap allScreens = capture.CaptureAllScreens()) { allScreens?.Save("all_screens.png"); } // Capture individual monitors for (int i = 0; i < capture.MonitorCount; i++) { using (Bitmap screen = capture.CaptureScreen(i)) { screen?.Save($"monitor_{i}.png"); } } } } } ``` -------------------------------- ### DXGI_GetAdapterDescription - Get Adapter Details Source: https://context7.com/murkyyt/dxgicapture/llms.txt Retrieves the DXGI_ADAPTER_DESC1 structure for a specified adapter index. This structure provides details about the graphics adapter, including its description, vendor and device IDs, memory information, and LUID. ```APIDOC ## DXGI_GetAdapterDescription ### Description Retrieves the DXGI_ADAPTER_DESC1 structure for the specified adapter index, containing the adapter description, vendor/device IDs, memory information, and LUID. Useful for identifying hardware, logging system information, and selecting specific adapters in multi-GPU configurations. ### Method GET (Conceptual - This is a function call, not a typical HTTP endpoint) ### Endpoint N/A (Function Call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```c #include "DXGICapture.h" void get_adapter_info(int index) { DXGI_ADAPTER_DESC1 desc; if (DXGI_GetAdapterDescription(index, &desc)) { // Process the description structure printf("Adapter Description: %ws\n", desc.Description); } } ``` ### Response #### Success Response (200) - **desc** (DXGI_ADAPTER_DESC1*) - A pointer to a DXGI_ADAPTER_DESC1 structure populated with the adapter's details. #### Response Example ```json { "Description": "NVIDIA GeForce RTX 3080", "VendorId": 4318, // 0x10DE "DeviceId": 7005, // 0x1187 "SubSysId": 1492524193, // 0x591A0000 "Revision": 161, "DedicatedVideoMemory": 10737418240, // 10 GB "DedicatedSystemMemory": 0, "SharedSystemMemory": 17179869184, // 16 GB "AdapterLuid": {"HighPart": 0, "LowPart": 1234567890}, "Flags": 0 } ``` ``` -------------------------------- ### DXGI_GetOutputDescription - Get Output Details Source: https://context7.com/murkyyt/dxgicapture/llms.txt Retrieves the DXGI_OUTPUT_DESC structure for a specified output index. This structure contains information such as the device name, desktop coordinates, rotation, and attachment status of a display output. ```APIDOC ## DXGI_GetOutputDescription ### Description Retrieves the DXGI_OUTPUT_DESC structure for the specified output index, containing the device name, desktop coordinates, rotation, and attachment status. This information is essential for understanding monitor layout, handling rotated displays, and positioning captured content correctly in multi-monitor setups. ### Method GET (Conceptual - This is a function call, not a typical HTTP endpoint) ### Endpoint N/A (Function Call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```c #include "DXGICapture.h" void get_output_info(int index) { DXGI_OUTPUT_DESC desc; if (DXGI_GetOutputDescription(index, &desc)) { // Process the description structure printf("Device Name: %ws\n", desc.DeviceName); } } ``` ### Response #### Success Response (200) - **desc** (DXGI_OUTPUT_DESC*) - A pointer to a DXGI_OUTPUT_DESC structure populated with the output's details. #### Response Example ```json { "DeviceName": "\\\\.\\DISPLAY1", "DesktopCoordinates": {"left": 0, "top": 0, "right": 1920, "bottom": 1080}, "Rotation": 0, // DXGI_MODE_ROTATION_IDENTITY "AttachedToDesktop": true } ``` ``` -------------------------------- ### Release DXGI Capture Resources (C/C++) Source: https://context7.com/murkyyt/dxgicapture/llms.txt Releases all resources allocated by DXGI_InitCapture, including D3D11 devices, contexts, and output duplications. This function is crucial for preventing resource leaks and should be called when capture is no longer needed. After calling, DXGI_InitCapture must be re-invoked to resume capture operations. The example also demonstrates a pattern for re-initialization in case of display changes. ```c #include "DXGICapture.h" void capture_session() { // Initialize if (!DXGI_InitCapture()) { return; } // Perform multiple captures for (int frame = 0; frame < 100; frame++) { HBITMAP hBmp = DXGI_CaptureScreen(0); if (hBmp) { // Process the bitmap... DeleteObject(hBmp); // Don't forget to free the bitmap } } // Clean up - releases all DXGI and D3D11 resources DXGI_DeInitCapture(); } // Re-initialization pattern for handling display changes void reinitialize_on_error() { DXGI_DeInitCapture(); // Release existing resources Sleep(100); // Brief delay for system stability DXGI_InitCapture(); // Reinitialize with new configuration } ``` -------------------------------- ### Retrieve DXGI Output Description in C/C++ Source: https://context7.com/murkyyt/dxgicapture/llms.txt Retrieves the DXGI_OUTPUT_DESC structure for a specified monitor. This function provides essential data such as desktop coordinates, display rotation, and attachment status, which are critical for multi-monitor setup management. ```c #include "DXGICapture.h" void analyze_monitor_layout() { if (!DXGI_InitCapture()) { return; } int outputCount = DXGI_OutputsCount(); int minX = INT_MAX, minY = INT_MAX; int maxX = INT_MIN, maxY = INT_MIN; for (int i = 0; i < outputCount; i++) { DXGI_OUTPUT_DESC desc; DXGI_GetOutputDescription(i, &desc); if (desc.DesktopCoordinates.left < minX) minX = desc.DesktopCoordinates.left; if (desc.DesktopCoordinates.top < minY) minY = desc.DesktopCoordinates.top; if (desc.DesktopCoordinates.right > maxX) maxX = desc.DesktopCoordinates.right; if (desc.DesktopCoordinates.bottom > maxY) maxY = desc.DesktopCoordinates.bottom; const char* rotationStr = "Unknown"; switch (desc.Rotation) { case DXGI_MODE_ROTATION_IDENTITY: rotationStr = "None (0°)"; break; case DXGI_MODE_ROTATION_ROTATE90: rotationStr = "90°"; break; case DXGI_MODE_ROTATION_ROTATE180: rotationStr = "180°"; break; case DXGI_MODE_ROTATION_ROTATE270: rotationStr = "270°"; break; } printf("Monitor %d (%ws):\n", i, desc.DeviceName); printf(" Bounds: [%d,%d] to [%d,%d]\n", desc.DesktopCoordinates.left, desc.DesktopCoordinates.top, desc.DesktopCoordinates.right, desc.DesktopCoordinates.bottom); printf(" Rotation: %s\n", rotationStr); printf(" Attached: %s\n\n", desc.AttachedToDesktop ? "Yes" : "No"); } printf("Virtual Desktop: %dx%d (from %d,%d to %d,%d)\n", maxX - minX, maxY - minY, minX, minY, maxX, maxY); DXGI_DeInitCapture(); } ``` -------------------------------- ### Initialize DXGI Capture System (C/C++) Source: https://context7.com/murkyyt/dxgicapture/llms.txt Initializes the DXGI capture system by enumerating adapters and outputs, creating D3D11 devices, and setting up output duplication. This function must be called before any capture operations. It returns TRUE on success and FALSE on failure, indicating potential issues like incompatible hardware or insufficient permissions. Dependencies include the DXGICapture.h header. ```c #include "DXGICapture.h" int main() { // Initialize the capture system - must be called first BOOL success = DXGI_InitCapture(); if (!success) { printf("Failed to initialize DXGI capture.\n"); printf("Possible causes:\n"); printf(" - No DXGI 1.2+ compatible GPU\n"); printf(" - Running in a remote desktop session\n"); printf(" - Insufficient permissions\n"); return -1; } printf("DXGI capture initialized successfully!\n"); printf("Adapters found: %d\n", DXGI_AdaptersCount()); printf("Outputs (monitors) found: %d\n", DXGI_OutputsCount()); // ... perform capture operations ... // Always clean up when done DXGI_DeInitCapture(); return 0; } ``` -------------------------------- ### Capture Screen Content using C# Wrapper Source: https://github.com/murkyyt/dxgicapture/blob/master/README.md Demonstrates how to initialize the DXGICapture instance, retrieve a bitmap handle, and process the captured frame. It includes error handling to re-initialize the capture if the initial attempt returns an invalid pointer. ```C# // Create new DXGICapture object DXGICapture DXGIcapture = new DXGICapture(); // Initialize the capture DXGIcapture.Init(); // Get pointer to the bitmap IntPtr _handle = DXGIcapture.GetCapture(); // Check for invalid capture if (_handle == IntPtr.Zero) { DXGIcapture.DeInit(); DXGIcapture.Init(); _handle = DXGIcapture.GetCapture(); } using (Bitmap bitmap = Image.FromHbitmap(_handle)) { // Do stuff with bitmap } // Deinitialize capture DXGIcapture.DeInit(); ``` -------------------------------- ### DXGI_InitCapture - Initialize Capture System Source: https://context7.com/murkyyt/dxgicapture/llms.txt Initializes the Desktop Duplication API, enumerating graphics adapters and outputs. This function must be called before any other capture operations. ```APIDOC ## DXGI_InitCapture ### Description Initializes the Desktop Duplication API by enumerating all graphics adapters and their outputs (monitors). This function must be called before any other capture functions. It creates D3D11 devices for each adapter and sets up output duplication for all connected displays. Returns TRUE on success, FALSE if initialization fails (e.g., no compatible GPU, no outputs available, or insufficient permissions). ### Method `C Function Call` ### Endpoint `N/A (Library Function)` ### Parameters None ### Request Example ```c #include "DXGICapture.h" int main() { BOOL success = DXGI_InitCapture(); if (!success) { printf("Failed to initialize DXGI capture.\n"); return -1; } printf("DXGI capture initialized successfully!\n"); // ... perform capture operations ... DXGI_DeInitCapture(); return 0; } ``` ### Response #### Success Response `TRUE` (BOOL) - Initialization successful. #### Failure Response `FALSE` (BOOL) - Initialization failed. #### Response Example `TRUE` or `FALSE` ``` -------------------------------- ### C# DXGICapture Wrapper Class for Screen Capture Source: https://context7.com/murkyyt/dxgicapture/llms.txt A complete C# wrapper class for DXGICapture, enabling screen capture via P/Invoke. It includes thread-safe access, resource management with IDisposable, and methods for initialization, deinitialization, capturing single or all screens, and querying monitor/adapter counts. Dependencies include System.Drawing and System.Runtime.InteropServices. ```csharp using System; using System.Drawing; using System.Runtime.InteropServices; public class DXGICapture : IDisposable { private const string DllName = "DXGICapture.dll"; private static readonly object _lock = new object(); private bool _initialized = false; private bool _disposed = false; // P/Invoke declarations [DllImport(DllName, CallingConvention = CallingConvention.Cdecl)] private static extern bool DXGI_InitCapture(); [DllImport(DllName, CallingConvention = CallingConvention.Cdecl)] private static extern void DXGI_DeInitCapture(); [DllImport(DllName, CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr DXGI_CaptureScreen(int index); [DllImport(DllName, CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr DXGI_UpdateFrame(); [DllImport(DllName, CallingConvention = CallingConvention.Cdecl)] private static extern void DXGI_SetTimeout(uint ms); [DllImport(DllName, CallingConvention = CallingConvention.Cdecl)] private static extern int DXGI_OutputsCount(); [DllImport(DllName, CallingConvention = CallingConvention.Cdecl)] private static extern int DXGI_AdaptersCount(); [DllImport(DllName, CallingConvention = CallingConvention.Cdecl)] private static extern bool DXGI_IsEnabled(); [DllImport("gdi32.dll")] private static extern bool DeleteObject(IntPtr hObject); public const int AllScreens = -1; public bool Init() { lock (_lock) { if (_disposed) throw new ObjectDisposedException(nameof(DXGICapture)); _initialized = DXGI_InitCapture(); return _initialized; } } public void DeInit() { lock (_lock) { if (_initialized) { DXGI_DeInitCapture(); _initialized = false; } } } public Bitmap CaptureScreen(int monitorIndex = 0) { lock (_lock) { if (!_initialized) return null; IntPtr hBitmap = DXGI_CaptureScreen(monitorIndex); if (hBitmap == IntPtr.Zero) { // Try reinitializing on failure DeInit(); Init(); hBitmap = DXGI_CaptureScreen(monitorIndex); } if (hBitmap == IntPtr.Zero) return null; try { return Image.FromHbitmap(hBitmap); } finally { DeleteObject(hBitmap); } } } public Bitmap CaptureAllScreens() => CaptureScreen(AllScreens); public int MonitorCount { get { lock (_lock) { return _initialized ? DXGI_OutputsCount() : 0; } } } public int AdapterCount { get { lock (_lock) { return _initialized ? DXGI_AdaptersCount() : 0; } } } public void SetTimeout(uint milliseconds) { lock (_lock) { DXGI_SetTimeout(milliseconds); } } public void Dispose() { lock (_lock) { if (!_disposed) { DeInit(); _disposed = true; } } GC.SuppressFinalize(this); } ~DXGICapture() => Dispose(); } ``` -------------------------------- ### Verify and Recover DXGI Capture State in C/C++ Source: https://context7.com/murkyyt/dxgicapture/llms.txt Demonstrates how to use DXGI_IsEnabled to monitor capture health and perform automated recovery if the system fails. This pattern is essential for long-running applications where display configurations may change unexpectedly. ```c #include "DXGICapture.h" void robust_capture_with_recovery() { if (!DXGI_InitCapture()) { printf("Initial capture setup failed\n"); return; } int consecutiveFailures = 0; const int MAX_FAILURES = 5; while (1) { if (!DXGI_IsEnabled()) { printf("Capture disabled, attempting reinitialization...\n"); DXGI_DeInitCapture(); Sleep(500); if (!DXGI_InitCapture()) { printf("Reinitialization failed, retrying in 1 second...\n"); Sleep(1000); continue; } printf("Reinitialization successful!\n"); consecutiveFailures = 0; } HBITMAP hBmp = DXGI_CaptureScreen(0); if (hBmp) { consecutiveFailures = 0; DeleteObject(hBmp); } else { consecutiveFailures++; printf("Capture failed (%d/%d)\n", consecutiveFailures, MAX_FAILURES); if (consecutiveFailures >= MAX_FAILURES) { printf("Max failures reached, forcing reinitialization...\n"); DXGI_DeInitCapture(); consecutiveFailures = 0; } } Sleep(16); } DXGI_DeInitCapture(); } ``` -------------------------------- ### Query Graphics Adapter Configuration Source: https://context7.com/murkyyt/dxgicapture/llms.txt Retrieves the total count of graphics adapters and provides access to hardware-specific details like Vendor ID, Device ID, and memory statistics for system diagnostics. ```c #include "DXGICapture.h" void display_system_configuration() { if (!DXGI_InitCapture()) return; int adapterCount = DXGI_AdaptersCount(); for (int i = 0; i < adapterCount; i++) { DXGI_ADAPTER_DESC1 adapterDesc; DXGI_GetAdapterDescription(i, &adapterDesc); printf("Adapter %d: %ws\n", i, adapterDesc.Description); printf(" Dedicated Video Memory: %zu MB\n", adapterDesc.DedicatedVideoMemory / (1024 * 1024)); } DXGI_DeInitCapture(); } ``` -------------------------------- ### Enumerate Available Display Outputs Source: https://context7.com/murkyyt/dxgicapture/llms.txt Retrieves the total number of connected monitors and iterates through them to extract detailed metadata such as device names, resolutions, and screen coordinates. ```c #include "DXGICapture.h" void enumerate_outputs() { if (!DXGI_InitCapture()) { printf("Failed to initialize\n"); return; } int outputCount = DXGI_OutputsCount(); for (int i = 0; i < outputCount; i++) { DXGI_OUTPUT_DESC desc; DXGI_GetOutputDescription(i, &desc); int width = desc.DesktopCoordinates.right - desc.DesktopCoordinates.left; int height = desc.DesktopCoordinates.bottom - desc.DesktopCoordinates.top; printf("Output %d: %ws, Resolution: %dx%d\n", i, desc.DeviceName, width, height); } DXGI_DeInitCapture(); } ``` -------------------------------- ### Retrieve DXGI Adapter Description in C/C++ Source: https://context7.com/murkyyt/dxgicapture/llms.txt Retrieves the DXGI_ADAPTER_DESC1 structure to obtain hardware information such as vendor IDs, device IDs, and memory metrics. This is useful for identifying specific GPUs in multi-adapter environments. ```c #include "DXGICapture.h" void log_gpu_information() { if (!DXGI_InitCapture()) { return; } printf("GPU Information Report\n"); printf("======================\n\n"); for (int i = 0; i < DXGI_AdaptersCount(); i++) { DXGI_ADAPTER_DESC1 desc; DXGI_GetAdapterDescription(i, &desc); printf("Adapter %d:\n", i); printf(" Name: %ws\n", desc.Description); printf(" Vendor ID: 0x%04X", desc.VendorId); switch (desc.VendorId) { case 0x10DE: printf(" (NVIDIA)\n"); break; case 0x1002: printf(" (AMD)\n"); break; case 0x8086: printf(" (Intel)\n"); break; default: printf(" (Unknown)\n"); break; } printf(" Device ID: 0x%04X\n", desc.DeviceId); printf(" Subsystem ID: 0x%08X\n", desc.SubSysId); printf(" Revision: %d\n", desc.Revision); printf(" Dedicated Video Memory: %.2f GB\n", desc.DedicatedVideoMemory / (1024.0 * 1024.0 * 1024.0)); printf(" Dedicated System Memory: %.2f GB\n", desc.DedicatedSystemMemory / (1024.0 * 1024.0 * 1024.0)); printf(" Shared System Memory: %.2f GB\n", desc.SharedSystemMemory / (1024.0 * 1024.0 * 1024.0)); printf(" LUID: %08X-%08X\n", desc.AdapterLuid.HighPart, desc.AdapterLuid.LowPart); printf(" Flags: 0x%X", desc.Flags); if (desc.Flags & DXGI_ADAPTER_FLAG_REMOTE) printf(" [REMOTE]"); if (desc.Flags & DXGI_ADAPTER_FLAG_SOFTWARE) printf(" [SOFTWARE]"); printf("\n\n"); } DXGI_DeInitCapture(); } ``` -------------------------------- ### Capture Screen by Index (C/C++) Source: https://context7.com/murkyyt/dxgicapture/llms.txt Captures a screen by its index, or all screens combined. Handles monitor rotation and returns an HBITMAP. The caller must free the HBITMAP using DeleteObject(). Requires GDI+ for saving images. ```c #include "DXGICapture.h" #include #pragma comment(lib, "gdiplus.lib") int main() { // Initialize GDI+ for saving images Gdiplus::GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); // Initialize DXGI capture if (!DXGI_InitCapture()) { return -1; } // Get PNG encoder CLSID pngClsid; // ... get encoder CLSID ... // Capture ALL screens combined into single image HBITMAP hBitmapAll = DXGI_CaptureScreen(DXGICAPTURE_ALL_SCREENS); if (hBitmapAll) { Gdiplus::Bitmap bmpAll(hBitmapAll, nullptr); bmpAll.Save(L"all_screens.png", &pngClsid, nullptr); DeleteObject(hBitmapAll); // Always free the bitmap printf("Captured all screens to all_screens.png\n"); } // Capture each monitor individually int monitorCount = DXGI_OutputsCount(); for (int i = 0; i < monitorCount; i++) { HBITMAP hBitmap = DXGI_CaptureScreen(i); if (hBitmap) { Gdiplus::Bitmap bmp(hBitmap, nullptr); wchar_t filename[64]; swprintf(filename, 64, L"monitor_%d.png", i); bmp.Save(filename, &pngClsid, nullptr); DeleteObject(hBitmap); printf("Captured monitor %d\n", i); } else { printf("Failed to capture monitor %d (timeout or error)\n", i); } } DXGI_DeInitCapture(); Gdiplus::GdiplusShutdown(gdiplusToken); return 0; } ``` -------------------------------- ### Configure Frame Acquisition Timeout Source: https://context7.com/murkyyt/dxgicapture/llms.txt Sets the timeout in milliseconds for the AcquireNextFrame operation. Adjusting this value balances capture responsiveness against CPU usage, where shorter timeouts are ideal for high-FPS gaming and longer timeouts suit static content. ```c #include "DXGICapture.h" void configure_for_gaming() { DXGI_InitCapture(); DXGI_SetTimeout(16); // ~60 FPS responsiveness for (int i = 0; i < 1000; i++) { HBITMAP hBmp = DXGI_CaptureScreen(0); if (hBmp) { DeleteObject(hBmp); } } DXGI_DeInitCapture(); } void configure_for_static_content() { DXGI_InitCapture(); DXGI_SetTimeout(1000); // 1 second timeout while (running) { HBITMAP hBmp = DXGI_CaptureScreen(0); if (hBmp) { DeleteObject(hBmp); } } DXGI_DeInitCapture(); } ``` -------------------------------- ### Update Frame from Primary Monitor (C/C++) Source: https://context7.com/murkyyt/dxgicapture/llms.txt Captures the next frame from the primary monitor (output index 0). Returns an HBITMAP handle or NULL on failure. The caller must free the bitmap using DeleteObject(). Useful for continuous capture loops. ```c #include "DXGICapture.h" void continuous_capture_loop() { if (!DXGI_InitCapture()) { return; } printf("Starting continuous capture from primary monitor...\n"); int frameCount = 0; int failCount = 0; while (frameCount < 60) { // Capture 60 frames HBITMAP hBitmap = DXGI_UpdateFrame(); if (hBitmap) { frameCount++; // Get bitmap dimensions BITMAP bm; GetObject(hBitmap, sizeof(BITMAP), &bm); printf("Frame %d: %dx%d pixels\n", frameCount, bm.bmWidth, bm.bmHeight); // Process the bitmap here (e.g., encode, stream, analyze) // ... DeleteObject(hBitmap); failCount = 0; // Reset fail counter } else { failCount++; if (failCount > 10) { printf("Too many consecutive failures, reinitializing...\n"); DXGI_DeInitCapture(); Sleep(100); if (!DXGI_InitCapture()) { break; } failCount = 0; } } Sleep(16); // ~60 FPS target } DXGI_DeInitCapture(); } ``` -------------------------------- ### DXGI_IsEnabled - Check if Capture is Active Source: https://context7.com/murkyyt/dxgicapture/llms.txt Checks if the DXGI capture system is currently initialized and ready for use. This function is crucial for verifying the capture state before attempting any capture operations, especially in dynamic environments where the display configuration might change. ```APIDOC ## DXGI_IsEnabled ### Description Returns TRUE if the capture system is currently initialized and ready for use, FALSE otherwise. Use this to verify the capture state before attempting captures, especially after potential reinitializations or in long-running applications where the display configuration may change. ### Method GET (Conceptual - This is a function call, not a typical HTTP endpoint) ### Endpoint N/A (Function within a library) ### Parameters None ### Request Example ```c if (DXGI_IsEnabled()) { // Capture is active, proceed with operations } else { // Capture is not active, handle accordingly } ``` ### Response #### Success Response - **BOOL** (boolean) - TRUE if capture is active, FALSE otherwise. #### Response Example ```json { "isActive": true } ``` ``` -------------------------------- ### DXGI_DeInitCapture - Release Capture Resources Source: https://context7.com/murkyyt/dxgicapture/llms.txt Releases all resources allocated during initialization, including D3D11 devices, contexts, and output duplications. This function should always be called to prevent resource leaks. ```APIDOC ## DXGI_DeInitCapture ### Description Releases all resources allocated during initialization, including D3D11 devices, device contexts, output duplications, and the DXGI factory. This function should always be called when screen capture is no longer needed to prevent resource leaks. After calling this function, DXGI_InitCapture must be called again before performing any capture operations. ### Method `C Function Call` ### Endpoint `N/A (Library Function)` ### Parameters None ### Request Example ```c #include "DXGICapture.h" void cleanup_capture() { DXGI_DeInitCapture(); } ``` ### Response No direct return value, but releases all associated resources. #### Response Example `void` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.