forked from mmozeiko/wcap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wcap.h
29 lines (22 loc) · 740 Bytes
/
wcap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once
#define UNICODE
#define COBJMACROS
#define WIN32_LEAN_AND_MEAN
#define _CRT_SECURE_NO_DEPRECATE
#include <initguid.h>
#include <windows.h>
#include <intrin.h>
#define WCAP_TITLE L"wcap"
#define WCAP_URL L"https://github.com/mmozeiko/wcap"
#ifdef _DEBUG
#define Assert(Cond) do { if (!(Cond)) __debugbreak(); } while (0)
#else
#define Assert(Cond) (void)(Cond)
#endif
#define HR(hr) do { HRESULT _hr = (hr); Assert(SUCCEEDED(_hr)); } while (0)
// calculates ceil(X * Num / Den)
#define MUL_DIV_ROUND_UP(X, Num, Den) (((X) * (Num) - 1) / (Den) + 1)
// MF works with 100nsec units
#define MF_UNITS_PER_SECOND 10000000ULL
#include <stdio.h>
#define StrFormat(Buffer, ...) _snwprintf(Buffer, _countof(Buffer), __VA_ARGS__)