)
{
NTSTATUS Status;
- ULONG i, AppPathLength;
+ SIZE_T i, AppPathLength;
PWCHAR ApplicationPath, PathCopy;
/* Clear the incoming string */
}
/* Check if we have space for one more character */
- Status = RtlULongAdd(i, 1, &AppPathLength);
+ Status = RtlSIZETAdd(i, 1, &AppPathLength);
if (NT_SUCCESS(Status))
{
/* Check if it's safe to multiply by two */
- Status = RtlULongMult(AppPathLength, sizeof(WCHAR), &AppPathLength);
+ Status = RtlSIZETMult(AppPathLength, sizeof(WCHAR), &AppPathLength);
if (NT_SUCCESS(Status))
{
/* Allocate a copy for the string */
)
{
NTSTATUS Status;
- ULONG BootDirLength, PathLength;
+ SIZE_T BootDirLength, PathLength;
/* Compute the length of the directory, and add a NUL */
BootDirLength = wcslen(BootDirectory);
- Status = RtlULongAdd(BootDirLength, 1, &BootDirLength);
+ Status = RtlSIZETAdd(BootDirLength, 1, &BootDirLength);
if (!NT_SUCCESS(Status))
{
goto Quickie;
/* Add the length of the file, make sure it fits */
PathLength = wcslen(FileName);
- Status = RtlULongAdd(PathLength, BootDirLength, &PathLength);
+ Status = RtlSIZETAdd(PathLength, BootDirLength, &PathLength);
if (!NT_SUCCESS(Status))
{
goto Quickie;
}
/* Convert to bytes */
- Status = RtlULongLongToULong(PathLength * sizeof(WCHAR), &PathLength);
+ Status = RtlSIZETMult(PathLength, sizeof(WCHAR), &PathLength);
if (!NT_SUCCESS(Status))
{
goto Quickie;
PBL_DEVICE_DESCRIPTOR BcdDevice;
PWCHAR BcdPath, FullPath, PathBuffer;
BOOLEAN HavePath;
- ULONG PathLength, FullSize;
+ SIZE_T PathLength, FullSize;
PVOID FinalBuffer;
UNICODE_STRING BcdString;
/* Add a NUL to the path, make sure it'll fit */
PathLength = wcslen(PathBuffer);
- Status = RtlULongAdd(PathLength, 1, &PathLength);
+ Status = RtlSIZETAdd(PathLength, 1, &PathLength);
if (!NT_SUCCESS(Status))
{
goto Quickie;
}
/* Convert to bytes */
- Status = RtlULongLongToULong(PathLength * sizeof(WCHAR), &PathLength);
+ Status = RtlSIZETMult(PathLength, sizeof(WCHAR), &PathLength);
if (!NT_SUCCESS(Status))
{
goto Quickie;
}
/* Now add the size of the path to the device path, check if it fits */
- Status = RtlULongAdd(PathLength, BcdDevice->Size, &FullSize);
+ Status = RtlSIZETAdd(PathLength, BcdDevice->Size, &FullSize);
if (!NT_SUCCESS(Status))
{
goto Quickie;
if (BmpInternalBootError)
{
/* Return it -- but it's a pointer? */
- return (ULONG)BmpInternalBootError; // ???
+ return (ULONG_PTR)BmpInternalBootError; // ???
}
/* Otherwise, show the menu to see what to do */