NERvDN Library
0.2.0.20160420-0019
NERvLibrary - Nerve Gear Developer Network
|
Reference for all C function and macro APIs provided by the NERvSDK. More...
template<class T > | |
static unsigned long | NERvGear::NERvDestroy (T *&object) |
Destroy an object and nulls the pointer. More... | |
template<class T > | |
static unsigned long | NERvGear::NERvRelease (T *&object) |
Release an object and nulls the pointer. More... | |
template<class T > | |
static T | NERvGear::NERvMin (T a, T b) |
Computes the minimum of a and b. | |
template<class T > | |
static T | NERvGear::NERvMax (T a, T b) |
Computes the maximum of a and b. | |
void __cdecl | NERvGear::NERvLogMessage (LOG::LEVEL level, const wchar_t *tag, const wchar_t *format,...) |
Logs a message with tag at specified level. More... | |
void __cdecl | NERvGear::NERvLogMessageV (LOG::LEVEL level, const wchar_t *tag, const wchar_t *format, va_list argptr) |
This is an overloaded version of NERvLogMessage(), please see its documentation for general information. More... | |
static void | NERvGear::NERvLogError (const wchar_t *tag, const wchar_t *format,...) |
Logs an error message with tag. More... | |
static void | NERvGear::NERvLogWarn (const wchar_t *tag, const wchar_t *format,...) |
Logs a warning message with tag. More... | |
static void | NERvGear::NERvLogInfo (const wchar_t *tag, const wchar_t *format,...) |
Logs an information message with tag. More... | |
static void | NERvGear::NERvLogDebug (const wchar_t *tag, const wchar_t *format,...) |
Logs a debug message with tag. More... | |
static void | NERvGear::NERvLogVerbose (const wchar_t *tag, const wchar_t *format,...) |
Logs a verbose message with tag. More... | |
static long | NERvGear::NERvBalloon (const wchar_t *title, const wchar_t *msg) |
Shows a balloon notification closed to the task bar icon. More... | |
static long | NERvGear::NERvNotify (INotification *notify) |
Pops up an icon to notify user. More... | |
static const wchar_t * | NERvGear::NERvGetModulePath () |
Retrieves the plug-in path of current module. More... | |
static IPlugin * | NERvGear::NERvPluginInstance () |
Retrieves the plug-in instance of current module. More... | |
static long | NERvGear::NERvBindEvent (IEventHandler *handler, EVT::TYPE type) |
Registers the event handler to process a type of events. More... | |
static long | NERvGear::NERvUnbindEvent (IEventHandler *handler, EVT::TYPE type) |
Unregisters the event handler. More... | |
static long | NERvGear::NERvProcessEvent (IEventHandler *handler, Event &event) |
Sends an event to the event handler or handlers. More... | |
static long | NERvGear::NERvQueueEvent (IEventHandler *handler, Event *event) |
Post an event in the event queue of main thread. More... | |
static long | NERvGear::NERvQueueTask (IRunnable *task, IEventHandler *handler, IUnknown *userdata, TASK::TYPE type) |
Queues a task to a worker thread in the thread pool. More... | |
static long | NERvGear::NERvExecute (UI::IWindow *window, const wchar_t *cmd, const wchar_t *param, const wchar_t *cwd, EXEC::TYPE type, long option) |
Executes an action. More... | |
static long | NERvGear::NERvCreateObject (const UID &classID, const UID &objectID, const UID &interfaceID, IUnknown *outer, void **object) |
Find and create an object instance of specified component. More... | |
static long | NERvGear::NERvRegisterObject (const UID &classID, const UID &objectID, IObjectFactory *factory) |
Register an object to the component object database. More... | |
static long | NERvGear::NERvUnregisterObject (const UID &classID, const UID &objectID) |
Unregister an object from the component object database. More... | |
static long | NERvGear::NERvSound (const wchar_t *path, SOUND::TYPE sound) |
static size_t | NERvGear::NERvTranslation (const wchar_t *src, size_t nCharDst, wchar_t *dst) |
Finds the translation for a string and copy it to the destination buffer. More... | |
static size_t | NERvGear::NERvStringLength (const wchar_t *src) |
Counts the length of a string. More... | |
static size_t | NERvGear::NERvCopyCharArray (size_t nCharSrc, const wchar_t *src, size_t nCharDst, wchar_t *dst) |
Copies a char array to the destination buffer. More... | |
static size_t | NERvGear::NERvCopyString (size_t nCharSrc, const wchar_t *src, size_t nCharDst, wchar_t *dst) |
Copies a null-terminated string to the destination buffer. More... | |
static size_t | NERvGear::NERvCopyString (const wchar_t *src, size_t nCharDst, wchar_t *dst) |
This is an overloaded version of NERvCopyString(size_t, const wchar_t*, size_t, wchar_t*), please see its documentation for general information. More... | |
static size_t | NERvGear::NERvCopyStringDoubleNull (size_t nCharSrc, const wchar_t *src, size_t nCharDst, wchar_t *dst) |
Copies a double-null-terminated string to the destination buffer. More... | |
template<size_t N_CHAR> | |
static size_t | NERvGear::NERvCopyCharArray (const wchar_t(&src)[N_CHAR], size_t nChar, wchar_t *dst) |
This is an overloaded version of NERvCopyCharArray(size_t, const wchar_t*, size_t, wchar_t*), please see its documentation for general information. More... | |
template<size_t N_CHAR> | |
static size_t | NERvGear::NERvCopyString (const wchar_t(&src)[N_CHAR], size_t nChar, wchar_t *dst) |
This is an overloaded version of NERvCopyString(size_t, const wchar_t*, size_t, wchar_t*), please see its documentation for general information. More... | |
template<size_t N_CHAR> | |
static size_t | NERvGear::NERvCopyStringDoubleNull (const wchar_t(&src)[N_CHAR], size_t nChar, wchar_t *dst) |
This is an overloaded version of NERvCopyStringDoubleNull(size_t, const wchar_t*, size_t, wchar_t*), please see its documentation for general information. More... | |
VERSION __cdecl | NERvGear::NERvVerCodeCore () |
Retrieves core(NERvGear) version code. More... | |
const wchar_t *__cdecl | NERvGear::NERvVerNameCore () |
Retrieves core(NERvGear) version name string. More... | |
const wchar_t *__cdecl | NERvGear::NERvGetCoreName () |
Retrieves core(NERvGear) name string. More... | |
VERSION __cdecl | NERvGear::NERvVerCodeHost () |
Retrieves host program version code. More... | |
const wchar_t *__cdecl | NERvGear::NERvVerNameHost () |
Retrieves host program version name string. More... | |
const wchar_t *__cdecl | NERvGear::NERvGetHostName () |
Retrieves host program name string. More... | |
Reference for all C function and macro APIs provided by the NERvSDK.
NVG_FLAG_INIT_UID
macro at the beginning of a source file to initialize all the UIDs declared with NVG_DEFINE_UID()
macro.
|
inlinestatic |
Shows a balloon notification closed to the task bar icon.
[in] | title | The balloon title string. |
[in] | msg | The balloon content string. |
S_OK | Success. The balloon has been shown. |
E_FAIL | Failed with unknown error. |
Include File:
#include <NERvGear/NERv1API.h>
|
inlinestatic |
Registers the event handler to process a type of events.
[in] | handler | A pointer to the NERvGear::IEventHandler interface processing the event. |
[in] | type | The event type that the event handler can processed. |
S_OK | Success, the event handler is registered successfully. |
E_INVALIDARG | Fail, the handler is NULL, or type is NVG_ANY. |
E_FAIL | Failed to register the event handler with unknown error. |
Include File:
#include <NERvGear/NERv1API.h>
|
inlinestatic |
Copies a char array to the destination buffer.
[in] | nCharSrc | The size of the src buffer, in characters. |
[in] | src | A pointer to the source char array, must not be NULL. |
[in] | nCharDst | The size of the dst buffer, in characters. If dst is NULL, this parameter must be 0. |
[out] | dst | A pointer to a buffer that receives the src char array, could be NULL. |
Include File:
#include <NERvGear/string.h>
|
inlinestatic |
This is an overloaded version of NERvCopyCharArray(size_t, const wchar_t*, size_t, wchar_t*), please see its documentation for general information.
This version is used when you use a char array reference as the source char array.
Include File:
#include <NERvGear/string.h>
|
inlinestatic |
Copies a null-terminated string to the destination buffer.
[in] | nCharSrc | The size of the src buffer, in characters, including the null terminator. |
[in] | src | A pointer to the source string buffer, must not be NULL. |
[in] | nCharDst | The size of the dst buffer, in characters. If dst is NULL, this parameter must be 0. |
[out] | dst | A pointer to a buffer that receives the src null-terminated string, could be NULL. |
Include File:
#include <NERvGear/string.h>
|
inlinestatic |
This is an overloaded version of NERvCopyString(size_t, const wchar_t*, size_t, wchar_t*), please see its documentation for general information.
This version is used when you don't know the length of the source string, the string's length will be counted if necessary.
Include File:
#include <NERvGear/string.h>
|
inlinestatic |
This is an overloaded version of NERvCopyString(size_t, const wchar_t*, size_t, wchar_t*), please see its documentation for general information.
This version is used when you use a null-terminated char array reference as the source string.
Include File:
#include <NERvGear/string.h>
|
inlinestatic |
Copies a double-null-terminated string to the destination buffer.
[in] | nCharSrc | The size of the src buffer, in characters, including all the null terminators. |
[in] | src | A pointer to the source string buffer, must not be NULL. |
[in] | nCharDst | The size of the dst buffer, in characters. If dst is NULL, this parameter must be 0. |
[out] | dst | A pointer to a buffer that receives the src double-null-terminated string, could be NULL. |
Include File:
#include <NERvGear/string.h>
|
inlinestatic |
This is an overloaded version of NERvCopyStringDoubleNull(size_t, const wchar_t*, size_t, wchar_t*), please see its documentation for general information.
This version is used when you use a double-null-terminated char array reference as the source string.
Include File:
#include <NERvGear/string.h>
|
inlinestatic |
Find and create an object instance of specified component.
[in] | classID | The UID of a component. |
[in] | objectID | The UID of a component object. If ID_NULL, system will find a default implementation for this component. |
[in] | interfaceID | The UID of an interface. |
[in] | outer | A pointer to the aggregate object's IUnknown interface (the controlling IUnknown). This parameter could be NULL, indicates that the object is not being created as part of an aggregate. |
[out] | object | Address of pointer that receives the interface pointer requested in interfaceID. |
S_OK | Success. An instance of the specified component object was successfully created. |
CLASS_E_NOAGGREGATION | Fail. A specified object cannot be created as part of an aggregate. |
E_OBJECT_NOT_FOUND | Fail. A specified object is not registered in the component object database. |
E_NOINTERFACE | Fail. A specified class does not implement the requested interface, or the controlling IUnknown does not expose the requested interface. |
E_INVALIDARG | Fail. one or more parameters are invalid. |
E_FAIL | Failed with unknown error. |
Include File:
#include <NERvGear/object.h>
|
inlinestatic |
Destroy an object and nulls the pointer.
This function calls the interface's Destroy() method to destroy an object and also sets the pointer to NULL.
[in,out] | object | Reference of the interface pointer to the object witch supports Destroy() method. |
|
inlinestatic |
Executes an action.
This function is used to open a file, URL or run a command with associated program or filter.
[in] | window | Reserved, must be NULL. | ||||||||||||||
[in] | cmd | The action command to be executed, type determinate the meaning of this command string.
| ||||||||||||||
[in] | param | The parameter for command, can be NULL. | ||||||||||||||
[in] | cwd | Reserved, must be NULL. | ||||||||||||||
[in] | type | The type of the action, could be one of the NERvGear::EXEC::ACTION enumeration values. | ||||||||||||||
[in] | option | Reserved, must be 0. |
S_OK | Success, the action is executed successfully. |
S_FALSE | Success, it's similar to S_OK but also indicates that the caller could 'ignore' this execution. Note that if type is NERvGear::EXEC::NONE, then the return value is also S_FALSE. |
E_FAIL | Failed with unknown error and the action is not executed. |
Include File:
#include <NERvGear/NERv1API.h>
const wchar_t* __cdecl NERvGear::NERvGetCoreName | ( | ) |
Retrieves core(NERvGear) name string.
e.g.
"Nerve Gear"
Include File:
#include <NERvGear/version.h>
const wchar_t* __cdecl NERvGear::NERvGetHostName | ( | ) |
Retrieves host program name string.
e.g. SAO Utils.exe provides
"SAO Utils"
while NERvSDK.exe provides
"NERvSDK"
Include File:
#include <NERvGear/version.h>
|
inlinestatic |
Retrieves the plug-in path of current module.
The returned string is generally the full path to the plug-in directory, not including the module file name. e.g.
"X:\SOME_DIRS\SAO Utils\Plugins\Plug-in Demo"
Include File:
#include <NERvGear/NERv1API.h>
|
inlinestatic |
Logs a debug message with tag.
Include File:
#include <NERvGear/log.h>
|
inlinestatic |
Logs an error message with tag.
Include File:
#include <NERvGear/log.h>
|
inlinestatic |
Logs an information message with tag.
Include File:
#include <NERvGear/log.h>
void __cdecl NERvGear::NERvLogMessage | ( | LOG::LEVEL | level, |
const wchar_t * | tag, | ||
const wchar_t * | format, | ||
... | |||
) |
Logs a message with tag at specified level.
Takes printf()
style variable argument syntax.
[in] | level | Logging level which could be one of the enumeration values of NERvGear::LOG::LEVEL. |
[in] | tag | An optional string pointer to the custom tag(category), could be NULL. |
[in] | format | A pointer to the formating string. |
Include File:
#include <NERvGear/log.h>
void __cdecl NERvGear::NERvLogMessageV | ( | LOG::LEVEL | level, |
const wchar_t * | tag, | ||
const wchar_t * | format, | ||
va_list | argptr | ||
) |
This is an overloaded version of NERvLogMessage(), please see its documentation for general information.
Takes vprintf()
style variable argument syntax.
Include File:
#include <NERvGear/log.h>
|
inlinestatic |
Logs a verbose message with tag.
Include File:
#include <NERvGear/log.h>
|
inlinestatic |
Logs a warning message with tag.
Include File:
#include <NERvGear/log.h>
|
inlinestatic |
Pops up an icon to notify user.
The notification icon keeps blinking until user click on it.
[in] | notify | A pointer to the INotification interface. |
S_OK | Success. The notification has been queued. |
E_INVALIDARG | The notify is NULL. |
E_FAIL | Failed with unknown error. |
Include File:
#include <NERvGear/NERv1API.h>
|
inlinestatic |
Retrieves the plug-in instance of current module.
static_cast<>()
syntax.Include File:
#include <NERvGear/NERv1API.h>
|
inlinestatic |
Sends an event to the event handler or handlers.
[in] | handler | A pointer to the NERvGear::IEventHandler interface processing the event, can be NULL. |
[in] | event | The event to be processed. |
Include File:
#include <NERvGear/NERv1API.h>
|
inlinestatic |
Post an event in the event queue of main thread.
This function returns without waiting for the thread to process the event.
[in] | handler | A pointer to the NERvGear::IEventHandler interface processing the event, can be NULL. |
[in] | event | A pointer to an event to be processed. |
S_OK | Success, the event is queued successfully. |
E_INVALIDARG | Fail, the handler or event is NULL. |
E_FAIL | Failed to queue the event with unknown error. |
Include File:
#include <NERvGear/NERv1API.h>
|
inlinestatic |
Queues a task to a worker thread in the thread pool.
[in] | task | A pointer to the NERvGear::IRunnable interface running the task. |
[in] | handler | A pointer to the NERvGear::IEventHandler interface handling the task event, can be NULL. |
[in] | userdata | A pointer to the NERvGear::IUnknown interface containing user data, can be NULL. |
[in] | type | The flags that control execution, can be one or more of the NERvGear::TASK::FLAG enumeration values. |
S_OK | Success, the task is queued successfully. |
E_INVALIDARG | Fail, the task is NULL. |
E_FAIL | Failed to queue the task with unknown error. |
static_cast<>()
syntax, the value of its retcode is the what the IRunnable::Run() method of queued task returned.Include File:
#include <NERvGear/NERv1API.h>
|
inlinestatic |
Register an object to the component object database.
[in] | classID | The UID of a component. |
[in] | objectID | The UID of a component object. |
[in] | factory | A pointer to the IObjectFactory interface of an object factory. |
S_OK | Success. The component object was successfully registered. |
E_OBJECT_DUPLICATED | Fail. A specified object is already registered in the component object database. |
E_INVALIDARG | Fail. The factory is NULL. |
E_FAIL | Failed with unknown error. |
Include File:
#include <NERvGear/object.h>
|
inlinestatic |
Release an object and nulls the pointer.
This function calls the IUnknown::Release() to release an object and also sets the pointer to NULL.
[in,out] | object | Reference of the interface pointer to the object. |
|
inlinestatic |
Play an internal sound effect or a sound file.
[in] | path | Must be NULL currently. |
[in] | sound | The sound type, can be one of the enumeration values of NERvGear::SOUND::TYPE. |
S_OK | Success. The specified sound effect or file is playing asynchronously. |
E_NOTIMPL | The path is not NULL. |
E_FAIL | Failed with unknown error. |
|
inlinestatic |
Counts the length of a string.
Include File:
#include <NERvGear/string.h>
|
inlinestatic |
Finds the translation for a string and copy it to the destination buffer.
Include File:
#include <NERvGear/string.h>
|
inlinestatic |
Unregisters the event handler.
[in] | handler | A pointer to the NERvGear::IEventHandler interface processing the event. |
[in] | type | The event type that the event handler can processed. |
S_OK | Success, the event handler is registered successfully. |
E_INVALIDARG | Fail, the handler is NULL, or type is NVG_ANY. |
E_FAIL | Failed to register the event handler with unknown error. |
Include File:
#include <NERvGear/NERv1API.h>
|
inlinestatic |
Unregister an object from the component object database.
S_OK | Success. The component object was successfully unregistered. |
E_OBJECT_NOT_FOUND | Fail. A specified object is not registered in the component object database. |
E_FAIL | Failed with unknown error. |
Include File:
#include <NERvGear/object.h>
VERSION __cdecl NERvGear::NERvVerCodeCore | ( | ) |
Retrieves core(NERvGear) version code.
Include File:
#include <NERvGear/version.h>
VERSION __cdecl NERvGear::NERvVerCodeHost | ( | ) |
Retrieves host program version code.
Include File:
#include <NERvGear/version.h>
const wchar_t* __cdecl NERvGear::NERvVerNameCore | ( | ) |
Retrieves core(NERvGear) version name string.
e.g.
"Beta 1 x64"
Include File:
#include <NERvGear/version.h>
const wchar_t* __cdecl NERvGear::NERvVerNameHost | ( | ) |
Retrieves host program version name string.
e.g. SAO Utils.exe provides
"Beta 1 x64"
while NERvSDK.exe provides
"0.1.0.0 x64"
Include File:
#include <NERvGear/version.h>