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

Thread: c dll with VB6

  1. #1
    Guest

    c dll with VB6

    Hello

    I try to write a C dll for VB6 and it do not work VB6 crash when calling the DLL
    if anybody have a simple example ?
    Thanks



  2. #2
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: c dll with VB6

    What exactly are you trying to do?-)

    All C fns in the dll should be decalred with _stdcall convention.
    Then write all your export functions in a .def file, so that c compiler will not add decorations.
    Add the def file to the project and build.

    Then do a proper declarations of those functions in your vb program. Either copy the dll to the application directory, or specify the complete path in the declarations.

    And then call them happyly

    Check on this board, there should be one example (posted by me :-) ) even showing things like callback functions etc, Hope that is not a overdose..

    RK

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