CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2004
    Posts
    20

    Angry problem when write DLL in VC fro use VB

    Hi everybody
    I wrote dll in VC for use VB.
    When i built dll with set active project configuration=release and call it in VB the result is not correct.
    But bult it with set active project configuration=debug the result is correct.
    Can you help me ?
    Thanks

  2. #2
    Join Date
    Jul 2004
    Posts
    155

    Re: problem when write DLL in VC fro use VB

    Hi ,

    It is wild guess. ( i need to do so because ur question is partial ).

    In ur Release Build, Calling convention may not be __stdcall or byte alignment is
    8.

    In ur Debug build calling convention is __stdcall ( perhaps byte alignment is 4 ..are u passing structs ? )


    Check the settings


    Praseed Pai

  3. #3
    Join Date
    Aug 2004
    Posts
    20

    Re: problem when write DLL in VC fro use VB

    Thanks, but i do not find false

  4. #4
    Join Date
    May 2004
    Posts
    45

    Re: problem when write DLL in VC fro use VB

    Quote Originally Posted by hungtt
    When i built dll with set active project configuration=release and call it in VB the result is not correct.
    But bult it with set active project configuration=debug the result is correct.
    Maybe you're supposing that the initial values of variables and member variables are zero. Use the compiler option /RTCu (Uninitialized local usage checks) and correct all errors that will appear in the debug DLL when you run the program.

  5. #5
    Join Date
    Aug 2004
    Location
    Bucharest, Romania... sometimes
    Posts
    1,039

    Re: problem when write DLL in VC fro use VB

    Assuming that is not an ActiveX dll, and you export your functions as __stdcall:
    Have you included a *.def file in your project where compiling the dll?
    Attach your compiled dll, the one compiled in Release version. I'd like to see it.
    Regards,
    Bogdan Apostol
    ESRI Developer Network

    Compilers demystified - Function pointers in Visual Basic 6.0
    Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

    Customize your R2H
    The unofficial board dedicated to ASUS R2H UMPC owners.

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