- LSA_OBJECT_ATTRIBUTES attrs;
- LSA_HANDLE handle = NULL;
- NTSTATUS res;
- LSA_UNICODE_STRING lucKeyName;
- LSA_UNICODE_STRING lucPrivateData;
- BOOL ok;
- OSStatus err;
-
- // If there isn't a trailing dot, add one because the mDNSResponder
- // presents names with the trailing dot.
-
- if ( m_secretName.ReverseFind( '.' ) != m_secretName.GetLength() )
- {
- m_secretName += '.';
- }
-
- // attrs are reserved, so initialize to zeroes.
-
- ZeroMemory(&attrs, sizeof( attrs ) );
-
- // Get a handle to the Policy object on the local system
-
- res = LsaOpenPolicy( NULL, &attrs, POLICY_ALL_ACCESS, &handle );
- err = translate_errno( res == 0, LsaNtStatusToWinError( res ), kUnknownErr );
- require_noerr( err, exit );