Help me get a pointer from a structure



I am trying to use the LsaLogonUser API. I am almost there.

'This is my structure
Public Structure MSV1_0_LM20_LOGON
Public MessageType As MSV1_0_PROTOCOL_MESSAGE_TYPE
Public LogonDomainName As String
Public UserName As String
Public Workstation As String
Public aryPassword As Char() 'Password
Public CaseSensitivePassword As String
Public CaseInsensitivePassword As String
Public ParameterControl As UInt32
End Structure

'API Call
<System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Assert,
Name:="FullTrust", Unrestricted:=True)> _
Declare Auto Function LsaLogonUser Lib "Secur32.dll" _
(ByVal LSA_Handle As IntPtr, _
ByRef OriginName As LSA_STRING, _
ByVal LogonType As SecurityLogonType, _
ByVal AuthenticationPackage As UInt32, _
ByVal AuthenticationInformation As IntPtr, _
ByVal AuthenticationInformationLength As UInt32, _
ByVal LocalGroups As IntPtr, _
ByRef SourceContext As TOKEN_SOURCE, _
ByRef ProfileBuffer As IntPtr, _
ByRef ProfileBufferLength As UInt32, _
ByRef logonid As Int64, _
ByRef Quotas As QUOTA_LIMITS, _
ByRef SubStatus As UInt16) _
As UInt16

I am passing the structure to AuthenticationInformation
I also need to be able to get the lenght as well

Thanks in advance

.



Relevant Pages

  • Re: LSALogonUser Access Denied Error
    ... Public LogonDomainName As String ... Public ParameterControl As UInt32 ... ByVal AuthenticationInformation As IntPtr, _ ... ByRef SourceContext As TOKEN_SOURCE, _ ...
    (microsoft.public.platformsdk.security)
  • LSALogonUser Access Denied Error
    ... I am tring to use LSALogonUser to authenticate my application. ... Public LogonDomainName As String ... ByVal AuthenticationInformation As IntPtr, _ ... ByRef SourceContext As TOKEN_SOURCE, _ ...
    (microsoft.public.platformsdk.security)
  • Declare parameter name start with "p" ?
    ... One reason is that the ByRef or ByVal does not show by InteliSence so the ... (ByVal pPrinterName As String, ByRef phPrinter As IntPtr, ByRef pDefault As ... (ByVal hPrinter As IntPtr, ByVal level As Integer, ByVal pPrinter As IntPtr, ...
    (microsoft.public.dotnet.languages.vb)
  • How to use NetFileEnum with .NET?
    ... Dim fi3_permission As Integer ... Dim fi3_pathname As String ... ByRef entriesread As Integer, _ ... ByVal resume_handle As IntPtr) As Integer ...
    (microsoft.public.dotnet.framework.interop)
  • RE: Oject value changing in a loop
    ... Sub zString_FindGeneral(ByRef IFindThis As String, ... ByRef IFmRow As Long, ByRef IFmCol As Integer, ByRef IToRow As Long, ByRef ... ' OFoundQty is the number of cells found containing the IFindThis string. ... 'Lines A, D, E work when searching one or multiple worksheets ...
    (microsoft.public.excel.programming)

Quantcast