ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

proto.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 doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.