Skip to content

Instantly share code, notes, and snippets.

View sherief's full-sized avatar

sherief

View GitHub Profile
#include <windows.h>
#include <wtsapi32.h>
HANDLE CreateProcessActiveConsole(LPCTSTR app, LPTSTR cmd)
{
static HANDLE hToken;
static STARTUPINFO si;
static PROCESS_INFORMATION pi;
ZeroMemory(&si, sizeof(STARTUPINFO));
#pragma comment (lib, "ole32")
#pragma comment (lib, "oleaut32")
#pragma comment (lib, "wbemuuid")
#include <stdio.h>
#include <windows.h>
#include <wbemidl.h>
void GetLastInputInfoFromWmi()
{
@sherief
sherief / EorzeaClock.c
Created August 4, 2023 17:27 — forked from 3735943886/EorzeaClock.c
Get Eorzea Time
#include <stdio.h>
#include <time.h>
void GetEorzeaTime(int *eHour, int *eMin)
{
/* Get current time */
time_t currentTime;
time(&currentTime);
/* Convert to Eorzea time */
#pragma comment(lib, "user32")
#pragma comment(lib, "psapi")
 
#include <stdio.h>
#include <windows.h>
#include <psapi.h>
 
void main()
{
    HWND hWnd;
#include <atlbase.h>
#include <sapi.h>
 
void main()
{
    CComPtr<ISpVoice> cpVoice;
 
    ::CoInitialize(nullptr);
 
    cpVoice.CoCreateInstance(CLSID_SpVoice);
#pragma comment(lib, "winmm")
#pragma comment(lib, "ole32")
#include <sapi.h>
void main()
{
    HRESULT hr;
    ISpVoice* pVoice;