[REACTOS] Stop using non-conforming swprintf / vswprintf

Use the underscored versions instead.
This commit is contained in:
Timo Kreuzer
2026-05-07 06:27:58 +00:00
parent 1dc2e6de72
commit 1cf31524d5
183 changed files with 964 additions and 943 deletions
+4 -4
View File
@@ -472,7 +472,7 @@ PrintJobDetails(
{
if (pBuffer->DaysOfMonth & (1 << i))
{
swprintf(szDateBuffer, L" %d", i + 1);
_swprintf(szDateBuffer, L" %d", i + 1);
nDateLength = wcslen(szDateBuffer);
if (nScheduleLength + nDateLength <= 55)
{
@@ -499,7 +499,7 @@ PrintJobDetails(
{
if (pBuffer->DaysOfWeek & (1 << i))
{
swprintf(szDateBuffer, L" %s", pszDaysOfWeekArray[i]);
_swprintf(szDateBuffer, L" %s", pszDaysOfWeekArray[i]);
nDateLength = wcslen(szDateBuffer);
if (nScheduleLength + nDateLength <= 55)
{
@@ -597,7 +597,7 @@ PrintAllJobs(
{
if (pBuffer[i].DaysOfMonth & (1 << j))
{
swprintf(szDateBuffer, L" %d", j + 1);
_swprintf(szDateBuffer, L" %d", j + 1);
nDateLength = wcslen(szDateBuffer);
if (nScheduleLength + nDateLength <= 19)
{
@@ -624,7 +624,7 @@ PrintAllJobs(
{
if (pBuffer[i].DaysOfWeek & (1 << j))
{
swprintf(szDateBuffer, L" %s", pszDaysOfWeekArray[j]);
_swprintf(szDateBuffer, L" %s", pszDaysOfWeekArray[j]);
nDateLength = wcslen(szDateBuffer);
if (nScheduleLength + nDateLength <= 55)
{
+5 -5
View File
@@ -76,7 +76,7 @@ int ShowParallelStatus(INT nPortNum)
WCHAR buffer[250];
WCHAR szPortName[MAX_PORTNAME_LEN];
swprintf(szPortName, L"LPT%d", nPortNum);
_swprintf(szPortName, L"LPT%d", nPortNum);
ConPuts(StdOut, L"\n");
UnderlinedResPrintf(StdOut, IDS_DEVICE_STATUS_HEADER, szPortName);
@@ -113,8 +113,8 @@ int SetParallelState(INT nPortNum)
WCHAR szPortName[MAX_PORTNAME_LEN];
WCHAR szTargetPath[MAX_PORTNAME_LEN];
swprintf(szPortName, L"LPT%d", nPortNum);
swprintf(szTargetPath, L"COM%d", nPortNum);
_swprintf(szPortName, L"LPT%d", nPortNum);
_swprintf(szTargetPath, L"COM%d", nPortNum);
if (!DefineDosDeviceW(DDD_REMOVE_DEFINITION, szPortName, szTargetPath))
{
ConPrintf(StdErr, L"ERROR: SetParallelState(%d) - DefineDosDevice(%s) failed: 0x%lx\n", nPortNum, szPortName, GetLastError());
@@ -528,7 +528,7 @@ SerialPortQuery(INT nPortNum, LPDCB pDCB, LPCOMMTIMEOUTS pCommTimeouts, BOOL bWr
ASSERT(pDCB);
ASSERT(pCommTimeouts);
swprintf(szPortName, L"COM%d", nPortNum);
_swprintf(szPortName, L"COM%d", nPortNum);
hPort = CreateFileW(szPortName,
bWrite ? GENERIC_WRITE : GENERIC_READ,
0, // exclusive
@@ -604,7 +604,7 @@ int ShowSerialStatus(INT nPortNum)
dcb.StopBits = 0;
}
swprintf(szPortName, L"COM%d", nPortNum);
_swprintf(szPortName, L"COM%d", nPortNum);
ConPuts(StdOut, L"\n");
UnderlinedResPrintf(StdOut, IDS_DEVICE_STATUS_HEADER, szPortName);
+10 -10
View File
@@ -136,9 +136,9 @@ static VOID DrawTree(PCWSTR strPath,
{
/* Add '├───Folder name' (\xC3\xC4\xC4\xC4 or \x251C\x2500\x2500\x2500) */
if (bUseAscii)
swprintf(str, L"+---%s", arrFolder[i].cFileName);
_swprintf(str, L"+---%s", arrFolder[i].cFileName);
else
swprintf(str, L"\x251C\x2500\x2500\x2500%s", arrFolder[i].cFileName);
_swprintf(str, L"\x251C\x2500\x2500\x2500%s", arrFolder[i].cFileName);
}
else
{
@@ -147,14 +147,14 @@ static VOID DrawTree(PCWSTR strPath,
/* Add '│ FileName' (\xB3 or \x2502) */
// This line is added to connect the below-folder sub-structure
if (bUseAscii)
swprintf(str, L"| %s", arrFolder[i].cFileName);
_swprintf(str, L"| %s", arrFolder[i].cFileName);
else
swprintf(str, L"\x2502 %s", arrFolder[i].cFileName);
_swprintf(str, L"\x2502 %s", arrFolder[i].cFileName);
}
else
{
/* Add ' FileName' */
swprintf(str, L" %s", arrFolder[i].cFileName);
_swprintf(str, L" %s", arrFolder[i].cFileName);
}
}
}
@@ -164,9 +164,9 @@ static VOID DrawTree(PCWSTR strPath,
{
/* '└───Folder name' (\xC0\xC4\xC4\xC4 or \x2514\x2500\x2500\x2500) */
if (bUseAscii)
swprintf(str, L"\\---%s", arrFolder[i].cFileName);
_swprintf(str, L"\\---%s", arrFolder[i].cFileName);
else
swprintf(str, L"\x2514\x2500\x2500\x2500%s", arrFolder[i].cFileName);
_swprintf(str, L"\x2514\x2500\x2500\x2500%s", arrFolder[i].cFileName);
}
else
{
@@ -174,14 +174,14 @@ static VOID DrawTree(PCWSTR strPath,
{
/* '│ FileName' (\xB3 or \x2502) */
if (bUseAscii)
swprintf(str, L"| %s", arrFolder[i].cFileName);
_swprintf(str, L"| %s", arrFolder[i].cFileName);
else
swprintf(str, L"\x2502 %s", arrFolder[i].cFileName);
_swprintf(str, L"\x2502 %s", arrFolder[i].cFileName);
}
else
{
/* ' FileName' */
swprintf(str, L" %s", arrFolder[i].cFileName);
_swprintf(str, L" %s", arrFolder[i].cFileName);
}
}
}
+1 -1
View File
@@ -31,7 +31,7 @@ BOOL StartD3DTest(GUID *lpDevice, HWND hWnd, HINSTANCE hInstance, WCHAR* pszCapt
LoadStringW(hInstance, IDS_D3DTEST_D3Dx, szTestDescriptionRaw, sizeof(szTestDescriptionRaw) / sizeof(WCHAR));
//LoadStringW(hInstance, resResult, szResult, sizeof(szResult) / sizeof(WCHAR));
swprintf(szTestDescription, szTestDescriptionRaw, TestNr);
_swprintf(szTestDescription, szTestDescriptionRaw, TestNr);
if (MessageBox(NULL, szTestDescription, szCaption, MB_YESNO | MB_ICONQUESTION) == IDNO)
return FALSE;
+10 -10
View File
@@ -78,7 +78,7 @@ Display_DrawText(HDC hDC, DISPLAYDATA* pData, int nYPos)
hOldFont = SelectObject(hDC, pData->hCaptionFont);
GetTextMetrics(hDC, &tm);
swprintf(szCaption, L"%s%s", pData->szTypeFaceName, pData->szFormat);
_swprintf(szCaption, L"%s%s", pData->szTypeFaceName, pData->szFormat);
TextOutW(hDC, 0, y, szCaption, (INT)wcslen(szCaption));
y += tm.tmHeight + SPACING1;
@@ -93,15 +93,15 @@ Display_DrawText(HDC hDC, DISPLAYDATA* pData, int nYPos)
/* Output Character set */
SelectObject(hDC, pData->hCharSetFont);
GetTextMetrics(hDC, &tm);
swprintf(szCaption, L"abcdefghijklmnopqrstuvwxyz");
_swprintf(szCaption, L"abcdefghijklmnopqrstuvwxyz");
TextOutW(hDC, 0, y, szCaption, (INT)wcslen(szCaption));
y += tm.tmHeight + 1;
swprintf(szCaption, L"ABCDEFGHIJKLMNOPQRSTUVWXYZ");
_swprintf(szCaption, L"ABCDEFGHIJKLMNOPQRSTUVWXYZ");
TextOutW(hDC, 0, y, szCaption, (INT)wcslen(szCaption));
y += tm.tmHeight + 1;
swprintf(szCaption, L"0123456789.:,;(\"~!@#$%%^&*')");
_swprintf(szCaption, L"0123456789.:,;(\"~!@#$%%^&*')");
TextOutW(hDC, 0, y, szCaption, (INT)wcslen(szCaption));
y += tm.tmHeight + 1;
@@ -119,7 +119,7 @@ Display_DrawText(HDC hDC, DISPLAYDATA* pData, int nYPos)
GetTextMetrics(hDC, &tm);
y += tm.tmHeight + 1;
SelectObject(hDC, pData->hSizeFont);
swprintf(szSize, L"%d", pData->nSizes[i]);
_swprintf(szSize, L"%d", pData->nSizes[i]);
TextOutW(hDC, 0, y - 13 - tm.tmDescent, szSize, (INT)wcslen(szSize));
}
SelectObject(hDC, hOldFont);
@@ -199,17 +199,17 @@ Display_SetTypeFace(HWND hwnd, PLOGFONTW pLogFont)
EnumFontFamProcW, (LPARAM)&fOpenType, 0);
if (fOpenType)
swprintf(pData->szFormat, L" (OpenType)");
_swprintf(pData->szFormat, L" (OpenType)");
else
swprintf(pData->szFormat, L" (TrueType)");
_swprintf(pData->szFormat, L" (TrueType)");
}
else if (tm.tmPitchAndFamily & TMPF_VECTOR)
{
swprintf(pData->szFormat, L" (Vector)");
_swprintf(pData->szFormat, L" (Vector)");
}
else
{
swprintf(pData->szFormat, L" (Raster)");
_swprintf(pData->szFormat, L" (Raster)");
}
for (i = 0; i < MAX_SIZES; i++)
@@ -518,7 +518,7 @@ Display_GetFullName(HWND hwnd, INT length, PWSTR ptr)
if (ptr != NULL && length >= len)
{
swprintf(ptr, L"%s%s", pData->szTypeFaceName, pData->szFormat);
_swprintf(ptr, L"%s%s", pData->szTypeFaceName, pData->szFormat);
}
return (LRESULT)len;
@@ -1109,7 +1109,7 @@ FormatInteger(LONGLONG Num, LPWSTR pwszResult, UINT cchResultMax)
INT i;
// Print the number in uniform mode
swprintf(wszNumber, L"%I64u", Num);
_swprintf(wszNumber, L"%I64u", Num);
// Get system strings for decimal and thousand separators.
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, wszDecimalSep, _countof(wszDecimalSep));
@@ -131,25 +131,25 @@ PrintByteDataLine(PWCHAR pBuffer, UINT uOffset, PBYTE pData, UINT uLength)
if (uOffset != 0)
{
n = swprintf(p, L"\r\n");
n = _swprintf(p, L"\r\n");
p += n;
r += n;
}
n = swprintf(p, L"%04lx:", uOffset);
n = _swprintf(p, L"%04lx:", uOffset);
p += n;
r += n;
for (i = 0; i < uLength; i++)
{
n = swprintf(p, L" %02x", pData[i]);
n = _swprintf(p, L" %02x", pData[i]);
p += n;
r += n;
}
for (i = 0; i < 9 - uLength; i++)
{
n = swprintf(p, L" ");
n = _swprintf(p, L" ");
p += n;
r += n;
}
@@ -157,7 +157,7 @@ PrintByteDataLine(PWCHAR pBuffer, UINT uOffset, PBYTE pData, UINT uLength)
for (i = 0; i < uLength; i++)
{
// NOTE: Normally iswprint should return FALSE for tabs...
n = swprintf(p, L"%c", (iswprint(pData[i]) && (pData[i] != L'\t')) ? pData[i] : L'.');
n = _swprintf(p, L"%c", (iswprint(pData[i]) && (pData[i] != L'\t')) ? pData[i] : L'.');
p += n;
r += n;
}
@@ -174,18 +174,18 @@ PrintWordDataLine(PWCHAR pBuffer, UINT uOffset, PULONG pData, UINT uLength)
if (uOffset != 0)
{
n = swprintf(p, L"\r\n");
n = _swprintf(p, L"\r\n");
p += n;
r += n;
}
n = swprintf(p, L"%04lx:", uOffset);
n = _swprintf(p, L"%04lx:", uOffset);
p += n;
r += n;
for (i = 0; i < uLength / sizeof(ULONG); i++)
{
n = swprintf(p, L" %08lx", pData[i]);
n = _swprintf(p, L" %08lx", pData[i]);
p += n;
r += n;
}
@@ -193,7 +193,7 @@ PrintWordDataLine(PWCHAR pBuffer, UINT uOffset, PULONG pData, UINT uLength)
/* Display the remaining bytes if uLength was not a multiple of sizeof(ULONG) */
for (i = (uLength / sizeof(ULONG)) * sizeof(ULONG); i < uLength; i++)
{
n = swprintf(p, L" %02x", ((PBYTE)pData)[i]);
n = _swprintf(p, L" %02x", ((PBYTE)pData)[i]);
p += n;
r += n;
}
@@ -115,7 +115,7 @@ GetRecordTypeName(WORD wType)
return TypeArray[i].pszRecordName;
}
swprintf(szType, L"%hu", wType);
_swprintf(szType, L"%hu", wType);
return szType;
}
@@ -289,7 +289,7 @@ GetInterfaceFriendlyName(
if (PathSize > _countof(Path))
return;
swprintf(Path, L"%s%s%s", PrePath, &lpDeviceName[dwPrefixLength], PostPath);
_swprintf(Path, L"%s%s%s", PrePath, &lpDeviceName[dwPrefixLength], PostPath);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
Path,
@@ -366,7 +366,7 @@ PrintAdapterDescription(PSTR lpClass)
if (lpPath == NULL)
goto CLEANUP;
swprintf(lpPath, L"%s%s", szPrePath, szName);
_swprintf(lpPath, L"%s%s", szPrePath, szName);
//MessageBox(NULL, lpPath, NULL, 0);
@@ -1276,9 +1276,9 @@ SetClassId(
if (pFoundAdapter)
{
swprintf(szKeyName,
L"System\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces\\%S",
pFoundAdapter->AdapterName);
_swprintf(szKeyName,
L"System\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces\\%S",
pFoundAdapter->AdapterName);
ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
szKeyName,
+1 -1
View File
@@ -70,7 +70,7 @@ PrintError(DWORD Status)
WCHAR szStatusBuffer[16];
LPWSTR Buffer;
swprintf(szStatusBuffer, L"%lu", Status);
_swprintf(szStatusBuffer, L"%lu", Status);
PrintMessageStringV(3502, szStatusBuffer);
if (FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
+1 -1
View File
@@ -182,7 +182,7 @@ PrintErrorMessage(
if (dwError != ERROR_SUCCESS)
{
/* Format insert for the 3514 message */
swprintf(szErrorBuffer, L"%lu", dwError);
_swprintf(szErrorBuffer, L"%lu", dwError);
pErrorInserts[0] = szErrorBuffer;
/* Format and print the 3514 message */
+1 -1
View File
@@ -90,7 +90,7 @@ PrintShortGroupCommands(
pCommand = pGroup->pCommandListHead;
while (pCommand != NULL)
{
swprintf(szBuffer1, L"%s %s", pGroup->pwszCmdGroupToken, pCommand->pwszCmdToken);
_swprintf(szBuffer1, L"%s %s", pGroup->pwszCmdGroupToken, pCommand->pwszCmdToken);
LoadStringW(pContext->hModule, pCommand->dwShortCmdHelpToken, szBuffer2, _countof(szBuffer2));
ConPrintf(StdOut, L"%-15s - %s", szBuffer1, szBuffer2);
+1 -1
View File
@@ -296,7 +296,7 @@ MakeQuotedString(
if (pszQuotedString == NULL)
return NULL;
swprintf(pszQuotedString, L"\"%s\"", pszString);
_swprintf(pszQuotedString, L"\"%s\"", pszString);
return pszQuotedString;
}
+1 -1
View File
@@ -49,7 +49,7 @@ VerifyInteg(LPCWSTR lpSHA1Hash, LPCWSTR lpFileName)
WCHAR buf[(sizeof(sha) * 2) + 1];
for (UINT i = 0; i < sizeof(sha); i++)
swprintf(buf + 2 * i, L"%02x", ((unsigned char *)sha)[i]);
_swprintf(buf + 2 * i, L"%02x", ((unsigned char *)sha)[i]);
/* does the resulting SHA1 match with the provided one? */
if (!_wcsicmp(buf, lpSHA1Hash))
ret = TRUE;
+6 -6
View File
@@ -112,12 +112,12 @@ AddIpv4HostEntries(
ARecord.Data.A.IpAddress = pAddress->S_un.S_addr;
/* Prepare the PTR record */
swprintf(szReverseName,
L"%u.%u.%u.%u.in-addr.arpa.",
pAddress->S_un.S_un_b.s_b4,
pAddress->S_un.S_un_b.s_b3,
pAddress->S_un.S_un_b.s_b2,
pAddress->S_un.S_un_b.s_b1);
_swprintf(szReverseName,
L"%u.%u.%u.%u.in-addr.arpa.",
pAddress->S_un.S_un_b.s_b4,
pAddress->S_un.S_un_b.s_b3,
pAddress->S_un.S_un_b.s_b2,
pAddress->S_un.S_un_b.s_b1);
ZeroMemory(&PtrRecord, sizeof(DNS_RECORDW));
+1 -1
View File
@@ -192,7 +192,7 @@ GetJobName(
for (;;)
{
ulValue = RtlRandomEx(&ulSeed);
swprintf(szNameBuffer, L"%08lx", ulValue);
_swprintf(szNameBuffer, L"%08lx", ulValue);
hKey = NULL;
lError = RegOpenKeyEx(hJobsKey,
+1 -1
View File
@@ -24,7 +24,7 @@ ReceiveIncomingPackets(SOCKET sock)
{
TCHAR logBuf[256];
swprintf(logBuf, L"Discard: Received %d bytes from client", readBytes);
_swprintf(logBuf, L"Discard: Received %d bytes from client", readBytes);
LogEvent(logBuf, 0, 0, LOG_FILE);
}
else if (readBytes == SOCKET_ERROR)
+2 -2
View File
@@ -25,7 +25,7 @@ EchoIncomingPackets(SOCKET sock)
readBytes = recv(sock, readBuffer, RECV_BUF, 0);
if (readBytes > 0)
{
swprintf(logBuf, L"Received %d bytes from client", readBytes);
_swprintf(logBuf, L"Received %d bytes from client", readBytes);
LogEvent(logBuf, 0, 0, LOG_FILE);
totalSentBytes = 0;
@@ -34,7 +34,7 @@ EchoIncomingPackets(SOCKET sock)
retVal = send(sock, readBuffer + totalSentBytes, readBytes - totalSentBytes, 0);
if (retVal > 0)
{
swprintf(logBuf, L"Sent %d bytes back to client", retVal);
_swprintf(logBuf, L"Sent %d bytes back to client", retVal);
LogEvent(logBuf, 0, 0, LOG_FILE);
totalSentBytes += retVal;
}
+15 -15
View File
@@ -84,14 +84,14 @@ AcceptConnections(SOCKET listeningSocket,
sock = accept(listeningSocket, (SOCKADDR*)&client, &addrSize);
if (sock != INVALID_SOCKET)
{
swprintf(logBuf,
L"Accepted connection to %s server from %S:%d",
lpName,
inet_ntoa(client.sin_addr),
ntohs(client.sin_port));
_swprintf(logBuf,
L"Accepted connection to %s server from %S:%d",
lpName,
inet_ntoa(client.sin_addr),
ntohs(client.sin_port));
LogEvent(logBuf, 0, 0, LOG_FILE);
swprintf(logBuf, L"Creating worker thread for %s", lpName);
_swprintf(logBuf, L"Creating worker thread for %s", lpName);
LogEvent(logBuf, 0, 0, LOG_FILE);
if (!bShutdown)
@@ -103,8 +103,8 @@ AcceptConnections(SOCKET listeningSocket,
}
else
{
swprintf(logBuf, L"Failed to start worker thread for the %s server",
lpName);
_swprintf(logBuf, L"Failed to start worker thread for the %s server",
lpName);
LogEvent(logBuf, 0, 0, LOG_FILE);
}
}
@@ -149,7 +149,7 @@ ShutdownConnection(SOCKET sock,
ret = recv(sock, readBuffer, BUF, 0);
if (ret >= 0)
{
swprintf(logBuf, L"FYI, received %d unexpected bytes during shutdown", ret);
_swprintf(logBuf, L"FYI, received %d unexpected bytes during shutdown", ret);
LogEvent(logBuf, 0, 0, LOG_FILE);
}
} while (ret > 0);
@@ -170,7 +170,7 @@ StartServer(LPVOID lpParam)
pServices = (PSERVICES)lpParam;
swprintf(logBuf, L"Starting %s server", pServices->lpName);
_swprintf(logBuf, L"Starting %s server", pServices->lpName);
LogEvent(logBuf, 0, 0, LOG_FILE);
if (!bShutdown)
@@ -178,10 +178,10 @@ StartServer(LPVOID lpParam)
listeningSocket = SetUpListener(htons(pServices->Port));
if (!bShutdown && listeningSocket != INVALID_SOCKET)
{
swprintf(logBuf,
L"%s is waiting for connections on port %d",
pServices->lpName,
pServices->Port);
_swprintf(logBuf,
L"%s is waiting for connections on port %d",
pServices->lpName,
pServices->Port);
LogEvent(logBuf, 0, 0, LOG_FILE);
AcceptConnections(listeningSocket, pServices->lpService, pServices->lpName);
@@ -192,7 +192,7 @@ StartServer(LPVOID lpParam)
}
}
swprintf(logBuf, L"Exiting %s thread", pServices->lpName);
_swprintf(logBuf, L"Exiting %s thread", pServices->lpName);
LogEvent(logBuf, 0, 0, LOG_FILE);
ExitThread(0);
}
+3 -3
View File
@@ -72,7 +72,7 @@ CreateServers(PSERVICEINFO pServInfo)
if ((RetVal = WSAStartup(MAKEWORD(2, 2), &wsaData)) != 0)
{
swprintf(buf, L"WSAStartup() failed : %lu\n", RetVal);
_swprintf(buf, L"WSAStartup() failed : %lu\n", RetVal);
LogEvent(buf, 0, 100, LOG_ALL);
return FALSE;
}
@@ -84,7 +84,7 @@ CreateServers(PSERVICEINFO pServInfo)
/* Create worker threads. */
for (i = 0; i < NUM_SERVICES; i++)
{
swprintf(buf, L"Creating thread for %s server", Services[i].lpName);
_swprintf(buf, L"Creating thread for %s server", Services[i].lpName);
LogEvent(buf, 0, 0, LOG_FILE);
hThread[i] = CreateThread(NULL,
@@ -96,7 +96,7 @@ CreateServers(PSERVICEINFO pServInfo)
if (hThread[i] == NULL)
{
swprintf(buf, L"\nError creating %s server thread\n", Services[i].lpName);
_swprintf(buf, L"\nError creating %s server thread\n", Services[i].lpName);
LogEvent(buf, GetLastError(), 0, LOG_ALL);
return FALSE;
}
+1 -1
View File
@@ -119,7 +119,7 @@ InstallDevice(PCWSTR DeviceInstance, BOOL ShowWizard)
/* Create a random UUID for the named pipe & event*/
UuidCreate(&RandomUuid);
swprintf(UuidString, L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
_swprintf(UuidString, L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
RandomUuid.Data1, RandomUuid.Data2, RandomUuid.Data3,
RandomUuid.Data4[0], RandomUuid.Data4[1], RandomUuid.Data4[2],
RandomUuid.Data4[3], RandomUuid.Data4[4], RandomUuid.Data4[5],
+6 -6
View File
@@ -3266,8 +3266,8 @@ GenerateDeviceID(
if (dwInstanceNumber >= 10000)
return CR_FAILURE;
swprintf(szGeneratedInstance, L"Root\\%ls\\%04lu",
pszDeviceID, dwInstanceNumber);
_swprintf(szGeneratedInstance, L"Root\\%ls\\%04lu",
pszDeviceID, dwInstanceNumber);
/* Try to open the enum key of the device instance */
dwError = RegOpenKeyEx(hEnumKey, szGeneratedInstance, 0, KEY_QUERY_VALUE, &hKey);
@@ -4142,9 +4142,9 @@ PNP_HwProfFlags(
}
else
{
swprintf(szKeyName,
L"System\\CurrentControlSet\\HardwareProfiles\\%04lu\\System\\CurrentControlSet\\Enum",
ulConfig);
_swprintf(szKeyName,
L"System\\CurrentControlSet\\HardwareProfiles\\%04lu\\System\\CurrentControlSet\\Enum",
ulConfig);
}
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
@@ -4287,7 +4287,7 @@ PNP_GetHwProfInfo(
goto done;
}
swprintf(szProfileName, L"%04lu", pHWProfileInfo->HWPI_ulHWProfile);
_swprintf(szProfileName, L"%04lu", pHWProfileInfo->HWPI_ulHWProfile);
lError = RegOpenKeyExW(hKeyProfiles,
szProfileName,
+3 -3
View File
@@ -376,8 +376,8 @@ CommandDumpSector(
Sector.QuadPart = _atoi64(argv[1]);
/* Build full drive name */
// swprintf(DriveName, L"\\\\.\\PHYSICALDRIVE%lu", ulDrive);
swprintf(DriveName, L"\\Device\\Harddisk%lu\\Partition0", ulDrive);
// _swprintf(DriveName, L"\\\\.\\PHYSICALDRIVE%lu", ulDrive);
_swprintf(DriveName, L"\\Device\\Harddisk%lu\\Partition0", ulDrive);
RtlInitUnicodeString(&PathName,
DriveName);
@@ -603,7 +603,7 @@ CommandPartInfo(
ulDrive = strtoul(argv[0], NULL, 0);
/* Build full drive name */
swprintf(DriveName, L"\\Device\\Harddisk%lu\\Partition0", ulDrive);
_swprintf(DriveName, L"\\Device\\Harddisk%lu\\Partition0", ulDrive);
RtlInitUnicodeString(&PathName,
DriveName);
+1 -1
View File
@@ -1896,7 +1896,7 @@ ShowPartitionSizeInputBox(SHORT Left,
coPos,
&Written);
swprintf(InputBuffer, L"%lu", MaxSize);
_swprintf(InputBuffer, L"%lu", MaxSize);
Length = wcslen(InputBuffer);
Pos = Length;
CONSOLE_SetInputTextXY(iLeft,
+1 -1
View File
@@ -157,7 +157,7 @@ BOOL ConPrintfVPaging(PCON_PAGER Pager, BOOL StartPaging, LPWSTR szFormat, va_li
if (szFormat == NULL)
return TRUE;
/*len =*/ vswprintf(szOut, szFormat, arg_ptr);
/*len =*/ _vswprintf(szOut, szFormat, arg_ptr);
// return ConPutsPaging(Pager, PagePrompt, StartPaging, szOut);
return ConWritePaging(Pager, PagePrompt, StartPaging,
+1 -1
View File
@@ -40,7 +40,7 @@ ErrorMessage(
if (szFormat)
{
va_start(arg_ptr, szFormat);
vswprintf(szMessage, szFormat, arg_ptr);
_vswprintf(szMessage, szFormat, arg_ptr);
va_end(arg_ptr);
}
+1 -1
View File
@@ -658,7 +658,7 @@ _main(
if ((DeviceMap.Query.DriveMap & (1 << i)) &&
(DeviceMap.Query.DriveType[i] == DOSDEVICE_DRIVE_FIXED))
{
swprintf(VolumePath, L"\\??\\%c:", L'A' + i);
_swprintf(VolumePath, L"\\??\\%c:", L'A' + i);
CheckVolume(VolumePath, TimeOut, CheckOnlyIfDirty);
}
}
+2 -2
View File
@@ -94,7 +94,7 @@ DetailDisk(
if (CurrentDisk->LayoutBuffer->PartitionStyle == PARTITION_STYLE_GPT)
PrintGUID(szBuffer, &CurrentDisk->LayoutBuffer->Gpt.DiskId);
else if (CurrentDisk->LayoutBuffer->PartitionStyle == PARTITION_STYLE_MBR)
swprintf(szBuffer, L"%08lx", CurrentDisk->LayoutBuffer->Mbr.Signature);
_swprintf(szBuffer, L"%08lx", CurrentDisk->LayoutBuffer->Mbr.Signature);
else
wcscpy(szBuffer, L"00000000");
ConResPrintf(StdOut, IDS_DETAIL_DISK_ID, szBuffer);
@@ -194,7 +194,7 @@ DetailPartition(
}
else if (CurrentDisk->PartitionStyle == PARTITION_STYLE_MBR)
{
swprintf(szBuffer, L"%02x", PartEntry->Mbr.PartitionType);
_swprintf(szBuffer, L"%02x", PartEntry->Mbr.PartitionType);
ConResPrintf(StdOut, IDS_DETAIL_PARTITION_TYPE, szBuffer);
ConResPrintf(StdOut, IDS_DETAIL_PARTITION_HIDDEN, "");
LoadStringW(GetModuleHandle(NULL),
+7 -7
View File
@@ -90,9 +90,9 @@ DumpDisk(
goto done;
}
swprintf(Buffer,
L"\\Device\\Harddisk%d\\Partition0",
CurrentDisk->DiskNumber);
_swprintf(Buffer,
L"\\Device\\Harddisk%d\\Partition0",
CurrentDisk->DiskNumber);
RtlInitUnicodeString(&Name,
Buffer);
@@ -195,10 +195,10 @@ DumpPartition(
goto done;
}
swprintf(Buffer,
L"\\Device\\Harddisk%d\\Partition%d",
CurrentDisk->DiskNumber,
CurrentPartition->PartitionNumber);
_swprintf(Buffer,
L"\\Device\\Harddisk%d\\Partition%d",
CurrentDisk->DiskNumber,
CurrentPartition->PartitionNumber);
RtlInitUnicodeString(&Name,
Buffer);
+1 -1
View File
@@ -52,7 +52,7 @@ PrintSize(
nUnitId,
szUnitBuffer, ARRAYSIZE(szUnitBuffer));
swprintf(pszOutBuffer, L"%4I64u %-2s", ullSize, szUnitBuffer);
_swprintf(pszOutBuffer, L"%4I64u %-2s", ullSize, szUnitBuffer);
StringCchPrintfW(pszOutBuffer,
ulOutBufferSize,
L"%4I64u %-2s", ullSize, szUnitBuffer);
+13 -13
View File
@@ -188,19 +188,19 @@ PrintGUID(
_Out_ PWSTR pszBuffer,
_In_ GUID *pGuid)
{
swprintf(pszBuffer,
L"%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
pGuid->Data1,
pGuid->Data2,
pGuid->Data3,
pGuid->Data4[0],
pGuid->Data4[1],
pGuid->Data4[2],
pGuid->Data4[3],
pGuid->Data4[4],
pGuid->Data4[5],
pGuid->Data4[6],
pGuid->Data4[7]);
_swprintf(pszBuffer,
L"%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
pGuid->Data1,
pGuid->Data2,
pGuid->Data3,
pGuid->Data4[0],
pGuid->Data4[1],
pGuid->Data4[2],
pGuid->Data4[3],
pGuid->Data4[4],
pGuid->Data4[5],
pGuid->Data4[6],
pGuid->Data4[7]);
}
static
+2 -2
View File
@@ -195,7 +195,7 @@ AssignDriveLetter(
DeviceNameLength = wcslen(DeviceName) * sizeof(WCHAR);
swprintf(DosDeviceName, L"\\DosDevices\\%c:", DriveLetter);
_swprintf(DosDeviceName, L"\\DosDevices\\%c:", DriveLetter);
DosDeviceNameLength = wcslen(DosDeviceName) * sizeof(WCHAR);
/* Allocate the input buffer for the MountMgr */
@@ -345,7 +345,7 @@ DeleteDriveLetter(
DPRINT("DeleteDriveLetter(%c)\n", DriveLetter);
/* Setup the device name of the letter to delete */
swprintf(DosDeviceName, L"\\DosDevices\\%c:", DriveLetter);
_swprintf(DosDeviceName, L"\\DosDevices\\%c:", DriveLetter);
DosDeviceNameLength = wcslen(DosDeviceName) * sizeof(WCHAR);
/* Allocate the input buffer for MountMgr */
+1 -1
View File
@@ -35,7 +35,7 @@ UniqueIdDisk(
if (CurrentDisk->LayoutBuffer->PartitionStyle == PARTITION_STYLE_GPT)
PrintGUID(szBuffer, &CurrentDisk->LayoutBuffer->Gpt.DiskId);
else if (CurrentDisk->LayoutBuffer->PartitionStyle == PARTITION_STYLE_MBR)
swprintf(szBuffer, L"%08lx", CurrentDisk->LayoutBuffer->Mbr.Signature);
_swprintf(szBuffer, L"%08lx", CurrentDisk->LayoutBuffer->Mbr.Signature);
else
wcscpy(szBuffer, L"00000000");
ConPrintf(StdOut, L"Disk ID: %s\n", szBuffer);
+3 -3
View File
@@ -187,11 +187,11 @@ ScmCopyControlSet(
DWORD dwError;
/* Create the source control set name */
swprintf(szSourceControlSetName, L"SYSTEM\\ControlSet%03lu", dwSourceControlSet);
_swprintf(szSourceControlSetName, L"SYSTEM\\ControlSet%03lu", dwSourceControlSet);
DPRINT("Source control set: %S\n", szSourceControlSetName);
/* Create the destination control set name */
swprintf(szDestinationControlSetName, L"SYSTEM\\ControlSet%03lu", dwDestinationControlSet);
_swprintf(szDestinationControlSetName, L"SYSTEM\\ControlSet%03lu", dwDestinationControlSet);
DPRINT("Destination control set: %S\n", szDestinationControlSetName);
/* Open the source control set key */
@@ -248,7 +248,7 @@ ScmDeleteControlSet(
DPRINT("ScmDeleteControSet(%lu)\n", dwControlSet);
/* Create the control set name */
swprintf(szControlSetName, L"SYSTEM\\ControlSet%03lu", dwControlSet);
_swprintf(szControlSetName, L"SYSTEM\\ControlSet%03lu", dwControlSet);
DPRINT("Control set: %S\n", szControlSetName);
/* Open the system key */
+5 -5
View File
@@ -1797,7 +1797,7 @@ SmpCreateDynamicEnvironmentVariables(VOID)
/* And now let's write the processor level */
RtlInitUnicodeString(&ValueName, L"PROCESSOR_LEVEL");
swprintf(ValueBuffer, L"%u", ProcessorInfo.ProcessorLevel);
_swprintf(ValueBuffer, L"%u", ProcessorInfo.ProcessorLevel);
DPRINT("Setting %wZ to %S\n", &ValueName, ValueBuffer);
Status = NtSetValueKey(KeyHandle,
&ValueName,
@@ -1906,7 +1906,7 @@ SmpCreateDynamicEnvironmentVariables(VOID)
if ((ProcessorInfo.ProcessorRevision >> 8) == 0xFF)
{
/* These guys used a revision + stepping, so get the rev only */
swprintf(ValueBuffer, L"%02x", ProcessorInfo.ProcessorRevision & 0xFF);
_swprintf(ValueBuffer, L"%02x", ProcessorInfo.ProcessorRevision & 0xFF);
_wcsupr(ValueBuffer);
break;
}
@@ -1914,12 +1914,12 @@ SmpCreateDynamicEnvironmentVariables(VOID)
/* Modern Intel, as well as 64-bit CPUs use a revision without stepping */
case PROCESSOR_ARCHITECTURE_IA64:
case PROCESSOR_ARCHITECTURE_AMD64:
swprintf(ValueBuffer, L"%04x", ProcessorInfo.ProcessorRevision);
_swprintf(ValueBuffer, L"%04x", ProcessorInfo.ProcessorRevision);
break;
/* And anything else we'll just read the whole revision identifier */
default:
swprintf(ValueBuffer, L"%u", ProcessorInfo.ProcessorRevision);
_swprintf(ValueBuffer, L"%u", ProcessorInfo.ProcessorRevision);
break;
}
@@ -1941,7 +1941,7 @@ SmpCreateDynamicEnvironmentVariables(VOID)
/* And finally, write the number of CPUs */
RtlInitUnicodeString(&ValueName, L"NUMBER_OF_PROCESSORS");
swprintf(ValueBuffer, L"%d", BasicInfo.NumberOfProcessors);
_swprintf(ValueBuffer, L"%d", BasicInfo.NumberOfProcessors);
DPRINT("Setting %wZ to %S\n", &ValueName, ValueBuffer);
Status = NtSetValueKey(KeyHandle,
&ValueName,
+2 -2
View File
@@ -318,7 +318,7 @@ SetKeyboardLayout(
if (ulLayoutId == (ULONG)CB_ERR)
return;
swprintf(szLayoutId, L"%08lx", ulLayoutId);
_swprintf(szLayoutId, L"%08lx", ulLayoutId);
hKl = LoadKeyboardLayoutW(szLayoutId, KLF_ACTIVATE | KLF_REPLACELANG | KLF_SETFORPROCESS);
SystemParametersInfoW(SPI_SETDEFAULTINPUTLANG, 0, &hKl, SPIF_SENDCHANGE);
@@ -519,7 +519,7 @@ InitializeDefaultUserLocale(
{
lcid = *pNewLcid;
swprintf(szBuffer, L"%08lx", lcid);
_swprintf(szBuffer, L"%08lx", lcid);
RegSetValueExW(hLocaleKey,
L"Locale",
0,
+2 -2
View File
@@ -143,14 +143,14 @@ OnTimer(
iSeconds -= iMinutes * 60;
LoadStringW(hAppInstance, IDS_TIMEOUTSHORTFORMAT, szFormatBuffer, ARRAYSIZE(szFormatBuffer));
swprintf(szBuffer, szFormatBuffer, iHours, iMinutes, iSeconds);
_swprintf(szBuffer, szFormatBuffer, iHours, iMinutes, iSeconds);
}
else
{
iDays = (INT)(pShutdownParams->dwTimeout / SECONDS_PER_DAY);
LoadStringW(hAppInstance, IDS_TIMEOUTLONGFORMAT, szFormatBuffer, ARRAYSIZE(szFormatBuffer));
swprintf(szBuffer, szFormatBuffer, iDays);
_swprintf(szBuffer, szFormatBuffer, iDays);
}
SetDlgItemTextW(hwndDlg, IDC_SYSSHUTDOWNTIMELEFT, szBuffer);
+1 -1
View File
@@ -320,7 +320,7 @@ InitKeyboardLayouts(VOID)
while (TRUE)
{
/* Read values with integer names only */
swprintf(wszKeyName, L"%d", i++);
_swprintf(wszKeyName, L"%d", i++);
if (RegQueryValueExW(hKey, wszKeyName, NULL, &dwType, (LPBYTE)wszKLID, &dwSize) != ERROR_SUCCESS)
{
/* There is no more entries */
+3 -3
View File
@@ -160,7 +160,7 @@ CopyHardwareProfile(
LoadStringW(hApplet, IDS_HWPROFILE_PROFILE, szBuffer, sizeof(szBuffer) / sizeof(WCHAR));
wcscpy(ProfileNames.szSourceName, pProfile->szFriendlyName);
swprintf(ProfileNames.szDestinationName, L"%s %lu", szBuffer, pProfileData->dwProfileCount);
_swprintf(ProfileNames.szDestinationName, L"%s %lu", szBuffer, pProfileData->dwProfileCount);
ProfileNames.pProfileData = pProfileData;
@@ -196,7 +196,7 @@ CopyHardwareProfile(
wcscpy(pNewProfile->szFriendlyName, ProfileNames.szDestinationName);
pNewProfile->dwProfileNumber = ++pProfileData->dwLastProfile;
swprintf(pNewProfile->szName, L"%04lu", pNewProfile->dwProfileNumber);
_swprintf(pNewProfile->szName, L"%04lu", pNewProfile->dwProfileNumber);
pNewProfile->dwPreferenceOrder = pNewProfile->dwProfileNumber;
@@ -281,7 +281,7 @@ RenameHardwareProfile(
LoadStringW(hApplet, IDS_HWPROFILE_PROFILE, szBuffer, sizeof(szBuffer) / sizeof(WCHAR));
wcscpy(ProfileNames.szSourceName, pProfile->szFriendlyName);
swprintf(ProfileNames.szDestinationName, L"%s %lu", szBuffer, pProfileData->dwProfileCount);
_swprintf(ProfileNames.szDestinationName, L"%s %lu", szBuffer, pProfileData->dwProfileCount);
ProfileNames.pProfileData = pProfileData;
+1 -1
View File
@@ -738,7 +738,7 @@ StartRecDlgProc(HWND hwndDlg,
iTimeout = SendDlgItemMessage(hwndDlg, IDC_STRRECLISTUPDWN, UDM_GETPOS, (WPARAM)0, (LPARAM)0);
else
iTimeout = 0;
swprintf(szTimeout, L"%i", iTimeout);
_swprintf(szTimeout, L"%i", iTimeout);
lResult = SendDlgItemMessageW(hwndDlg, IDC_STRECOSCOMBO, CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
if (lResult == CB_ERR)
+1 -1
View File
@@ -48,7 +48,7 @@ OnProfileTypeInit(
if (pszCookedBuffer == NULL)
goto done;
swprintf(pszCookedBuffer, pszRawBuffer, pProfileData->pszFullName);
_swprintf(pszCookedBuffer, pszRawBuffer, pProfileData->pszFullName);
/* Set the full text */
SetDlgItemText(hwndDlg, IDC_USERPROFILE_TYPE_TEXT, pszCookedBuffer);
+1 -3
View File
@@ -541,9 +541,7 @@ MonthCalPaint(IN PMONTHCALWND infoPtr,
RECT rcText;
SIZE TextSize;
szDayLen = swprintf(szDay,
L"%lu",
Day);
szDayLen = _swprintf(szDay, L"%lu", Day);
if (GetTextExtentPoint32W(hDC,
szDay,
+1 -1
View File
@@ -44,7 +44,7 @@ VOID DisplayWin32Error(DWORD dwErrorCode)
NULL );
#if DBG
if (swprintf(szMsg, L"%hs:%d: %s", file, line, (PWSTR)lpMsgBuf))
if (_swprintf(szMsg, L"%hs:%d: %s", file, line, (PWSTR)lpMsgBuf))
{
MessageBoxW(NULL, szMsg, NULL, MB_OK | MB_ICONERROR);
}
+4 -4
View File
@@ -78,7 +78,7 @@ CControlNode::QueryInterface(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CControlNode::QueryInterface: NoInterface for %s", lpstr);
_swprintf(Buffer, L"CControlNode::QueryInterface: NoInterface for %s", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
#endif
@@ -102,7 +102,7 @@ CControlNode_fnConstructor(
IKsPropertySet * pProperty;
// store pin id
swprintf(Buffer, L"%u", PinId);
_swprintf(Buffer, L"%u", PinId);
// try find target pin
hr = pFilter->FindPin(Buffer, &pPin);
@@ -110,7 +110,7 @@ CControlNode_fnConstructor(
if (FAILED(hr))
{
#ifdef BDAPLGIN_TRACE
swprintf(Buffer, L"CControlNode_fnConstructor failed find pin %lu with %lx\n", PinId, hr);
_swprintf(Buffer, L"CControlNode_fnConstructor failed find pin %lu with %lx\n", PinId, hr);
OutputDebugStringW(Buffer);
#endif
return hr;
@@ -122,7 +122,7 @@ CControlNode_fnConstructor(
return hr;
#ifdef BDAPLGIN_TRACE
swprintf(Buffer, L"CControlNode_fnConstructor get IID_IKsObject status %lx\n", hr);
_swprintf(Buffer, L"CControlNode_fnConstructor get IID_IKsObject status %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
+14 -14
View File
@@ -132,7 +132,7 @@ CBDADeviceControl::StartChanges( void)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDADeviceControl::StartChanges: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
_swprintf(Buffer, L"CBDADeviceControl::StartChanges: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
OutputDebugStringW(Buffer);
#endif
@@ -158,7 +158,7 @@ CBDADeviceControl::CheckChanges( void)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDADeviceControl::CheckChanges: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
_swprintf(Buffer, L"CBDADeviceControl::CheckChanges: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
OutputDebugStringW(Buffer);
#endif
@@ -184,7 +184,7 @@ CBDADeviceControl::CommitChanges( void)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDADeviceControl::CommitChanges: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
_swprintf(Buffer, L"CBDADeviceControl::CommitChanges: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
OutputDebugStringW(Buffer);
#endif
@@ -229,14 +229,14 @@ CBDADeviceControl::GetNodeTypes(ULONG *pulcNodeTypes, ULONG ulcNodeTypesMax, ULO
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDADeviceControl::GetNodeTypes: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
_swprintf(Buffer, L"CBDADeviceControl::GetNodeTypes: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
OutputDebugStringW(Buffer);
if (SUCCEEDED(hr))
{
for(ULONG Index = 0; Index < *pulcNodeTypes; Index++)
{
swprintf(Buffer, L"CBDADeviceControl::GetPinTypes: Index %lu Value %lx\n", Index, rgulNodeTypes[Index]);
_swprintf(Buffer, L"CBDADeviceControl::GetPinTypes: Index %lu Value %lx\n", Index, rgulNodeTypes[Index]);
OutputDebugStringW(Buffer);
}
}
@@ -266,7 +266,7 @@ CBDADeviceControl::GetNodeDescriptors(ULONG *ulcNodeDescriptors, ULONG ulcNodeDe
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[1000];
swprintf(Buffer, L"CBDADeviceControl::GetNodeDescriptors: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
_swprintf(Buffer, L"CBDADeviceControl::GetNodeDescriptors: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
OutputDebugStringW(Buffer);
@@ -279,7 +279,7 @@ CBDADeviceControl::GetNodeDescriptors(ULONG *ulcNodeDescriptors, ULONG ulcNodeDe
StringFromCLSID(rgNodeDescriptors[Index].guidFunction, &pGUIDFunction);
StringFromCLSID(rgNodeDescriptors[Index].guidName, &pGUIDName);
swprintf(Buffer, L"CBDADeviceControl::GetPinTypes: Index %lu Value %lx\nFunction %s\n Name %s\n-----\n", Index, rgNodeDescriptors[Index].ulBdaNodeType, pGUIDFunction, pGUIDName);
_swprintf(Buffer, L"CBDADeviceControl::GetPinTypes: Index %lu Value %lx\nFunction %s\n Name %s\n-----\n", Index, rgNodeDescriptors[Index].ulBdaNodeType, pGUIDFunction, pGUIDName);
OutputDebugStringW(Buffer);
}
}
@@ -312,7 +312,7 @@ CBDADeviceControl::GetNodeInterfaces(ULONG ulNodeType, ULONG *pulcInterfaces, UL
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDADeviceControl::GetNodeInterfaces: hr %lx, BytesReturned %lu ulNodeType %lu\n", hr, BytesReturned, ulNodeType);
_swprintf(Buffer, L"CBDADeviceControl::GetNodeInterfaces: hr %lx, BytesReturned %lu ulNodeType %lu\n", hr, BytesReturned, ulNodeType);
OutputDebugStringW(Buffer);
if (SUCCEEDED(hr))
@@ -323,7 +323,7 @@ CBDADeviceControl::GetNodeInterfaces(ULONG ulNodeType, ULONG *pulcInterfaces, UL
StringFromCLSID(rgguidInterfaces[Index], &pstr);
swprintf(Buffer, L"CBDADeviceControl::GetNodeInterfaces: Index %lu Name %s\n", Index, pstr);
_swprintf(Buffer, L"CBDADeviceControl::GetNodeInterfaces: Index %lu Name %s\n", Index, pstr);
OutputDebugStringW(Buffer);
}
}
@@ -352,14 +352,14 @@ CBDADeviceControl::GetPinTypes(ULONG *pulcPinTypes, ULONG ulcPinTypesMax, ULONG
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDADeviceControl::GetPinTypes: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
_swprintf(Buffer, L"CBDADeviceControl::GetPinTypes: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
OutputDebugStringW(Buffer);
if (SUCCEEDED(hr))
{
for(ULONG Index = 0; Index < *pulcPinTypes; Index++)
{
swprintf(Buffer, L"CBDADeviceControl::GetPinTypes: Index %lu Value %lx\n", Index, rgulPinTypes[Index]);
_swprintf(Buffer, L"CBDADeviceControl::GetPinTypes: Index %lu Value %lx\n", Index, rgulPinTypes[Index]);
OutputDebugStringW(Buffer);
}
}
@@ -441,7 +441,7 @@ CBDADeviceControl::CreateTopology(ULONG ulInputPinId, ULONG ulOutputPinId)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDADeviceControl::CreateTopology: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
_swprintf(Buffer, L"CBDADeviceControl::CreateTopology: hr %lx, BytesReturned %lu\n", hr, BytesReturned);
OutputDebugStringW(Buffer);
#endif
@@ -473,7 +473,7 @@ CBDADeviceControl::GetControlNode(ULONG ulInputPinId, ULONG ulOutputPinId, ULONG
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[200];
swprintf(Buffer, L"CBDADeviceControl::GetControlNode: hr %lx, BytesReturned %lu PinId %lu ulInputPinId %lu ulOutputPinId %lu ulNodeType %lu\n", hr, BytesReturned, PinId, ulInputPinId, ulOutputPinId, ulNodeType);
_swprintf(Buffer, L"CBDADeviceControl::GetControlNode: hr %lx, BytesReturned %lu PinId %lu ulInputPinId %lu ulOutputPinId %lu ulNodeType %lu\n", hr, BytesReturned, PinId, ulInputPinId, ulOutputPinId, ulNodeType);
OutputDebugStringW(Buffer);
#endif
@@ -483,7 +483,7 @@ CBDADeviceControl::GetControlNode(ULONG ulInputPinId, ULONG ulOutputPinId, ULONG
hr = CControlNode_fnConstructor(m_pFilter, ulNodeType, PinId, IID_IUnknown, (LPVOID*)ppControlNode);
#ifdef BDAPLGIN_TRACE
swprintf(Buffer, L"CBDADeviceControl::GetControlNode: hr %lx\n", hr);
_swprintf(Buffer, L"CBDADeviceControl::GetControlNode: hr %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
+8 -8
View File
@@ -85,7 +85,7 @@ CBDADigitalDemodulator::QueryInterface(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CBDADigitalDemodulator::QueryInterface: NoInterface for %s", lpstr);
_swprintf(Buffer, L"CBDADigitalDemodulator::QueryInterface: NoInterface for %s", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
DebugBreak();
@@ -111,7 +111,7 @@ CBDADigitalDemodulator::put_ModulationType(ModulationType *pModulationType)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDADigitalDemodulator::put_ModulationType: pModulationType %lu hr %lx\n", *pModulationType, hr);
_swprintf(Buffer, L"CBDADigitalDemodulator::put_ModulationType: pModulationType %lu hr %lx\n", *pModulationType, hr);
OutputDebugStringW(Buffer);
#endif
@@ -142,7 +142,7 @@ CBDADigitalDemodulator::put_InnerFECMethod(FECMethod *pFECMethod)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDADigitalDemodulator::put_InnerFECMethod: pFECMethod %lu hr %lx\n", *pFECMethod, hr);
_swprintf(Buffer, L"CBDADigitalDemodulator::put_InnerFECMethod: pFECMethod %lu hr %lx\n", *pFECMethod, hr);
OutputDebugStringW(Buffer);
#endif
@@ -172,7 +172,7 @@ CBDADigitalDemodulator::put_InnerFECRate(BinaryConvolutionCodeRate *pFECRate)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDADigitalDemodulator::put_InnerFECRate: pFECRate %lu hr %lx\n", *pFECRate, hr);
_swprintf(Buffer, L"CBDADigitalDemodulator::put_InnerFECRate: pFECRate %lu hr %lx\n", *pFECRate, hr);
OutputDebugStringW(Buffer);
#endif
@@ -202,7 +202,7 @@ CBDADigitalDemodulator::put_OuterFECMethod(FECMethod *pFECMethod)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDADigitalDemodulator::put_OuterFECMethod: pFECMethod %lu hr %lx\n", *pFECMethod, hr);
_swprintf(Buffer, L"CBDADigitalDemodulator::put_OuterFECMethod: pFECMethod %lu hr %lx\n", *pFECMethod, hr);
OutputDebugStringW(Buffer);
#endif
@@ -232,7 +232,7 @@ CBDADigitalDemodulator::put_OuterFECRate(BinaryConvolutionCodeRate *pFECRate)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDADigitalDemodulator::put_OuterFECRate: pFECRate %lu hr %lx\n", *pFECRate, hr);
_swprintf(Buffer, L"CBDADigitalDemodulator::put_OuterFECRate: pFECRate %lu hr %lx\n", *pFECRate, hr);
OutputDebugStringW(Buffer);
#endif
@@ -262,7 +262,7 @@ CBDADigitalDemodulator::put_SymbolRate(ULONG *pSymbolRate)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDADigitalDemodulator::put_SymbolRate: pSymbolRate %lu hr %lx\n", *pSymbolRate, hr);
_swprintf(Buffer, L"CBDADigitalDemodulator::put_SymbolRate: pSymbolRate %lu hr %lx\n", *pSymbolRate, hr);
OutputDebugStringW(Buffer);
#endif
@@ -292,7 +292,7 @@ CBDADigitalDemodulator::put_SpectralInversion(SpectralInversion *pSpectralInvers
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDADigitalDemodulator::put_SpectralInversion: pSpectralInversion %lu hr %lx\n", *pSpectralInversion, hr);
_swprintf(Buffer, L"CBDADigitalDemodulator::put_SpectralInversion: pSpectralInversion %lu hr %lx\n", *pSpectralInversion, hr);
OutputDebugStringW(Buffer);
#endif
+6 -6
View File
@@ -83,7 +83,7 @@ CBDAFrequencyFilter::QueryInterface(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CControlNode::QueryInterface: NoInterface for %s", lpstr);
_swprintf(Buffer, L"CControlNode::QueryInterface: NoInterface for %s", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
DebugBreak();
@@ -122,7 +122,7 @@ CBDAFrequencyFilter::put_Frequency(ULONG ulFrequency)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDAFrequencyFilter::put_Frequency: m_NodeId %lu ulFrequency %lu hr %lx\n", m_NodeId, ulFrequency, hr);
_swprintf(Buffer, L"CBDAFrequencyFilter::put_Frequency: m_NodeId %lu ulFrequency %lu hr %lx\n", m_NodeId, ulFrequency, hr);
OutputDebugStringW(Buffer);
#endif
@@ -152,7 +152,7 @@ CBDAFrequencyFilter::put_Polarity(Polarisation Polarity)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDAFrequencyFilter::put_Polarity: m_NodeId %lu Polarity %lu hr %lx\n", m_NodeId, Polarity, hr);
_swprintf(Buffer, L"CBDAFrequencyFilter::put_Polarity: m_NodeId %lu Polarity %lu hr %lx\n", m_NodeId, Polarity, hr);
OutputDebugStringW(Buffer);
#endif
@@ -182,7 +182,7 @@ CBDAFrequencyFilter::put_Range(ULONG ulRange)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDAFrequencyFilter::put_Range: m_NodeId %lu ulRange %lu hr %lx\n", m_NodeId, ulRange, hr);
_swprintf(Buffer, L"CBDAFrequencyFilter::put_Range: m_NodeId %lu ulRange %lu hr %lx\n", m_NodeId, ulRange, hr);
OutputDebugStringW(Buffer);
#endif
@@ -212,7 +212,7 @@ CBDAFrequencyFilter::put_Bandwidth(ULONG ulBandwidth)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDAFrequencyFilter::put_Bandwidth: m_NodeId %lu ulBandwidth %lu hr %lx\n", m_NodeId, ulBandwidth, hr);
_swprintf(Buffer, L"CBDAFrequencyFilter::put_Bandwidth: m_NodeId %lu ulBandwidth %lu hr %lx\n", m_NodeId, ulBandwidth, hr);
OutputDebugStringW(Buffer);
#endif
@@ -241,7 +241,7 @@ CBDAFrequencyFilter::put_FrequencyMultiplier(ULONG ulMultiplier)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDAFrequencyFilter::put_FrequencyMultiplier: m_NodeId %lu ulMultiplier %lu hr %lx\n", m_NodeId, ulMultiplier, hr);
_swprintf(Buffer, L"CBDAFrequencyFilter::put_FrequencyMultiplier: m_NodeId %lu ulMultiplier %lu hr %lx\n", m_NodeId, ulMultiplier, hr);
OutputDebugStringW(Buffer);
#endif
+4 -4
View File
@@ -78,7 +78,7 @@ CBDALNBInfo::QueryInterface(
WCHAR Buffer[100];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CBDALNBInfo::QueryInterface: NoInterface for %s", lpstr);
_swprintf(Buffer, L"CBDALNBInfo::QueryInterface: NoInterface for %s", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
#endif
@@ -102,7 +102,7 @@ CBDALNBInfo::put_LocalOscillatorFrequencyLowBand(ULONG ulLOFLow)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDALNBInfo::put_LocalOscillatorFrequencyLowBand: m_NodeId %lu ulLOFLow %lu hr %lx\n", m_NodeId, ulLOFLow, hr);
_swprintf(Buffer, L"CBDALNBInfo::put_LocalOscillatorFrequencyLowBand: m_NodeId %lu ulLOFLow %lu hr %lx\n", m_NodeId, ulLOFLow, hr);
OutputDebugStringW(Buffer);
#endif
@@ -132,7 +132,7 @@ CBDALNBInfo::put_LocalOscillatorFrequencyHighBand(ULONG ulLOFHigh)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDALNBInfo::put_LocalOscillatorFrequencyHighBand: m_NodeId %lu ulLOFHigh %lu hr %lx\n", m_NodeId, ulLOFHigh, hr);
_swprintf(Buffer, L"CBDALNBInfo::put_LocalOscillatorFrequencyHighBand: m_NodeId %lu ulLOFHigh %lu hr %lx\n", m_NodeId, ulLOFHigh, hr);
OutputDebugStringW(Buffer);
#endif
@@ -162,7 +162,7 @@ CBDALNBInfo::put_HighLowSwitchFrequency(ULONG ulSwitchFrequency)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDALNBInfo::put_HighLowSwitchFrequency: m_NodeId %lu ulSwitchFrequency %lu hr %lx\n", m_NodeId, ulSwitchFrequency, hr);
_swprintf(Buffer, L"CBDALNBInfo::put_HighLowSwitchFrequency: m_NodeId %lu ulSwitchFrequency %lu hr %lx\n", m_NodeId, ulSwitchFrequency, hr);
OutputDebugStringW(Buffer);
#endif
+3 -3
View File
@@ -100,7 +100,7 @@ CBDAPinControl::GetPinID(ULONG *pulPinID)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDAPinControl::GetPinID: hr %lx pulPinID %lu BytesReturned %lx\n", hr, *pulPinID, BytesReturned);
_swprintf(Buffer, L"CBDAPinControl::GetPinID: hr %lx pulPinID %lu BytesReturned %lx\n", hr, *pulPinID, BytesReturned);
OutputDebugStringW(Buffer);
#endif
@@ -125,7 +125,7 @@ CBDAPinControl::GetPinType(ULONG *pulPinType)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDAPinControl::GetPinType: hr %lx pulPinType %lu BytesReturned %lx\n", hr, *pulPinType, BytesReturned);
_swprintf(Buffer, L"CBDAPinControl::GetPinType: hr %lx pulPinType %lu BytesReturned %lx\n", hr, *pulPinType, BytesReturned);
OutputDebugStringW(Buffer);
#endif
@@ -360,7 +360,7 @@ CBDAPinControl_fnConstructor(
else
{
WCHAR Buffer[100];
swprintf(Buffer, L"CBDAPinControl_fnConstructor failed to register filter with %lx\n", hr);
_swprintf(Buffer, L"CBDAPinControl_fnConstructor failed to register filter with %lx\n", hr);
OutputDebugStringW(Buffer);
}
}
+6 -6
View File
@@ -106,7 +106,7 @@ CBDASignalStatistics::get_SignalStrength(LONG *plDbStrength)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDASignalStatistics::get_SignalStrength: m_NodeId %lu hr %lx, BytesReturned %lu plDbStrength %ld\n", m_NodeId, hr, BytesReturned, *plDbStrength);
_swprintf(Buffer, L"CBDASignalStatistics::get_SignalStrength: m_NodeId %lu hr %lx, BytesReturned %lu plDbStrength %ld\n", m_NodeId, hr, BytesReturned, *plDbStrength);
OutputDebugStringW(Buffer);
#endif
@@ -137,7 +137,7 @@ CBDASignalStatistics::get_SignalQuality(LONG *plPercentQuality)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDASignalStatistics::get_SignalQuality: m_NodeId %lu hr %lx, BytesReturned %lu plPercentQuality %lu\n", m_NodeId, hr, BytesReturned, *plPercentQuality);
_swprintf(Buffer, L"CBDASignalStatistics::get_SignalQuality: m_NodeId %lu hr %lx, BytesReturned %lu plPercentQuality %lu\n", m_NodeId, hr, BytesReturned, *plPercentQuality);
OutputDebugStringW(Buffer);
#endif
@@ -172,7 +172,7 @@ CBDASignalStatistics::get_SignalPresent(BOOLEAN *pfPresent)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDASignalStatistics::get_SignalPresent: m_NodeId %lu hr %lx, BytesReturned %lu Present %lu\n", m_NodeId, hr, BytesReturned, Present);
_swprintf(Buffer, L"CBDASignalStatistics::get_SignalPresent: m_NodeId %lu hr %lx, BytesReturned %lu Present %lu\n", m_NodeId, hr, BytesReturned, Present);
OutputDebugStringW(Buffer);
#endif
@@ -206,7 +206,7 @@ CBDASignalStatistics::get_SignalLocked(BOOLEAN *pfLocked)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDASignalStatistics::get_SignalLocked: m_NodeId %lu hr %lx, BytesReturned %lu Locked %lu\n", m_NodeId, hr, BytesReturned, Locked);
_swprintf(Buffer, L"CBDASignalStatistics::get_SignalLocked: m_NodeId %lu hr %lx, BytesReturned %lu Locked %lu\n", m_NodeId, hr, BytesReturned, Locked);
OutputDebugStringW(Buffer);
#endif
@@ -229,7 +229,7 @@ CBDASignalStatistics::put_SampleTime(LONG lmsSampleTime)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDASignalStatistics::put_SampleTime: m_NodeId %lu hr %lx\n", m_NodeId, hr);
_swprintf(Buffer, L"CBDASignalStatistics::put_SampleTime: m_NodeId %lu hr %lx\n", m_NodeId, hr);
OutputDebugStringW(Buffer);
#endif
@@ -253,7 +253,7 @@ CBDASignalStatistics::get_SampleTime(LONG *plmsSampleTime)
#ifdef BDAPLGIN_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CBDASignalStatistics::get_SampleTime: m_NodeId %lu hr %lx, BytesReturned %lu \n", m_NodeId, hr, BytesReturned);
_swprintf(Buffer, L"CBDASignalStatistics::get_SampleTime: m_NodeId %lu hr %lx, BytesReturned %lu \n", m_NodeId, hr, BytesReturned);
OutputDebugStringW(Buffer);
#endif
+1 -1
View File
@@ -74,7 +74,7 @@ CClassFactory::CreateInstance(
StringFromCLSID(riid, &lpstr);
swprintf(Buffer, L"riid %s", lpstr);
_swprintf(Buffer, L"riid %s", lpstr);
OutputDebugStringW(Buffer);
+2 -2
View File
@@ -118,7 +118,7 @@ CKsClockForwarder::Stop()
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[200];
swprintf(Buffer, L"CKsClockForwarder::Stop m_ThreadStarted %u m_PendingStop %u m_hThread %p m_hEvent %p m_Handle %p\n", m_ThreadStarted, m_PendingStop, m_hThread, m_hEvent, m_Handle);
_swprintf(Buffer, L"CKsClockForwarder::Stop m_ThreadStarted %u m_PendingStop %u m_hThread %p m_hEvent %p m_Handle %p\n", m_ThreadStarted, m_PendingStop, m_hThread, m_hEvent, m_Handle);
OutputDebugStringW(Buffer);
#endif
@@ -287,7 +287,7 @@ CKsClockForwarder::SetClockState(KSSTATE State)
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsClockForwarder::SetClockState m_State %u State %u hr %lx\n", m_State, State, hr);
_swprintf(Buffer, L"CKsClockForwarder::SetClockState m_State %u State %u hr %lx\n", m_State, State, hr);
OutputDebugStringW(Buffer);
#endif
+1 -1
View File
@@ -184,7 +184,7 @@ CEnumMediaTypes_fnConstructor(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(riid, &lpstr);
swprintf(Buffer, L"CEnumMediaTypes_fnConstructor riid %s\n", lpstr);
_swprintf(Buffer, L"CEnumMediaTypes_fnConstructor riid %s\n", lpstr);
OutputDebugStringW(Buffer);
#endif
+1 -1
View File
@@ -67,7 +67,7 @@ CEnumPins::QueryInterface(
WCHAR Buffer[100];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CEnumPins::QueryInterface: NoInterface for %s\n", lpstr);
_swprintf(Buffer, L"CEnumPins::QueryInterface: NoInterface for %s\n", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
+6 -6
View File
@@ -324,7 +324,7 @@ CInputPin::QueryInterface(
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CInputPin::QueryInterface: NoInterface for %s\n", lpstr);
_swprintf(Buffer, L"CInputPin::QueryInterface: NoInterface for %s\n", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
@@ -619,7 +619,7 @@ CInputPin::NotifyAllocator(IMemAllocator *pAllocator, BOOL bReadOnly)
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CInputPin::NotifyAllocator hr %lx bReadOnly, %u cbAlign %u cbBuffer %u cbPrefix %u cBuffers %u\n", hr, bReadOnly, Properties.cbAlign, Properties.cbBuffer, Properties.cbPrefix, Properties.cBuffers);
_swprintf(Buffer, L"CInputPin::NotifyAllocator hr %lx bReadOnly, %u cbAlign %u cbBuffer %u cbPrefix %u cBuffers %u\n", hr, bReadOnly, Properties.cbAlign, Properties.cbBuffer, Properties.cbPrefix, Properties.cBuffers);
OutputDebugStringW(Buffer);
#endif
@@ -664,7 +664,7 @@ CInputPin::GetAllocatorRequirements(ALLOCATOR_PROPERTIES *pProps)
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CInputPin::GetAllocatorRequirements hr %lx m_hPin %p cBuffers %u cbBuffer %u cbAlign %u cbPrefix %u\n", hr, m_hPin, pProps->cBuffers, pProps->cbBuffer, pProps->cbAlign, pProps->cbPrefix);
_swprintf(Buffer, L"CInputPin::GetAllocatorRequirements hr %lx m_hPin %p cBuffers %u cbBuffer %u cbAlign %u cbPrefix %u\n", hr, m_hPin, pProps->cBuffers, pProps->cbBuffer, pProps->cbAlign, pProps->cbPrefix);
OutputDebugStringW(Buffer);
#endif
@@ -1465,7 +1465,7 @@ CInputPin::CreatePin(
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CInputPin::CreatePin unexpected communication %u %s\n", m_Communication, m_PinName);
_swprintf(Buffer, L"CInputPin::CreatePin unexpected communication %u %s\n", m_Communication, m_PinName);
OutputDebugStringW(Buffer);
#endif
hr = E_FAIL;
@@ -1570,7 +1570,7 @@ CInputPin::CreatePinHandle(
StringFromIID(m_MediaFormat.formattype, &pFormat);
WCHAR Buffer[200];
swprintf(Buffer, L"CInputPin::CreatePinHandle Major %s SubType %s Format %s pbFormat %p cbFormat %u\n", pMajor, pSub, pFormat, pmt->pbFormat, pmt->cbFormat);
_swprintf(Buffer, L"CInputPin::CreatePinHandle Major %s SubType %s Format %s pbFormat %p cbFormat %u\n", pMajor, pSub, pFormat, pmt->pbFormat, pmt->cbFormat);
CoTaskMemFree(pMajor);
CoTaskMemFree(pSub);
CoTaskMemFree(pFormat);
@@ -1669,7 +1669,7 @@ CInputPin::GetSupportedSets(
#ifdef KSPROXY_TRACE
WCHAR Buffer[200];
swprintf(Buffer, L"CInputPin::GetSupportedSets NumProperty %lu NumMethods %lu NumEvents %lu\n", NumProperty, NumMethods, NumEvents);
_swprintf(Buffer, L"CInputPin::GetSupportedSets NumProperty %lu NumMethods %lu NumEvents %lu\n", NumProperty, NumMethods, NumEvents);
OutputDebugStringW(Buffer);
#endif
+1 -1
View File
@@ -287,7 +287,7 @@ CKsInterfaceHandler::KsProcessMediaSamples(
}
#ifdef KSPROXY_TRACE
WCHAR Buffer[200];
swprintf(Buffer, L"CKsInterfaceHandler::KsProcessMediaSamples PinName %s BufferLength %lu Property Buffer %p ExtendedSize %u lActual %u dwSampleFlags %lx\n", m_PinName, Properties.cbBuffer, Properties.pbBuffer, ExtendedSize, Properties.lActual, Properties.dwSampleFlags);
_swprintf(Buffer, L"CKsInterfaceHandler::KsProcessMediaSamples PinName %s BufferLength %lu Property Buffer %p ExtendedSize %u lActual %u dwSampleFlags %lx\n", m_PinName, Properties.cbBuffer, Properties.pbBuffer, ExtendedSize, Properties.lActual, Properties.dwSampleFlags);
OutputDebugStringW(Buffer);
#endif
+29 -29
View File
@@ -252,7 +252,7 @@ COutputPin::COutputPin(
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"COutputPin::COutputPin Format %p pbFormat %lu\n", &m_MediaFormat, m_MediaFormat.cbFormat);
_swprintf(Buffer, L"COutputPin::COutputPin Format %p pbFormat %lu\n", &m_MediaFormat, m_MediaFormat.cbFormat);
OutputDebugStringW(Buffer);
#endif
@@ -398,7 +398,7 @@ COutputPin::QueryInterface(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"COutputPin::QueryInterface: NoInterface for %s PinId %u PinName %s\n", lpstr, m_PinId, m_PinName);
_swprintf(Buffer, L"COutputPin::QueryInterface: NoInterface for %s PinId %u PinName %s\n", lpstr, m_PinId, m_PinName);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
#endif
@@ -1363,7 +1363,7 @@ COutputPin::KsProperty(
WCHAR Buffer[100];
LPOLESTR pstr;
StringFromCLSID(Property->Set, &pstr);
swprintf(Buffer, L"COutputPin::KsProperty Set %s Id %lu Flags %x hr %x\n", pstr, Property->Id, Property->Flags, hr);
_swprintf(Buffer, L"COutputPin::KsProperty Set %s Id %lu Flags %x hr %x\n", pstr, Property->Id, Property->Flags, hr);
OutputDebugStringW(Buffer);
#endif
@@ -1556,7 +1556,7 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
if (FAILED(hr))
{
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"COutputPin::Connect CreatePin handle failed with %lx\n", hr);
_swprintf(Buffer, L"COutputPin::Connect CreatePin handle failed with %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
return hr;
@@ -1607,7 +1607,7 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
if (FAILED(hr))
{
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"COutputPin::Connect IMemAllocator::SetProperties failed with hr %lx\n", hr);
_swprintf(Buffer, L"COutputPin::Connect IMemAllocator::SetProperties failed with hr %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
m_MemAllocator->Release();
@@ -1621,7 +1621,7 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
if (FAILED(hr))
{
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"COutputPin::Connect IMemAllocator::Commit failed with hr %lx\n", hr);
_swprintf(Buffer, L"COutputPin::Connect IMemAllocator::Commit failed with hr %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
m_MemAllocator->Release();
@@ -1634,7 +1634,7 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
if (FAILED(hr))
{
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"COutputPin::Connect No IMemAllocatorCallbackTemp interface hr %lx\n", hr);
_swprintf(Buffer, L"COutputPin::Connect No IMemAllocatorCallbackTemp interface hr %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
m_MemAllocator->Release();
@@ -1651,7 +1651,7 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
if (FAILED(hr))
{
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"COutputPin::Connect IMemAllocatorNotifyCallbackTemp::SetNotify failed hr %lx\n", hr);
_swprintf(Buffer, L"COutputPin::Connect IMemAllocatorNotifyCallbackTemp::SetNotify failed hr %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
m_MemAllocator->Release();
@@ -1664,7 +1664,7 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
if (FAILED(hr))
{
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"COutputPin::Connect IMemInputPin::NotifyAllocator failed with hr %lx\n", hr);
_swprintf(Buffer, L"COutputPin::Connect IMemInputPin::NotifyAllocator failed with hr %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
m_MemAllocator->Release();
@@ -1986,7 +1986,7 @@ COutputPin::CreatePin(
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"COutputPin::CreatePin KsQueryMediums failed %lx\n", hr);
_swprintf(Buffer, L"COutputPin::CreatePin KsQueryMediums failed %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
return hr;
@@ -1999,7 +1999,7 @@ COutputPin::CreatePin(
// failed
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"COutputPin::CreatePin KsQueryInterfaces failed %lx\n", hr);
_swprintf(Buffer, L"COutputPin::CreatePin KsQueryInterfaces failed %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
@@ -2037,7 +2037,7 @@ COutputPin::CreatePin(
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"COutputPin::CreatePinHandle failed with %lx\n", hr);
_swprintf(Buffer, L"COutputPin::CreatePinHandle failed with %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
return hr;
@@ -2055,7 +2055,7 @@ COutputPin::CreatePin(
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"COutputPin::CreatePin failed to create interface handler %lx\n", hr);
_swprintf(Buffer, L"COutputPin::CreatePin failed to create interface handler %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
@@ -2069,7 +2069,7 @@ COutputPin::CreatePin(
// failed to initialize interface handler plugin
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"COutputPin::CreatePin failed to initialize interface handler %lx\n", hr);
_swprintf(Buffer, L"COutputPin::CreatePin failed to initialize interface handler %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
InterfaceHandler->Release();
@@ -2086,7 +2086,7 @@ COutputPin::CreatePin(
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"COutputPin::CreatePin unexpected communication %u %s\n", m_Communication, m_PinName);
_swprintf(Buffer, L"COutputPin::CreatePin unexpected communication %u %s\n", m_Communication, m_PinName);
OutputDebugStringW(Buffer);
#endif
@@ -2099,7 +2099,7 @@ COutputPin::CreatePin(
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"COutputPin::CreatePin Result %lx\n", hr);
_swprintf(Buffer, L"COutputPin::CreatePin Result %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
@@ -2172,7 +2172,7 @@ COutputPin::CreatePinHandle(
{
// copy extended format
WCHAR Buffer[100];
swprintf(Buffer, L"COutputPin::CreatePinHandle copy format %p pbFormat %lu\n", pmt, pmt->cbFormat);
_swprintf(Buffer, L"COutputPin::CreatePinHandle copy format %p pbFormat %lu\n", pmt, pmt->cbFormat);
OutputDebugStringW(Buffer);
CopyMemory((DataFormat + 1), pmt->pbFormat, pmt->cbFormat);
}
@@ -2216,7 +2216,7 @@ COutputPin::CreatePinHandle(
StringFromIID(m_MediaFormat.subtype , &pSub);
StringFromIID(m_MediaFormat.formattype, &pFormat);
WCHAR Buffer[200];
swprintf(Buffer, L"COutputPin::CreatePinHandle Major %s SubType %s Format %s pbFormat %p cbFormat %u\n", pMajor, pSub, pFormat, pmt->pbFormat, pmt->cbFormat);
_swprintf(Buffer, L"COutputPin::CreatePinHandle Major %s SubType %s Format %s pbFormat %p cbFormat %u\n", pMajor, pSub, pFormat, pmt->pbFormat, pmt->cbFormat);
CoTaskMemFree(pMajor);
CoTaskMemFree(pSub);
CoTaskMemFree(pFormat);
@@ -2343,7 +2343,7 @@ COutputPin::GetSupportedSets(
#ifdef KSPROXY_TRACE
WCHAR Buffer[200];
swprintf(Buffer, L"NumProperty %lu NumMethods %lu NumEvents %lu\n", NumProperty, NumMethods, NumEvents);
_swprintf(Buffer, L"NumProperty %lu NumMethods %lu NumEvents %lu\n", NumProperty, NumMethods, NumEvents);
OutputDebugStringW(Buffer);
#endif
@@ -2487,7 +2487,7 @@ COutputPin::IoProcessRoutine()
if (FAILED(hr) || !StreamSegment)
{
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"COutputPin::IoProcessRoutine KsProcessMediaSamples FAILED PinName %s hr %lx\n", m_PinName, hr);
_swprintf(Buffer, L"COutputPin::IoProcessRoutine KsProcessMediaSamples FAILED PinName %s hr %lx\n", m_PinName, hr);
OutputDebugStringW(Buffer);
#endif
break;
@@ -2496,7 +2496,7 @@ COutputPin::IoProcessRoutine()
// interface handle should increment pending i/o count
assert(m_IoCount >= 1);
swprintf(Buffer, L"COutputPin::IoProcessRoutine m_IoCount %lu NumHandles %lu\n", m_IoCount, NumHandles);
_swprintf(Buffer, L"COutputPin::IoProcessRoutine m_IoCount %lu NumHandles %lu\n", m_IoCount, NumHandles);
OutputDebugStringW(Buffer);
if (m_IoCount != NumHandles)
@@ -2508,7 +2508,7 @@ COutputPin::IoProcessRoutine()
// wait for i/o completion
dwStatus = WaitForSingleObject(hEvent, INFINITE);
swprintf(Buffer, L"COutputPin::IoProcessRoutine dwStatus %lx Error %lx NumHandles %lu\n", dwStatus, GetLastError(), NumHandles);
_swprintf(Buffer, L"COutputPin::IoProcessRoutine dwStatus %lx Error %lx NumHandles %lu\n", dwStatus, GetLastError(), NumHandles);
OutputDebugStringW(Buffer);
// perform completion
@@ -2525,7 +2525,7 @@ COutputPin::IoProcessRoutine()
hr = m_MemInputPin->Receive(Samples[0]);
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"COutputPin::IoProcessRoutine PinName %s IMemInputPin::Receive hr %lx Sample %p m_MemAllocator %p\n", m_PinName, hr, Sample, m_MemAllocator);
_swprintf(Buffer, L"COutputPin::IoProcessRoutine PinName %s IMemInputPin::Receive hr %lx Sample %p m_MemAllocator %p\n", m_PinName, hr, Sample, m_MemAllocator);
OutputDebugStringW(Buffer);
#endif
@@ -2642,7 +2642,7 @@ COutputPin_SetState(
hr = pPin->KsProperty(&Property, sizeof(KSPROPERTY), &CurState, sizeof(KSSTATE), &BytesReturned);
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"COutputPin_SetState Setting State CurState: KSSTATE_STOP KSSTATE_ACQUIRE PinName %s hr %lx\n", pPin->m_PinName, hr);
_swprintf(Buffer, L"COutputPin_SetState Setting State CurState: KSSTATE_STOP KSSTATE_ACQUIRE PinName %s hr %lx\n", pPin->m_PinName, hr);
OutputDebugStringW(Buffer);
#endif
@@ -2666,7 +2666,7 @@ COutputPin_SetState(
hr = pPin->KsProperty(&Property, sizeof(KSPROPERTY), &CurState, sizeof(KSSTATE), &BytesReturned);
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"COutputPin_SetState Setting State CurState KSSTATE_ACQUIRE KSSTATE_PAUSE PinName %s hr %lx\n", pPin->m_PinName, hr);
_swprintf(Buffer, L"COutputPin_SetState Setting State CurState KSSTATE_ACQUIRE KSSTATE_PAUSE PinName %s hr %lx\n", pPin->m_PinName, hr);
OutputDebugStringW(Buffer);
#endif
@@ -2690,7 +2690,7 @@ COutputPin_SetState(
hr = pPin->KsProperty(&Property, sizeof(KSPROPERTY), &CurState, sizeof(KSSTATE), &BytesReturned);
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"COutputPin_SetState Setting State CurState: KSSTATE_PAUSE KSSTATE_RUN PinName %s hr %lx\n", pPin->m_PinName, hr);
_swprintf(Buffer, L"COutputPin_SetState Setting State CurState: KSSTATE_PAUSE KSSTATE_RUN PinName %s hr %lx\n", pPin->m_PinName, hr);
OutputDebugStringW(Buffer);
#endif
@@ -2722,7 +2722,7 @@ COutputPin_SetState(
hr = pPin->KsProperty(&Property, sizeof(KSPROPERTY), &CurState, sizeof(KSSTATE), &BytesReturned);
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"COutputPin_SetState Setting State CurState: KSSTATE_RUN KSSTATE_PAUSE PinName %s hr %lx\n", pPin->m_PinName, hr);
_swprintf(Buffer, L"COutputPin_SetState Setting State CurState: KSSTATE_RUN KSSTATE_PAUSE PinName %s hr %lx\n", pPin->m_PinName, hr);
OutputDebugStringW(Buffer);
#endif
@@ -2746,7 +2746,7 @@ COutputPin_SetState(
hr = pPin->KsProperty(&Property, sizeof(KSPROPERTY), &CurState, sizeof(KSSTATE), &BytesReturned);
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"COutputPin_SetState Setting State CurState: KSSTATE_PAUSE KSSTATE_ACQUIRE PinName %s hr %lx\n", pPin->m_PinName, hr);
_swprintf(Buffer, L"COutputPin_SetState Setting State CurState: KSSTATE_PAUSE KSSTATE_ACQUIRE PinName %s hr %lx\n", pPin->m_PinName, hr);
OutputDebugStringW(Buffer);
#endif
@@ -2778,7 +2778,7 @@ COutputPin_SetState(
hr = pPin->KsProperty(&Property, sizeof(KSPROPERTY), &CurState, sizeof(KSSTATE), &BytesReturned);
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"COutputPin_SetState Setting State CurState: KSSTATE_ACQUIRE KSSTATE_STOP PinName %s hr %lx\n", pPin->m_PinName, hr);
_swprintf(Buffer, L"COutputPin_SetState Setting State CurState: KSSTATE_ACQUIRE KSSTATE_STOP PinName %s hr %lx\n", pPin->m_PinName, hr);
OutputDebugStringW(Buffer);
#endif
+28 -28
View File
@@ -343,7 +343,7 @@ CKsProxy::QueryInterface(
WCHAR Buffer[100];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CKsProxy::QueryInterface plugin %lu supports interface %s\n", Index, lpstr);
_swprintf(Buffer, L"CKsProxy::QueryInterface plugin %lu supports interface %s\n", Index, lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
#endif
@@ -355,7 +355,7 @@ CKsProxy::QueryInterface(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CKsProxy::QueryInterface: NoInterface for %s !!!\n", lpstr);
_swprintf(Buffer, L"CKsProxy::QueryInterface: NoInterface for %s !!!\n", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
#endif
@@ -968,7 +968,7 @@ CKsProxy::IsFormatSupported(
WCHAR Buffer[100];
LPOLESTR pstr;
StringFromCLSID(*pFormat, &pstr);
swprintf(Buffer, L"CKsProxy::IsFormatSupported %s\n",pstr);
_swprintf(Buffer, L"CKsProxy::IsFormatSupported %s\n",pstr);
OutputDebugStringW(Buffer);
#endif
@@ -980,7 +980,7 @@ CKsProxy::IsFormatSupported(
if (SUCCEEDED(hr))
{
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"CKsProxy::IsFormatSupported NumFormat %lu\n",FormatList->Count);
_swprintf(Buffer, L"CKsProxy::IsFormatSupported NumFormat %lu\n",FormatList->Count);
OutputDebugStringW(Buffer);
#endif
@@ -1694,7 +1694,7 @@ CKsProxy::GetMiscFlags()
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::GetMiscFlags stub Flags %x\n", Flags);
_swprintf(Buffer, L"CKsProxy::GetMiscFlags stub Flags %x\n", Flags);
OutputDebugStringW(Buffer);
#endif
@@ -1975,13 +1975,13 @@ CKsProxy::Load(
#endif
hr = pStm->Read(&Length, sizeof(ULONG), &BytesReturned);
swprintf(Buffer, L"Length hr %x hr length %lu\n", hr, Length);
_swprintf(Buffer, L"Length hr %x hr length %lu\n", hr, Length);
OutputDebugStringW(Buffer);
do
{
hr = pStm->Read(&PinId, sizeof(ULONG), &BytesReturned);
swprintf(Buffer, L"Read: hr %08x PinId %lx BytesReturned %lu\n", hr, PinId, BytesReturned);
_swprintf(Buffer, L"Read: hr %08x PinId %lx BytesReturned %lu\n", hr, PinId, BytesReturned);
OutputDebugStringW(Buffer);
if (FAILED(hr) || !BytesReturned)
@@ -1992,7 +1992,7 @@ CKsProxy::Load(
hr = pStm->Read(&MediaType, sizeof(AM_MEDIA_TYPE), &BytesReturned);
if (FAILED(hr) || BytesReturned != sizeof(AM_MEDIA_TYPE))
{
swprintf(Buffer, L"Read failed with %lx\n", hr);
_swprintf(Buffer, L"Read failed with %lx\n", hr);
OutputDebugStringW(Buffer);
break;
}
@@ -2002,7 +2002,7 @@ CKsProxy::Load(
StringFromIID(MediaType.subtype , &pSub);
StringFromIID(MediaType.formattype, &pFormat);
swprintf(Buffer, L"BytesReturned %lu majortype %s subtype %s bFixedSizeSamples %u bTemporalCompression %u lSampleSize %u formattype %s, pUnk %p cbFormat %u pbFormat %p\n", BytesReturned, pMajor, pSub, MediaType.bFixedSizeSamples, MediaType.bTemporalCompression, MediaType.lSampleSize, pFormat, MediaType.pUnk, MediaType.cbFormat, MediaType.pbFormat);
_swprintf(Buffer, L"BytesReturned %lu majortype %s subtype %s bFixedSizeSamples %u bTemporalCompression %u lSampleSize %u formattype %s, pUnk %p cbFormat %u pbFormat %p\n", BytesReturned, pMajor, pSub, MediaType.bFixedSizeSamples, MediaType.bTemporalCompression, MediaType.lSampleSize, pFormat, MediaType.pUnk, MediaType.cbFormat, MediaType.pbFormat);
OutputDebugStringW(Buffer);
Length -= BytesReturned;
@@ -2017,7 +2017,7 @@ CKsProxy::Load(
hr = pStm->Read(&MediaType.pbFormat, sizeof(MediaType.cbFormat), &BytesReturned);
if (FAILED(hr))
{
swprintf(Buffer, L"ReadFormat failed with %lx\n", hr);
_swprintf(Buffer, L"ReadFormat failed with %lx\n", hr);
OutputDebugStringW(Buffer);
break;
}
@@ -2243,7 +2243,7 @@ CKsProxy::GetSupportedSets(
#ifdef KSPROXY_TRACE
WCHAR Buffer[200];
swprintf(Buffer, L"NumProperty %lu NumMethods %lu NumEvents %lu\n", NumProperty, NumMethods, NumEvents);
_swprintf(Buffer, L"NumProperty %lu NumMethods %lu NumEvents %lu\n", NumProperty, NumMethods, NumEvents);
OutputDebugStringW(Buffer);
#endif
@@ -2424,11 +2424,11 @@ CKsProxy::GetPinName(
if (DataFlow == KSPIN_DATAFLOW_IN)
{
swprintf(Buffer, L"Input%lu", PinCount);
_swprintf(Buffer, L"Input%lu", PinCount);
}
else
{
swprintf(Buffer, L"Output%lu", PinCount);
_swprintf(Buffer, L"Output%lu", PinCount);
}
// allocate pin name
@@ -2472,7 +2472,7 @@ CKsProxy::CreatePins()
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::CreatePins GetPinInstanceCount failed with %lx\n", hr);
_swprintf(Buffer, L"CKsProxy::CreatePins GetPinInstanceCount failed with %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
continue;
@@ -2485,7 +2485,7 @@ CKsProxy::CreatePins()
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::CreatePins GetPinCommunication failed with %lx\n", hr);
_swprintf(Buffer, L"CKsProxy::CreatePins GetPinCommunication failed with %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
continue;
@@ -2496,7 +2496,7 @@ CKsProxy::CreatePins()
// already maximum reached for this pin
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::CreatePins Instances.CurrentCount == Instances.PossibleCount\n");
_swprintf(Buffer, L"CKsProxy::CreatePins Instances.CurrentCount == Instances.PossibleCount\n");
OutputDebugStringW(Buffer);
#endif
continue;
@@ -2508,7 +2508,7 @@ CKsProxy::CreatePins()
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::CreatePins GetPinDataflow failed with %lx\n", hr);
_swprintf(Buffer, L"CKsProxy::CreatePins GetPinDataflow failed with %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
continue;
@@ -2523,7 +2523,7 @@ CKsProxy::CreatePins()
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::CreatePins GetPinName failed with %lx\n", hr);
_swprintf(Buffer, L"CKsProxy::CreatePins GetPinName failed with %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
continue;
@@ -2537,7 +2537,7 @@ CKsProxy::CreatePins()
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::CreatePins CInputPin_Constructor failed with %lx\n", hr);
_swprintf(Buffer, L"CKsProxy::CreatePins CInputPin_Constructor failed with %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
CoTaskMemFree(PinName);
@@ -2552,7 +2552,7 @@ CKsProxy::CreatePins()
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::CreatePins COutputPin_Constructor failed with %lx\n", hr);
_swprintf(Buffer, L"CKsProxy::CreatePins COutputPin_Constructor failed with %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
CoTaskMemFree(PinName);
@@ -2566,7 +2566,7 @@ CKsProxy::CreatePins()
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"Index %lu DataFlow %lu Name %s\n", Index, DataFlow, PinName);
_swprintf(Buffer, L"Index %lu DataFlow %lu Name %s\n", Index, DataFlow, PinName);
OutputDebugStringW(Buffer);
#endif
@@ -2598,7 +2598,7 @@ CKsProxy::Load(IPropertyBag *pPropBag, IErrorLog *pErrorLog)
if (FAILED(hr))
{
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"CKsProxy::Load Read %lx\n", hr);
_swprintf(Buffer, L"CKsProxy::Load Read %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
return MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, GetLastError());
@@ -2638,7 +2638,7 @@ CKsProxy::Load(IPropertyBag *pPropBag, IErrorLog *pErrorLog)
{
// failed to open device
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"CKsProxy:: failed to open device with %lx\n", GetLastError());
_swprintf(Buffer, L"CKsProxy:: failed to open device with %lx\n", GetLastError());
OutputDebugStringW(Buffer);
#endif
return MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, GetLastError());
@@ -2675,7 +2675,7 @@ CKsProxy::Load(IPropertyBag *pPropBag, IErrorLog *pErrorLog)
hr = CreatePins();
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"CKsProxy::Load CreatePins %lx\n", hr);
_swprintf(Buffer, L"CKsProxy::Load CreatePins %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
@@ -2866,7 +2866,7 @@ CKsProxy::SetPinState(
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::SetPinState Index %u State %u hr %lx\n", Index, State, hr);
_swprintf(Buffer, L"CKsProxy::SetPinState Index %u State %u hr %lx\n", Index, State, hr);
OutputDebugStringW(Buffer);
#endif
@@ -2967,7 +2967,7 @@ CKsProxy::SetSyncSource(
// failed to set master clock
pObject->Release();
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::SetSyncSource KSPROPERTY_STREAM_MASTERCLOCK failed with %lx\n", hr);
_swprintf(Buffer, L"CKsProxy::SetSyncSource KSPROPERTY_STREAM_MASTERCLOCK failed with %lx\n", hr);
OutputDebugStringW(Buffer);
return hr;
}
@@ -3099,7 +3099,7 @@ CKsProxy::JoinFilterGraph(
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::JoinFilterGraph pName %s pGraph %p m_Ref %u\n", pName, pGraph, m_Ref);
_swprintf(Buffer, L"CKsProxy::JoinFilterGraph pName %s pGraph %p m_Ref %u\n", pName, pGraph, m_Ref);
OutputDebugStringW(Buffer);
#endif
@@ -3165,7 +3165,7 @@ CKsProxy_Constructor(
WCHAR Buffer[100];
LPOLESTR pstr;
StringFromCLSID(riid, &pstr);
swprintf(Buffer, L"CKsProxy_Constructor pUnkOuter %p riid %s\n", pUnkOuter, pstr);
_swprintf(Buffer, L"CKsProxy_Constructor pUnkOuter %p riid %s\n", pUnkOuter, pstr);
OutputDebugStringW(Buffer);
#endif
+2 -2
View File
@@ -67,7 +67,7 @@ CEnumMediaTypes::QueryInterface(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CEnumMediaTypes::QueryInterface: NoInterface for %s\n", lpstr);
_swprintf(Buffer, L"CEnumMediaTypes::QueryInterface: NoInterface for %s\n", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
@@ -167,7 +167,7 @@ CEnumMediaTypes_fnConstructor(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(riid, &lpstr);
swprintf(Buffer, L"CEnumMediaTypes_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
_swprintf(Buffer, L"CEnumMediaTypes_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
OutputDebugStringW(Buffer);
#endif
+1 -1
View File
@@ -67,7 +67,7 @@ CEnumPins::QueryInterface(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CEnumPins::QueryInterface: NoInterface for %s\n", lpstr);
_swprintf(Buffer, L"CEnumPins::QueryInterface: NoInterface for %s\n", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
+3 -3
View File
@@ -187,7 +187,7 @@ CNetworkProvider::QueryInterface(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CNetworkProvider::QueryInterface: DeviceFilter %lu supports %s !!!\n", Index, lpstr);
_swprintf(Buffer, L"CNetworkProvider::QueryInterface: DeviceFilter %lu supports %s !!!\n", Index, lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
#endif
@@ -198,7 +198,7 @@ CNetworkProvider::QueryInterface(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CNetworkProvider::QueryInterface: NoInterface for %s !!!\n", lpstr);
_swprintf(Buffer, L"CNetworkProvider::QueryInterface: NoInterface for %s !!!\n", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
@@ -560,7 +560,7 @@ CNetworkProvider_fnConstructor(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(riid, &lpstr);
swprintf(Buffer, L"CNetworkProvider_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
_swprintf(Buffer, L"CNetworkProvider_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
OutputDebugStringW(Buffer);
#endif
+2 -2
View File
@@ -106,7 +106,7 @@ CPin::QueryInterface(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CPin::QueryInterface: NoInterface for %s\n", lpstr);
_swprintf(Buffer, L"CPin::QueryInterface: NoInterface for %s\n", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
@@ -327,7 +327,7 @@ CPin_fnConstructor(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(riid, &lpstr);
swprintf(Buffer, L"CPin_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
_swprintf(Buffer, L"CPin_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
OutputDebugStringW(Buffer);
#endif
+11 -11
View File
@@ -92,7 +92,7 @@ CScanningTunner::QueryInterface(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CScanningTunner::QueryInterface: NoInterface for %s\n", lpstr);
_swprintf(Buffer, L"CScanningTunner::QueryInterface: NoInterface for %s\n", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
@@ -312,8 +312,8 @@ CScanningTunner::performDVBTTune(
WCHAR Buffer[1000];
swprintf(Buffer, L"BandWidth %lu Frequency %lu Rate %lu InnerFEC %ld OuterFEC %ld InnerFECRate %ld OuterFECRate %ld Modulation %lu\n",
BandWidth, Frequency, SymbolRate, InnerFEC, OuterFEC, InnerFECRate, OuterFECRate, Modulation);
_swprintf(Buffer, L"BandWidth %lu Frequency %lu Rate %lu InnerFEC %ld OuterFEC %ld InnerFECRate %ld OuterFECRate %ld Modulation %lu\n",
BandWidth, Frequency, SymbolRate, InnerFEC, OuterFEC, InnerFECRate, OuterFECRate, Modulation);
OutputDebugStringW(Buffer);
@@ -335,7 +335,7 @@ CScanningTunner::performDVBTTune(
hr = pTopo->GetControlNode(0, 1, 0, &pNode); //HACK
WCHAR Buffer[100];
swprintf(Buffer, L"CScanningTunner::performDVBTTune GetControlNode %lx\n", hr);
_swprintf(Buffer, L"CScanningTunner::performDVBTTune GetControlNode %lx\n", hr);
OutputDebugStringW(Buffer);
if (FAILED(hr))
@@ -347,7 +347,7 @@ CScanningTunner::performDVBTTune(
hr = pNode->QueryInterface(IID_IBDA_FrequencyFilter, (void**)&pFrequency);
swprintf(Buffer, L"CScanningTunner::performDVBTTune IID_IBDA_FrequencyFilter hr %lx\n", hr);
_swprintf(Buffer, L"CScanningTunner::performDVBTTune IID_IBDA_FrequencyFilter hr %lx\n", hr);
OutputDebugStringW(Buffer);
// sanity check
@@ -355,7 +355,7 @@ CScanningTunner::performDVBTTune(
hr = SetFrequency(pFrequency, 1000 /* FIXME */, Frequency, BDA_POLARISATION_NOT_DEFINED /* FIXME */, BDA_RANGE_NOT_SET /* FIXME */, BandWidth);
swprintf(Buffer, L"CScanningTunner::performDVBTTune SetFrequency hr %lx\n", hr);
_swprintf(Buffer, L"CScanningTunner::performDVBTTune SetFrequency hr %lx\n", hr);
OutputDebugStringW(Buffer);
//sanity check
@@ -367,7 +367,7 @@ CScanningTunner::performDVBTTune(
hr = pNode->QueryInterface(IID_IBDA_LNBInfo, (void**)&pLnbInfo);
swprintf(Buffer, L"CScanningTunner::performDVBTTune IID_IBDA_LNBInfo hr %lx\n", hr);
_swprintf(Buffer, L"CScanningTunner::performDVBTTune IID_IBDA_LNBInfo hr %lx\n", hr);
OutputDebugStringW(Buffer);
// sanity check
@@ -376,7 +376,7 @@ CScanningTunner::performDVBTTune(
hr = SetLnbInfo(pLnbInfo, ULONG_MAX /* FIXME */, ULONG_MAX /* FIXME*/, ULONG_MAX /*FIXME*/);
swprintf(Buffer, L"CScanningTunner::performDVBTTune SetLnbInfo hr %lx\n", hr);
_swprintf(Buffer, L"CScanningTunner::performDVBTTune SetLnbInfo hr %lx\n", hr);
OutputDebugStringW(Buffer);
// sanity check
@@ -387,7 +387,7 @@ CScanningTunner::performDVBTTune(
hr = pNode->QueryInterface(IID_IBDA_DigitalDemodulator, (void**)&pDigitalDemo);
swprintf(Buffer, L"CScanningTunner::performDVBTTune IID_IBDA_DigitalDemodulator hr %lx\n", hr);
_swprintf(Buffer, L"CScanningTunner::performDVBTTune IID_IBDA_DigitalDemodulator hr %lx\n", hr);
OutputDebugStringW(Buffer);
// sanity check
@@ -395,7 +395,7 @@ CScanningTunner::performDVBTTune(
hr = SetDigitalDemodulator(pDigitalDemo, Modulation, InnerFEC, InnerFECRate, OuterFEC, OuterFECRate, SymbolRate);
swprintf(Buffer, L"CScanningTunner::performDVBTTune SetDigitalDemodulator hr %lx\n", hr);
_swprintf(Buffer, L"CScanningTunner::performDVBTTune SetDigitalDemodulator hr %lx\n", hr);
OutputDebugStringW(Buffer);
// sanity check
@@ -704,7 +704,7 @@ CScanningTunner_fnConstructor(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(riid, &lpstr);
swprintf(Buffer, L"CScanningTunner_fnConstructor riid %s\n", lpstr);
_swprintf(Buffer, L"CScanningTunner_fnConstructor riid %s\n", lpstr);
OutputDebugStringW(Buffer);
#endif
+2 -2
View File
@@ -66,7 +66,7 @@ CEnumTuningSpaces::QueryInterface(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CEnumTuningSpaces::QueryInterface: NoInterface for %s\n", lpstr);
_swprintf(Buffer, L"CEnumTuningSpaces::QueryInterface: NoInterface for %s\n", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
@@ -123,7 +123,7 @@ CEnumTuningSpaces_fnConstructor(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(riid, &lpstr);
swprintf(Buffer, L"CEnumTuningSpaces_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
_swprintf(Buffer, L"CEnumTuningSpaces_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
OutputDebugStringW(Buffer);
#endif
+7 -7
View File
@@ -26,7 +26,7 @@ public:
OutputDebugStringW(L"CTuneRequest::Release : delete\n");
WCHAR Buffer[100];
swprintf(Buffer, L"CTuneRequest::Release : m_TuningSpace %p delete\n", m_TuningSpace);
_swprintf(Buffer, L"CTuneRequest::Release : m_TuningSpace %p delete\n", m_TuningSpace);
OutputDebugStringW(Buffer);
@@ -113,7 +113,7 @@ CTuneRequest::QueryInterface(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CTuneRequest::QueryInterface: NoInterface for %s", lpstr);
_swprintf(Buffer, L"CTuneRequest::QueryInterface: NoInterface for %s", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
@@ -186,7 +186,7 @@ CTuneRequest::Clone(ITuneRequest **NewTuneRequest)
{
#ifdef MSVIDCTL_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CTuneRequest::Clone %p\n", NewTuneRequest);
_swprintf(Buffer, L"CTuneRequest::Clone %p\n", NewTuneRequest);
OutputDebugStringW(Buffer);
#endif
@@ -238,7 +238,7 @@ CTuneRequest::put_ONID(long ONID)
{
#ifdef MSVIDCTL_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CTuneRequest::put_ONID : %lu\n", ONID);
_swprintf(Buffer, L"CTuneRequest::put_ONID : %lu\n", ONID);
OutputDebugStringW(Buffer);
#endif
@@ -264,7 +264,7 @@ CTuneRequest::put_TSID(long TSID)
{
#ifdef MSVIDCTL_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CTuneRequest::put_TSID : %lu\n", TSID);
_swprintf(Buffer, L"CTuneRequest::put_TSID : %lu\n", TSID);
OutputDebugStringW(Buffer);
#endif
@@ -290,7 +290,7 @@ CTuneRequest::put_SID(long SID)
{
#ifdef MSVIDCTL_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CTuneRequest::put_SID : %lu\n", SID);
_swprintf(Buffer, L"CTuneRequest::put_SID : %lu\n", SID);
OutputDebugStringW(Buffer);
#endif
@@ -313,7 +313,7 @@ CTuneRequest_fnConstructor(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(riid, &lpstr);
swprintf(Buffer, L"CTuneRequest_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
_swprintf(Buffer, L"CTuneRequest_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
OutputDebugStringW(Buffer);
#endif
+4 -4
View File
@@ -25,7 +25,7 @@ public:
InterlockedDecrement(&m_Ref);
WCHAR Buffer[100];
swprintf(Buffer, L"CTuningSpace::Release : %p Ref %lu\n", this, m_Ref);
_swprintf(Buffer, L"CTuningSpace::Release : %p Ref %lu\n", this, m_Ref);
OutputDebugStringW(Buffer);
if (!m_Ref)
@@ -106,7 +106,7 @@ CTuningSpace::QueryInterface(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CTuningSpace::QueryInterface: NoInterface for %s", lpstr);
_swprintf(Buffer, L"CTuningSpace::QueryInterface: NoInterface for %s", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
@@ -215,7 +215,7 @@ CTuningSpace::get__NetworkType(GUID *NetworkTypeGuid)
{
#ifdef MSVIDCTL_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CTuningSpace::get__NetworkType : %p stub\n", NetworkTypeGuid);
_swprintf(Buffer, L"CTuningSpace::get__NetworkType : %p stub\n", NetworkTypeGuid);
OutputDebugStringW(Buffer);
#endif
@@ -345,7 +345,7 @@ CTuningSpace_fnConstructor(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(riid, &lpstr);
swprintf(Buffer, L"CTuningSpace_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
_swprintf(Buffer, L"CTuningSpace_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
OutputDebugStringW(Buffer);
#endif
@@ -86,7 +86,7 @@ CTuningSpaceContainer::QueryInterface(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(refiid, &lpstr);
swprintf(Buffer, L"CTuningSpaceContainer::QueryInterface: NoInterface for %s", lpstr);
_swprintf(Buffer, L"CTuningSpaceContainer::QueryInterface: NoInterface for %s", lpstr);
OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr);
@@ -254,7 +254,7 @@ CTuningSpaceContainer_fnConstructor(
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(riid, &lpstr);
swprintf(Buffer, L"CTuningSpaceContainer_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
_swprintf(Buffer, L"CTuningSpaceContainer_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
OutputDebugStringW(Buffer);
#endif
+2 -2
View File
@@ -143,7 +143,7 @@ CNetConnection::Disconnect()
}
SetupDiDestroyDeviceInfoList(hInfo);
swprintf(szPath, L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\%s\\Connection", pDisplayName);
_swprintf(szPath, L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\%s\\Connection", pDisplayName);
CoTaskMemFree(pDisplayName);
if (FAILED_UNEXPECTEDLY(hr))
@@ -174,7 +174,7 @@ CNetConnection::Disconnect()
}
RegCloseKey(hKey);
swprintf(szPath, L"System\\CurrentControlSet\\Hardware Profiles\\Current\\System\\CurrentControlSet\\Enum\\%s", pPnp);
_swprintf(szPath, L"System\\CurrentControlSet\\Hardware Profiles\\Current\\System\\CurrentControlSet\\Enum\\%s", pPnp);
CoTaskMemFree(pPnp);
if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, szPath, 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS)
+2 -2
View File
@@ -314,7 +314,7 @@ CNetConnectionPropertyUi::LANPropertiesUIDlg(
//NOTE: Windows write these setting with the undocumented INetLanConnection::SetInfo
if (StringFromCLSID((CLSID)This->m_pProperties->guidId, &pStr) == ERROR_SUCCESS)
{
swprintf(szKey, L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\%s\\Connection", pStr);
_swprintf(szKey, L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\%s\\Connection", pStr);
CoTaskMemFree(pStr);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szKey, 0, KEY_WRITE, &hKey) == ERROR_SUCCESS)
{
@@ -540,7 +540,7 @@ CNetConnectionPropertyUi::Disconnect(
DWORD dwFlags)
{
WCHAR szBuffer[100];
swprintf(szBuffer, L"INetConnectionConnectUi_fnDisconnect flags %x\n", dwFlags);
_swprintf(szBuffer, L"INetConnectionConnectUi_fnDisconnect flags %x\n", dwFlags);
MessageBoxW(NULL, szBuffer, NULL, MB_OK);
return S_OK;
+13 -13
View File
@@ -41,7 +41,7 @@ UpdateLanStatusUiDlg(
{
if (LoadStringW(netshell_hInstance, IDS_FORMAT_BIT, szFormat, sizeof(szFormat)/sizeof(WCHAR)))
{
swprintf(szBuffer, szFormat, IfEntry->dwSpeed);
_swprintf(szBuffer, szFormat, IfEntry->dwSpeed);
SendDlgItemMessageW(hwndDlg, IDC_SPEED, WM_SETTEXT, 0, (LPARAM)szBuffer);
}
}
@@ -49,7 +49,7 @@ UpdateLanStatusUiDlg(
{
if (LoadStringW(netshell_hInstance, IDS_FORMAT_KBIT, szFormat, sizeof(szFormat)/sizeof(WCHAR)))
{
swprintf(szBuffer, szFormat, IfEntry->dwSpeed/1000);
_swprintf(szBuffer, szFormat, IfEntry->dwSpeed/1000);
SendDlgItemMessageW(hwndDlg, IDC_SPEED, WM_SETTEXT, 0, (LPARAM)szBuffer);
}
}
@@ -57,7 +57,7 @@ UpdateLanStatusUiDlg(
{
if (LoadStringW(netshell_hInstance, IDS_FORMAT_MBIT, szFormat, sizeof(szFormat)/sizeof(WCHAR)))
{
swprintf(szBuffer, szFormat, IfEntry->dwSpeed/1000000);
_swprintf(szBuffer, szFormat, IfEntry->dwSpeed/1000000);
SendDlgItemMessageW(hwndDlg, IDC_SPEED, WM_SETTEXT, 0, (LPARAM)szBuffer);
}
}
@@ -65,7 +65,7 @@ UpdateLanStatusUiDlg(
{
if (LoadStringW(netshell_hInstance, IDS_FORMAT_GBIT, szFormat, sizeof(szFormat)/sizeof(WCHAR)))
{
swprintf(szBuffer, szFormat, IfEntry->dwSpeed/1000000000);
_swprintf(szBuffer, szFormat, IfEntry->dwSpeed/1000000000);
SendDlgItemMessageW(hwndDlg, IDC_SPEED, WM_SETTEXT, 0, (LPARAM)szBuffer);
}
}
@@ -111,7 +111,7 @@ UpdateLanStatusUiDlg(
if (!LoadStringW(netshell_hInstance, IDS_DURATION_DAYS, DayBuffer, sizeof(DayBuffer) / sizeof(DayBuffer[0])))
DayBuffer[0] = L'\0';
}
swprintf(Buffer, DayBuffer, TimeConnected.wDay, LocBuffer);
_swprintf(Buffer, DayBuffer, TimeConnected.wDay, LocBuffer);
SendDlgItemMessageW(hwndDlg, IDC_DURATION, WM_SETTEXT, 0, (LPARAM)Buffer);
}
@@ -469,8 +469,8 @@ LANStatusUiDetailsDlg(
li.iItem = InsertItemToListView(hDlgCtrl, IDS_PHYSICAL_ADDRESS);
if (li.iItem >= 0)
{
swprintf(szBuffer, L"%02x-%02x-%02x-%02x-%02x-%02x",pCurAdapter->Address[0], pCurAdapter->Address[1],
pCurAdapter->Address[2], pCurAdapter->Address[3], pCurAdapter->Address[4], pCurAdapter->Address[5]);
_swprintf(szBuffer, L"%02x-%02x-%02x-%02x-%02x-%02x",pCurAdapter->Address[0], pCurAdapter->Address[1],
pCurAdapter->Address[2], pCurAdapter->Address[3], pCurAdapter->Address[4], pCurAdapter->Address[5]);
SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li);
}
li.iItem = InsertItemToListView(hDlgCtrl, IDS_IP_ADDRESS);
@@ -590,20 +590,20 @@ LANStatusUiAdvancedDlg(
dwIpAddr = ntohl(pContext->IpAddress);
swprintf(szBuffer, L"%u.%u.%u.%u", FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr),
THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
_swprintf(szBuffer, L"%u.%u.%u.%u", FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr),
THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
SendDlgItemMessageW(hwndDlg, IDC_DETAILSIP, WM_SETTEXT, 0, (LPARAM)szBuffer);
dwIpAddr = ntohl(pContext->SubnetMask);
swprintf(szBuffer, L"%u.%u.%u.%u", FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr),
THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
_swprintf(szBuffer, L"%u.%u.%u.%u", FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr),
THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
SendDlgItemMessageW(hwndDlg, IDC_DETAILSSUBNET, WM_SETTEXT, 0, (LPARAM)szBuffer);
dwIpAddr = ntohl(pContext->Gateway);
if (dwIpAddr)
{
swprintf(szBuffer, L"%u.%u.%u.%u", FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr),
THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
_swprintf(szBuffer, L"%u.%u.%u.%u", FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr),
THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
SendDlgItemMessageW(hwndDlg, IDC_DETAILSGATEWAY, WM_SETTEXT, 0, (LPARAM)szBuffer);
}
return TRUE;
+2 -2
View File
@@ -194,7 +194,7 @@ static void _ShowContextMenu(CSysTray * pSysTray)
if (cr != CR_SUCCESS)
{
WCHAR strInfo[128];
swprintf(strInfo, L"Problem Ejecting %wS", g_strMenuSel);
_swprintf(strInfo, L"Problem Ejecting %wS", g_strMenuSel);
MessageBox(0, L"The device cannot be stopped right now! Try stopping it again later!", strInfo, MB_OK | MB_ICONEXCLAMATION);
}
else
@@ -342,7 +342,7 @@ HRESULT STDMETHODCALLTYPE Hotplug_Message(_In_ CSysTray * pSysTray, UINT uMsg, W
break;
case DBT_DEVICEREMOVECOMPLETE:
WCHAR strInfo[128];
swprintf(strInfo, L"The %wS can now be safely removed from the system.", g_strMenuSel);
_swprintf(strInfo, L"The %wS can now be safely removed from the system.", g_strMenuSel);
NotifyBalloon(pSysTray, L"Safe to Remove Hardware", strInfo);
lResult = true;
+11 -12
View File
@@ -121,9 +121,9 @@ GetCurrentHwProfileW(LPHW_PROFILE_INFOW lpHwProfileInfo)
return FALSE;
}
swprintf(szKeyName,
L"Hardware Profile\\%04lu",
dwConfigId);
_swprintf(szKeyName,
L"Hardware Profile\\%04lu",
dwConfigId);
if (RegOpenKeyExW(hDbKey,
szKeyName,
@@ -158,15 +158,14 @@ GetCurrentHwProfileW(LPHW_PROFILE_INFOW lpHwProfileInfo)
{
/* Create a new GUID */
UuidCreate(&uuid);
swprintf(
lpHwProfileInfo->szHwProfileGuid,
L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
uuid.Data1,
uuid.Data2,
uuid.Data3,
uuid.Data4[0], uuid.Data4[1],
uuid.Data4[2], uuid.Data4[3], uuid.Data4[4], uuid.Data4[5],
uuid.Data4[6], uuid.Data4[7]);
_swprintf(lpHwProfileInfo->szHwProfileGuid,
L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
uuid.Data1,
uuid.Data2,
uuid.Data3,
uuid.Data4[0], uuid.Data4[1],
uuid.Data4[2], uuid.Data4[3], uuid.Data4[4], uuid.Data4[5],
uuid.Data4[6], uuid.Data4[7]);
dwLength = (wcslen(lpHwProfileInfo->szHwProfileGuid) + 1) * sizeof(WCHAR);
RegSetValueExW(hProfileKey,
+1 -1
View File
@@ -264,7 +264,7 @@ ScConnectControlPipe(HANDLE *hPipe)
dwServiceCurrent = 0;
}
swprintf(NtControlPipeName, L"\\\\.\\pipe\\net\\NtControlPipe%u", dwServiceCurrent);
_swprintf(NtControlPipeName, L"\\\\.\\pipe\\net\\NtControlPipe%u", dwServiceCurrent);
TRACE("PipeName: %S\n", NtControlPipeName);
if (!WaitNamedPipeW(NtControlPipeName, 30000))
+5 -5
View File
@@ -226,11 +226,11 @@ capGetDriverDescriptionW(WORD wDriverIndex,
if (VerQueryValueW(Version, L"\\", &Ms, &Ls))
{
memmove(&FileInfo, Ms, Ls);
swprintf(szVersion, L"Version: %d.%d.%d.%d",
HIWORD(FileInfo.dwFileVersionMS),
LOWORD(FileInfo.dwFileVersionMS),
HIWORD(FileInfo.dwFileVersionLS),
LOWORD(FileInfo.dwFileVersionLS));
_swprintf(szVersion, L"Version: %d.%d.%d.%d",
HIWORD(FileInfo.dwFileVersionMS),
LOWORD(FileInfo.dwFileVersionMS),
HIWORD(FileInfo.dwFileVersionLS),
LOWORD(FileInfo.dwFileVersionLS));
lstrcpynW(lpszVer, szVersion, cbVer);
}
+10 -10
View File
@@ -226,8 +226,8 @@ UpdateDriverVersionInfoDetails(IN HWND hwndDlg,
goto done;
dwLangId = *(LPDWORD)lpInfo;
swprintf(szLangInfo, L"\\StringFileInfo\\%04x%04x\\",
LOWORD(dwLangId), HIWORD(dwLangId));
_swprintf(szLangInfo, L"\\StringFileInfo\\%04x%04x\\",
LOWORD(dwLangId), HIWORD(dwLangId));
/* read CompanyName */
wcscpy(szLangPath, szLangInfo);
@@ -900,7 +900,7 @@ DisplayDevicePropertyText(IN PDEVADVPROP_INFO dap,
{
if (GetLastError() != ERROR_FILE_NOT_FOUND)
{
swprintf(dap->szTemp, L"Error: Getting the size failed! (Error: %ld)", GetLastError());
_swprintf(dap->szTemp, L"Error: Getting the size failed! (Error: %ld)", GetLastError());
SetListViewText(hwndListView, 0, dap->szTemp);
}
return;
@@ -952,7 +952,7 @@ DisplayDevicePropertyText(IN PDEVADVPROP_INFO dap,
{
case SPDRP_CAPABILITIES:
index = 0;
swprintf(dap->szTemp, L"%08lx", dwValue);
_swprintf(dap->szTemp, L"%08lx", dwValue);
SetListViewText(hwndListView, index++, dap->szTemp);
if (dwValue & CM_DEVCAP_LOCKSUPPORTED)
SetListViewText(hwndListView, index++, L"CM_DEVCAP_LOCKSUPPORTED");
@@ -978,7 +978,7 @@ DisplayDevicePropertyText(IN PDEVADVPROP_INFO dap,
case SPDRP_CONFIGFLAGS:
index = 0;
swprintf(dap->szTemp, L"%08lx", dwValue);
_swprintf(dap->szTemp, L"%08lx", dwValue);
SetListViewText(hwndListView, index++, dap->szTemp);
if (dwValue & CONFIGFLAG_DISABLED)
SetListViewText(hwndListView, index++, L"CONFIGFLAG_DISABLED");
@@ -1003,7 +1003,7 @@ DisplayDevicePropertyText(IN PDEVADVPROP_INFO dap,
break;
default:
swprintf(dap->szTemp, L"0x%08lx", dwValue);
_swprintf(dap->szTemp, L"0x%08lx", dwValue);
SetListViewText(hwndListView, 0, dap->szTemp);
break;
}
@@ -1039,7 +1039,7 @@ DisplayDevNodeFlags(IN PDEVADVPROP_INFO dap,
dap->hMachine);
index = 0;
swprintf(dap->szTemp, L"%08lx", dwStatus);
_swprintf(dap->szTemp, L"%08lx", dwStatus);
SetListViewText(hwndListView, index++, dap->szTemp);
if (dwStatus & DN_ROOT_ENUMERATED)
SetListViewText(hwndListView, index++, L"DN_ROOT_ENUMERATED");
@@ -1155,7 +1155,7 @@ DisplayCsFlags(IN PDEVADVPROP_INFO dap,
dap->hMachine);
index = 0;
swprintf(dap->szTemp, L"%08lx", dwValue);
_swprintf(dap->szTemp, L"%08lx", dwValue);
SetListViewText(hwndListView, index++, dap->szTemp);
if (dwValue & CSCONFIGFLAG_DISABLED)
@@ -1689,7 +1689,7 @@ DisplayPowerStateMappings(
PowerState = PowerData.PD_PowerStateMapping[i];
if ((PowerState >= PowerDeviceUnspecified) && (PowerState <= PowerDeviceD3))
{
swprintf(szSystemStateBuffer, L"S%u", i - 1);
_swprintf(szSystemStateBuffer, L"S%u", i - 1);
switch (PowerState)
{
@@ -1717,7 +1717,7 @@ DisplayPowerStateMappings(
break;
}
swprintf(szOutBuffer, L"%s -> %s", szSystemStateBuffer, szDeviceStateBuffer);
_swprintf(szOutBuffer, L"%s -> %s", szSystemStateBuffer, szDeviceStateBuffer);
SetListViewText(hwndListView, i, szOutBuffer);
}
}
+5 -5
View File
@@ -128,11 +128,11 @@ DllMain(HANDLE hDll,
else
{
/* Use the session path */
swprintf(SessionDir,
L"%ws\\%ld%ws",
SESSION_DIR,
SessionId,
WIN_OBJ_DIR);
_swprintf(SessionDir,
L"%ws\\%ld%ws",
SESSION_DIR,
SessionId,
WIN_OBJ_DIR);
}
/* Connect to the Base Server */
+4 -4
View File
@@ -141,10 +141,10 @@ CreatePipe(PHANDLE hReadPipe,
PipeId = InterlockedIncrement(&ProcessPipeId);
/* Create the pipe name */
swprintf(Buffer,
L"\\Device\\NamedPipe\\Win32Pipes.%p.%08x",
NtCurrentTeb()->ClientId.UniqueProcess,
PipeId);
_swprintf(Buffer,
L"\\Device\\NamedPipe\\Win32Pipes.%p.%08x",
NtCurrentTeb()->ClientId.UniqueProcess,
PipeId);
RtlInitUnicodeString(&PipeName, Buffer);
/* Always use case insensitive */
+7 -7
View File
@@ -3403,13 +3403,13 @@ WSPAddressToString(IN LPSOCKADDR lpsaAddress,
if (lpErrno) *lpErrno = WSAEINVAL;
return SOCKET_ERROR;
}
swprintf(buffer,
L"%u.%u.%u.%u:%u",
(unsigned int)(ntohl(((SOCKADDR_IN *)lpsaAddress)->sin_addr.s_addr) >> 24 & 0xff),
(unsigned int)(ntohl(((SOCKADDR_IN *)lpsaAddress)->sin_addr.s_addr) >> 16 & 0xff),
(unsigned int)(ntohl(((SOCKADDR_IN *)lpsaAddress)->sin_addr.s_addr) >> 8 & 0xff),
(unsigned int)(ntohl(((SOCKADDR_IN *)lpsaAddress)->sin_addr.s_addr) & 0xff),
ntohs(((SOCKADDR_IN *)lpsaAddress)->sin_port));
_swprintf(buffer,
L"%u.%u.%u.%u:%u",
(unsigned int)(ntohl(((SOCKADDR_IN *)lpsaAddress)->sin_addr.s_addr) >> 24 & 0xff),
(unsigned int)(ntohl(((SOCKADDR_IN *)lpsaAddress)->sin_addr.s_addr) >> 16 & 0xff),
(unsigned int)(ntohl(((SOCKADDR_IN *)lpsaAddress)->sin_addr.s_addr) >> 8 & 0xff),
(unsigned int)(ntohl(((SOCKADDR_IN *)lpsaAddress)->sin_addr.s_addr) & 0xff),
ntohs(((SOCKADDR_IN *)lpsaAddress)->sin_port));
p = wcschr(buffer, L':');
if (!((SOCKADDR_IN *)lpsaAddress)->sin_port)
+16 -16
View File
@@ -346,7 +346,7 @@ InstallSerialPort(IN HDEVINFO DeviceInfoSet,
}
/* Build the name of the port device */
swprintf(szPortName, L"%s%u", pszCom, dwPortNumber);
_swprintf(szPortName, L"%s%u", pszCom, dwPortNumber);
/* Close the com port database */
if (hComDB != HCOMDB_INVALID_HANDLE_VALUE)
@@ -389,17 +389,17 @@ InstallSerialPort(IN HDEVINFO DeviceInfoSet,
NULL))
{
/* ... and use it to build a new friendly name */
swprintf(szFriendlyName,
L"%s (%s)",
szDeviceDescription,
szPortName);
_swprintf(szFriendlyName,
L"%s (%s)",
szDeviceDescription,
szPortName);
}
else
{
/* ... or build a generic friendly name */
swprintf(szFriendlyName,
L"Serial Port (%s)",
szPortName);
_swprintf(szFriendlyName,
L"Serial Port (%s)",
szPortName);
}
/* Set the friendly name for the device */
@@ -474,7 +474,7 @@ InstallParallelPort(IN HDEVINFO DeviceInfoSet,
if (dwPortNumber != 0)
{
swprintf(szPortName, L"%s%u", pszLpt, dwPortNumber);
_swprintf(szPortName, L"%s%u", pszLpt, dwPortNumber);
}
else
{
@@ -538,17 +538,17 @@ InstallParallelPort(IN HDEVINFO DeviceInfoSet,
NULL))
{
/* ... and use it to build a new friendly name */
swprintf(szFriendlyName,
L"%s (%s)",
szDeviceDescription,
szPortName);
_swprintf(szFriendlyName,
L"%s (%s)",
szDeviceDescription,
szPortName);
}
else
{
/* ... or build a generic friendly name */
swprintf(szFriendlyName,
L"Parallel Port (%s)",
szPortName);
_swprintf(szFriendlyName,
L"Parallel Port (%s)",
szPortName);
}
TRACE("Friendly name: %S\n", szFriendlyName);
+9 -9
View File
@@ -176,7 +176,7 @@ ChangePortNumber(
return ERROR_SUCCESS;
/* Build the new port name */
swprintf(szNewPortName, L"LPT%lu", dwNewPortNumber);
_swprintf(szNewPortName, L"LPT%lu", dwNewPortNumber);
/* Open the devices hardware key */
hDeviceKey = SetupDiOpenDevRegKey(pPortData->DeviceInfoSet,
@@ -214,17 +214,17 @@ ChangePortNumber(
NULL))
{
/* ... and use it to build a new friendly name */
swprintf(szFriendlyName,
L"%s (%s)",
szDeviceDescription,
szNewPortName);
_swprintf(szFriendlyName,
L"%s (%s)",
szDeviceDescription,
szNewPortName);
}
else
{
/* ... or build a generic friendly name */
swprintf(szFriendlyName,
L"Parallel Port (%s)",
szNewPortName);
_swprintf(szFriendlyName,
L"Parallel Port (%s)",
szNewPortName);
}
/* Set the friendly name for the device */
@@ -424,7 +424,7 @@ OnInitDialog(HWND hwnd,
for (i = 1; i < 4; i++)
{
swprintf(szBuffer, L"LPT%lu", i);
_swprintf(szBuffer, L"LPT%lu", i);
if ((dwPortMap & (1 << i)) && (pPortData->dwPortNumber != i))
wcscat(szBuffer, szPortInUse);
+6 -6
View File
@@ -284,12 +284,12 @@ WritePortSettings(
nFlowControlIndex = ComboBox_GetCurSel(hwndControl);
}
swprintf(szPortData,
L"%lu,%s,%s,%s",
BaudRates[nBaudRateIndex],
Paritys[nParityIndex],
DataBits[nDataBitsIndex],
StopBits[nStopBitsIndex]);
_swprintf(szPortData,
L"%lu,%s,%s,%s",
BaudRates[nBaudRateIndex],
Paritys[nParityIndex],
DataBits[nDataBitsIndex],
StopBits[nStopBitsIndex]);
if (nFlowControlIndex < 2)
{
wcscat(szPortData, L",");
+2 -2
View File
@@ -414,7 +414,7 @@ EnumerateNetworkComponent(
hr = StringFromCLSID(pGuid, &pszGuid);
if (SUCCEEDED(hr))
{
swprintf(szName, L"SYSTEM\\CurrentControlSet\\Control\\Network\\%s", pszGuid);
_swprintf(szName, L"SYSTEM\\CurrentControlSet\\Control\\Network\\%s", pszGuid);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szName, 0, KEY_READ, &hKey) == ERROR_SUCCESS)
{
hr = EnumClientServiceProtocol(hKey, pGuid, pHead);
@@ -711,7 +711,7 @@ ApplyOrCancelChanges(
{
if (StringFromCLSID(&pHead->InstanceId, &pszGuid) == NOERROR)
{
swprintf(szName, L"SYSTEM\\CurrentControlSet\\Control\\Network\\%s", pszGuid);
_swprintf(szName, L"SYSTEM\\CurrentControlSet\\Control\\Network\\%s", pszGuid);
CoTaskMemFree(pszGuid);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szName, 0, KEY_READ, &hKey) == ERROR_SUCCESS)
+20 -20
View File
@@ -988,8 +988,8 @@ InsertIpAddressToListView(
li.iItem = itemCount;
li.iSubItem = 0;
dwIpAddr = pAddr->IpAddress;
swprintf(szBuffer, L"%lu.%lu.%lu.%lu",
FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr), THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
_swprintf(szBuffer, L"%lu.%lu.%lu.%lu",
FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr), THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
li.pszText = szBuffer;
li.iItem = SendMessageW(hDlgCtrl, LVM_INSERTITEMW, 0, (LPARAM)&li);
@@ -998,13 +998,13 @@ InsertIpAddressToListView(
if (bSubMask)
{
dwIpAddr = pAddr->u.SubnetMask;
swprintf(szBuffer, L"%lu.%lu.%lu.%lu",
FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr), THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
_swprintf(szBuffer, L"%lu.%lu.%lu.%lu",
FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr), THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
}
else
{
if (pAddr->u.Metric)
swprintf(szBuffer, L"%u", pAddr->u.Metric);
_swprintf(szBuffer, L"%u", pAddr->u.Metric);
else
LoadStringW(netcfgx_hInstance, IDS_AUTOMATIC, szBuffer, sizeof(szBuffer)/sizeof(WCHAR));
}
@@ -1791,7 +1791,7 @@ TcpipAdvancedIpDlg(
{
if (Gw.Metric)
{
swprintf(szBuffer, L"%u", Gw.Metric);
_swprintf(szBuffer, L"%u", Gw.Metric);
li.iSubItem = 1;
li.pszText = szBuffer;
SendDlgItemMessageW(hwndDlg, IDC_GWLIST, LVM_SETITEMW, 0, (LPARAM)&li);
@@ -1833,7 +1833,7 @@ TcpipAdvancedIpDlg(
(void)SendDlgItemMessageW(hwndDlg, IDC_GWLIST, LVM_SETITEMW, 0, (LPARAM)&li);
if (Gw.Metric)
{
swprintf(szBuffer, L"%u", Gw.Metric);
_swprintf(szBuffer, L"%u", Gw.Metric);
li.iSubItem = 1;
li.pszText = szBuffer;
SendDlgItemMessageW(hwndDlg, IDC_GWLIST, LVM_SETITEMW, 0, (LPARAM)&li);
@@ -1959,8 +1959,8 @@ InitializeTcpipAdvancedDNSDlg(
while(pAddr)
{
dwIpAddr = pAddr->IpAddress;
swprintf(szBuffer, L"%lu.%lu.%lu.%lu",
FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr), THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
_swprintf(szBuffer, L"%lu.%lu.%lu.%lu",
FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr), THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
SendDlgItemMessageW(hwndDlg, IDC_DNSADDRLIST, LB_ADDSTRING, 0, (LPARAM)szBuffer);
pAddr = pAddr->Next;
@@ -2228,7 +2228,7 @@ TcpipAdvancedDnsDlg(
if (LoadStringW(netcfgx_hInstance, IDS_DNS_SUFFIX, szFormat, sizeof(szFormat)/sizeof(WCHAR)))
{
szFormat[(sizeof(szFormat)/sizeof(WCHAR))-1] = L'\0';
swprintf(szBuffer, szFormat, szSuffix);
_swprintf(szBuffer, szFormat, szSuffix);
if (LoadStringW(netcfgx_hInstance, IDS_TCPIP, szFormat, sizeof(szFormat)/sizeof(WCHAR)))
szFormat[(sizeof(szFormat)/sizeof(WCHAR))-1] = L'\0';
else
@@ -4003,17 +4003,17 @@ CreateMultiSzString(IP_ADDR * pAddr, COPY_TYPE Type, LPDWORD Size, BOOL bComma)
if (Type == IPADDR)
{
dwIpAddr = pTemp->IpAddress;
swprintf(szBuffer, L"%lu.%lu.%lu.%lu",
FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr), THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
_swprintf(szBuffer, L"%lu.%lu.%lu.%lu",
FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr), THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
}else if (Type == SUBMASK)
{
dwIpAddr = pTemp->u.SubnetMask;
swprintf(szBuffer, L"%lu.%lu.%lu.%lu",
FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr), THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
_swprintf(szBuffer, L"%lu.%lu.%lu.%lu",
FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr), THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
}
else if (Type == METRIC)
{
swprintf(szBuffer, L"%u", pTemp->u.Metric);
_swprintf(szBuffer, L"%u", pTemp->u.Metric);
}
dwSize += wcslen(szBuffer) + 1;
@@ -4033,17 +4033,17 @@ CreateMultiSzString(IP_ADDR * pAddr, COPY_TYPE Type, LPDWORD Size, BOOL bComma)
if (Type == IPADDR)
{
dwIpAddr = pTemp->IpAddress;
swprintf(pStr, L"%lu.%lu.%lu.%lu",
FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr), THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
_swprintf(pStr, L"%lu.%lu.%lu.%lu",
FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr), THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
}else if (Type == SUBMASK)
{
dwIpAddr = pTemp->u.SubnetMask;
swprintf(pStr, L"%lu.%lu.%lu.%lu",
FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr), THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
_swprintf(pStr, L"%lu.%lu.%lu.%lu",
FIRST_IPADDRESS(dwIpAddr), SECOND_IPADDRESS(dwIpAddr), THIRD_IPADDRESS(dwIpAddr), FOURTH_IPADDRESS(dwIpAddr));
}
else if (Type == METRIC)
{
swprintf(pStr, L"%u", pTemp->u.Metric);
_swprintf(pStr, L"%u", pTemp->u.Metric);
}
if (bComma)
+1 -1
View File
@@ -521,7 +521,7 @@ PrepareFoldersToScan(
nType = GetDriveTypeW(drive);
if (nType == DRIVE_REMOVABLE || nType == DRIVE_CDROM)
{
Buffer += 1 + swprintf(Buffer, drive);
Buffer += 1 + _swprintf(Buffer, drive);
}
}
}
+1 -1
View File
@@ -22,7 +22,7 @@ SampOpenAliasObject(IN PSAM_DB_OBJECT DomainObject,
DomainObject, AliasId, DesiredAccess, AliasObject);
/* Convert the RID into a string (hex) */
swprintf(szRid, L"%08lX", AliasId);
_swprintf(szRid, L"%08lX", AliasId);
/* Create the user object */
return SampOpenDbObject(DomainObject,
+1 -1
View File
@@ -22,7 +22,7 @@ SampOpenGroupObject(IN PSAM_DB_OBJECT DomainObject,
DomainObject, GroupId, DesiredAccess, GroupObject);
/* Convert the RID into a string (hex) */
swprintf(szRid, L"%08lX", GroupId);
_swprintf(szRid, L"%08lX", GroupId);
/* Create the user object */
return SampOpenDbObject(DomainObject,
+8 -8
View File
@@ -1988,7 +1988,7 @@ SamrCreateGroupInDomain(IN SAMPR_HANDLE DomainHandle,
TRACE("RID: %lx\n", ulRid);
/* Convert the RID into a string (hex) */
swprintf(szRid, L"%08lX", ulRid);
_swprintf(szRid, L"%08lX", ulRid);
/* Create the group object */
Status = SampCreateDbObject(DomainObject,
@@ -2411,7 +2411,7 @@ SamrCreateUserInDomain(IN SAMPR_HANDLE DomainHandle,
}
/* Convert the RID into a string (hex) */
swprintf(szRid, L"%08lX", ulRid);
_swprintf(szRid, L"%08lX", ulRid);
/* Create the user object */
Status = SampCreateDbObject(DomainObject,
@@ -3002,7 +3002,7 @@ SamrCreateAliasInDomain(IN SAMPR_HANDLE DomainHandle,
TRACE("RID: %lx\n", ulRid);
/* Convert the RID into a string (hex) */
swprintf(szRid, L"%08lX", ulRid);
_swprintf(szRid, L"%08lX", ulRid);
/* Create the alias object */
Status = SampCreateDbObject(DomainObject,
@@ -3754,7 +3754,7 @@ SamrLookupIdsInDomain(IN SAMPR_HANDLE DomainHandle,
{
TRACE("RID: %lu\n", RelativeIds[i]);
swprintf(RidString, L"%08lx", RelativeIds[i]);
_swprintf(RidString, L"%08lx", RelativeIds[i]);
/* Lookup aliases */
Status = SampRegOpenKey(DomainObject->KeyHandle,
@@ -4007,7 +4007,7 @@ SamrOpenGroup(IN SAMPR_HANDLE DomainHandle,
}
/* Convert the RID into a string (hex) */
swprintf(szRid, L"%08lX", GroupId);
_swprintf(szRid, L"%08lX", GroupId);
/* Create the group object */
Status = SampOpenDbObject(DomainObject,
@@ -4850,7 +4850,7 @@ SamrOpenAlias(IN SAMPR_HANDLE DomainHandle,
}
/* Convert the RID into a string (hex) */
swprintf(szRid, L"%08lX", AliasId);
_swprintf(szRid, L"%08lX", AliasId);
/* Create the alias object */
Status = SampOpenDbObject(DomainObject,
@@ -5451,7 +5451,7 @@ SamrOpenUser(IN SAMPR_HANDLE DomainHandle,
}
/* Convert the RID into a string (hex) */
swprintf(szRid, L"%08lX", UserId);
_swprintf(szRid, L"%08lX", UserId);
/* Create the user object */
Status = SampOpenDbObject(DomainObject,
@@ -8950,7 +8950,7 @@ SamrCreateUser2InDomain(IN SAMPR_HANDLE DomainHandle,
}
/* Convert the RID into a string (hex) */
swprintf(szRid, L"%08lX", ulRid);
_swprintf(szRid, L"%08lX", ulRid);
/* Create the user object */
Status = SampCreateDbObject(DomainObject,
+7 -7
View File
@@ -33,7 +33,7 @@ SampSetupAddMemberToAlias(HKEY hDomainKey,
ConvertSidToStringSidW(MemberSid, &MemberSidString);
swprintf(szKeyName, L"Aliases\\%08lX\\Members", AliasId);
_swprintf(szKeyName, L"Aliases\\%08lX\\Members", AliasId);
if (!RegCreateKeyExW(hDomainKey,
szKeyName,
@@ -55,7 +55,7 @@ SampSetupAddMemberToAlias(HKEY hDomainKey,
RegCloseKey(hMembersKey);
}
swprintf(szKeyName, L"Aliases\\Members\\%s", MemberSidString);
_swprintf(szKeyName, L"Aliases\\Members\\%s", MemberSidString);
if (!RegCreateKeyExW(hDomainKey,
szKeyName,
@@ -67,7 +67,7 @@ SampSetupAddMemberToAlias(HKEY hDomainKey,
&hMembersKey,
&dwDisposition))
{
swprintf(szKeyName, L"%08lX", AliasId);
_swprintf(szKeyName, L"%08lX", AliasId);
RegSetValueEx(hMembersKey,
szKeyName,
@@ -100,7 +100,7 @@ SampSetupCreateAliasAccount(HANDLE hDomainKey,
ULONG SdSize = 0;
NTSTATUS Status;
swprintf(szAccountKeyName, L"Aliases\\%08lX", ulRelativeId);
_swprintf(szAccountKeyName, L"Aliases\\%08lX", ulRelativeId);
Status = SampRegCreateKey(hDomainKey,
szAccountKeyName,
@@ -186,7 +186,7 @@ SampSetupAddMemberToGroup(IN HANDLE hDomainKey,
ULONG i;
NTSTATUS Status;
swprintf(szKeyName, L"Groups\\%08lX", GroupId);
_swprintf(szKeyName, L"Groups\\%08lX", GroupId);
Status = SampRegOpenKey(hDomainKey,
szKeyName,
@@ -272,7 +272,7 @@ SampSetupCreateGroupAccount(HANDLE hDomainKey,
FixedGroupData.GroupId = ulRelativeId;
FixedGroupData.Attributes = 0;
swprintf(szAccountKeyName, L"Groups\\%08lX", ulRelativeId);
_swprintf(szAccountKeyName, L"Groups\\%08lX", ulRelativeId);
Status = SampRegCreateKey(hDomainKey,
szAccountKeyName,
@@ -401,7 +401,7 @@ SampSetupCreateUserAccount(HANDLE hDomainKey,
FixedUserData.AdminCount = 0;
FixedUserData.OperatorCount = 0;
swprintf(szAccountKeyName, L"Users\\%08lX", ulRelativeId);
_swprintf(szAccountKeyName, L"Users\\%08lX", ulRelativeId);
Status = SampRegCreateKey(hDomainKey,
szAccountKeyName,
+1 -1
View File
@@ -22,7 +22,7 @@ SampOpenUserObject(IN PSAM_DB_OBJECT DomainObject,
DomainObject, UserId, DesiredAccess, UserObject);
/* Convert the RID into a string (hex) */
swprintf(szRid, L"%08lX", UserId);
_swprintf(szRid, L"%08lX", UserId);
/* Create the user object */
return SampOpenDbObject(DomainObject,
+1 -1
View File
@@ -489,7 +489,7 @@ BOOL COpenWithList::LoadInfo(COpenWithList::SApp *pApp)
}
/* Query name */
swprintf(wszBuf, L"\\StringFileInfo\\%04x%04x\\FileDescription", wLang, wCode);
_swprintf(wszBuf, L"\\StringFileInfo\\%04x%04x\\FileDescription", wLang, wCode);
success = VerQueryValueW(pBuf, wszBuf, (LPVOID *)&pResult, &cchLen) && (cchLen > 1);
if (success)
StringCchCopyNW(pApp->wszName, _countof(pApp->wszName), pResult, cchLen);
+1 -1
View File
@@ -497,7 +497,7 @@ CDrvDefExt::InitGeneralPage(HWND hwndDlg)
/* Set drive description */
WCHAR wszFormat[50];
GetDlgItemTextW(hwndDlg, 14009, wszFormat, _countof(wszFormat));
swprintf(wszBuf, wszFormat, m_wszDrive[0]);
_swprintf(wszBuf, wszFormat, m_wszDrive[0]);
SetDlgItemTextW(hwndDlg, 14009, wszBuf);
/* show disk cleanup button only for fixed drives */
+7 -7
View File
@@ -164,7 +164,7 @@ LPCWSTR CFileVersionInfo::GetString(LPCWSTR pwszName)
return NULL;
WCHAR wszBuf[256];
swprintf(wszBuf, L"\\StringFileInfo\\%04x%04x\\%s", m_wLang, m_wCode, pwszName);
_swprintf(wszBuf, L"\\StringFileInfo\\%04x%04x\\%s", m_wLang, m_wCode, pwszName);
/* Query string in version block */
LPCWSTR pwszResult = NULL;
@@ -175,7 +175,7 @@ LPCWSTR CFileVersionInfo::GetString(LPCWSTR pwszName)
if (!pwszResult)
{
/* Try US English */
swprintf(wszBuf, L"\\StringFileInfo\\%04x%04x\\%s", MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), 1252, pwszName);
_swprintf(wszBuf, L"\\StringFileInfo\\%04x%04x\\%s", MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), 1252, pwszName);
if (!VerQueryValueW(m_pInfo, wszBuf, (LPVOID *)&pwszResult, &cBytes))
pwszResult = NULL;
}
@@ -219,7 +219,7 @@ SH_FormatInteger(LONGLONG Num, LPWSTR pwszResult, UINT cchResultMax)
{
// Print the number in uniform mode
WCHAR wszNumber[24];
swprintf(wszNumber, L"%I64u", Num);
_swprintf(wszNumber, L"%I64u", Num);
// Get system strings for decimal and thousand separators.
WCHAR wszDecimalSep[8], wszThousandSep[8];
@@ -1087,10 +1087,10 @@ CFileDefExt::InitVersionPage(HWND hwndDlg)
if (pInfo)
{
WCHAR wszVersion[256];
swprintf(wszVersion, L"%u.%u.%u.%u", HIWORD(pInfo->dwFileVersionMS),
LOWORD(pInfo->dwFileVersionMS),
HIWORD(pInfo->dwFileVersionLS),
LOWORD(pInfo->dwFileVersionLS));
_swprintf(wszVersion, L"%u.%u.%u.%u", HIWORD(pInfo->dwFileVersionMS),
LOWORD(pInfo->dwFileVersionMS),
HIWORD(pInfo->dwFileVersionLS),
LOWORD(pInfo->dwFileVersionLS));
TRACE("MS %x LS %x ver %s \n", pInfo->dwFileVersionMS, pInfo->dwFileVersionLS, debugstr_w(wszVersion));
SetDlgItemTextW(hwndDlg, 14001, wszVersion);
}
+3 -3
View File
@@ -112,7 +112,7 @@ InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive)
dwSerial = -1;
}
swprintf(szVolume, L"%s (%c:)", szName, szDrive[0]);
_swprintf(szVolume, L"%s (%c:)", szName, szDrive[0]);
ZeroMemory(&li, sizeof(li));
li.mask = LVIF_TEXT | LVIF_PARAM;
li.iSubItem = 0;
@@ -129,7 +129,7 @@ InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive)
pItem->FreeBytesAvailable = FreeBytesAvailable;
pItem->dwSerial = dwSerial;
swprintf(szName, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\BitBucket\\Volume\\%04X-%04X", LOWORD(dwSerial), HIWORD(dwSerial));
_swprintf(szName, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\BitBucket\\Volume\\%04X-%04X", LOWORD(dwSerial), HIWORD(dwSerial));
dwSize = sizeof(DWORD);
if (RegGetValueW(HKEY_CURRENT_USER, szName, L"MaxCapacity", RRF_RT_DWORD, NULL, &pItem->dwMaxCapacity, &dwSize))
@@ -207,7 +207,7 @@ static BOOL StoreDriveSettings(HWND hwndDlg)
if (SendMessageW(hDlgCtrl, LVM_GETITEMW, 0, (LPARAM)&li))
{
pItem = (PDRIVE_ITEM_CONTEXT)li.lParam;
swprintf(szSerial, L"%04X-%04X", LOWORD(pItem->dwSerial), HIWORD(pItem->dwSerial));
_swprintf(szSerial, L"%04X-%04X", LOWORD(pItem->dwSerial), HIWORD(pItem->dwSerial));
if (RegCreateKeyExW(hKey, szSerial, 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS)
{
dwSize = sizeof(DWORD);
@@ -184,16 +184,16 @@ CFSDropTarget::_GetUniqueFileName(LPCWSTR pwszBasePath, LPCWSTR pwszExt, LPWSTR
}
if (!bShortcut)
swprintf(pwszTarget, L"%s%s%s", wszLink, pwszBasePath, pwszExt);
_swprintf(pwszTarget, L"%s%s%s", wszLink, pwszBasePath, pwszExt);
else
swprintf(pwszTarget, L"%s%s", pwszBasePath, pwszExt);
_swprintf(pwszTarget, L"%s%s", pwszBasePath, pwszExt);
for (UINT i = 2; PathFileExistsW(pwszTarget); ++i)
{
if (!bShortcut)
swprintf(pwszTarget, L"%s%s (%u)%s", wszLink, pwszBasePath, i, pwszExt);
_swprintf(pwszTarget, L"%s%s (%u)%s", wszLink, pwszBasePath, i, pwszExt);
else
swprintf(pwszTarget, L"%s (%u)%s", pwszBasePath, i, pwszExt);
_swprintf(pwszTarget, L"%s (%u)%s", pwszBasePath, i, pwszExt);
}
return TRUE;
+1 -1
View File
@@ -1182,7 +1182,7 @@ TRASH_CanTrashFile(LPCWSTR wszPath)
return FALSE;
}
swprintf(szBuffer, L"%04X-%04X", LOWORD(VolSerialNumber), HIWORD(VolSerialNumber));
_swprintf(szBuffer, L"%04X-%04X", LOWORD(VolSerialNumber), HIWORD(VolSerialNumber));
wcscat(szKey, szBuffer);
if (RegCreateKeyExW(HKEY_CURRENT_USER, szKey, 0, NULL, 0, KEY_READ | KEY_WRITE, NULL, &hKey, &dwDisposition) != ERROR_SUCCESS)
+1 -1
View File
@@ -67,7 +67,7 @@ AddCommasW(DWORD lValue, LPWSTR lpNumber)
numFormat.lpThousandSep = szSeparator;
numFormat.NegativeOrder = 0;
swprintf(szValue, L"%lu", lValue);
_swprintf(szValue, L"%lu", lValue);
if (GetNumberFormatW(LOCALE_USER_DEFAULT,
0,
@@ -108,7 +108,7 @@ STDMETHODIMP RecycleBinGeneric::DeleteFile(LPCWSTR szFileName)
return HRESULT_FROM_WIN32(GetLastError());
}
#else
swprintf(szVolume, L"%c:\\", szFullName[0]);
_swprintf(szVolume, L"%c:\\", szFullName[0]);
#endif
/* Skip namespace (if any): "\\.\" or "\\?\" */
@@ -148,7 +148,7 @@ STDMETHODIMP RecycleBinGeneric::EmptyRecycleBin()
continue;
WCHAR szVolumeName[MAX_PATH];
swprintf(szVolumeName, L"%c:\\", L'A' + i);
_swprintf(szVolumeName, L"%c:\\", L'A' + i);
if (GetDriveTypeW(szVolumeName) != DRIVE_FIXED)
continue;
+1 -1
View File
@@ -166,7 +166,7 @@ static __inline int SHELL32_GUIDToStringW (REFGUID guid, LPWSTR str)
'%','0','2','X','%','0','2','X','-',
'%','0','2','X','%','0','2','X','%','0','2','X','%','0','2','X',
'%','0','2','X','%','0','2','X','}',0 };
return swprintf(str, fmtW,
return _swprintf(str, fmtW,
guid.Data1, guid.Data2, guid.Data3,
guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3],
guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]);
+3 -3
View File
@@ -457,7 +457,7 @@ static BOOL SHELL_ArgifyW(WCHAR* out, DWORD len, const WCHAR* fmt, const WCHAR*
LPVOID pv;
HGLOBAL hmem = SHAllocShared(pidl, ILGetSize(pidl), 0);
pv = SHLockShared(hmem, 0);
chars = swprintf(buf, L":%p", pv);
chars = _swprintf(buf, L":%p", pv);
if (chars >= ARRAY_SIZE(buf))
ERR("pidl format buffer too small!\n");
@@ -2527,7 +2527,7 @@ static BOOL SHELL_execute(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc)
wcmd = wcmdAlloc;
wcmdLen = len;
}
swprintf(wcmd, L"\"%s\"", (LPWSTR)wszApplicationName);
_swprintf(wcmd, L"\"%s\"", (LPWSTR)wszApplicationName);
if (sei_tmp.lpParameters[0])
{
strcatW(wcmd, L" ");
@@ -2561,7 +2561,7 @@ static BOOL SHELL_execute(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc)
NULL, &env, NULL, NULL);
if (retval > 32)
{
swprintf(lpQuotedFile, L"\"%s\"", lpFile);
_swprintf(lpQuotedFile, L"\"%s\"", lpFile);
retval = SHELL_quote_and_execute(wExec, lpQuotedFile,
wszKeyname,
wszApplicationName, env,
+2 -2
View File
@@ -465,13 +465,13 @@ void AddFSClassKeysToArray(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, HKEY* array,
AddClassKeyToArray(L"Unknown", array, cKeys);
}
swprintf(wszSFA, L"SystemFileAssociations\\%s", extension);
_swprintf(wszSFA, L"SystemFileAssociations\\%s", extension);
AddClassKeyToArray(wszSFA, array, cKeys);
dwSize = sizeof(wszClass);
if (RegGetValueW(HKEY_CLASSES_ROOT, extension, L"PerceivedType", RRF_RT_REG_SZ, NULL, wszClass, &dwSize) == ERROR_SUCCESS)
{
swprintf(wszSFA, L"SystemFileAssociations\\%s", wszClass);
_swprintf(wszSFA, L"SystemFileAssociations\\%s", wszClass);
AddClassKeyToArray(wszSFA, array, cKeys);
}
}
+4 -4
View File
@@ -120,10 +120,10 @@ pSetupDebugPrint(
goto done;
va_start(args, pszMessage);
vsnwprintf(pszFormatBuffer,
FORMAT_BUFFER_SIZE,
pszMessage,
args);
_vsnwprintf(pszFormatBuffer,
FORMAT_BUFFER_SIZE,
pszMessage,
args);
va_end(args);
}

Some files were not shown because too many files have changed in this diff Show More