Start process as system using CreateProcessAsUser


Note that this function assumes the caller to be running as SYSTEM as well (i.e. Windows service). For self reference:

C++ · Process · Windows

1 minute

Using APC as FIFO queue in Windows


In this way, we can implement a FIFO queue without using explicit locking/synchronization for enqueueing/dequeueing. For self reference:

C++ · Fifo · Queue

1 minute

Simple touch/swipe input function in Windows


For self reference: Simulate a touch input down, drag, up programmatically.

C++ · Input · Windows

1 minute

ATL service base code


Yet another service code for Windows. This time, it’s an ATL service. ATL services are basically the same as traditional Windows services but with some advantages. Can be started on-demand automatically by the first client call (via COM). Clients can call service functions with parameters and return values using COM. In traditional services, clients normally communicate using service control codes and you need some kind of IPC (named pipes, shared memory, etc.

Atl · C++ · Service · Windows

1 minute