|
Hey no prob..
Do your Duty and Don't expect the Result
|
|
|
|
|
Hi toxcct,
Sorry i'm not clearly read your post.
To make the string always UNICODE we have to use L or someother converting macro.
Sorry once again...
Do your Duty and Don't expect the Result
|
|
|
|
|
ok nevermind
|
|
|
|
|
toxcct wrote: why not using C++ cast operators ?!
Problem was not related to this, just ignored that.
toxcct wrote: Notice that those 2 lines of code are quite the same, because is unicode is not defined, _T() simply equals its content (just removed)...
OP is facing problem because, UNICODE is defined. Otherwise, he would not have needed to use LPCWSTR .
toxcct wrote: Here[^] is a link to those macros
Thanks for this.
|
|
|
|
|
prasad_som wrote: OP is facing problem because, UNICODE is defined. Otherwise, he would not have needed to use LPCWSTR.
yes yes, i aggree with that.
but i just added that your 2nd line of code (LPCWSTR pTestCast = (LPCWSTR)(_T("Error_Occured.err")); ) was not correct.
you would better have written this :
LPCWSTR pTestCast = CT2W(_T("Error_Occured.err"));
so, like that, if unicode is define, _T() transforms it to a wide string, and that's good, because CT2W() waits for a wide string in such acompilation mode;
if unicode is not defined, then your code remains the same and also compiles good for an ANSI compilation, because _T() casts into an ANSI strings, which is what CT2W() waits for is UNICODE is not #defined...
|
|
|
|
|
toxcct wrote: LPCWSTR pTestCast = CT2W(_T("Error_Occured.err"));
I appreciate for this information.
But in case of ANSI , it is not needed to use LPCWSTR (in context of API in OP). It would be LPCSTR rather.
So problem faced by OP was basically due to incorrect type casting. And wanted to highlight that. Might be not considered all scenarios.
|
|
|
|
|
that's why we should most of the time use CString, LP[C]TSTR and _T()
|
|
|
|
|
toxcct wrote: that's why we should most of the time use CString, LP[C]TSTR and _T()
I do.
|
|
|
|
|
|
Hi,
Is there any win32 API for getting sql server edition.
Regards,
Mushq
|
|
|
|
|
Mushq wrote: Is there any win32 API for getting sql server edition.
CRegKey
Search registry for SQL Server version!
|
|
|
|
|
Caution: Registry entries are always subject to change in future versions!
how to find the edition of SQL Server 2000/2005 through registry?[^]
Better yet, get it from the server itself using SQL:
SELECT SERVERPROPERTY('Edition')
SELECT SERVERPROPERTY('ProductVersion')
etc.
SELECT @@VERSION AS 'SQL Server Version'
xp_msver [...]
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
I want to practice vc++.so i like to build a simple project using vc++.Can any one guide me.Plz give any simple projects for me.
Is any site for this?
Plz help me.
|
|
|
|
|
Please refer this[^]
Regards,
Paresh.
|
|
|
|
|
The first project would be to avoid using more than one user account and making it so obviously visible by posting the same question from either user accounts, one after another. Stop thinking that you are the smartest person in the world.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
What does you meaning of "practice vc++ and simple project".I think if you get a book has many good examples.
|
|
|
|
|
don't bother, the 2 threads are from the same guy
(again and again and ........ and again, pleaaaaaaaaaaaaase read the other replies when joining a thread lately !!!!!)
|
|
|
|
|
Really,I think why two sames messages(almost) is here and OK!
|
|
|
|
|
sorry ? i didn't understand your post... may you rephrase please ?
|
|
|
|
|
I said maybe these messages are of a member with two names,and did you serious in your previous message.I think we must happy tonight,tomorrow is new year in my country ;)
|
|
|
|
|
WhiteSky wrote: I said maybe these messages are of a member with two names
yes, but abusing of trolls is not well seen here. moreover, not only the guy is trolling, but he's also spamming (same question twice is definitely not needed to get a relevant answer).
WhiteSky wrote: did you serious in your previous message
you meant, was I serious ?
yes.
WhiteSky wrote: I think we must be happy tonight,tomorrow is new year in my country
few hours in advance, happy new year (but that doesn't change the thread )
|
|
|
|
|
Are you wanting to learn C++, VC++, or MFC?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I am new to vc++.I want to build a simple project.Can anyone help me to this.
plz Give project abstract.
Is Any website for this.
|
|
|
|
|
Please refer this[^]
Regards,
Paresh.
|
|
|
|
|