home *** CD-ROM | disk | FTP | other *** search
- #define __DLLLDR_H
-
- class dllldr
- {
- public:
-
- HINSTANCE h;
-
- dllldr()
- {
- h = 0;
- }
- ~dllldr()
- {
- free();
- }
- int init(char file[])
- {
- if ((h = LoadLibrary(file)) < HINSTANCE_ERROR)
- {
- h = 0;
- }
- return h != 0;
- }
- void free()
- {
- if (h != 0)
- {
- FreeLibrary(h);
-
- h = 0;
- }
- }
- operator HINSTANCE()
- {
- return h;
- }
- };
-
-