Urgent help needed

I am doing a program to convert a serial no to date format, the serial no is
representing the seconds elapsed since 01/01/1970. and I using the Visual basic
to call the DLL function(general from Borland C++ version 4).

It seems there is no problem to creat the DLL in c
program, no error message, but when I run the visual basic program which call the
DLL that I created, it generate the GPF(general protection fault).  the following
is the program code.

Please help .  Thank you.

/*  This is the def file in C Using Borland C++ */

LIBRARY TEST3
DESCRIPTION  "just testing"
EXETYPE WINDOWS
CODE    PRELOAD MOVEABLE DISCARDABLE
DATA    PRELOAD MOVEABLE SINGLE
HEAPSIZE  4096
EXPORTS NUMTODATE

/*  this is the main c program Using Borland C++ */

/* Demonstrates the functions */

#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <windows.h>

char FAR PASCAL NUMTODATE(char *argv1)
{

        struct tm *ptr;
        char *c, buf1[80];
        long l;

         l = atol(argv1);

         ptr = localtime(&l);

        c = asctime(ptr);
        puts(c);

        return *c;

Quote
}

/*  this is the visual basic program */

Declare Function NUMTODATE Lib "c:\test3.dll" (ByVal DateNum As String) As String

MsgRtn = NUMTODATE(CodeInquire)

=============================