hey everyone,
i am attempting to create a simple dll in c++ that creates a timestamp, in the following format...
17042011233200
Which is: 17/04/2011 @ 23:32:00
thus far, i have found a code (see below), but after compiling with devc++ it doesnt seem to work, i am new with dll's and this would be my very first one but because of my lack of experience i am unable to create one, please could someone help me.
MY HORRIBLE ATTEMPT
#include <stdio.h>
#include <time.h>
#include "timestamp.h"
BOOL APIENTRY DllMain (HINSTANCE hInst,DWORD reason,LPVOID reserved )
{
return TRUE;
}
DLL_EXPORT int timestamp()
{
time_t now;
struct tm *ts;
char buf[80];
now = time(0);
ts = localtime(&now);
strftime(buf, sizeof(buf), "%d%m%Y%H%M%S", ts);
}
the code above compiles correcttly as a dll, but doesnt work when called, if anyone could help me create the full source (including a header) i need for devc++ that would be amazing and i will be so grateful, thanks for you time,
Nathaniel Blackburn.