VirtualBox

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

Last change on this file since 38093 was 36453, checked in by vboxsync, 14 years ago

VBoxCredProv: Implemented support for handling/ignoring remote (desktop) sessions.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 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-2011 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
26bool isRemoteSession(void);
27
28//makes a copy of a field descriptor using CoTaskMemAlloc
29HRESULT FieldDescriptorCoAllocCopy(const CREDENTIAL_PROVIDER_FIELD_DESCRIPTOR& rcpfd,
30 CREDENTIAL_PROVIDER_FIELD_DESCRIPTOR** ppcpfd);
31
32//makes a copy of a field descriptor on the normal heap
33HRESULT FieldDescriptorCopy(const CREDENTIAL_PROVIDER_FIELD_DESCRIPTOR& rcpfd,
34 CREDENTIAL_PROVIDER_FIELD_DESCRIPTOR* pcpfd);
35
36//creates a UNICODE_STRING from a normal string
37HRESULT UnicodeStringInitWithString(PWSTR pwz,
38 UNICODE_STRING* pus);
39
40//packages the credentials into the buffer that the system expects
41HRESULT KerbInteractiveUnlockLogonPack(const KERB_INTERACTIVE_UNLOCK_LOGON& rkiulIn,
42 BYTE** prgb, DWORD* pcb);
43
44//unpacks the "packed" version of the creds in-place into the "unpacked" version
45void KerbInteractiveUnlockLogonUnpackInPlace(KERB_INTERACTIVE_UNLOCK_LOGON* pkiul);
46
47//get the authentication package that will be used for our logon attempt
48HRESULT RetrieveNegotiateAuthPackage(ULONG * pulAuthPackage);
49
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