Click here to Skip to main content
15,925,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dll and global variables. Pin
Dimitris Vikeloudas3-Apr-08 22:39
Dimitris Vikeloudas3-Apr-08 22:39 
GeneralCComPtr Pin
George_George3-Apr-08 4:47
George_George3-Apr-08 4:47 
GeneralRe: CComPtr Pin
led mike3-Apr-08 5:14
led mike3-Apr-08 5:14 
GeneralRe: CComPtr Pin
George_George3-Apr-08 21:16
George_George3-Apr-08 21:16 
GeneralA2WBSTR Pin
George_George3-Apr-08 4:40
George_George3-Apr-08 4:40 
GeneralRe: A2WBSTR Pin
James R. Twine3-Apr-08 4:54
James R. Twine3-Apr-08 4:54 
GeneralRe: A2WBSTR Pin
George_George3-Apr-08 21:29
George_George3-Apr-08 21:29 
GeneralRe: A2WBSTR Pin
CPallini3-Apr-08 5:47
mveCPallini3-Apr-08 5:47 
On my system, provided _ATL_EX_CONVERSION_MACROS_ONLY symbol is not defined, they are the same
#if defined(_UNICODE)
// in these cases the default (TCHAR) is the same as OLECHAR
	inline BSTR T2BSTR_EX(__in_opt LPCTSTR lp) {return ::SysAllocString(lp);}
	inline BSTR A2BSTR_EX(__in_opt LPCSTR lp) {return A2WBSTR(lp);}
	inline BSTR W2BSTR_EX(__in_opt LPCWSTR lp) {return ::SysAllocString(lp);}

#ifndef _ATL_EX_CONVERSION_MACROS_ONLY

	inline BSTR T2BSTR(__in_opt LPCTSTR lp) {return ::SysAllocString(lp);}
	inline BSTR A2BSTR(__in_opt LPCSTR lp) {return A2WBSTR(lp);}
	inline BSTR W2BSTR(__in_opt LPCWSTR lp) {return ::SysAllocString(lp);}
	
#endif	// _ATL_EX_CONVERSION_MACROS_ONLY

#else // !defined(_UNICODE)
	inline BSTR T2BSTR_EX(__in_opt LPCTSTR lp) {return A2WBSTR(lp);}
	inline BSTR A2BSTR_EX(__in_opt LPCSTR lp) {return A2WBSTR(lp);}
	inline BSTR W2BSTR_EX(__in_opt LPCWSTR lp) {return ::SysAllocString(lp);}
	
#ifndef _ATL_EX_CONVERSION_MACROS_ONLY

	inline BSTR T2BSTR(__in_opt LPCTSTR lp) {return A2WBSTR(lp);}
	inline BSTR A2BSTR(__in_opt LPCSTR lp) {return A2WBSTR(lp);}
	inline BSTR W2BSTR(__in_opt LPCWSTR lp) {return ::SysAllocString(lp);}

#endif	// _ATL_EX_CONVERSION_MACROS_ONLY

#endif // defined(_UNICODE)


Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke


GeneralRe: A2WBSTR Pin
George_George3-Apr-08 21:27
George_George3-Apr-08 21:27 
GeneralRe: A2WBSTR Pin
CPallini3-Apr-08 22:38
mveCPallini3-Apr-08 22:38 
GeneralRe: A2WBSTR Pin
George_George3-Apr-08 23:04
George_George3-Apr-08 23:04 
GeneralRe: A2WBSTR Pin
CPallini3-Apr-08 23:15
mveCPallini3-Apr-08 23:15 
GeneralRe: A2WBSTR Pin
George_George3-Apr-08 23:18
George_George3-Apr-08 23:18 
GeneralRe: A2WBSTR Pin
CPallini3-Apr-08 23:29
mveCPallini3-Apr-08 23:29 
GeneralRe: A2WBSTR Pin
George_George3-Apr-08 23:32
George_George3-Apr-08 23:32 
Generalesoteric use of the "new" keyword Pin
Dave Calkins3-Apr-08 4:12
Dave Calkins3-Apr-08 4:12 
GeneralRe: esoteric use of the "new" keyword Pin
James R. Twine3-Apr-08 4:51
James R. Twine3-Apr-08 4:51 
QuestionRe: esoteric use of the "new" keyword Pin
David Crow3-Apr-08 4:56
David Crow3-Apr-08 4:56 
GeneralRe: esoteric use of the "new" keyword Pin
James R. Twine3-Apr-08 5:05
James R. Twine3-Apr-08 5:05 
GeneralRe: esoteric use of the "new" keyword Pin
Cedric Moonen3-Apr-08 5:10
Cedric Moonen3-Apr-08 5:10 
GeneralRe: esoteric use of the "new" keyword Pin
James R. Twine3-Apr-08 5:41
James R. Twine3-Apr-08 5:41 
GeneralRe: esoteric use of the "new" keyword Pin
Mark Salsbery3-Apr-08 6:10
Mark Salsbery3-Apr-08 6:10 
GeneralRe: esoteric use of the "new" keyword Pin
Dave Calkins3-Apr-08 11:18
Dave Calkins3-Apr-08 11:18 
GeneralRegCreateKeyEx failed in Vista Pin
dharani3-Apr-08 2:52
dharani3-Apr-08 2:52 
QuestionRe: RegCreateKeyEx failed in Vista Pin
Rajesh R Subramanian3-Apr-08 3:02
professionalRajesh R Subramanian3-Apr-08 3: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.