Why can not use VC API command wcsncpy_s in BCB2007? Have something need
include?
Have any command instead?
Thanks for any comments,
James
The VC "wcsncpy" function is the UNICODE version of "strncpy". As far as I know unicode is not supported by CPP Builder or not complete supported. I'm not in the CPP Builder thing so deep anymore, but in the past UNICODE was not very easy with BCB. I think the VCL is not UNICODE capable...
Under VC you must have "_UNICODE" defined to use UNICODE. Maybe this helps you also with BCB
Hope I could help a little bit?
Greetz
Thomas
Thanks for your informat, that is very helpful for me.
James
wcsncpy_s is not an API, it is a function from microsoft C RTL. You can
not use this in BDS since it has different C RTL that does not implement
this function.
>
> Have any command instead?
You can use wcsncpy that exists in BDS C RTL.
Just include string.h or cstring.
> The VC "wcsncpy" function is the UNICODE version of "strncpy".
Yes, it is, and it is supported by BCB as well. Most of the Unicode
functions of the C library are.
> As far as I know unicode is not supported by CPP Builder
To an extent, it is.
> in the past UNICODE was not very easy with BCB.
The UNICODE define, no. But Unicode in general can be used.
> I think the VCL is not UNICODE capable...
No it is not. That will be implemented in the next version.
> Under VC you must have "_UNICODE" defined to use UNICODE.
That is not needed in order to use the Unicode functions of the C library.
Gambit
> Just include string.h or cstring.
If you use cstring, then the function will be in the std:: namespace.
--
David Dean (CodeGear)
Lead C++ QA Engineer
The original code like this :
wcsncpy_s(pszBuffer, bufferLen, varName.pwszVal, _TRUNCATE);
I don't know how to use std::namspace to modify this code for compiler?
Please provide easy code explain for me, thank you.
Best regards,
James
No need for that. This code is equivalent to the original:
wcsncpy(pszBuffer, varName.pwszVal, bufferLen);
"Darko Miletic" <kik...@fibertel.com.ar> 在郵件
news:47d124f7$1...@newsgroups.borland.com 中撰寫...
The MS function use WCHAR for filename.
For example :
void Player::SetWaveFile(WCHAR *pszFileName)
How to change my OpenDialog->FileName AnsiString to WCHAR?
Have any method translate String to UNICODE?
Thanks for any comments,
James
"Darko Miletic" <kik...@fibertel.com.ar> 在郵件
news:47d124f7$1...@newsgroups.borland.com 中撰寫...