rename a variable to avoid conflicts with an existing information class constant

svn path=/trunk/; revision=20964
This commit is contained in:
Thomas Bluemel 2006-01-21 22:36:37 +00:00
parent 837b237d7f
commit 155e603f19

View file

@ -1432,7 +1432,7 @@ SetFileShortNameW(
ULONG NeededSize;
UNICODE_STRING ShortName;
IO_STATUS_BLOCK IoStatusBlock;
PFILE_NAME_INFORMATION FileNameInformation;
PFILE_NAME_INFORMATION FileNameInfo;
if(IsConsoleHandle(hFile))
{
@ -1449,29 +1449,29 @@ SetFileShortNameW(
RtlInitUnicodeString(&ShortName, lpShortName);
NeededSize = sizeof(FILE_NAME_INFORMATION) + ShortName.Length + sizeof(WCHAR);
if(!(FileNameInformation = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, NeededSize)))
if(!(FileNameInfo = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, NeededSize)))
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
}
FileNameInformation->FileNameLength = ShortName.Length;
RtlCopyMemory(FileNameInformation->FileName, ShortName.Buffer, ShortName.Length);
FileNameInfo->FileNameLength = ShortName.Length;
RtlCopyMemory(FileNameInfo->FileName, ShortName.Buffer, ShortName.Length);
Status = NtSetInformationFile(hFile,
&IoStatusBlock, //out
FileNameInformation,
FileNameInfo,
NeededSize,
FileShortNameInformation);
RtlFreeHeap(RtlGetProcessHeap(), 0, FileNameInformation);
RtlFreeHeap(RtlGetProcessHeap(), 0, FileNameInfo);
if(!NT_SUCCESS(Status))
{
SetLastErrorByStatus(Status);
return FALSE;
}
return NT_SUCCESS(Status);
return TRUE;
}