Hello everybody. I'd written a C module within a "Windows DLL" project (see code below) and I'm able to compile it. When I use regsvr32 to register it, I receive the dreaded error message "...\feomod2.dll was loaded, but the DllRegisterServer entry point was not found. This file can not be registered". I've tried many techniques, but am now stumped. Please help ....
Here's the source code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
typedef unsigned short Int16;
typedef unsigned char Int8;
typedef unsigned long int Int32;
const unsigned int NUMBER_OF_BYTES_TO_KILL = 2 ;
__declspec(dllexport) Int32 _dynamn (
int *code,
int *stmno,
int *InLen,
char *InBuf,
int *OutLen,
char *OutBuf
)
{
switch (*code)
{
case 1: /* Initialization, no other values */
printf ("OUTMOD Initial Entry\n");
break;
case 2: /* Cleanup call, no other values */
printf ("OUTMOD End of Responses Entry\n");
break;
case 3: /* Process response record */
/* Process the record only if its length is greater than NUMBER_OF_BYTES_TO_KILL */
if ( sizeof( *InBuf ) > NUMBER_OF_BYTES_TO_KILL )
{
/* Move *InBuf memory address, NUMBER_OF_BYTES_TO_KILL bytes forward */
OutBuf = OutBuf + NUMBER_OF_BYTES_TO_KILL;
/* Inform the FE engine that the prefixing NUMBER_OF_BYTES_TO_KILL were eliminated */
*OutLen = *OutLen - NUMBER_OF_BYTES_TO_KILL;
}
break;
case 4:
/* Checkpoint, no other values */
printf ("OUTMOD Checkpoint Entry\n");
break;
case 5:
/* DBC restart - close and reopen the output files */
printf ("OUTMOD DBC Restart Entry\n");
break;
case 6:
/* Host restart */
printf ("OUTMOD Host Restart Entry\n");
break;
default:
printf ("OUTMOD Invalid Entry code\n");
break;
}
return (0);
}