je suit la fonction définie dans l'une dll:problème dans l'appel dll par écrit le processus d'appel
__declspec(dllexport) int __stdcall
mjscall(char *cmd, DWORD wtime, char *stdoutfile, char *stderrfile)
Je dois écrire un processus pour appeler la fonction ci-dessus. Je le fais la première fois, je n'ai pas trop d'idée. J'ai écrit le code suivant
#include <windows.h>
#include <windows.h>
#include <stdio.h>
#include <io.h>
#include <stdlib.h>
#include <limits.h>
extern __declspec(dllexport) int __stdcall mjscall(char *cmd, DWORD wtime, char *stdoutfile, char *stderrfile);
typedef INT (*MJSCALL) (char *,DWORD, char *, char *);
int main()
{
char *a,*b,*c;
a=NULL;
b=NULL;
c=NULL;
DWORD aa =1;
int i;
HMODULE hLib;
MJSCALL ADD;
hLib=LoadLibrary("f3cucall.dll");
if(hLib==NULL)
{
return 1;
}
ADD=(MJSCALL)GetProcAddress(hLib,"mjscall");
if (ADD==NULL)
{
return 1;
}
(ADD)(a,aa,b,c);
return 0;
}
Le "(ADD) (a, aa, b, c);" est à l'origine du problème. Quelqu'un peut-il m'aider?