Skip to content

Instantly share code, notes, and snippets.

View valinet's full-sized avatar

Valentin Radu valinet

View GitHub Profile
ADeltaX / main.cpp
Created March 22, 2021 15:38
DWM Thumbnail/VirtualDesktop IDCompositionVisual example
#include <Unknwn.h>
#include <Windows.h>
#include <ntstatus.h>
#include <winternl.h>
#include <wrl\implements.h>
#include <comutil.h>
#include <dcomp.h>
#include <dwmapi.h>
#include <dxgi1_3.h>
#include <d3d11_2.h>
m417z / ShowAppId.cpp
Created July 29, 2020 16:33
Get an Application User Model ID (AUMID) from a window handle
#include <windows.h>
#include <initguid.h>
// {c8900b66-a973-584b-8cae-355b7f55341b}
DEFINE_GUID(CLSID_StartMenuCacheAndAppResolver, 0x660b90c8, 0x73a9, 0x4b58, 0x8c, 0xae, 0x35, 0x5b, 0x7f, 0x55, 0x34, 0x1b);
// {46a6eeff-908e-4dc6-92a6-64be9177b41c}
DEFINE_GUID(IID_IAppResolver_7, 0x46a6eeff, 0x908e, 0x4dc6, 0x92, 0xa6, 0x64, 0xbe, 0x91, 0x77, 0xb4, 0x1c);
// {de25675a-72de-44b4-9373-05170450c140}
ADeltaX / main.cpp
Last active July 17, 2024 16:55
Example of creating a window using a private api on a dll-injected immersive process
#include "pch.h"
#pragma comment(lib, "gdi32.lib")
enum ZBID
rikka0w0 /
Last active September 22, 2023 08:30
Get rid of the immersive menu in Win10 1809 and above
  1. Download tools: ResourceHacker and mssstyleEditor, then unpack them
  2. Download resources: Win8 theme for Win10, and then uppack it, we will need 'Windows 8 RP Themes for Windows 10\Theme\Themes For 10 Build 14393 Anniversary Update\Windows 8 RP\aero 8 RP.msstyle'.
  3. Open it with ResourceHacker, export IMAGE 1055:0 and IMERSIVE 1:0.
  4. Make a backup of the original aerolite.msstyles and make a copy of it to your working folder (arbitary)
  5. Open it with ResourceHacker, Go to 'Action -> Add an Image or Other Binary Resource' or hit Ctrl+M to open the "Add Binary Resource" Dialog. Choose the menu image resource file that is going to be used, then change the "Resource Type" to IMAGE and resource name to be what ever available, in my case, 993.
  6. Change the value of IMERSIVE 1:0, by importing the data from "aero 8 RP.msstyle"
define-private-public / HttpServer.cs
Last active June 28, 2024 13:57
A Simple HTTP server in C#
// Filename: HttpServer.cs
// Author: Benjamin N. Summerton <define-private-public>
// License: Unlicense (
using System;
using System.IO;
using System.Text;
using System.Net;
using System.Threading.Tasks;
shamil /
Last active July 16, 2024 22:52
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
t-mat / win32-capture-stack-back-trace.cpp
Created December 15, 2013 22:38
Win32: CaptureStackBackTrace
// CaptureStackBackTrace
#include <windows.h>
#include <stdio.h>
void capture() {
const ULONG framesToSkip = 0;
const ULONG framesToCapture = 64;
mridgers / pdbdump.c
Created June 21, 2012 21:19
Small tool to list and query symbols in PDB files.
// pdbdump.c - dump symbols from .pdb and executable files (public domain).
// - to compile; cl.exe /Ox /Zi pdbdump.c
// -
// - Martin Ridgers, pdbdump 'at'
#include <stdio.h>
#include <Windows.h>
#include <DbgHelp.h>