VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/VBoxCredProv/VBoxCredProvUtils.cpp@ 40388

Last change on this file since 40388 was 40271, checked in by vboxsync, 13 years ago

VBoxCredProv: fixed svn properties

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1/** @file
2 * VBoxCredProvUtils - Misc. utility functions for VBoxCredProv.
3 */
4
5/*
6 * Copyright (C) 2012 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 */
16
17#include <windows.h>
18
19#include <iprt/string.h>
20
21#include <VBox/log.h>
22#include <VBox/VboxGuestLib.h>
23
24/** Verbosity flag for guest logging. */
25DWORD g_dwVerbosity = 0;
26
27/**
28 * Displays a verbose message.
29 *
30 * @param iLevel Minimum log level required to display this message.
31 * @param pszFormat The message text.
32 * @param ... Format arguments.
33 */
34void VBoxCredProvVerbose(DWORD dwLevel, const char *pszFormat, ...)
35{
36 if (dwLevel <= g_dwVerbosity)
37 {
38 va_list args;
39 va_start(args, pszFormat);
40 char *psz = NULL;
41 RTStrAPrintfV(&psz, pszFormat, args);
42 va_end(args);
43
44 AssertPtr(psz);
45 LogRel(("%s", psz));
46
47 RTStrFree(psz);
48 }
49}
50
51
52/**
53 * Reports VBoxGINA's status to the host (treated as a guest facility).
54 *
55 * @return IPRT status code.
56 * @param enmStatus Status to report to the host.
57 */
58int VBoxCredProvReportStatus(VBoxGuestFacilityStatus enmStatus)
59{
60 VBoxCredProvVerbose(0, "VBoxCredProv: reporting status %d\n", enmStatus);
61
62 int rc = VbglR3AutoLogonReportStatus(enmStatus);
63 if (RT_FAILURE(rc))
64 VBoxCredProvVerbose(0, "VBoxCredProv: failed to report status %d, rc=%Rrc\n", enmStatus, rc);
65 return rc;
66}
67
68
69
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