Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenproto.c
Go to the documentation of this file.
00001 #include "precomp.h" 00002 00003 NTSTATUS TiGetProtocolNumber( 00004 PUNICODE_STRING FileName, 00005 PULONG Protocol) 00006 /* 00007 * FUNCTION: Returns the protocol number from a file name 00008 * ARGUMENTS: 00009 * FileName = Pointer to string with file name 00010 * Protocol = Pointer to buffer to put protocol number in 00011 * RETURNS: 00012 * Status of operation 00013 */ 00014 { 00015 UNICODE_STRING us; 00016 NTSTATUS Status; 00017 ULONG Value; 00018 PWSTR Name; 00019 00020 TI_DbgPrint(MAX_TRACE, ("Called. FileName (%wZ).\n", FileName)); 00021 00022 Name = FileName->Buffer; 00023 00024 if (*Name++ != (WCHAR)L'\\') 00025 return STATUS_UNSUCCESSFUL; 00026 00027 if (*Name == L'\0') 00028 return STATUS_UNSUCCESSFUL; 00029 00030 RtlInitUnicodeString(&us, Name); 00031 00032 Status = RtlUnicodeStringToInteger(&us, 10, &Value); 00033 if (!NT_SUCCESS(Status) || ((Value > 255))) 00034 return STATUS_UNSUCCESSFUL; 00035 00036 *Protocol = Value; 00037 00038 return STATUS_SUCCESS; 00039 } 00040 Generated on Sun May 27 2012 04:28:08 for ReactOS by
1.7.6.1
|