Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

*& construct in header file

Status
Not open for further replies.

sem

Programmer
Jun 3, 2000
4,709
UA
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? How can I use *& in pure C? Regards, Dima
 
extern "C" {
//some other delarations
__declspec(dllexport) int __stdcall myfunc (unsigned char*& p1);
//for using in C
__declspec(dllexport) int __stdcall myfunc_c (unsigned char** p1);
typedef int (__stdcall* PROCESS)(unsigned char*);
}
implementation:
int __stdcall myfunc_c (unsigned char** p1)
{
return myfunc(*p1);
} Ion Filipski
1c.bmp


filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top