CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CYBWin32Module.cpp
Go to the documentation of this file.
1 #include "CYB.hpp"
3 
5  //No FK32 because this can be called without Core
6  FModule(reinterpret_cast<Win32::HMODULE>(Platform::System::Sys::Call(Platform::System::Sys::LOAD_LIBRARY, const_cast<char*>(AModuleName.CString()))))
7 {
8  if (FModule == nullptr)
10 }
12  if (FModule != nullptr)
13  //No FK32 because this can be called without Core
15 }
16 
18  auto Result(reinterpret_cast<void*>(Platform::System::Sys::Call(Platform::System::Sys::LOAD_SYMBOL, FModule, const_cast<char*>(AFunctionName.CString()))));
19  if (Result == nullptr)
21  return Result;
22 }
void * LoadFunction(const API::String::CStyle &AFunctionName)
Load a pointer to a function from a module. Pointer valid for as long as one reference to the owned m...
static unsigned long long Call(const CallNumber ACallNumber, Args &&...AArgs) noexcept
Do a linked or system call.
Specific could not be loaded from given Module.
Definition: Exception.hpp:111
Module(const API::String::CStyle &AModuleName)
Constructs a module reference. The module named by ANonSuffixedModuleName will be loaded into the pro...
Win32::HMODULE FModule
The Module handle.
A basic char contained string.
Definition: CStyleString.hpp:7
Precompiled header for inter-engine operations.
const char * CString(void) const noexcept
Get the contained const CString.
Exceptions that are thrown internally in the engine that the should never see, these are a superset o...
Definition: Exception.hpp:104
Strong typing for Platform::Identifier.