Results 1 to 11 of 11

Thread: VB coder needs C++ help.....

  1. #1

    Thread Starter
    Hyperactive Member Filter300's Avatar
    Join Date
    Aug 2001
    Posts
    413

    VB coder needs C++ help.....

    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....

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    There are java classes that allow COM access. The j++ library has them.

    I'm confused.

  4. #4
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    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.....

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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? 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
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7

    Thread Starter
    Hyperactive Member Filter300's Avatar
    Join Date
    Aug 2001
    Posts
    413
    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...

  8. #8
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  9. #9

    Thread Starter
    Hyperactive Member Filter300's Avatar
    Join Date
    Aug 2001
    Posts
    413
    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....

  10. #10
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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...
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  11. #11
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267
    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.....
    Magiaus

    If I helped give me some points.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width