Pass by Reference in Managed C++ Class Library

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

    #1

    Pass by Reference in Managed C++ Class Library

    I have a Managed C++ class Library wrapper; this DLL will be called from
    VB.NET project.

    If a function parameter passed by reference, I cannot see this function from
    VB.NET. Otherwise, it works great.

    void ICCompress(int &iFileSize, int &iKeySize, BOOL &isKEYFRAME)
    {
    ....
    }

    How can I make it work? Thanks.



  • Mattias Sjögren

    #2
    Re: Pass by Reference in Managed C++ Class Library

    >How can I make it work? Thanks.

    Try something like

    void ICCompress(int __gc& iFileSize, int __gc& iKeySize, BOOL __gc&
    isKEYFRAME)

    or

    void ICCompress(Int3 2 &iFileSize, Int32 &iKeySize, Boolean
    &isKEYFRAME)



    Mattias

    --
    Mattias Sjögren [MVP] mattias @ mvps.org
    http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
    Please reply only to the newsgroup.

    Comment

    Working...