none
How to listen event for runtime loaded C# dll in VBA (MS Access) RRS feed

  • Question

  • Hi ,

    I have a c# dll. My client (consumer of dll) is VBA (Ms Access).
    I need to load dll runtime (dll is not registered in registry). I cannot register dll in registry, its a requirement. I am loading dll using LoadLibrary API.

    I can call C# dll methods without any problem.

    Question:

    How can i implement event listener in VBA for events generating from dll. I was thinking of using WithEvents but it requires type at declaration which i cannot.

    Can anyone help me with simple example. Example can be from VB.Net if not from C#.

    Thanks
    Muhammad

    Monday, March 15, 2010 6:07 AM

Answers

  • I guess you should ask in VB forum. And if you managed to load .NET framework in pure C++ (LoadLibrary), init it and run functions I don't understand why you have problems with VB but anyway - you should ask in VB forum

    C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off (c) — Bjarne Stroustrup [http://www2.research.att.com/~bs/bs_faq.html#really-say-that]
    • Marked as answer by SamAgain Monday, March 22, 2010 3:27 AM
    Wednesday, March 17, 2010 4:11 PM

All replies

  • I guess you should ask in VB forum. And if you managed to load .NET framework in pure C++ (LoadLibrary), init it and run functions I don't understand why you have problems with VB but anyway - you should ask in VB forum

    C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off (c) — Bjarne Stroustrup [http://www2.research.att.com/~bs/bs_faq.html#really-say-that]
    • Marked as answer by SamAgain Monday, March 22, 2010 3:27 AM
    Wednesday, March 17, 2010 4:11 PM

  • Any examples for reference?
    Thursday, February 10, 2011 1:10 AM