CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 1999
    Posts
    1

    How to create a DLL without using classes.

    I want to write a DLL that would be used like a subroutine repository. I don't want to write a class and then use the methods, because I don't want to have to change all of the calls to each of the procedures. This DLL would then be accessible just like a DLL written in another language, referenced in my project, and used after declaring the DECLARE statement for the procedures.

    Thanks for your response.


  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: How to create a DLL without using classes.

    Hi

    The simple answer is .. you can't

    VB only allows you to create ActiveX DLL's - if you want to create a standard windows DLL, you'll need to use a language that can create them -

    C, C++, Delphi, Modula2, Pascal etc


    An ActiveX DLL can be used by any programming language that supports COM -

    C++, Delphi etc


    Regards

    Chris Eastwood



    CodeGuru - the website for developers
    http://www.codeguru.com/vb

  3. #3
    Join Date
    May 1999
    Posts
    3,332

    Re: How to create a DLL without using classes.

    you CAN achieve what you want, although you HAVE to create a class, but that's NOT a problem.
    Just set the Instancing property of your class module to GlobalMultiUse!
    that's it.
    Now in your client programs, add a reference to that AX dll and call the "methods" like regular functions and subs! It works!


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