Dynamic DLL linking with the help of template classes

This the the forum for potential authors to submit article ideas.

Moderator: 2ffat

Dynamic DLL linking with the help of template classes

Postby S0mbre » Tue Jun 14, 2011 9:39 pm

I have a bunch of template classes that I always include whenever I need to dynamically link a DLL and call its functions. The classes (an exception handler, a TDll class for the DLL itself, and a number of template classes for DLL procedures) help me a lot to avoid typing the usual code associated with dynamic DLL loading, function call and memory freeing. In fact, the calling of a DLL function using this helper class unit could be contained in a matter of three lines.

Please tell me if this is eligible. I am not quite sure whether this subject hasn't been yet covered and published before; please let me know.

Regards,
Iskander S. Shafikov
Rosneft Oil Company (Russia)
S0mbre
Active Poster
Active Poster
 
Posts: 11
Joined: Wed Jun 08, 2011 9:36 pm

Re: Dynamic DLL linking with the help of template classes

Postby S0mbre » Thu Jun 16, 2011 5:57 am

In fact, the first post needs a correction. The helper unit contains only 2 exception classes (one for DLL loading and one for function address retrieval) and one TDll class that does the rest of the job (DLL loading/unloading and function calls). The class is but one step away from a component/package (since it uses properties that may easily be published).
S0mbre
Active Poster
Active Poster
 
Posts: 11
Joined: Wed Jun 08, 2011 9:36 pm


Return to Manuscript Proposals

Who is online

Users browsing this forum: No registered users and 1 guest

cron