Source file: /~heha/hs/hidparse.zip/hidparse/hidparse.h

#pragma once

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <windowsx.h>
#include <shlwapi.h>
extern "C"{
#include <hidsdi.h>
#include <hidpi.h>
}

#define T(x) TEXT(x)
#define elemof(x) (sizeof(x)/sizeof(*(x)))
#define nobreak
#ifdef UNICODE
# ifndef _UNICODE
#  define _UNICODE
# endif
# define USTR L"%s"
# define ASTR L"%S"
#else
# define USTR "%S"
# define ASTR "%s"
#endif

#include <tchar.h>
#include <stdio.h>

/***********
 * Globals *
 ***********/

struct RECTS{
 short left,top,right,bottom;
 void operator=(const RECT&r) {
  left  =(short)r.left;
  top   =(short)r.top;
  right =(short)r.right;
  bottom=(short)r.bottom;
 }
 void operator>>(RECT&r) const{
  r.left  =left;
  r.top   =top;
  r.right =right;
  r.bottom=bottom;
 }
};

extern struct CONFIG{
 RECTS winpos;
 char showCmd;	// SW_SHOW, SW_MINIMIZED, SW_MAXIMIZED
 char flags;	// Bit 0 = AutoUpdate, Bit 1 = XP functions
}Config;

/*******************
 * UsageDecode.cpp *
 *******************/

struct UsageDecode{
 static bool Init(const TCHAR*directory);
 static void Done();
 static int Decode(USAGE_AND_PAGE u, BYTE flags, TCHAR*buf, int buflen);
	// flags == 1: Usage, flags == 2: UsagePage, flags ==3: Usage(long)
};
Detected encoding: ASCII (7 bit)2