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
static void GetDeviceInstanceId(const char* device_interface, char* instance_id, size_t len) | |
{ | |
HDEVINFO devinfo; | |
SP_DEVICE_INTERFACE_DATA interface_data; | |
SP_DEVINFO_DATA device_data; | |
name[0] = '\0'; | |
devinfo = SetupDiCreateDeviceInfoList(NULL, 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
using System; | |
class klGDIBitmapConversion | |
{ | |
public static System.Drawing.Bitmap MainConv(System.Drawing.Bitmap img) | |
{ | |
System.Drawing.Bitmap b = img;// new System.Drawing.Bitmap("test.jpg"); | |
SplashImage(b, 0, 0); | |
DateTime dtFaq = DateTime.Now; | |
System.Drawing.Bitmap b0 = CopyToBpp(b, 8); | |
TimeSpan tsFaq = DateTime.Now - dtFaq; |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
namespace CA_Client.Helpers | |
{ | |
internal static class SearchByCmp | |
{ |
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
/***************************************************************************** | |
* | |
* The algorithm for applying acceleration is: | |
* | |
* dxC = dxR | |
* if A >= 1 and abs(dxR) > T1 then | |
* dxC = dxR * 2 | |
* if A >= 2 and abs(dxR) > Thres2 then | |
* dxC = dxR * 4 | |
* end if |
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.gaming.input.h> | |
#include <windows.gaming.input.custom.h> | |
#include <initguid.h> | |
DEFINE_GUID(IID___FIEventHandler_1_Windows__CGaming__CInput__CArcadeStick, 0x6afb8188, 0xd28d, 0x539b, 0xbb,0x69, 0xea,0x17,0x63,0xfb,0x99,0x20); | |
DEFINE_GUID(IID___FIEventHandler_1_Windows__CGaming__CInput__CFlightStick, 0xd57470b1, 0xcc22, 0x5a43, 0x8e,0x18, 0x5c,0xa0,0x64,0xaa,0xfe,0x21); | |
DEFINE_GUID(IID___FIEventHandler_1_Windows__CGaming__CInput__CGamepad, 0x8a7639ee, 0x624a, 0x501a, 0xbb,0x53, 0x56,0x2d,0x1e,0xc1,0x1b,0x52); | |
DEFINE_GUID(IID___FIEventHandler_1_Windows__CGaming__CInput__CRacingWheel, 0x352ec824, 0xf64b, 0x5353, 0x80,0xea, 0x7f,0xf5,0x8e,0x3b,0x92,0xa4); | |
DEFINE_GUID(IID___FIEventHandler_1_Windows__CGaming__CInput__CRawGameController, 0x00621c22, 0x42e8, 0x529f, 0x92,0x70, 0x83,0x6b,0x32,0x93,0x1d,0x72); | |
DEFINE_GUID(IID___FIIterable_1_Windows__CGaming__CInput__CArcadeStick, 0x9376f457, 0x2da5, 0x544a, 0xa4,0x09, 0xc6,0x36,0xf5,0xd8,0x1c,0x35); |
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 "pch.h" | |
#include "framework.h" | |
#include "utils_winrt.h" | |
#include "utils.h" | |
#include <windows.globalization.h> | |
#include <objidlbase.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
/**************************************************************************\ | |
* | |
* Function Description: | |
* | |
* Convert a 32bpp premultiplied ARGB value to | |
* a 32bpp non-premultiplied ARGB value | |
* | |
* Arguments: | |
* | |
* argb - Premultiplied ARGB value |
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
static uint8_t Win32ScanCodeToHIDUsage(uint16_t scanCode) | |
{ | |
uint8_t index = (scanCode & 0xff) < 0x80 ? (scanCode & 0xff) : 0x00; | |
if ((scanCode & 0xff00) != 0) | |
{ | |
if ((scanCode & 0xff00) == 0xe000) | |
index |= 0x80; | |
else | |
index = 0; | |
} |
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
// user32.dll | |
// provide either hcur or lpName and iFrame. | |
// outputs pjifRate (frame time in jiffles - 1/60 sec) and pccur (count of steps in animation sequence) | |
// returns cursor frame for iFrame | |
HCURSOR GetCursorFrameInfo(HCURSOR hcur, LPWSTR lpName, int iFrame, OUT LPDWORD pjifRate, OUT LPINT pccur); |
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
[DllImport("winlangdb.dll", ExactSpelling = true, CharSet = CharSet.Unicode, SetLastError = true)] | |
public static extern int GetLanguageNames(string Language, StringBuilder Autonym, StringBuilder EnglishName, StringBuilder LocalName, StringBuilder ScriptName); | |
[DllImport("winlangdb.dll", ExactSpelling = true, CharSet = CharSet.Unicode, SetLastError = true)] | |
public static extern int LanguagesDatabaseGetChildLanguages( | |
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(HStringMarshaler))] string language, | |
int sortOrder /*2 or 4*/, | |
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(HStringMarshaler))] string customLanguage, | |
char delimeter, | |
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(HStringMarshaler))] out string childLanguages); |
NewerOlder