Hallo,
I've got a DLL and header file, that contains
extern "C" {
//some other delarations
__declspec(dllexport) int __stdcall myfunc (unsigned char*& p1);
typedef int (__stdcall* PROCESS)(unsigned char*);
}
It's apparently for C++, but I need to use it in C program
I replaced this declaration by
__declspec(dllexport) int __stdcall process (unsigned char** p);
and call it as
unsigned char* m = NULL;
int result = process(&m);
Does anybody have an idea why this doesn't work? Isn't it the same? How can I use *& in pure C? Should I have some knowledge about the internals of the procedure being called to call it successfully?
Please, help as I'm really stuck in it
Regards, Dima
I've got a DLL and header file, that contains
extern "C" {
//some other delarations
__declspec(dllexport) int __stdcall myfunc (unsigned char*& p1);
typedef int (__stdcall* PROCESS)(unsigned char*);
}
It's apparently for C++, but I need to use it in C program
I replaced this declaration by
__declspec(dllexport) int __stdcall process (unsigned char** p);
and call it as
unsigned char* m = NULL;
int result = process(&m);
Does anybody have an idea why this doesn't work? Isn't it the same? How can I use *& in pure C? Should I have some knowledge about the internals of the procedure being called to call it successfully?
Please, help as I'm really stuck in it
Regards, Dima