Skip to content

Instantly share code, notes, and snippets.

// Compile with MSVC, *Release* configuration
#include <iostream>
#include <new>
#include <windows.h>
LONG WINAPI MyUEF (PEXCEPTION_POINTERS pExp)
{
if (pExp->ExceptionRecord->ExceptionCode == STATUS_HEAP_CORRUPTION) {
std::cout << "Heap corruption detected!" << std::endl;
// Compile with MSVC, *Release* configuration
#include <iostream>
#include <new>
#include <windows.h>
LONG WINAPI MyVEH (PEXCEPTION_POINTERS pExp)
{
if (pExp->ExceptionRecord->ExceptionCode == STATUS_HEAP_CORRUPTION) {
std::cout << "Heap corruption detected!" << std::endl;
#include <iostream>
#include <windows.h>
#include <wingdi.h>
int main ()
{
PRINTDLGW dialogResult = {};
dialogResult.lStructSize = sizeof dialogResult;
dialogResult.Flags = PD_RETURNDEFAULT;
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2011/WindowsSettings">
<printerDriverIsolation>true</printerDriverIsolation>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
#ifdef _WIN32
using nchar = wchar_t;
using nstring = std::wstring;
#define NSTRLITERAL(str) L##str
#define nfopen _wfopen
/* ... */
import os
import sys
def usage():
print("Usage: readfolder.py [folder]")
def doread(dir):
for root, dirs, files in os.walk(dir):
for file in files:
fpath = os.path.join(root, file)