C++ Function in VB

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pete

    C++ Function in VB

    I've written a lil program in C++ that
    i need to access in Visual Basic, anyone
    know the easiest way to do this?

    To show you my stress, right now I am
    considering creating my C++ program
    into a console program, and accepting
    command line parameters, then from VB
    calling this program with the two parameters
    1: HWND of a textbox or something...
    2: string of text for my C++ program...

    My C++ program would then use that string
    to do some processing, then pass my results
    to the HWND of my VB app...

    I know this is the hard way of doing things, but
    its the only way I know I can do w/o help... and
    with out any knowledge of creating a C++ dll
    to use in VB .. im sure its my only option unless
    someone here can show me a straight forward
    way of doing this DLL stuff?

    Please help :-)

    Thanks ..

    Pete


  • Andrew Ward

    #2
    Re: C++ Function in VB

    Ask in one of the microsoft ATL newsgroups about how to create an ATL Server
    Component.
    Actually if you are using visual studio creating an ATL COM component that
    can be used from VB is mostly pre-generated code created by the IDE, you
    just fill in the contents of methods the wizards generate.


    "Pete" <p_e_t_e_j_b@co mcast.net> wrote in message
    news:68T2b.2689 64$o%2.122346@s ccrnsc02...[color=blue]
    > I've written a lil program in C++ that
    > i need to access in Visual Basic, anyone
    > know the easiest way to do this?
    >
    > To show you my stress, right now I am
    > considering creating my C++ program
    > into a console program, and accepting
    > command line parameters, then from VB
    > calling this program with the two parameters
    > 1: HWND of a textbox or something...
    > 2: string of text for my C++ program...
    >
    > My C++ program would then use that string
    > to do some processing, then pass my results
    > to the HWND of my VB app...
    >
    > I know this is the hard way of doing things, but
    > its the only way I know I can do w/o help... and
    > with out any knowledge of creating a C++ dll
    > to use in VB .. im sure its my only option unless
    > someone here can show me a straight forward
    > way of doing this DLL stuff?
    >
    > Please help :-)
    >
    > Thanks ..
    >
    > Pete
    >
    >[/color]


    Comment

    Working...