#ifndef DEBUG_HPP #define DEBUG_HPP // define DRDDEBUG if you want to unit test the ReturnWithProfile(..) // function, regardless of what AuthenticateMember returned. //#define DRDDEBUG #ifdef DBG #define _DEBUG #include //#include //#include #include "PassportGuard.hpp" #include "PassportLock.hpp" #define DRDREGISTRYVALUELEN 1024 // The constants aren't used by the PASSPORTLOG macro at the moment, just // a place holder for future functionality. // // Debug constants used to configure what gets logged. Will be moved out of // here an into the registry eventually. Add yours to the list. #define CACHE_DBGNUM 100 #define CACHEEXTENSION_DBGNUM 101 #define DOMAINMAP_DBGNUM 200 #define PPSSPI_DBGNUM 300 #ifndef PASSPORTDEBUGAPI #define PASSPORTDEBUGAPI __declspec(dllimport) #endif // this is the maxium number of groups we can handle...make sure this is at least big // enough to handle all of the groups we have #define MAXNUMBER_OF_LOGGINGGROUPS 100 // To print out a number in HEX, preceded the insertion of the number with: // < Guard(PassportDebug::mLock); \ if (PassportDebug::OKToLog(lognum)) { \ ofstream outFile("C:\\passport.txt", ios::out | ios::app); \ if (outFile && outFile.good()) \ outFile << string; \ outFile.close(); \ } \ } #define PASSPORT_RECYCLE_DEBUG_LOGS { \ ofstream outFile("C:\\passport.txt", ios::out | ios::trunc); \ outFile.close(); \ } #else /* DBG*/ #define PASSPORTLOG(lognum, string) #endif /* DBG*/ //nothing below this line #endif