/// <summary> /// Get the authentication ticket by sending an I/O control request /// </summary> /// <returns>(string) AuthTicket</returns> private string GetAuthTicket() { string strAuthTicket = ""; // Check if the handle is valid, if not then shortcut return if (m_handle == INVALID_HANDLE_VALUE) { return(strAuthTicket); } // Send a special I/O control to the Alfresco share to get the Authentication Ticket ioctlAuthTicket authTicketStruct = new ioctlAuthTicket(); try { // Copy output structure to generic object object objOutput = authTicketStruct; // Send the query to the Alfresco CIFS server uint len = SendIOControl(FSConstants.FSCTL_ALFRESCO_GETAUTHTICKET, ref objOutput, (uint)Marshal.SizeOf(authTicketStruct)); // Retrieve the output authTicketStruct = (ioctlAuthTicket)objOutput; strAuthTicket = authTicketStruct.authTicket; } catch (Exception e) { System.Diagnostics.Debug.Print(e.Message); } return(strAuthTicket); }
/// <summary> /// Get the authentication ticket by sending an I/O control request /// </summary> /// <returns>(string) AuthTicket</returns> private string GetAuthTicket() { string strAuthTicket = ""; // Check if the handle is valid, if not then shortcut return if (m_handle == INVALID_HANDLE_VALUE) { return strAuthTicket; } // Send a special I/O control to the Alfresco share to get the Authentication Ticket ioctlAuthTicket authTicketStruct = new ioctlAuthTicket(); try { // Copy output structure to generic object object objOutput = authTicketStruct; // Send the query to the Alfresco CIFS server uint len = SendIOControl(FSConstants.FSCTL_ALFRESCO_GETAUTHTICKET, ref objOutput, (uint)Marshal.SizeOf(authTicketStruct)); // Retrieve the output authTicketStruct = (ioctlAuthTicket)objOutput; strAuthTicket = authTicketStruct.authTicket; } catch (Exception e) { System.Diagnostics.Debug.Print(e.Message); } return strAuthTicket; }