CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 1999
    Location
    Montreal, Quebec, Canada
    Posts
    192

    How to make a funciton available

    By curiousity, if I create an ActiveX DLL, how can I make one of the function "available" to other application.. if I try to show dependencies, no functions are available.

    Thank you.


  2. #2
    Join Date
    Jul 1999
    Posts
    145

    Re: How to make a funciton available

    Set the instancing property to GlobalMultiUse.
    The second part of your post about dependencies I don't understand though...


  3. #3
    Join Date
    Jul 1999
    Location
    Montreal, Quebec, Canada
    Posts
    192

    Re: How to make a funciton available

    And how to I set this? sorry, no VB expert..!

    As for the dependencies.. I mean using the Visual Studio tools, I can see the ordinals and the functions in the DLL...


  4. #4
    Join Date
    Jul 1999
    Posts
    145

    Re: How to make a funciton available

    In VB start an ActiveX DLL project. When it comes up there should be a class module attached to it (look in the upper right portion of the coding window at the Project Explorer window) Double click on the class module if it is not already highlighted then look below the Project Explorer window and you will see the Properties Window. Here in the Properties Window for the class you will see the Instancing Property, click on it to set it. If you have any trouble, look in the VB help files.


  5. #5
    Join Date
    Jul 1999
    Location
    Montreal, Quebec, Canada
    Posts
    192

    Re: How to make a funciton available

    Ok, so it's set now to GlobalMultiUse, now how do I make my function "available" from the outside world?


  6. #6
    Join Date
    Jul 1999
    Posts
    145

    Re: How to make a funciton available

    Now just compile the DLL, start another project, select the Project menu choose Components and click on your DLL name so that it is checked, then click OK and you're ready to go...
    Or if you want to test your DLL you can add a project to your DLL project and test/debug the DLL, just select the File menu and click Add Project. Then call the DLL functions from the new project the way you would normally. Don't forget though to change the startup option in Project/Properties to the new form.
    All this stuff is in the VB help files, very easy to understand, and theres even a step by step guide to building an example project. Good Luck.


  7. #7
    Join Date
    Jul 1999
    Location
    Montreal, Quebec, Canada
    Posts
    192

    Re: How to make a funciton available

    I know that, what I'm trying to do is to use this DLL inside Visual C++..

    If I use the Dependency Walker, I still don't see any of the functions I put in the DLL, so I must do something wrong..


  8. #8
    Join Date
    Jul 1999
    Posts
    145

    Re: How to make a funciton available

    Sorry, I can't help you there. I know nothing about C++ or its IDE. According to Microsoft though it should work no problem. Did you try registering the DLL after you compiled it?
    You might want to repost your question.
    Sorry I couldn't be of more help.


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