From VB.NET Debug C++ DLL

Posted on 2006-04-04
Last Modified: 2010-05-18

I have created this VB.NET project that uses an existing unmanaged C++ DLL.  For some reason when I call a function within this DLL the return code I recieve is an extremely long number.  So while running the project I would Ideallly like to be able to step thru the code.  I have the source to the DLL.  It was created using Visual C++ 6.0.  

Declare Function Build_Structure Lib "store.dll" (ByVal fname As String, ByVal ImageFile As String, ByVal ObjClass As Long) As Long

This is how I declared the function in the dll as well.  Anything wrong with that?
Question by:corduroy9
    LVL 96

    Expert Comment

    by:Bob Learned
    What type of project is the VB.NET project?  DLL or Windows Application?

    LVL 2

    Author Comment

    Windows Application calling a C++ DLL
    LVL 14

    Accepted Solution

    You might consider defining the ObjClass as IntPtr or Int32
    LVL 2

    Author Comment

    The problem was that the variable lengths changed between versions and therefore had to set the variable to a specific length of integer.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Article by: jpaulino
    XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now