Home All Groups Group Topic Archive Search About

Need to add DLLs at runtime

Author
28 Nov 2007 7:12 PM
Victory
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 ***

Author
28 Nov 2007 7:45 PM
David Kerber
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
> 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?

No.

Show quote
> thanks,
> Mars
>
> *** Sent via Developersdex http://www.developersdex.com ***
>

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Author
28 Nov 2007 10:10 PM
Victory
Actually, the answer is to use Reflections.

Mars

*** Sent via Developersdex http://www.developersdex.com ***
Author
28 Nov 2007 10:10 PM
Bob Butler
"Victory" <csh***@devdex.com> wrote in message
news:eOXwvtgMIHA.4740@TK2MSFTNGP02.phx.gbl...
> Actually, the answer is to use Reflections.

if it were dotnet; VB doesn't have that
Author
28 Nov 2007 10:25 PM
Lance Wynn
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 ***
Author
28 Nov 2007 10:47 PM
Christian
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

AddThis Social Bookmark Button