Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

175
Views
Sample/example for LsaCallAuthenticationPackage Windows API to get information about MSV1_0 in C#

what kind of struct need to use to get MSV1_0 challenge by calling LsaCallAuthenticationPackage API in C#. my sample code is below.

UInt32 msvAuthPackageId;
using(OSCalls.LsaStringWrapper msvPackageName = new OSCalls.LsaStringWrapper("MICROSOFT_AUTHENTICATION_PACKAGE_V1_0")) {
  status = OSCalls.LsaLookupAuthenticationPackage(lsaHandle, ref msvPackageName._string, out msvAuthPackageId);
  Console.WriteLine("NtlmLogon status check again after LsaLookupAuthenticationPackage {0} ", status);
  if (status != OSCalls.WinStatusCodes.STATUS_SUCCESS) throw new System.ComponentModel.Win32Exception((int) OSCalls.LsaNtStatusToWinError(status));
}

Status is a success but protocolReturnBuf value is empty (always getting zero value and returnBufLen is showing 12)

where authPackage, I am using the below struct to build the pointer and using MSV1_0_PROTOCOL_MESSAGE_TYPE.MsV1_0Lm20ChallengeRequest to get the challenge

public struct MSV1_0_LM20_LOGON //
{

    public MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;   
    public LSA_UNICODE_STRING LogonDomainName;
    public LSA_UNICODE_STRING UserName;
    public LSA_UNICODE_STRING Workstation;
   
}
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!