VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/VBoxCredProv/helpers.h@ 33983

Last change on this file since 33983 was 33540, checked in by vboxsync, 14 years ago

*: spelling fixes, thanks Timeless!

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1//
2// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
3// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
4// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
5// PARTICULAR PURPOSE.
6//
7// Copyright (c) 2006 Microsoft Corporation. All rights reserved.
8//
9// Helper functions for copying parameters and packaging the buffer
10// for GetSerialization.
11//
12// Modifications (c) 2009-2010 Oracle Corporation
13//
14
15#pragma once
16#include "common.h"
17#include <windows.h>
18#include <strsafe.h>
19
20#pragma warning(push)
21#pragma warning(disable : 4995)
22#include <shlwapi.h>
23#pragma warning(pop)
24
25
26
27//makes a copy of a field descriptor using CoTaskMemAlloc
28HRESULT FieldDescriptorCoAllocCopy(
29 const CREDENTIAL_PROVIDER_FIELD_DESCRIPTOR& rcpfd,
30 CREDENTIAL_PROVIDER_FIELD_DESCRIPTOR** ppcpfd
31 );
32
33//makes a copy of a field descriptor on the normal heap
34HRESULT FieldDescriptorCopy(
35 const CREDENTIAL_PROVIDER_FIELD_DESCRIPTOR& rcpfd,
36 CREDENTIAL_PROVIDER_FIELD_DESCRIPTOR* pcpfd
37 );
38
39//creates a UNICODE_STRING from a normal string
40HRESULT UnicodeStringInitWithString(
41 PWSTR pwz,
42 UNICODE_STRING* pus
43 );
44
45//packages the credentials into the buffer that the system expects
46HRESULT KerbInteractiveLogonPack(
47 const KERB_INTERACTIVE_LOGON& rkil,
48 BYTE** prgb,
49 DWORD* pcb
50 );
51
52//unpacks the "packed" version of the creds in-place into the "unpacked" version
53void KerbInteractiveLogonUnpackInPlace(
54 KERB_INTERACTIVE_UNLOCK_LOGON* pkiul
55 );
56
57
58//get the authentication package that will be used for our logon attempt
59HRESULT RetrieveNegotiateAuthPackage(
60 ULONG * pulAuthPackage
61 );
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette