Importing and exporting functions from DLLs in VC++6.0

How I can import any function from any DLL file(in VC++ 6.0). Please HELP ME!!!!!!



Answer this question

Importing and exporting functions from DLLs in VC++6.0

  • DimD

    My project have this exports, you need alike:

    using System.Runtime.InteropServices;

    ...

    [DllImport("COMCTL32.DLL")]

    static extern void ImageList_EndDrag();



  • Clifford Grimm

    And it worked in Visual C++ 6.0 (I only have it)!!!


  • Rami Reddy

    Hi!

    You can't import/export C++ classes from DLL, but you can import/export C styled functions (like most of Win32 API). You need to read about P/Invoke (Platform Invoke) in MSDN and use DllImportAttribute class.



  • Hennesey

    Ups, sorry, I don't notice you not using .NET. You need this page:

    http://msdn2.microsoft.com/en-us/library/9h658af8(VS.80).aspx

    it's about importing/exporting in C++



  • vidhyaprakash

  • Smitha S Saligrama

    There's a lot of forum postings involving exporting and importing functions to/from DLL's. Use the Search field. You can also search MSDN.

    Brian


  • pwilliams82

    I build a Dll that contains some function like this:

    void SomeFunc(void)
    {
    CSomeDialog dlg;
    dlg.DoModal();
    }

    How to export this function to other applications


  • Importing and exporting functions from DLLs in VC++6.0