Skip to content

Instantly share code, notes, and snippets.

View alexgwalley's full-sized avatar

Alex Walley alexgwalley

View GitHub Profile
@alexgwalley
alexgwalley / google_oauth2.c
Last active September 7, 2025 10:51
Google OAuth 2.0 Get Access Token - Basic
#define WINDOWS_LEAN_AND_MEAN
#include <winsock2.h>
#include <windows.h>
#include <winhttp.h>
#include <stdio.h>
#include <stdint.h>
#pragma comment(lib, "Crypt32.lib")
#pragma comment(lib, "bcrypt.lib")
#pragma comment(lib, "ws2_32.lib")
@alexgwalley
alexgwalley / drop_target_example.c
Last active October 11, 2024 01:29
Drop Target on Windows in C (Drag & Drop)
// example of IDropTarget implementation in C
// allows dropping of files and INETURL from clipboard
// can be expanded for more use cases
// https://learn.microsoft.com/en-us/windows/win32/api/oleidl/nn-oleidl-idroptarget
#include <stdint.h>
#define WINDOWS_LEAN_AND_MEAN
#include <windows.h>
#include <shlobj_core.h>