|
|
and develop applications for Windows XP?
I've used Windows XP SP2 Platform SDK for several months, there are some incomptible problem, like CFileDialog crashing.
I wonder if there is a more compatible one.
What about Windows Server 2003 R2 Platform SDK ?
Thanks.
modified on Saturday, March 29, 2008 5:48 AM
|
|
|
|
|
Windows Server 2003 R2 Platform SDK February 2003 Edition is the last version compatible with VC6. I cannot tell you if your problems will go away however.
Best Wishes,
-David Delaune
|
|
|
|
|
I've tried, CFileDialog still crashes.
Thanks all the same.
|
|
|
|
|
hi
how to create DLL in visual C++?and how to execute it ?give the detail about DLL functionality for VC++?
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
For detail, please check 'Programming Applications For Microsoft Windows' by Jeffrey Richter.
|
|
|
|
|
|
Is this a dejavu[^] or are you repeatedly asking the same simple questions instead of using the search?
|
|
|
|
|
Hello everyone,
I am compiling the client part program of COM reentrancy problem. Does anyone know what is the problem?
(BTW: server part program can compile, link and register ok.)
I am using MSVC 2008 + x64 Windows Server 2003. Is it because the code is old and in the newest SDK we need some code change to migrate?
http://www.codeproject.com/KB/COM/sta_issues.aspx
1>stdafx.cpp
1>d:\exercises\stareentr\stareentr\client\stdafx.h(16) : fatal error C1083: Cannot open include file: 'atlapp.h': No such file or directory
1>Compiling...
1>client.cpp
1>d:\exercises\stareentr\stareentr\client\client.cpp(4) : fatal error C1083: Cannot open precompiled header file: '.\Debug/client.pch': No such file or directory
thanks in advance,
George
|
|
|
|
|
Hi,
It seems, problem is only in some project settings.
Check "additional include libraries", linker input etc.
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Thanks Suman,
The value for me is, odbc32.lib odbccp32.lib comctl32.lib. But what I met with is compile error, why do you think it deals with linker options?
regards,
George
|
|
|
|
|
Hi,
I mainly wanted to tell it will be only project settings and not programming error.
I will tell you when I find solution.
Is there use of SetSDKPath() in ur project?
Thanks,
Suman
--
"Programming is an art that fights back!"
modified on Saturday, March 29, 2008 7:07 AM
|
|
|
|
|
Thanks Suman,
I found atlapp.h belongs to WTL 8.0 and when I install the library and add the include path of WTL 8.0 to the project additional include path, the client.cpp can compile.
But for the resource file, there is still compile error,
1>.\client.rc(10) : fatal error RC1015: cannot open include file 'atlres.h'.
Do we need special settings for the resource file?
regards,
George
|
|
|
|
|
Hi,
Try adding "C:\Program Files\Microsoft Visual Studio\VC....\WTL\include" to "Additional Include Directories" under C/C++ and Resources tab in your Project Settings dialog.
Best Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Thanks Suman, it works!
regards,
George
|
|
|
|
|
Hi,
I am glad to hear ur problem solved..
All the best!!
Thanks & Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Thanks Suman,
You are so knowledgable. I am new to ATL, and I may have some further stupid questions like this. Glad if you could continue to help.
regards,
George
|
|
|
|
|
George_George wrote: You are so knowledgable
Hi,
I am normal programmer only, I had overcome similar problems with MFC programs.
Sure, I will be there to help whenever I have time..
Best Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
No use of SetSDKPath in the entire solution. If you want to check source the reproduce the compile error, you can simply download the source from the link I posted in the original question.
regards,
George
|
|
|
|
|
Hi, I'm having a weird crash problem when running on debug mode. Any call to getFile() causes a runtime error.
Code:
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; }
I'm using it on a boost test suite. the code is:
// 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);
The runtime error is:
unknown location(0): fatal error in "sdk_status": dbgheap.c(1279) : Assertion failed: _CrtIsValidHeapPointer(pUserData)
I'd preciate the help.
Thanks
|
|
|
|
|
Hi,
As the problem related to Boost module, please try posting in boost forum also.
See the problem related to you in one of forum: boost::variant build crashes Visual C++ [^]
Check the compile options, loops etc..
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Is not boost related. It happens even if I don't use boost. It also happens with getSource() :S.
Any Ideas?
|
|
|
|
|
Hi,
Check if some buffer is overflow and causing stack corruption
If so, increase buffer size or whatever is right
Is ur application a DLL or something else?
--
"Programming is an art that fights back!"
|
|
|
|
|
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
|
|
|
|
|
Hi,
Please try assigning "__FILE__" to some variable and use it while comparing.
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|