Link to home
Start Free TrialLog in
Avatar of Norbert
NorbertFlag for Germany

asked on

Connecting an OCX to a Windows 95 C Program

One of our customers wants to connect our OCX'es to his existing C Program.
I'd like to know if that is possible and what he has to do
Avatar of jkr
jkr
Flag of Germany image

The easiest way i could imagine is writing a wrapper DLL that encapsulates e.g. the COleDispatchDriver wrapper classes (so to say 'wraps the wrappers' ;-) and exports C-style functions that make the functionality accessible (e.g. converts OLE events into windows messages and so on)...
Avatar of semuel
semuel

Hello there.

you forgot to mention the enviroment were he wrote his C program.
if it's an ANSI-C program, forget it. ansi-C does not support dlls and thing like that.
if he's using any other enviroment... well, it's depend on the enviroment.

Semuel.
semuel - do you think it's a good idea to lock the question without supplying a really useful answer???
Avatar of Norbert

ASKER

Sorry for the late respose.
I had a accident last thurstday when I leaved the company after I had posted the question and I am back to the office now the first time.

Semuel:
Well if we talk about using of already existing OCX'es I thought
it is clear that it must be a MS Windows enviroment
but to be clear it is Windows 95/98.
Our custom has simple a program written for windows and he like our ocx'es so he wants to use it

JKR:
If I understand you right you recommend to create a C- Style DLL
that works as interface between the OCX'es and the C Program.
I think that should work but it is a hardcoded solution and because each property and event have to be known by the DLL the flexibility of the OCX linking will be lost

Well, regarding the nature of an IDispatch for example, it should be possible to also do some parametrization from the outsinde...
ASKER CERTIFIED SOLUTION
Avatar of mikeblas
mikeblas

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
Avatar of Norbert

ASKER

Now back from vacation.
Its a hard work to do all again