PDA

Click to See Complete Forum and Search --> : VB coder needs C++ help.....


Filter300
Aug 21st, 2002, 02:42 PM
hello... i need some help with a C++ issue.. i have something coded in VB and it works great... it uses a an OCX to access notes.... now my boss wants me to do this thru C++ because... for some reason they MS... and want everything new to be done in java... cept java cant call these ocx's... now they want this piece written in C++ how do you use an ocx in C++??? in vb you just referance it in components... also how do you use OLE in C++? any help would be greatly appreciated....

parksie
Aug 21st, 2002, 03:54 PM
With great difficulty. I wouldn't recommend it until you actually know the language because it requires in-depth knowledge of pointers and polymorphism, two of the most complex and most misused features.

MSDN has lots of information but don't say I didn't warn you...

PS: Hint: with Visual C++, look up the #import statement :)

jim mcnamara
Aug 21st, 2002, 03:59 PM
There are java classes that allow COM access. The j++ library has them.

I'm confused.

jim mcnamara
Aug 21st, 2002, 04:01 PM
Even with MFC, ActiveX coding in VC++ is a pain for beginners. You'd have to know all the IOLExxxx interfaces, for starters.

But Parksie did warn you..... :D

parksie
Aug 21st, 2002, 04:04 PM
Originally posted by jim mcnamara
There are java classes that allow COM access. The j++ library has them.

I'm confused. They probably meant pure Java? :confused: Hasn't Visual J++ been more or less abandoned now? At the very least, the MS JVM is being crippled since they lost the fight with Sun.

PS: It's a pain even for advanced users ;)

CornedBee
Aug 22nd, 2002, 05:48 AM
MS has mostly given up java and tries to push C#, which is on the front end an exact clone of java (nearly the same syntax and such), the differences are only on the back end.

ActiveX is right up there with the Total Perspective Vortex.

Filter300
Aug 22nd, 2002, 08:05 AM
We are using pure java... they want nothing realated to MS anymore... but for some reason they dont mind the visual C++... and it doesnt pay to go into depth with C++ cuz im still learning Java... i was hopein this would be easy...

CornedBee
Aug 22nd, 2002, 10:08 AM
It isn't. And OCX is something VERY msoft.

What kind of notes are those? How are they saved? Maybe we can help you there.

Filter300
Aug 22nd, 2002, 11:04 AM
ohh woops.. i guess i shoulda been more clear... Lotus Notes we have all of our forms and surveys in lotus notes documents stored in Lutos Databases... and now with java we need to use this OCX that that Lotus has for interface... and OLE.... We need to have the exteral java program open Notes and open up the forms within Notes....
java can not do this... but i'm told that java can call a c++ dll ... so now i have to make this C++ dll to call the OCX and OLE stuff....

... I have this working beutifuly with vb app but they want nothing to do with VB....

CornedBee
Aug 28th, 2002, 05:17 AM
You have to do three things:
1) Pray the OCX uses the "dual interfaces" mechanism.
2) Find header files and documentation for it.
3) Learn about the CoCreateInstance, IUnknown::Release and IUnknown::QueryInterface functions.

If it doesn't use dual interfaces, go threaten Lotus to give another kind of access or else...

Magiaus
Aug 28th, 2002, 10:54 AM
IUnkown as in I don't ever want to get into that if i can help it. and i know c++ fairly well. I had a real hard time with that when i was working on a shell interface type librarie for vb. man now i have a headache from just thinking about it.....