This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <wchar.h> | |
#define LOAD_LIBRARY_SEARCH_SYSTEM32 (0x00000800) | |
HMODULE loadlibrary_system(const wchar_t* name) | |
{ | |
/* If running on Windows 8 or a system with KB2533623, LoadLibraryEx with | |
LOAD_LIBRARY_SEARCH_SYSTEM32 does the right thing */ | |
if (GetProcAddress(GetModuleHandleW(L"kernel32.dll"), "AddDllDirectory")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <uxtheme.h> | |
#include <dwmapi.h> | |
#define DWMWA_USE_IMMERSIVE_DARK_MODE 19 | |
extern IMAGE_DOS_HEADER __ImageBase; | |
#define HINST_THISCOMPONENT ((HINSTANCE)&__ImageBase) | |
struct window { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 0.006][v][cplayer] mpv 0.34.0-154-gd92c4238da Copyright © 2000-2021 mpv/MPlayer/mplayer2 projects | |
[ 0.006][v][cplayer] built on Mon Jan 24 23:47:15 AEDT 2022 | |
[ 0.006][v][cplayer] FFmpeg library versions: | |
[ 0.007][v][cplayer] libavutil 56.70.100 | |
[ 0.007][v][cplayer] libavcodec 58.134.100 | |
[ 0.007][v][cplayer] libavformat 58.76.100 | |
[ 0.007][v][cplayer] libswscale 5.9.100 | |
[ 0.007][v][cplayer] libavfilter 7.110.100 | |
[ 0.007][v][cplayer] libswresample 3.9.100 | |
[ 0.007][v][cplayer] FFmpeg version: 4.4.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// clang -Wall -O0 hole-struct.c -o hole-struct | |
// gcc -Wall -O0 hole-struct.c -o hole-struct | |
#include <stdio.h> | |
#include <string.h> | |
struct hole_struct { | |
char a; | |
// char hole1[3]; | |
int b; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc dxinteropcaps.c -std=c99 -Wall -o dxinteropcaps -lgdi32 -lopengl32 -ld3d9 -O0 -ggdb3 | |
#define _WIN32_WINNT 0x0600 | |
#define COBJMACROS | |
#define UNICODE | |
#define _UNICODE | |
#include <stdbool.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <windows.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdbool.h> | |
#include <windows.h> | |
#include <dwmapi.h> | |
extern IMAGE_DOS_HEADER __ImageBase; | |
#define HINST_THISCOMPONENT ((HINSTANCE)&__ImageBase) | |
#define DWMWA_WINDOW_CORNER_PREFERENCE (33) | |
typedef enum { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <windows.h> | |
static CALLBACK DWORD read_thread(void *arg) | |
{ | |
HANDLE pipe = arg; | |
OVERLAPPED ol = { .hEvent = CreateEventW(NULL, TRUE, TRUE, NULL) }; | |
HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE); | |
char outbuf[128]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <windows.h> | |
static CALLBACK DWORD discard_thread(void *arg) | |
{ | |
HANDLE pipe = arg; | |
OVERLAPPED ol = { 0 }; | |
ol.hEvent = CreateEventW(NULL, TRUE, TRUE, NULL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define PLAYLIST_ITEMS (50) | |
#define RAND_WINDOWS (1) | |
#define RAND_FREEBSD (2) | |
#define USE_RAND RAND_WINDOWS | |
#define BIG_PLAYLIST (PLAYLIST_ITEMS > 50) | |
#define _CRT_RAND_S | |
#define __USE_MINGW_ANSI_STDIO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adapter 0: | |
Device Name: NVIDIA GeForce GTX 670 | |
Device ID: 10de:1189 (rev a1) | |
Subsystem ID: 1043:841a | |
LUID: 0000000000009c30 | |
Output 0: | |
Device Name: \\.\DISPLAY1 | |
Coordinates: 2560x1440+0+0 | |
Attached to desktop: TRUE | |
Bits-per-color: 8 |
NewerOlder