Hai Friends,
Any body knows how to Access dll (Created by Boraland C++ builder 5.0) in Visual c++ 6.0.
i am Trying the following method
Dll Function :- Myfunc(int *a)
//Code
typedef void (WINAPI*cfunc)( int *a);
cfunc Myfunc;
void main() {
HINSTANCE hLib=LoadLibrar y("projdll.dll" );//DllCreateProjec t1DLLTEST
if(hLib==NULL) {
cout << "Unable to load library!" << endl;
getch();
return;
}
Myfunc=(cfunc)G etProcAddress(( HMODULE)hLib, "Myfunc");
int a;
Myfunc(&a);
FreeLibrary((HM ODULE)hLib);
getch();
}
but i am getting access violation error.
any body can help me?
Thank you,
Kiruba.
Any body knows how to Access dll (Created by Boraland C++ builder 5.0) in Visual c++ 6.0.
i am Trying the following method
Dll Function :- Myfunc(int *a)
//Code
typedef void (WINAPI*cfunc)( int *a);
cfunc Myfunc;
void main() {
HINSTANCE hLib=LoadLibrar y("projdll.dll" );//DllCreateProjec t1DLLTEST
if(hLib==NULL) {
cout << "Unable to load library!" << endl;
getch();
return;
}
Myfunc=(cfunc)G etProcAddress(( HMODULE)hLib, "Myfunc");
int a;
Myfunc(&a);
FreeLibrary((HM ODULE)hLib);
getch();
}
but i am getting access violation error.
any body can help me?
Thank you,
Kiruba.
Comment