|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Need to add DLLs at runtimei want to be able to provide a open file dialog in my app to allow the
users to specify a DLL. i want my application to automatically detect the properties, methods, etc. and build a user interface element that will allow the user to configure input and methods to use from the DLL. any ideas on how to do this? thanks, Mars *** Sent via Developersdex http://www.developersdex.com *** In article <u#9nrKfMIHA.1***@TK2MSFTNGP03.phx.gbl>, csh***@devdex.com
says... > i want to be able to provide a open file dialog in my app to allow the No.> users to specify a DLL. i want my application to automatically detect > the properties, methods, etc. and build a user interface element that > will allow the user to configure input and methods to use from the DLL. > any ideas on how to do this? Show quote -- Remove the ns_ from if replying by e-mail (but keep posts in the newsgroups if possible). Actually, the answer is to use Reflections.
Mars *** Sent via Developersdex http://www.developersdex.com *** "Victory" <csh***@devdex.com> wrote in message if it were dotnet; VB doesn't have thatnews:eOXwvtgMIHA.4740@TK2MSFTNGP02.phx.gbl... > Actually, the answer is to use Reflections. Are these ActiveX DLLs?
Show quote "Victory" <csh***@devdex.com> wrote in message news:u%239nrKfMIHA.1208@TK2MSFTNGP03.phx.gbl... >i want to be able to provide a open file dialog in my app to allow the > users to specify a DLL. i want my application to automatically detect > the properties, methods, etc. and build a user interface element that > will allow the user to configure input and methods to use from the DLL. > any ideas on how to do this? > thanks, > Mars > > *** Sent via Developersdex http://www.developersdex.com *** Hi all, hi Victory,
the only one possibility is to write C DLL's which export there functions extern "C". You can use the portable executeable file format to get the exports. Now you need an API you understand: extern "C" { _declspec(dllexport) PVOID CreateFN_YOUR_FN_NAME(VOID) { return anyClass you want; }; _declspec(dllexport) VOID DeleteFN_YOUR_FN_NAME(PVOID) { delete anyClass you want; }; _declspec(dllexport) VOID SetParamFN_YOUR_FN_NAME(PVOID an object, PVOID data) { ((type cast to whatever you need)object)->SetSomeName(data); }; }; I think you know what i mean ... I wrote myself a library for this, that was a hard work to get it running ... Kr Christian Show quote > > >i want to be able to provide a open file dialog in my app to allow the > > users to specify a DLL. i want my application to automatically detect > > the properties, methods, etc. and build a user interface element that |
|||||||||||||||||||||||