VirtualBox

Ignore:
Timestamp:
May 4, 2009 2:54:21 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
46804
Message:

VBoxService/common: Added first VM information lookup for Windows.

Location:
trunk/src/VBox/Additions/common/VBoxService
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/Makefile.kmk

    r19321 r19327  
    3232VBoxService_TEMPLATE      = VBOXGUESTR3EXE
    3333VBoxService_DEFS          = VBOXSERVICE_TIMESYNC
    34 VBoxService_DEFS.win     += _WIN32_WINNT=0x0501
     34VBoxService_DEFS.win     += _WIN32_WINNT=0x0501 _UNICODE UNICODE
    3535VBoxService_DEFS.os2      = VBOX_WITH_HGCM VBOXSERVICE_CLIPBOARD
    3636ifdef VBOX_WITH_GUEST_PROPS
     
    4242VBoxService_SOURCES.win   = \
    4343        VBoxService-win.cpp \
    44         VBoxServiceVMInfo.cpp
     44        VBoxServiceVMInfo.cpp \
     45        VBoxServiceVMInfo-win.cpp
    4546VBoxService_SOURCES.os2   = \
    4647        VBoxService-os2.def \
     
    5051        $(VBOX_LIB_VBGL_R3) \
    5152        $(VBOX_LIB_IPRT_GUEST_R3)
     53ifdef VBOX_WITH_GUEST_PROPS
     54 VBoxService_LIBS.win    += \
     55        Secur32.lib \
     56        WtsApi32.lib \
     57        Psapi.lib
     58endif
    5259
    5360include $(KBUILD_PATH)/subfooter.kmk
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h

    r19321 r19327  
    2828# include <process.h> /**@todo what's this here for?  */
    2929#endif
    30 
    31 /** @todo just move this into the windows specific code, it's not needed
    32  *        here. */
    33 /** The service name. */
    34 #define VBOXSERVICE_NAME           "VBoxService"
    35 /** The friendly service name. */
    36 #define VBOXSERVICE_FRIENDLY_NAME  "VBoxService"
    3730
    3831/**
     
    9891typedef VBOXSERVICE const *PCVBOXSERVICE;
    9992
     93#ifdef RT_OS_WINDOWS
     94/** The service name (needed for mutex creation on Windows). */
     95#define VBOXSERVICE_NAME           L"VBoxService"
     96/** The friendly service name. */
     97#define VBOXSERVICE_FRIENDLY_NAME  L"VBoxService"
     98/** The following constant may be defined by including NtStatus.h. */
     99#define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
     100/** Structure for storing the looked up user information. */
     101typedef struct
     102{
     103    TCHAR szUser [_MAX_PATH];
     104    TCHAR szAuthenticationPackage [_MAX_PATH];
     105    TCHAR szLogonDomain [_MAX_PATH];
     106} VBOXSERVICEVMINFOUSER;
     107/** Function prototypes for dynamic loading. */
     108typedef DWORD (WINAPI* fnWTSGetActiveConsoleSessionId)();
     109#endif
    100110
    101111__BEGIN_DECLS
     
    104114extern int g_cVerbosity;
    105115extern uint32_t g_DefaultInterval;
    106 /** Windows SCM stuff.
    107  *  @todo document each of them individually, this comment only documents
    108  *  g_vboxServiceStatusCode on windows. On the other platforms it will be
    109  *  dangling.
    110  *  @todo all this should be moved to -win.cpp and exposed via functions. */
    111 #ifdef RT_OS_WINDOWS
    112 extern DWORD                 g_rcWinService;
    113 extern SERVICE_STATUS_HANDLE g_hWinServiceStatus;
    114 extern SERVICE_TABLE_ENTRY const g_aServiceTable[];     /** @todo generate on the fly, see comment in main() from the enabled sub services. */
    115 #endif
    116116
    117117extern int VBoxServiceSyntax(const char *pszFormat, ...);
     
    122122extern int VBoxServiceStartServices(unsigned iMain);
    123123extern int VBoxServiceStopServices(void);
     124
    124125#ifdef RT_OS_WINDOWS
    125 extern int VBoxServiceWinInstall(void);
    126 extern int VBoxServiceWinUninstall(void);
    127 #endif
    128 
    129126extern VBOXSERVICE g_TimeSync;
    130127extern VBOXSERVICE g_Clipboard;
     
    132129extern VBOXSERVICE g_VMInfo;
    133130
     131extern DWORD                 g_rcWinService;
     132extern SERVICE_STATUS_HANDLE g_hWinServiceStatus;
     133extern SERVICE_TABLE_ENTRY const g_aServiceTable[];     /** @todo generate on the fly, see comment in main() from the enabled sub services. */
     134
     135extern int VBoxServiceWinInstall(void);
     136extern int VBoxServiceWinUninstall(void);
     137/** Detects wheter a user is logged on based on the
     138 *  enumerated processes. */
     139extern BOOL VboxServiceVMInfoWinIsLoggedIn(VBOXSERVICEVMINFOUSER* a_pUserInfo,
     140                                           PLUID a_pSession,
     141                                           PLUID a_pLuid,
     142                                           DWORD a_dwNumOfProcLUIDs);
     143/** Gets logon user IDs from enumerated processes. */
     144extern DWORD VboxServiceVMInfoWinGetLUIDsFromProcesses(PLUID *ppLuid);
     145#endif
     146
    134147__END_DECLS
    135148
Note: See TracChangeset for help on using the changeset viewer.

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