Rtlstringcbprintf n'est pas dans ntstrsafe.h comme décrit
-
21-12-2019 - |
Question
J'essaie d'utiliser
Error 4 error C3861: 'RtlStringCbPrintf': identifier not found c:\bw\epic_sl\musslcomm\musslcomm\commmessenger\socketx.h 124 1 CommMessenger
Si j'utilise rtlstringcbprintfa ou
La solution
Parce que Windows ne fournit pas RTLStringCBPRINTF Définir pour ces deux fonctions.De MSDN:
Utilisez RTLSTRINGCBPRINTFW pour gérer les chaînes UNICODE et Rtlstringcbprinterfa pour gérer les chaînes ANSI.Le formulaire que vous utilisez dépend de vos données ..
L'exemple de MSDN Utilisez la fonction RTLSTRINGCBPRINTFW (), pas RTLStringCBPRINTF ().
Vous pouvez définir vous-même RTLSTRINGCBPRINTF () vous-même:
#if defined(UNICODE)
# define RtlStringCbPrintf RtlStringCbPrintfA
#else
# define RtlStringCbPrintf RtlStringCbPrintfW
#endif