From: Jan M on 24 Jan 2010 06:22 Hi, Working with WDK example MSVAD. Added wcscat_s() and get "unresolved external symbol _wcscat_s referenced in function "long __stdcall MyFunction()". wcscat() links (with #pragma warning (disable: 4995)) but OACR constantly nags "... is banned ...". What lib do I need to link in to resolve this (MS docs dont seem to have this info for WDK). Thanks. Jan
From: Don Burn on 24 Jan 2010 09:13 Well the bottom line is you should not be using wcscat in the kernel period. Personally, I find that there is little reason to use NULL terminated strings in the kernel using UNICODE_STRING instead with RtlAppendUnicodeStringToString for the equivalent of wcscat. If you really need to use NULL terminated strings, then look at RtlStringCbCat, RtlStringCbCatEx, RtlStringCbCatN, RtlStringCbCatNEx one of these will serve the purpose. In general when reviewing kernem mode code, if I see a C language library function it is a red flag that the developer at a minimum does not know the kernel environment and probably has a bug in his code. -- Don Burn (MVP, Windows DKD) Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr Remove StopSpam to reply "Jan M" <jan_m(a)jerseymail.co.uk> wrote in message news:ucD59dOnKHA.2544(a)TK2MSFTNGP04.phx.gbl... > Hi, > > Working with WDK example MSVAD. Added wcscat_s() and get "unresolved > external symbol _wcscat_s referenced in function "long __stdcall > MyFunction()". > > wcscat() links (with #pragma warning (disable: 4995)) but OACR constantly > nags "... is banned ...". > > What lib do I need to link in to resolve this (MS docs dont seem to have > this info for WDK). > > Thanks. > > Jan > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4801 (20100124) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > > __________ Information from ESET NOD32 Antivirus, version of virus signature database 4801 (20100124) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
From: Maxim S. Shatskih on 24 Jan 2010 10:18 > Working with WDK example MSVAD. Added wcscat_s() Try StringCchCat or StringCbCat instead. -- Maxim S. Shatskih Windows DDK MVP maxim(a)storagecraft.com http://www.storagecraft.com
From: Jan M on 24 Jan 2010 10:54 Thanks guys. I settled for StringCchCatNW(). Jan
|
Pages: 1 Prev: WinUSB as a filter driver? Next: List of kernel mode compatible functions |