VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/VBoxService/VBoxVMInfoOS.cpp@ 12250

最後變更 在這個檔案從12250是 11982,由 vboxsync 提交於 16 年 前

All: license header changes for 2.0 (OSE headers, add Sun GPL/LGPL disclaimer)

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 1.2 KB
 
1/* $Id: VBoxVMInfoOS.cpp 11982 2008-09-02 13:09:44Z vboxsync $ */
2/** @file
3 * VBoxVMInfoOS - Guest OS information for the host.
4 */
5
6/*
7 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
8 *
9 * Sun Microsystems, Inc. confidential
10 * All rights reserved
11 */
12
13#include "VBoxService.h"
14#include "VBoxVMInfo.h"
15#include "VBoxVMInfoOS.h"
16
17#include <iprt/system.h>
18
19int getPlatformInfo(VBOXINFORMATIONCONTEXT* a_pCtx)
20{
21 if (FALSE == a_pCtx->fFirstRun) /* Only do this at the initial run. */
22 return 0;
23
24 char szInfo[256] = {0};
25 int rc = 0;
26
27 rc = RTSystemQueryOSInfo(RTSYSOSINFO_PRODUCT, szInfo, sizeof(szInfo));
28 vboxVMInfoWriteProp(a_pCtx, "GuestInfo/OS/Product", szInfo);
29
30 rc = RTSystemQueryOSInfo(RTSYSOSINFO_RELEASE, szInfo, sizeof(szInfo));
31 vboxVMInfoWriteProp(a_pCtx, "GuestInfo/OS/Release", szInfo);
32
33 rc = RTSystemQueryOSInfo(RTSYSOSINFO_VERSION, szInfo, sizeof(szInfo));
34 vboxVMInfoWriteProp(a_pCtx, "GuestInfo/OS/Version", szInfo);
35
36 rc = RTSystemQueryOSInfo(RTSYSOSINFO_SERVICE_PACK, szInfo, sizeof(szInfo));
37 vboxVMInfoWriteProp(a_pCtx, "GuestInfo/OS/ServicePack", szInfo);
38
39 return 0;
40}
41
42int vboxVMInfoOS(VBOXINFORMATIONCONTEXT* a_pCtx)
43{
44 getPlatformInfo(a_pCtx);
45
46 return 0;
47}
48
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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