You're not writing a single app. You're writing a driver that exposes an interface for an app to talk to it and behave like a normal joystick device driver on the other side.
Another application is needed to tell the driver how to behave, such as stick positions, button push and release, ... This is the app the user interacts with.
The updated device driver docs starts at
Windows Driver Kit documentation - Windows drivers | Microsoft Docs[
^].