+ /* Check if the call comes from user mode */
+ if (PreviousMode != KernelMode)
+ {
+ _SEH2_TRY
+ {
+ /* Probe the PortHandle */
+ ProbeForWriteHandle(PortHandle);
+
+ /* Probe the ObjectAttributes */
+ ProbeForRead(ObjectAttributes, sizeof(OBJECT_ATTRIBUTES), sizeof(ULONG));
+
+ /* Get the object name and probe the unicode string */
+ ObjectName = ObjectAttributes->ObjectName;
+ ProbeForRead(ObjectName, sizeof(UNICODE_STRING), 1);
+
+ /* Check if we have no name */
+ NoName = (ObjectName->Buffer == NULL) || (ObjectName->Length == 0);
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ /* Return the exception code */
+ _SEH2_YIELD(return _SEH2_GetExceptionCode());
+ }
+ _SEH2_END;
+ }
+ else
+ {
+ /* Check if we have no name */
+ NoName = (ObjectAttributes->ObjectName->Buffer == NULL) ||
+ (ObjectAttributes->ObjectName->Length == 0);
+ }
+