Hello,
I am new in POS world and c++ language.
I need to create a DLL function that receives a text reference parameter.
DLLLoad Always returns 0 (Zero)
Please what am I doing wrong.
thank you very much
ISL File:
var hODBCDLL: N9
EVENT INQ: 1
Var fecha: A200
DLLLoad hODBCDLL, "Holamundo.dll"
InfoMessage "ID ", hODBCDLL
DLLCall_CDECL hODBCDLL, obtenerfecha(ref fecha)
InfoMessage "fecha", fecha
ENDEVENT
this is the h file
#include <time.h>
#ifndef HOLAMUNDO_H
#define HOLAMUNDO_H
class Holamundo {
public:
Holamundo();
Holamundo(const Holamundo& orig);
virtual ~Holamundo();
__declspec(dllexport) void obtenerfecha(char* fecha);
private:
};
#endif /* HOLAMUNDO_H */
this is the cpp file:
#include "Holamundo.h"
Holamundo::Holamundo() {
}
Holamundo::Holamundo(const Holamundo& orig) {
}
Holamundo::~Holamundo() {
}
void Holamundo:
btenerfecha(char* fecha)
{
time_t now = time(0);
struct tm tstruct;
tstruct = *localtime(&now);
strftime(fecha, sizeof(fecha), "%Y-%m-%d.%X", &tstruct);
}
I am new in POS world and c++ language.
I need to create a DLL function that receives a text reference parameter.
DLLLoad Always returns 0 (Zero)
Please what am I doing wrong.
thank you very much
ISL File:
var hODBCDLL: N9
EVENT INQ: 1
Var fecha: A200
DLLLoad hODBCDLL, "Holamundo.dll"
InfoMessage "ID ", hODBCDLL
DLLCall_CDECL hODBCDLL, obtenerfecha(ref fecha)
InfoMessage "fecha", fecha
ENDEVENT
this is the h file
#include <time.h>
#ifndef HOLAMUNDO_H
#define HOLAMUNDO_H
class Holamundo {
public:
Holamundo();
Holamundo(const Holamundo& orig);
virtual ~Holamundo();
__declspec(dllexport) void obtenerfecha(char* fecha);
private:
};
#endif /* HOLAMUNDO_H */
this is the cpp file:
#include "Holamundo.h"
Holamundo::Holamundo() {
}
Holamundo::Holamundo(const Holamundo& orig) {
}
Holamundo::~Holamundo() {
}
void Holamundo:
{
time_t now = time(0);
struct tm tstruct;
tstruct = *localtime(&now);
strftime(fecha, sizeof(fecha), "%Y-%m-%d.%X", &tstruct);
}