Commit adbd01d4 authored by Legodev's avatar Legodev

ADDED: RVExtensionVersion function

parent 9122cbbf
......@@ -18,7 +18,7 @@
#ifndef SOURCE_CONSTANTS_HPP_
#define SOURCE_CONSTANTS_HPP_
#define DLLVERSIONSTRING "[1,0,3,5]"
#define DLLVERSIONSTRING "[1,0,3,6]"
#define CONFIG_FILE_NAME "libredex.cfg"
/*
......
......@@ -17,6 +17,17 @@
#include "main.hpp"
extern "C"
{
void RVExtensionVersion(char *output, int outputSize)
{
char version[] = DLLVERSIONSTRING;
//--- max outputSize is 32 bytes
strncpy(output, version, outputSize);
output[outputSize - 1] = '\0';
}
}
extern "C"
{
void RVExtension(char *output, int outputSize, const char *function)
......@@ -30,6 +41,7 @@ extern "C"
errstr += "Sorry RVExtension is not supported anymore";
errstr += "\"]";
strncpy(output, errstr.c_str(), outputSize);
output[outputSize - 1] = '\0';
#ifdef DEBUG
result = std::time(nullptr);
testfile << std::put_time(std::localtime(&result), "%F %T") << "\t\t ARMAIO-ERROR " << errstr << std::endl;
......@@ -76,6 +88,7 @@ extern "C"
errstr += error;
errstr += "\"]";
strncpy(output, errstr.c_str(), outputSize);
output[outputSize - 1] = '\0';
#ifdef DEBUG
result = std::time(nullptr);
testfile << std::put_time(std::localtime(&result), "%F %T") << "\t\t ARMAIO-ERROR " << errstr << std::endl;
......
......@@ -145,7 +145,7 @@ static void destroy(void)
#ifdef __cplusplus
extern "C" {
#endif
__declspec (dllexport) void RVExtensionVersion(char *output, int outputSize);
__declspec (dllexport) void RVExtension(char *output, int outputSize, const char *function);
__declspec (dllexport) void RVExtensionArgs(char *output, int outputSize, const char *function, const char **args, int argsCnt);
......
......@@ -2,8 +2,8 @@
#define PRODUCT_NAME_STR "libredex"
#define PRODUCT_DESCRIPTION "Desolation Redux Arma3 callExtension"
#define VER_VERSION 1,0,3,5
#define VER_VERSION_STR "1.0.3.5"
#define VER_VERSION 1,0,3,6
#define VER_VERSION_STR "1.0.3.6"
VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_VERSION
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment