Many examples out there but they all show C functions.
Visual .net 2003.
Created a MFC DLL Project (Shared)
Added myDatabase Class with code.
Add the one function that I want to export InsertData
It Builds.
Do I need to add more to this project?
How do I access this from a client?
Visual .net 2003.
Created a MFC DLL Project (Shared)
Added myDatabase Class with code.
Add the one function that I want to export InsertData
It Builds.
Do I need to add more to this project?
How do I access this from a client?
Code:
#pragma once
#include <windows.h>
#include <sqlext.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
class myDatabase
{
private:
HENV hEnv; // Env Handle from SQLAllocEnv()
HDBC hDBC; // Connection handle
int DBOpen;
RETCODE OpenDatabase();
void doSQLState(HSTMT handle);
RETCODE CommitDatabase();
int CloseDatabase();
public:
myDatabase(void);
~myDatabase(void);
int InsertData(char *PID, char *system, char *program, char *step, char *message, char *rc, char *dt);
};
Code:
; DLLAppLogger.def : Declares the module parameters for the DLL.
LIBRARY "DLLAppLogger"
EXPORTS
; Explicit exports can go here
InsertData