mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-10-08 10:58:57 -07:00
4c77a3f148
## Link to GitHub Issue or related Pull Request, if one exists n/a ## Description of change To make plugin development easier, add `get_module_info` and `get_plugin_directory` to deal with common tasks for hooking DLLs and reading INI files. Also, add the ability to register for d3d9 present callbacks via `register_d3d9`, which makes it significantly easier for plugins to draw things on screen. ## Testing See sample code.
24 lines
471 B
C++
24 lines
471 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <windows.h>
|
|
|
|
#include "sdk/include/spicesdk.h"
|
|
|
|
namespace sdk {
|
|
|
|
struct SdkModule {
|
|
std::string dll;
|
|
HINSTANCE module;
|
|
};
|
|
|
|
namespace modules {
|
|
|
|
SPICE_SDK_STATUS_CODE get_module_info(const wchar_t *module_name, SPICE_SDK_MODULE_INFO *info);
|
|
SPICE_SDK_STATUS_CODE get_plugin_directory(const std::vector<SdkModule> ®istered_modules,
|
|
const void *plugin_address, wchar_t *buffer, uint32_t *size);
|
|
|
|
}
|
|
|
|
} |