Re: [PATCH 5/5] kernel32: Added implementation for OpenFileById.
"Vincas Miliūnas" <vincas.miliunas(a)gmail.com> wrote:
+ objectName.Buffer = (WCHAR *)&lpFileID->DUMMYUNIONNAME.FileId;
This doesn't look right.
+ if (status) + { + SetLastError( RtlNtStatusToDosError( status ) ); + return INVALID_HANDLE_VALUE; + } + else if (!result) + { + return INVALID_HANDLE_VALUE; + } + else + { + return result; + }
It looks like some braces and all 'else' statements may go. -- Dmitry.
On 10/10/2012 05:45 AM, Dmitry Timoshkov wrote:
"Vincas Miliūnas" <vincas.miliunas(a)gmail.com> wrote:
+ objectName.Buffer = (WCHAR *)&lpFileID->DUMMYUNIONNAME.FileId; This doesn't look right. That's how the pointer to the fileid is transported, see the file_id_to_unix_file_name function in ntdll/directory.c
+ if (status) + { + SetLastError( RtlNtStatusToDosError( status ) ); + return INVALID_HANDLE_VALUE; + } + else if (!result) + { + return INVALID_HANDLE_VALUE; + } + else + { + return result; + } It looks like some braces and all 'else' statements may go.
"Vincas Miliūnas" <vincas.miliunas(a)gmail.com> wrote:
+ objectName.Buffer = (WCHAR *)&lpFileID->DUMMYUNIONNAME.FileId; This doesn't look right. That's how the pointer to the fileid is transported, see the file_id_to_unix_file_name function in ntdll/directory.c
I meant DUMMYUNIONNAME. -- Dmitry.
participants (2)
-
Dmitry Timoshkov -
Vincas Miliūnas