Link to home
Start Free TrialLog in
Avatar of hustch
hustch

asked on

Calling Delphi 32-bit DLL from 16 bit Borland C

I've got some Delphi 3 functions, that I would like to call from a 16-bit Borland C program, running on Windows 95 or Windows NT.

Does anyone have examples on know how to do that ?
The C program has to be 16-bit, so just compling the c-program to 16-bit is not an option.
Avatar of icampbe1
icampbe1

There are two approaches you can take.

1) Wrap your 32bit dll routines up into an automation wrapper.  When the 16bit app uses it, the cross platform is handled by the marshalling mechanism.  This may not be your best solution though, and is somewhat cumbersome.

2) Use 'Generic' thunking.   It enables 16-bit apps to call 32-bit dlls under Win95 and NT.  This is your most flexible approach (although you haven't said very much.)

Cheers
Ian C
Avatar of hustch

ASKER

>> (although you haven't said very much.)
Well, neither have you, What do you need to know ?
Is a delphi code (How to use a 32 bit DLL with 16 bit Delphi)
 will help you?
Avatar of hustch

ASKER

If it works by calling windows api function, I don't think
there should be any problem converting it to c.
ASKER CERTIFIED SOLUTION
Avatar of ronit051397
ronit051397

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial