Results 1 to 3 of 3

Thread: Dll

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2001
    Location
    -
    Posts
    21
    Can someone be nice and explain me how to make a dll with MS Visual C++ 6 (step by step)

    I know C++, Im a newbie with vb but i know how to call funtion from a alredy make dll (like mcisendstring in winmm) so be nice and explain to me
    ---

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Sorry,
    You're too polite.
    You have to be more obnoxious and demanding

    - jamie
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355
    ok:

    1. open vc++
    2. create a win32 dll project (no MFC), choose the "simple dll" option in the dialog that you get
    3. make a function; it must be declared like this:

    extern "C" <returntype> __stdcall <funcname>(params)
    {
    //code
    }

    then:

    open notepad, and enter info like this:
    LIBRARY "<dllname.dll>"

    EXPORTS
    <Function1>
    <Function2>

    just list all the functions you want to export.
    save this as "<projectname>.def" and then in vc++ go to Project->Add to Project->Files
    and add your DEF file. then compile, and you should be able to call the functions from VB

    There are other ways than using a DEF file, but I find this works, and it's not very complex to do.
    buzzwords are the language of fools

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