Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Funny looking part of constructor (at least for me as being greenhorn)

Status
Not open for further replies.

BAriel

Technical User
Oct 9, 2002
5
DE
Hello dear forum participants,
I keep on seeing things like
CComVariant(L"The Halden plant as ordered by Fibrotech");
being bloody beginner I am wondering what does capital L stand for ?
Is it some qualifier/hint ?
In positive case: For whom ?
In negative case: What is it then ?
Does some comprehensive list of such "qualifiers/hints" exist ?
In positive case : Where ?

What is the main idea behind these "qualifiers/hints" ?

Yours sincerely
Ariel Burbaickij

 
CComVariant has a constructor with one argument : LPCOLESTR

LPCOLSTR is a pointer to a WCHAR (wchar_t).

wchar_t can contain UNICODE characters

'L' prefix to a string means the compiler will generate a wchar string (UNICODE).

Thus everything makes sense .... ok ?
/JOlesen
 
'L' prefix to a string means the compiler will generate a wchar string (UNICODE).
Where do you know it from ?
Could you point me to some list of possible prefixes
and their meaning ?

Yours sincerely
Ariel Burbaickij
 
From the compiler documentation :

'C++ Character constants'
(Search for character constants).

I do not wonder if you somehow feel lost/confused. When it comes to COM documentation, I feel that it is scattered 'all over the place'
A good thing is to search/browse the include-files installed with the compiler/SDK.
/JOlesen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top