Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Compile error atlapp.h can not be found Pin
George_George29-Mar-08 2:43
George_George29-Mar-08 2:43 
GeneralRe: Compile error atlapp.h can not be found Pin
rp_suman29-Mar-08 2:49
rp_suman29-Mar-08 2:49 
GeneralRe: Compile error atlapp.h can not be found Pin
George_George29-Mar-08 1:12
George_George29-Mar-08 1:12 
QuestionDebug mode crash Pin
m3604712028-Mar-08 17:48
m3604712028-Mar-08 17:48 
GeneralRe: Debug mode crash Pin
rp_suman29-Mar-08 0:33
rp_suman29-Mar-08 0:33 
GeneralRe: Debug mode crash Pin
m3604712029-Mar-08 5:14
m3604712029-Mar-08 5:14 
QuestionRe: Debug mode crash Pin
rp_suman29-Mar-08 5:34
rp_suman29-Mar-08 5:34 
GeneralRe: Debug mode crash Pin
m3604712029-Mar-08 5:48
m3604712029-Mar-08 5:48 
There are no buffers in use :S. Yes, the program is the test suite for a dll. this is the complete source of the file where the crash happens:


#ifndef __THSDK_TBASE_SDKSTATUS_H__
#define __THSDK_TBASE_SDKSTATUS_H__

#include <string>

#include "Export.h"

namespace ThaoriusSDK
{
class SdkStatusFactory;

enum SdkStatusCodesE
{
SDK_SUCCESS = 1,
SDK_PARTIAL,
SDK_ERROR,
SDK_UNKNOWN
};

enum SdkErrorCodesE
{
SDK_NO_ERROR = 1,
SDK_NOTICE,
SDK_FATAL_ERROR,
SDK_CHAOS
};

class __TBaseExport SdkStatus
{
protected:
SdkStatus( void );

inline void setSource( const std::string& source ) throw() { this->source = std::string(source); }
inline void setDescription( const std::string& description ) throw() { this->description = std::string(description); }
inline void setSourceLibrary( const std::string& sourceLibrary ) throw() { this->sourceLibrary = std::string(sourceLibrary); }
inline void setSourceLibraryId( unsigned short sourceLibraryId ) throw() { this->sourceLibraryId = sourceLibraryId; }
inline void setExtendedErrorCode( unsigned short extendedErrorCode ) throw() { this->extendedErrorCode = extendedErrorCode; }
inline void setStatusCode( SdkStatusCodesE statusCode ) throw() { this->statusCode = statusCode; }
inline void setErrorCode( SdkErrorCodesE errorCode ) throw() { this->errorCode = errorCode; }
inline void setFile( const std::string& fileName ) throw() { this->file = std::string(fileName); }
inline void setLine( unsigned int lineNumber ) throw() { this->line = lineNumber; }

friend class SdkStatusFactory;

public:
~SdkStatus( void );

inline std::string getSource( void ) const throw() { return source; }
inline std::string getDescription( void ) const throw() { return description; }
inline std::string getSourceLibrary( void ) const throw() { return sourceLibrary; }
inline unsigned short getSourceLibraryId( void ) const throw() { return sourceLibraryId; }
inline unsigned short getExtendedErrorCode( void ) const throw() { return extendedErrorCode; }
inline SdkStatusCodesE getStatusCode( void ) const throw() { return statusCode; }
inline SdkErrorCodesE getErrorCode( void ) const throw() { return errorCode; }
inline std::string getFile( void ) const throw() { return file; }
inline unsigned int getLine( void ) const throw() { return line; }

private:
std::string source;
std::string description;
std::string sourceLibrary;
std::string file;
unsigned int line;
unsigned short sourceLibraryId;
unsigned short extendedErrorCode;
SdkStatusCodesE statusCode;
SdkErrorCodesE errorCode;
};
};

#endif



Personaly, I don't undertand why getDescription() works and getFile/getSource don't.

This is the function that is supposed to test the status

void sdk_status( void )
{
// Get some status
SdkStatus status = SdkStatusFactory::createStatus("TBaseTestSuite::test2", "TBase", 25, __FILE__, __LINE__, SDK_SUCCESS, SDK_NO_ERROR, 666, "Wazabi");

// Check the values
BOOST_CHECK_EQUAL(status.getDescription(), "Wazabi");
BOOST_CHECK_EQUAL(status.getErrorCode(), SDK_NO_ERROR);
BOOST_CHECK_EQUAL(status.getExtendedErrorCode(), 666);
BOOST_CHECK_EQUAL(status.getFile(), __FILE__);
BOOST_CHECK_EQUAL(status.getSource(), "TBaseTestSuite::test2");
BOOST_CHECK_EQUAL(status.getSourceLibrary(), "TBase");
BOOST_CHECK_EQUAL(status.getSourceLibraryId(), 25);
BOOST_CHECK_EQUAL(status.getStatusCode(), SDK_SUCCESS);
}

Any other idea?

Thanks
GeneralRe: Debug mode crash Pin
rp_suman29-Mar-08 6:10
rp_suman29-Mar-08 6:10 
GeneralRe: Debug mode crash Pin
m3604712029-Mar-08 6:58
m3604712029-Mar-08 6:58 
GeneralRe: Debug mode crash Pin
rp_suman29-Mar-08 22:59
rp_suman29-Mar-08 22:59 
GeneralCreating a new Template Item Pin
Ken Mazaika28-Mar-08 12:16
Ken Mazaika28-Mar-08 12:16 
GeneralRe: Creating a new Template Item Pin
Steve Echols28-Mar-08 20:10
Steve Echols28-Mar-08 20:10 
GeneralRe: Creating a new Template Item Pin
Rajkumar R30-Mar-08 18:56
Rajkumar R30-Mar-08 18:56 
GeneralRe: Creating a new Template Item Pin
Ken Mazaika3-Apr-08 4:43
Ken Mazaika3-Apr-08 4:43 
Questionplease help me Pin
umai28-Mar-08 8:51
umai28-Mar-08 8:51 
GeneralRe: please help me Pin
led mike28-Mar-08 9:00
led mike28-Mar-08 9:00 
GeneralRe: please help me Pin
umai29-Mar-08 5:05
umai29-Mar-08 5:05 
GeneralRe: please help me Pin
Mark Salsbery28-Mar-08 9:14
Mark Salsbery28-Mar-08 9:14 
GeneralRe: please help me Pin
umai29-Mar-08 5:04
umai29-Mar-08 5:04 
GeneralRe: please help me Pin
Mark Salsbery29-Mar-08 6:59
Mark Salsbery29-Mar-08 6:59 
GeneralRe: please help me Pin
CPallini30-Mar-08 3:08
mveCPallini30-Mar-08 3:08 
QuestionRe: please help me Pin
CPallini28-Mar-08 9:17
mveCPallini28-Mar-08 9:17 
QuestionRe: please help me Pin
rp_suman29-Mar-08 1:57
rp_suman29-Mar-08 1:57 
AnswerRe: please help me Pin
ganesa moorthy29-Mar-08 2:06
ganesa moorthy29-Mar-08 2:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.