Click here to Skip to main content
16,004,969 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: STL fstream format question Pin
Nemanja Trifunovic25-Mar-03 11:42
Nemanja Trifunovic25-Mar-03 11:42 
GeneralRe: STL fstream format question Pin
Nitron25-Mar-03 11:43
Nitron25-Mar-03 11:43 
GeneralRe: STL fstream format question Pin
Nemanja Trifunovic25-Mar-03 11:52
Nemanja Trifunovic25-Mar-03 11:52 
GeneralRe: STL fstream format question Pin
Nitron25-Mar-03 13:23
Nitron25-Mar-03 13:23 
General_bstr_t problem Pin
particle2k25-Mar-03 6:32
particle2k25-Mar-03 6:32 
GeneralRe: _bstr_t problem Pin
particle2k25-Mar-03 6:39
particle2k25-Mar-03 6:39 
GeneralRe: _bstr_t problem Pin
geo_m25-Mar-03 10:16
geo_m25-Mar-03 10:16 
GeneralRe: _bstr_t problem Pin
particle2k26-Mar-03 1:36
particle2k26-Mar-03 1:36 
hello,
thanks for the info with the finalconstruct.
and for the _bstr_t problem i found some more info. in fact it is working in a simple atl coclass, but i have the problem in a rather complex application. but it seems like i found an error, but i do not know, why it is like this.

i have a function
HRESULT GetSection([in] BSTR bstrSection, [out,retval] IVConfigFileSection** pVal );

it should return the section of a config file based on the section name. an empty section name should return the default section selected before.
i call this function from inside the same class like following:

CComPtr< IVConfigFileSection > pSection = NULL;
GetSection( L"", &pSection );
or
GetSection( L"MySection", &pSection );

then i get the error with the string assignment in a complete different function.

if i change the call of the function to:
GetSection( (_bstr_t)"", &pSection );
or
GetSection( (_bstr_t)"MySection", &pSection );

it works, the string assignment is correct.

so i thought maybe it has something to do with the GetSection function.
this one is very simple:

STDMETHODIMP VConfigFile::GetSection(/*[in]*/ BSTR bstrSection, /*[out,retval]*/ IVConfigFileSection** pVal )
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())

*pVal = NULL;

if ( SysStringLen( bstrSection ) == 0 )
return default;
else
return other;

return S_OK;
}

now i'm not sure if it has something to do with the SysStringLen function?
or is it wrong to pass a L"Text" parameter to a function expecting a BSTR paramter?

thanks in advance
enrico
GeneralRe: _bstr_t problem Pin
geo_m26-Mar-03 1:55
geo_m26-Mar-03 1:55 
QuestionHow can I change my WTL project to a COM server Pin
Remon Spekreijse24-Mar-03 3:57
Remon Spekreijse24-Mar-03 3:57 
GeneralEnable/Disable toolbar buttons Pin
Tommy2k22-Mar-03 8:00
Tommy2k22-Mar-03 8:00 
GeneralRe: Enable/Disable toolbar buttons Pin
Michael Dunn22-Mar-03 8:33
sitebuilderMichael Dunn22-Mar-03 8:33 
GeneralRe: Enable/Disable toolbar buttons Pin
Ed Gadziemski23-Mar-03 2:52
professionalEd Gadziemski23-Mar-03 2:52 
GeneralAnything for Netscape Plug-in Pin
Mahesh Perumal20-Mar-03 0:30
Mahesh Perumal20-Mar-03 0:30 
GeneralATL Object Wizard Pin
DuFF15-Mar-03 14:15
DuFF15-Mar-03 14:15 
GeneralRe: ATL Object Wizard Pin
Amit Dey26-Mar-03 13:02
Amit Dey26-Mar-03 13:02 
GeneralDDX_CONTROL with WTL Pin
roel_v215-Mar-03 10:36
roel_v215-Mar-03 10:36 
GeneralRe: DDX_CONTROL with WTL Pin
roel_v215-Mar-03 11:45
roel_v215-Mar-03 11:45 
GeneralRe: DDX_CONTROL with WTL Pin
Michael Dunn15-Mar-03 13:14
sitebuilderMichael Dunn15-Mar-03 13:14 
GeneralRe: DDX_CONTROL with WTL Pin
roel_v215-Mar-03 15:14
roel_v215-Mar-03 15:14 
GeneralRe: DDX_CONTROL with WTL Pin
Michael Dunn15-Mar-03 18:51
sitebuilderMichael Dunn15-Mar-03 18:51 
GeneralRe: DDX_CONTROL with WTL Pin
Ernesto D.16-Mar-03 12:11
Ernesto D.16-Mar-03 12:11 
GeneralRe: DDX_CONTROL with WTL Pin
Michael Dunn16-Mar-03 12:40
sitebuilderMichael Dunn16-Mar-03 12:40 
GeneralRe: DDX_CONTROL with WTL Pin
Ernesto D.16-Mar-03 15:59
Ernesto D.16-Mar-03 15:59 
GeneralATL/WTL vs MFC Pin
Jean-Marc Molina13-Mar-03 21:02
Jean-Marc Molina13-Mar-03 21:02 

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.