Skip to content

Instantly share code, notes, and snippets.

#include <windows.h>
#include <oleauto.h>
#include <conio.h>
#include <stdio.h>
#pragma comment(lib,"OleAut32.lib")
/*
This is an example of testing OleAut32.DispCallFunc from C with a VB6 ActiveX object.
@dhw
dhw / structureWithEnums.py
Created August 9, 2025 01:23 — forked from christoph2/structureWithEnums.py
Add missing enum feature to ctypes Structures.
import ctypes
import enum
#
# Prerequisits:
# -------------
# If you are using Python < 3.4 run `pip install enum34`.
#
# Problem Definition
# ------------------
@dhw
dhw / fetch_microsoft_symbols.py
Created August 1, 2025 22:58 — forked from luser/fetch_microsoft_symbols.py
Fetch and convert PDB files from Microsoft's symbol server to Breakpad .sym format
#!/usr/bin/env python
import distutils.spawn
import os
import requests
import shutil
import subprocess
import sys
import tempfile
import urlparse
@dhw
dhw / download_pdb_database.py
Created August 1, 2025 22:58 — forked from lucasg/download_pdb_database.py
Download pdb and PE files from microsoft symbol store
import os
import re
import sys
import logging
import argparse
import subprocess
import requests
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\Windows\\System32\\regsvr32.exe"="~ RUNASADMIN"
[HKEY_CLASSES_ROOT\DllFile\Shell\Register]
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\DllFile\Shell\Register\command]
@="C:\\Windows\\System32\\regsvr32.exe \"%1\""
#Enter the file name here (either an OCX or DLL file)
$fileName = "<filename>.OCX"
#$fileName = "<filename>.DLL"
#If the file is located in the syswow64 folder instead of the system32 folder, replace this in the line below
$OCXorDLLfile = "$env:SystemRoot\System32\$fileName"
function Search-Registry {
<#
.SYNOPSIS
Searches registry key names, value names, and value data (limited).
@dhw
dhw / MutexAttribute.cs
Created February 6, 2018 02:10 — forked from odinserj/MutexAttribute.cs
MutexAttribute.cs
using System;
using System.Collections.Generic;
using System.Linq;
using Hangfire.Common;
using Hangfire.States;
using Hangfire.Storage;
namespace Hangfire.Pro
{
/// <summary>