MCPcopy Create free account
hub / github.com/Norbyte/ositools / CustomFunctionInjector

Class CustomFunctionInjector

OsiInterface/CustomFunctions.h:229–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227 };
228
229 class CustomFunctionInjector
230 {
231 public:
232 CustomFunctionInjector(class OsirisWrappers & wrappers, CustomFunctionManager & functions);
233
234 void Initialize();
235 void ThrowEvent(FunctionHandle handle, OsiArgumentDesc * args) const;
236
237 inline std::vector<OsiSymbolInfo> const & OsiSymbols() const
238 {
239 return osiSymbols_;
240 }
241
242 private:
243 OsirisWrappers & wrappers_;
244 CustomFunctionManager & functions_;
245 std::wstring storyHeaderPath_;
246 HANDLE storyHeaderFile_{ NULL };
247 bool extendingStory_{ false };
248 std::unordered_map<uint32_t, FunctionHandle> osiToDivMappings_;
249 std::unordered_map<FunctionHandle, uint32_t> divToOsiMappings_;
250 std::vector<OsiSymbolInfo> osiSymbols_;
251
252 void CreateOsirisSymbolMap(MappingInfo ** Mappings, uint32_t * MappingCount);
253 void OnAfterGetFunctionMappings(void * Osiris, MappingInfo ** Mappings, uint32_t * MappingCount);
254 bool CallWrapper(std::function<bool(uint32_t, OsiArgumentDesc *)> const & next, uint32_t handle, OsiArgumentDesc * params);
255 bool QueryWrapper(std::function<bool(uint32_t, OsiArgumentDesc *)> const & next, uint32_t handle, OsiArgumentDesc * params);
256 void ExtendStoryHeader(std::wstring const & headerPath);
257 void OnCreateFile(LPCWSTR lpFileName,
258 DWORD dwDesiredAccess,
259 DWORD dwShareMode,
260 LPSECURITY_ATTRIBUTES lpSecurityAttributes,
261 DWORD dwCreationDisposition,
262 DWORD dwFlagsAndAttributes,
263 HANDLE hTemplateFile,
264 HANDLE hFile);
265 void OnCloseHandle(HANDLE hFile, BOOL bSucceeded);
266 };
267}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected