3 NTSTATUS
TiGetProtocolNumber(
4 PUNICODE_STRING FileName
,
7 * FUNCTION: Returns the protocol number from a file name
9 * FileName = Pointer to string with file name
10 * Protocol = Pointer to buffer to put protocol number in
20 TI_DbgPrint(MAX_TRACE
, ("Called. FileName (%wZ).\n", FileName
));
22 Name
= FileName
->Buffer
;
24 if (*Name
++ != (WCHAR
)L
'\\')
25 return STATUS_UNSUCCESSFUL
;
27 if (*Name
== (WCHAR
)NULL
)
28 return STATUS_UNSUCCESSFUL
;
30 RtlInitUnicodeString(&us
, Name
);
32 Status
= RtlUnicodeStringToInteger(&us
, 10, &Value
);
33 if (!NT_SUCCESS(Status
) || ((Value
> 255)))
34 return STATUS_UNSUCCESSFUL
;
38 return STATUS_SUCCESS
;