URISchemer is a DLL that allows you to create a URI scheme in Windows right from your Gamemaker: Studio game.
A URI scheme is a type of link to easily open a program and pass it some data. An example of a program that does this is Steam.
Grab the DLL from the releases page.
Take a look at the example project.
The DLL exposes two functions:
double registerURIScheme(char scheme[])
Creates the required registry entries for a URI scheme. It will not override existing URI schemes.
Argument | Type | Description |
---|---|---|
scheme | char[] | Name of the URI scheme you want (e.g. "example" to get the scheme example:// ) |
Returns one of three numerical values:
Return value | Description |
---|---|
-1 | URI scheme already exists |
0 | An error occured while creating the URI scheme |
1 | URI scheme was successfully created |
double requestAdminRights()
Restarts the application in admin mode, popping up a UAC request if appropriate.
Note: it does not exit the current process.
Takes no arguments and always returns 1.
This is my first attempt at writing C++. As such, it may contain bugs and it almost definitely isn't following any kind of best practices. If you see room for improvement, don't hesitate to let me know or submit a PR.
This DLL is also largely untested at this point. I've only had the chance to test it on my on Windows 7 computer. If you find it doesn't work on your system, be sure to let me know.