Results 1 to 2 of 2

Thread: c++ to VB

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    10

    c++ to VB

    Hi, I am designing a program which will require data retrieval using c++ in real time. The c++ code is open source and does its job. The c++ program cannot be converted to VB because of the baud rate that VB can handle. This is a I/O interfaced program.

    The thing is, I need to design the interface and most of the program in VB. Is there a way to make a memory buffer or something? What is the best way to take the raw data being pulled in from the c++ program and send it to the VB program?

    Thanks.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    You NEED to? Why?

    Anyway, you can put the C++ code into a DLL and use it from VB. You can allocate a buffer from VB using the HeapAlloc API, the trouble is accessing it from VB.

    You can also make a COM DLL from the C++ code and use SAFEARRAYs, but then data transfer should be kept to a minimum, they're quite slow (it's the native representation of VB's arrays).
    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.

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