Thread: DLL's

  1. #16
    Registered User minime6696's Avatar
    Join Date
    Aug 2001
    Posts
    267

    Talking User Friendlyness... :)

    Here, this might be more user-friendly :

    Code:
    #ifndef EXPORT
    #define EXPORT __declspec(dllimport)
    #endif//EXPORT
    That way, the User will never need to do anything . When you u'ze it in the DLL, simple define EXPORT before you include the header, like this:

    Code:
    #define EXPORT __declspec(dllexport)
    #include "myheader.h"
    Tada!

    SPH

  2. #17
    Registered User xds4lx's Avatar
    Join Date
    Nov 2001
    Posts
    630
    Actually that can be a little better minime (same as Ken's but i already was using the EXPORT)

    Code:
    #ifndef EXP
    #define EXPORT __declspec(dllexport)
    #elif !defined EXP
    #define EXPORT __declspec(dllimport)
    Although for some reason VC likes to give a warning about redeclaration when using this to include the dll but whatever i just turn of those dumb warnings i know what im doing
    Last edited by xds4lx; 03-25-2002 at 02:17 AM.
    "only two things are infinite, the universe and human stupidity, and im not sure about the former." - albert einstein

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Protection of DLLs
    By Poche in forum C# Programming
    Replies: 5
    Last Post: 06-04-2009, 08:30 PM
  2. Some doubts on DLLs
    By BrownB in forum Windows Programming
    Replies: 1
    Last Post: 05-30-2007, 02:25 AM
  3. standart dlls
    By keeper in forum C++ Programming
    Replies: 3
    Last Post: 07-05-2006, 07:32 PM
  4. Can't load string from resource DLL's string table
    By s_k in forum Windows Programming
    Replies: 4
    Last Post: 07-15-2003, 06:43 AM
  5. question about DLL's and class functions
    By btq in forum Windows Programming
    Replies: 2
    Last Post: 02-25-2003, 06:08 AM