Ignore:
Timestamp:
01/19/15 01:50:31 (9 years ago)
Author:
Maciej Komosinski
Message:

VirtFILE can have fields and still be used as a DLL thanks to declspec(dllimport)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/virtfile/virtfile.h

    r295 r301  
    1111#include <string>
    1212using std::string;
    13 //#include <dirent.h> //to jest inkludowane przez powyzsze
    14 //struct dirent; //kiedys byla ta linia jak nie bylo jeszcze implementacji windowsowej dirent, ale borlandowi sie nie podoba jak s¹ obie
    1513
    16 #ifdef DLLEXPORTACTIVE  //tylko w tym pliku uzyte
     14#ifdef DLLEXPORTACTIVE  //defined in the project that makes the DLL
    1715#define DLLEXP __declspec(dllexport)
    1816#else
     17#ifdef __BORLANDC__ //assuming that all executables produced by borland use the DLL
     18#define DLLEXP __declspec(dllimport) //without dllimport, fields in objects would have separate instances in DLL and in EXE
     19#else
    1920#define DLLEXP
     21#endif
    2022#endif
    2123
     
    102104public:
    103105        VirtFileSystem *chain;
    104         ChainFileSystem(VirtFileSystem *_chain = NULL) :chain(_chain) {}
     106        ChainFileSystem(VirtFileSystem *_chain = NULL);
    105107        VirtFILE *Vfopen(const char* path, const char*mode);
    106108        bool Vfexists(const char* path);
Note: See TracChangeset for help on using the changeset viewer.