CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Visual Basic

  1. #1
    Join Date
    Feb 2000
    Posts
    1

    Visual Basic

    Hi,
    I have a C++ function implementation for a COM Object as follows

    foo(Variant *var, String Text)..

    I need to create this COM object and call the above mentioned function from visual basic.
    I cannot find an equivalent to Variant * in VB?? I am getting typemismatch for Variant (obviously)

    Thanks
    Shoba





  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: Visual Basic

    Try using

    Dim YourVariable as Variant
    'set the value of YourVariable
    Call Foo(YourVariable,strText)



    I admit, I'm not familiar with C++ but it looks like you're looking for a variable type that can hold anything - in VB thats the Variant type.

    If I'm wrong, then I'm sorry, but that's my guess.
    John

    John Pirkey
    MCSD
    www.ShallowWaterSystems.com
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

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

Featured