Panoptes 1.0.0
Endpoint Detection and Response
Loading...
Searching...
No Matches
ml_model.cpp File Reference
#include "PanoptesML.h"
#include <onnxruntime/onnxruntime_cxx_api.h>
#include <stdexcept>

Go to the source code of this file.

Classes

struct  MlModel::Impl

Functions

std::wstring ModuleDirectory ()
 The folder this DLL was loaded from, with a trailing backslash.

Function Documentation

◆ ModuleDirectory()

std::wstring ModuleDirectory ( )

The folder this DLL was loaded from, with a trailing backslash.

Definition at line 122 of file ml_model.cpp.

123{
124 HMODULE module = NULL;
125 GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
126 (LPCWSTR)&ModuleDirectory, &module);
127 WCHAR path[MAX_PATH];
128 DWORD length = GetModuleFileNameW(module, path, MAX_PATH);
129 std::wstring directory(path, length);
130 return directory.substr(0, directory.find_last_of(L'\\') + 1);
131}
std::wstring ModuleDirectory()
The folder this DLL was loaded from, with a trailing backslash.
Definition ml_model.cpp:122
#define MAX_PATH
Definition callbacks.h:7

References MAX_PATH, and ModuleDirectory().

Referenced by ModuleDirectory().