Click here to Skip to main content
15,891,033 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: C++/MFC solution Convert string to integer only such that if it is alphanumeric or float it should show as invalid values. Pin
Shivanand Gupta21-Aug-12 23:40
Shivanand Gupta21-Aug-12 23:40 
QuestionVisual Studio 10 Linker Pin
BarryPearlman15-Jul-12 14:52
BarryPearlman15-Jul-12 14:52 
AnswerRe: Visual Studio 10 Linker Pin
Richard MacCutchan15-Jul-12 22:13
mveRichard MacCutchan15-Jul-12 22:13 
QuestionHow to unload a memory-resident system dll from memory? Pin
creative2628-Jun-12 10:50
creative2628-Jun-12 10:50 
AnswerRe: How to unload a memory-resident system dll from memory? Pin
Richard MacCutchan28-Jun-12 22:26
mveRichard MacCutchan28-Jun-12 22:26 
QuestionHELP BUTTON Pin
Smart Zulu22-Jun-12 1:15
Smart Zulu22-Jun-12 1:15 
QuestionUnable to drop a file on a new message in outlook 2007 Pin
sisrahul19-Jun-12 2:57
sisrahul19-Jun-12 2:57 
GeneralBug in ATL/MFC 8.0 CString Pin
XmlSeeker14-Jun-12 18:58
XmlSeeker14-Jun-12 18:58 
I think I have found a bug in the CString assignement operator of the ATL/MFC 8.
C++
CStringT& operator=( __in_z_opt PCYSTR pszSrc )

The method calculates the length of the required buffer and allocates the buffer. The calculation does not include the terminating null character. Thereafter it calls MultiByteToWideChar, passing the length as the cchWideChar parameter.

The function MultiByteToWideChar returns 0 as failure indication, but this is ignored by the MFC. As a side effect, MultiByteToWideChar fills the output buffer on some platforms like Win32 and Windows CE 5.0 (SH4).

But the Windows CE 5.0 (x86) implementation of MultiByteToWideChar does not fill the buffer. Although the allocated buffer is too small, the bug is not visible on most platforms but on Windows CE 5.0 (x86). Here you get an empty CString after the assignment.

Example:
C++
CStringW s("ABC");
PCWSTR p = (PCWSTR)s;
assert(0 != p[0]); The assert in the code above fails.

GeneralRe: Bug in ATL/MFC 8.0 CString Pin
Richard MacCutchan14-Jun-12 21:48
mveRichard MacCutchan14-Jun-12 21:48 
QuestionATL - Raise Event to all clients and acces to same variable Pin
ljubek7414-Jun-12 7:08
ljubek7414-Jun-12 7:08 
AnswerRe: ATL - Raise Event to all clients and acces to same variable Pin
barneyman17-Jun-12 14:51
barneyman17-Jun-12 14:51 
GeneralRe: ATL - Raise Event to all clients and acces to same variable Pin
ljubek7418-Jun-12 2:02
ljubek7418-Jun-12 2:02 
QuestionMFC exe to ATL service Pin
es196812-Jun-12 3:39
es196812-Jun-12 3:39 
AnswerRe: MFC exe to ATL service Pin
barneyman13-Jun-12 18:02
barneyman13-Jun-12 18:02 
QuestionAPI Decision Pin
Collin Biedenkapp11-Jun-12 18:53
Collin Biedenkapp11-Jun-12 18:53 
AnswerRe: API Decision Pin
Richard MacCutchan11-Jun-12 22:01
mveRichard MacCutchan11-Jun-12 22:01 
Questionhow to use an interface as a parameter in other atl objects? Pin
astupidboy31-May-12 20:41
astupidboy31-May-12 20:41 
AnswerRe: how to use an interface as a parameter in other atl objects? Pin
Richard MacCutchan31-May-12 21:26
mveRichard MacCutchan31-May-12 21:26 
GeneralRe: how to use an interface as a parameter in other atl objects? Pin
astupidboy31-May-12 22:29
astupidboy31-May-12 22:29 
GeneralRe: how to use an interface as a parameter in other atl objects? Pin
Richard MacCutchan31-May-12 22:35
mveRichard MacCutchan31-May-12 22:35 
GeneralRe: how to use an interface as a parameter in other atl objects? Pin
astupidboy31-May-12 22:56
astupidboy31-May-12 22:56 
GeneralRe: how to use an interface as a parameter in other atl objects? Pin
Richard MacCutchan31-May-12 23:08
mveRichard MacCutchan31-May-12 23:08 
GeneralRe: how to use an interface as a parameter in other atl objects? Pin
astupidboy31-May-12 23:24
astupidboy31-May-12 23:24 
GeneralRe: how to use an interface as a parameter in other atl objects? Pin
barneyman3-Jun-12 17:58
barneyman3-Jun-12 17:58 
GeneralRe: how to use an interface as a parameter in other atl objects? Pin
astupidboy31-May-12 22:35
astupidboy31-May-12 22:35 

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.