napking
Dec 4th, 2000, 09:33 PM
Is it possible to call a Visual Basic function from COBOL or native C (not C++)? I've tried unsuccessfully to do this and I'm about to conceede defeat and declare that it is not possible to call an Object-Oriented program from one that is not, eg. COBOL/C.
My many attempts have yielded the following error;
test.obj : error LNK2001: unresolved external symbol _d4init@12
test.exe : fatal error LNK1120: 1 unresolved externals
I have implemented the required mixed-language calling conventions as required, i.e. if you are calling a VB function from within COBOL/C you are required to specify the system-calling convention prior to declaring the function name. For example, to call a VB function from within COBOL, you would declare the call as;
call 'S_vbentrypoint'
With the 'S_' being the default system calling convention using by VB (stdcall). COBOL to a native C function would be;
call 'c_centrypoint'
Any assistance will be greatly appreciated.
Regards,
Napking
My many attempts have yielded the following error;
test.obj : error LNK2001: unresolved external symbol _d4init@12
test.exe : fatal error LNK1120: 1 unresolved externals
I have implemented the required mixed-language calling conventions as required, i.e. if you are calling a VB function from within COBOL/C you are required to specify the system-calling convention prior to declaring the function name. For example, to call a VB function from within COBOL, you would declare the call as;
call 'S_vbentrypoint'
With the 'S_' being the default system calling convention using by VB (stdcall). COBOL to a native C function would be;
call 'c_centrypoint'
Any assistance will be greatly appreciated.
Regards,
Napking