wie du eine dll erstellst weißt du aber schon?
wenn nicht hier mal schnell einen kleinen quellcode.
das einbinden macht sich am besten wenn du es pers system (""); machst, dann schaut er nähmlich in win32 system nach :-d
/*dllmain.cpp*/
/*******************************************************************************
IGOR ( Userexit für das EASY Archivsystem)
Version 1.3
Geprüft auf dem EASY Archivsystem 3.40
Plattform Microsoft Windows
**************************************
Erstellt unter DEV C++ 4.9.9.2
( Bloodshed Software )
*************************************/
// Bibliotheken einbinden
#include <iostream>
#include <windows.h>
#include <stdio.h>
#include <string>
#define DLL_EXPORT
#include "dll.h"
extern "C"
{
DECLDIR int Zaehler1_alter_Stand (
int nType, int nState, int nFldIdx,
LPSTR lpszMskName, int nSizeMskName,
LPSTR lpszBlobFile, int nSizeBlobFile,
LPSTR lpszFldData, int nSizeFldData,
LPSTR lpszErrText, int nSizeErrText
)
{
char *str;
char fd[200];
char pfad[200]="IGOR\\";
str = "_zaehlerstand_1_alt.txt";
char acUserName[100];
DWORD nUserName = sizeof(acUserName);
if (GetUserName(acUserName, &nUserName))
{
strcat(acUserName,str);
strcpy (fd,acUserName);
strcat(pfad,fd);
FILE *cs;
cs=fopen(pfad,"a+");
if (cs==NULL)
{system ("md IGOR");}
if (cs!=NULL)
{
fclose(cs);
}
remove(pfad);
FILE *dt;
dt=fopen(pfad,"a+");
if (dt!=NULL)
{
fprintf(dt,"%s", lpszFldData );
fclose (dt);
}
else
{
MessageBox (
NULL, "FC2",
"EASY CAPTURE - USEREXIT", MB_OK|MB_ICONSTOP
);
}
}
else
{
MessageBox (
NULL, "FC1",
"EASY CAPTURE - USEREXIT", MB_OK|MB_ICONSTOP
);
}
return 0;
}
/*dll.h*/
/*******************************************************************************
IGOR ( Userexit für das EASY Archivsystem)
Version 1.3
Geprüft auf dem EASY Archivsystem 3.40
Plattform Microsoft Windows
**************************************
Erstellt unter DEV C++ 4.9.9.2
( Bloodshed Software )
*************************************/
#ifndef _DLLTUT_DLL_H_
#define _DLLTUT_DLL_H_
// DLL EX - / IM - port halt
#if defined DLL_EXPORT
#define DECLDIR __declspec(dllexport)
#else
#define DECLDIR __declspec(dllimport)
#endif
// Prototyp
extern "C"
{
DECLDIR int Zaehler1_alter_Stand
(int nType, int nState, int nFldIdx,
LPSTR lpszMskName, int nSizeMskName,
LPSTR lpszBlobFile, int nSizeBlobFile,
LPSTR lpszFldData, int nSizeFldData,
LPSTR lpszErrText, int nSizeErrText
);
}
#endif