RtlStringCchPrintfExW
VOID RtlStringCchPrintfExW(
WCHAR *pszDest,
UINT64 cchDest,
WCHAR **ppszDestEnd,
UINT64 *pcchRemaining,
UINT64 dwFlags,
const WCHAR *pszFormat,
...){
int v9;
wchar_t *v10;
UINT64 v11;
const wchar_t *v12;
NTSTATUS v13;
size_t v14;
int v15;
STRSAFE_LPWSTR ppszDestEnda;
size_t pcchNewDestLength[2];
va_list va;
va_start(va, pszFormat);
v9 = 0;
if( (dwFlags & 0x100) != 0 )
{
if( !pszDest && cchDest || cchDest > 0x7FFFFFFF )
v9 = -1073741811;
}
else if( cchDest - 1 > 0x7FFFFFFE )
{
v9 = -1073741811;
}
if( v9 < 0 )
{
if( cchDest )
*pszDest = 0;
}
else
{
ppszDestEnda = pszDest;
v10 = pszDest;
pcchNewDestLength[0] = cchDest;
v11 = cchDest;
if( (dwFlags & 0x100) != 0 )
{
v12 = &::ppszDestEnd;
if( pszFormat )
v12 = pszFormat;
}
else
{
v12 = pszFormat;
}
if( (dwFlags & 0xFFFFE000) != 0 )
{
v15 = -1073741811;
if( cchDest )
*pszDest = 0;
}
else if( cchDest )
{
pcchNewDestLength[0] = 0i64;
v13 = RtlStringVPrintfWorkerW(pszDest, cchDest, pcchNewDestLength, v12, va);
v14 = pcchNewDestLength[0];
v15 = v13;
v11 = cchDest - pcchNewDestLength[0];
pcchNewDestLength[0] = cchDest - pcchNewDestLength[0];
v10 = &pszDest[v14];
ppszDestEnda = v10;
if( v13 >= 0 )
{
if( (dwFlags & 0x200) != 0 && v11 > 1 )
RtlStringExHandleFillBehindNullW(&pszDest[v14], 2 * v11, dwFlags);
goto LABEL_11;
}
}
else
{
if( !*v12 )
{
LABEL_11:
if( ppszDestEnd )
*ppszDestEnd = v10;
if( pcchRemaining )
*pcchRemaining = v11;
return;
}
v15 = pszDest != 0i64 ? -2147483643 : -1073741811;
}
if( (dwFlags & 0x1C00) != 0 && cchDest )
{
StringExHandleOtherFlagsW(pszDest, 2 * cchDest, ppszDestEnd, (UINT64 *)&ppszDestEnda, (UINT64)pcchNewDestLength);
v10 = ppszDestEnda;
v11 = pcchNewDestLength[0];
}
if( (int)(v15 + 0x80000000) < 0 || v15 == -2147483643 )
goto LABEL_11;
}
}Referenced by:
CmBuildDevicePanelId
CmGetCommonClassRegKeyPath
CmGetDeviceContainerRegKeyPath
CmGetDeviceControlKeyPath
CmGetDeviceHardwareKeyPath
CmGetDeviceInstanceKeyPath
CmGetDeviceInterfaceRegKeyPath
CmGetDeviceLogConfKeyPath
CmGetDevicePanelRegKeyPath
CmGetDeviceSoftwareKey
CmGetDeviceSoftwareKeyPath
DrvDbBuildDeviceIdDriverInfMatch
DrvDbCreateDatabaseNode
IoReportDetectedDevice
IoReportRootDevice
IopCreateLegacyDeviceIds
IopInitializeBootDrivers
PiCMGenerateDeviceInstance
PiFindDevInstMatch
PiProcessDriverInstance
PiRearrangeDeviceInstances
PipMakeGloballyUniqueId
PnpDeletePropertyWorker
PnpDriverLoadingFailed
PnpGetGenericStoreProperty
PnpGetGenericStorePropertyLocales
PnpOpenPropertiesKey
PnpSetPropertyWorker
PnpStringFromGuid
PopDiagTraceProcessorThrottleDurationPerfTrack
PopDiagTraceProcessorThrottlePerfTrack
RtlFormatMessageEx