VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.h@ 48070

Last change on this file since 48070 was 48070, checked in by vboxsync, 11 years ago

wddm,vboxtray: forward-port autoresize, multimon, and seamless fixes from 4.2 r87071, r87353, r87356, r87528, r87568, r87581, r87584, r87608, r87673, r87678, r87708, r87629, r87529; additional fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.3 KB
Line 
1/* $Id: VBoxTray.h 48070 2013-08-26 18:13:22Z vboxsync $ */
2/** @file
3 * VBoxTray - Guest Additions Tray, Internal Header.
4 */
5
6/*
7 * Copyright (C) 2006-2012 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef ___VBOXTRAY_H
19#define ___VBOXTRAY_H
20
21# define _InterlockedExchange _InterlockedExchange_StupidDDKVsCompilerCrap
22# define _InterlockedExchangeAdd _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
23# define _InterlockedCompareExchange _InterlockedCompareExchange_StupidDDKVsCompilerCrap
24# define _InterlockedAddLargeStatistic _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
25# define _interlockedbittestandset _interlockedbittestandset_StupidDDKVsCompilerCrap
26# define _interlockedbittestandreset _interlockedbittestandreset_StupidDDKVsCompilerCrap
27# define _interlockedbittestandset64 _interlockedbittestandset64_StupidDDKVsCompilerCrap
28# define _interlockedbittestandreset64 _interlockedbittestandreset64_StupidDDKVsCompilerCrap
29# pragma warning(disable : 4163)
30#include <windows.h>
31# pragma warning(default : 4163)
32# undef _InterlockedExchange
33# undef _InterlockedExchangeAdd
34# undef _InterlockedCompareExchange
35# undef _InterlockedAddLargeStatistic
36# undef _interlockedbittestandset
37# undef _interlockedbittestandreset
38# undef _interlockedbittestandset64
39# undef _interlockedbittestandreset64
40
41#include <tchar.h>
42#include <stdio.h>
43#include <stdarg.h>
44#include <process.h>
45
46#include <iprt/initterm.h>
47#include <iprt/string.h>
48
49#include <VBox/version.h>
50#include <VBox/Log.h>
51#include <VBox/VBoxGuest.h> /** @todo use the VbglR3 interface! */
52#include <VBox/VBoxGuestLib.h>
53#include <VBoxDisplay.h>
54
55#include "VBoxDispIf.h"
56
57#ifdef DEBUG_misha
58#define WARN(_m) do { \
59 Assert(0); \
60 Log(_m); \
61 } while (0)
62#else
63#define WARN(_m) do { \
64 Log(_m); \
65 } while (0)
66#endif
67
68/*
69 * Windows messsages.
70 */
71
72/**
73 * General VBoxTray messages.
74 */
75#define WM_VBOXTRAY_TRAY_ICON WM_APP + 40
76/**
77 * VM/VMMDev related messsages.
78 */
79#define WM_VBOXTRAY_VM_RESTORED WM_APP + 100
80/**
81 * VRDP messages.
82 */
83#define WM_VBOXTRAY_VRDP_CHECK WM_APP + 301
84
85
86/* The tray icon's ID. */
87#define ID_TRAYICON 2000
88
89
90/*
91 * Timer IDs.
92 */
93#define TIMERID_VBOXTRAY_CHECK_HOSTVERSION 1000
94#define TIMERID_VBOXTRAY_CAPS_TIMER 1001
95#define TIMERID_VBOXTRAY_DT_TIMER 1002
96#define TIMERID_VBOXTRAY_ST_DELAYED_INIT_TIMER 1003
97
98/* The environment information for services. */
99typedef struct _VBOXSERVICEENV
100{
101 HINSTANCE hInstance;
102 HANDLE hDriver;
103 HANDLE hStopEvent;
104 /* display driver interface, XPDM - WDDM abstraction see VBOXDISPIF** definitions above */
105 VBOXDISPIF dispIf;
106} VBOXSERVICEENV;
107
108/* The service initialization info and runtime variables. */
109typedef struct _VBOXSERVICEINFO
110{
111 char *pszName;
112 int (* pfnInit) (const VBOXSERVICEENV *pEnv, void **ppInstance, bool *pfStartThread);
113 unsigned (__stdcall * pfnThread) (void *pInstance);
114 void (* pfnStop) (const VBOXSERVICEENV *pEnv, void *pInstance);
115 void (* pfnDestroy) (const VBOXSERVICEENV *pEnv, void *pInstance);
116
117 /* Variables. */
118 HANDLE hThread;
119 void *pInstance;
120 bool fStarted;
121} VBOXSERVICEINFO;
122
123/* Globally unique (system wide) message registration. */
124typedef struct _VBOXGLOBALMESSAGE
125{
126 /** Message name. */
127 char *pszName;
128 /** Function pointer for handling the message. */
129 int (* pfnHandler) (WPARAM wParam, LPARAM lParam);
130
131 /* Variables. */
132
133 /** Message ID;
134 * to be filled in when registering the actual message. */
135 UINT uMsgID;
136} VBOXGLOBALMESSAGE, *PVBOXGLOBALMESSAGE;
137
138extern HWND ghwndToolWindow;
139extern HINSTANCE ghInstance;
140
141#endif /* !___VBOXTRAY_H */
142
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