I have a problem when trying to use CString.
I have a console application written using VS2010Express. I have a piece of code I would like to use, but it uses CString. When I try to include the appropriate header atlstr.h (as far as I know) I get the famous error: Cannot open source file. After Goggling around for a while it seems that in general it should be possible, but the atlstr.h is not available to Express users. Questions:
1) Is that right ? 2) Can I avoid this problem somehow?
Below is the code, (origin: http://www.cprogramming.com/tutorial/ado_c++_wrapper_classes.html)
If anyone has an Idea how I can continue using this code, with or without the use of CString, please give me a hand....
#import "C:\Program\Delade filer\System\ado\msado15.dll" rename ("EOF","adoEOF") no_namespace
#include <atlstr.h>
class CADOConnection
{ private:
_ConnectionPtr pConnection;
CString m_szConnectionString;
BOOL Initialize();
public:
void SetConnectionString(CString& szConnectionString);
TCHAR *GetConnectionString(){return m_szConnectionString);
BOOL IsClosed();
BOOL IsOpen();
BOOL Open();
BOOL Open(CString& szConnectionString, CString szUser=_T(""), CString szPassword=_T(""));
BOOL Close();
CADOConnection(CString& szConnectionString);
CADOConnection(void);
~CADOConnection(void);
};
Thank you, and happy Easter !