Index: unk/include/VBox/VRDPOrders.h
===================================================================
--- /trunk/include/VBox/VRDPOrders.h	(revision 33003)
+++ 	(revision )
@@ -1,297 +1,0 @@
-/** @file
- * VBox Remote Desktop Protocol - Orders Structures. (VRDP)
- */
-
-/*
- * Copyright (C) 2006-2008 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- *
- * The contents of this file may alternatively be used under the terms
- * of the Common Development and Distribution License Version 1.0
- * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
- * VirtualBox OSE distribution, in which case the provisions of the
- * CDDL are applicable instead of those of the GPL.
- *
- * You may elect to license modified versions of this file under the
- * terms and conditions of either the GPL or the CDDL or both.
- */
-
-#ifndef ___VBox_vrdporders_h
-#define ___VBox_vrdporders_h
-
-#include <iprt/types.h>
-
-/*
- * The VRDP server gets an information about a graphical update as a pointer
- * to a memory block and the size of the memory block.
- * The memory block layout is:
- *    VRDPORDERHDR - Describes the affected rectangle.
- *    Then VRDP orders follow:
- *        VRDPORDERCODE
- *        A VRDPORDER* structure.
- *
- * If size of the memory block is equal to the VRDPORDERHDR, then a bitmap
- * update is assumed.
- */
-
-/* 128 bit bitmap hash. */
-typedef uint8_t VRDPBITMAPHASH[16];
-
-#pragma pack(1)
-typedef struct _VRDPORDERHDR
-{
-   /** Coordinates of the affected rectangle. */
-   int16_t x;
-   int16_t y;
-   uint16_t w;
-   uint16_t h;
-} VRDPORDERHDR;
-
-typedef struct _VRDPORDERCODE
-{
-   uint32_t u32Code;
-} VRDPORDERCODE;
-
-/* VRDP order codes. Must be >= 0, because the VRDP server internally
- * uses negative values to mark some operations.
- */
-#define VRDP_ORDER_DIRTY_RECT     (0)
-#define VRDP_ORDER_SOLIDRECT      (1)
-#define VRDP_ORDER_SOLIDBLT       (2)
-#define VRDP_ORDER_DSTBLT         (3)
-#define VRDP_ORDER_SCREENBLT      (4)
-#define VRDP_ORDER_PATBLTBRUSH    (5)
-#define VRDP_ORDER_MEMBLT         (6)
-#define VRDP_ORDER_CACHED_BITMAP  (7)
-#define VRDP_ORDER_DELETED_BITMAP (8)
-#define VRDP_ORDER_LINE           (9)
-#define VRDP_ORDER_BOUNDS         (10)
-#define VRDP_ORDER_REPEAT         (11)
-#define VRDP_ORDER_POLYLINE       (12)
-#define VRDP_ORDER_ELLIPSE        (13)
-#define VRDP_ORDER_SAVESCREEN     (14)
-#define VRDP_ORDER_TEXT           (15)
-
-typedef struct _VRDPORDERPOINT
-{
-    int16_t  x;
-    int16_t  y;
-} VRDPORDERPOINT;
-
-typedef struct _VRDPORDERPOLYPOINTS
-{
-    uint8_t  c;
-    VRDPORDERPOINT a[16];
-} VRDPORDERPOLYPOINTS;
-
-typedef struct _VRDPORDERAREA
-{
-    int16_t  x;
-    int16_t  y;
-    uint16_t w;
-    uint16_t h;
-} VRDPORDERAREA;
-
-typedef struct _VRDPORDERRECT
-{
-    int16_t left;
-    int16_t top;
-    int16_t right;
-    int16_t bottom;
-} VRDPORDERRECT;
-
-
-typedef struct _VRDPORDERBOUNDS
-{
-    VRDPORDERPOINT pt1;
-    VRDPORDERPOINT pt2;
-} VRDPORDERBOUNDS;
-
-typedef struct _VRDPORDERREPEAT
-{
-    VRDPORDERBOUNDS bounds;
-} VRDPORDERREPEAT;
-
-
-/* Header for bitmap bits in VBVA VRDP operations. */
-typedef struct _VRDPDATABITS
-{
-    /* Size of bitmap data without the header. */
-    uint32_t cb;
-    int16_t  x;
-    int16_t  y;
-    uint16_t cWidth;
-    uint16_t cHeight;
-    uint8_t cbPixel;
-} VRDPDATABITS;
-
-typedef struct _VRDPORDERSOLIDRECT
-{
-    int16_t  x;
-    int16_t  y;
-    uint16_t w;
-    uint16_t h;
-    uint32_t rgb;
-} VRDPORDERSOLIDRECT;
-
-typedef struct _VRDPORDERSOLIDBLT
-{
-    int16_t  x;
-    int16_t  y;
-    uint16_t w;
-    uint16_t h;
-    uint32_t rgb;
-    uint8_t  rop;
-} VRDPORDERSOLIDBLT;
-
-typedef struct _VRDPORDERDSTBLT
-{
-    int16_t  x;
-    int16_t  y;
-    uint16_t w;
-    uint16_t h;
-    uint8_t  rop;
-} VRDPORDERDSTBLT;
-
-typedef struct _VRDPORDERSCREENBLT
-{
-    int16_t  x;
-    int16_t  y;
-    uint16_t w;
-    uint16_t h;
-    int16_t  xSrc;
-    int16_t  ySrc;
-    uint8_t  rop;
-} VRDPORDERSCREENBLT;
-
-typedef struct _VRDPORDERPATBLTBRUSH
-{
-    int16_t  x;
-    int16_t  y;
-    uint16_t w;
-    uint16_t h;
-    int8_t   xSrc;
-    int8_t   ySrc;
-    uint32_t rgbFG;
-    uint32_t rgbBG;
-    uint8_t  rop;
-    uint8_t  pattern[8];
-} VRDPORDERPATBLTBRUSH;
-
-typedef struct _VRDPORDERMEMBLT
-{
-    int16_t  x;
-    int16_t  y;
-    uint16_t w;
-    uint16_t h;
-    int16_t  xSrc;
-    int16_t  ySrc;
-    uint8_t  rop;
-    VRDPBITMAPHASH hash;
-} VRDPORDERMEMBLT;
-
-typedef struct _VRDPORDERCACHEDBITMAP
-{
-    VRDPBITMAPHASH hash;
-    /* VRDPDATABITS and the bitmap data follows. */
-} VRDPORDERCACHEDBITMAP;
-
-typedef struct _VRDPORDERDELETEDBITMAP
-{
-    VRDPBITMAPHASH hash;
-} VRDPORDERDELETEDBITMAP;
-
-typedef struct _VRDPORDERLINE
-{
-    int16_t  x1;
-    int16_t  y1;
-    int16_t  x2;
-    int16_t  y2;
-    int16_t  xBounds1;
-    int16_t  yBounds1;
-    int16_t  xBounds2;
-    int16_t  yBounds2;
-    uint8_t  mix;
-    uint32_t rgb;
-} VRDPORDERLINE;
-
-typedef struct _VRDPORDERPOLYLINE
-{
-    VRDPORDERPOINT ptStart;
-    uint8_t  mix;
-    uint32_t rgb;
-    VRDPORDERPOLYPOINTS points;
-} VRDPORDERPOLYLINE;
-
-typedef struct _VRDPORDERELLIPSE
-{
-    VRDPORDERPOINT pt1;
-    VRDPORDERPOINT pt2;
-    uint8_t  mix;
-    uint8_t  fillMode;
-    uint32_t rgb;
-} VRDPORDERELLIPSE;
-
-typedef struct _VRDPORDERSAVESCREEN
-{
-    VRDPORDERPOINT pt1;
-    VRDPORDERPOINT pt2;
-    uint8_t ident;
-    uint8_t restore;
-} VRDPORDERSAVESCREEN;
-
-typedef struct _VRDPORDERGLYPH
-{
-    uint32_t o32NextGlyph;
-    uint64_t u64Handle;
-
-    /* The glyph origin position on the screen. */
-    int16_t  x;
-    int16_t  y;
-
-    /* The glyph bitmap dimensions. Note w == h == 0 for the space character. */
-    uint16_t w;
-    uint16_t h;
-
-    /* The character origin in the bitmap. */
-    int16_t  xOrigin;
-    int16_t  yOrigin;
-
-    /* 1BPP bitmap. Rows are byte aligned. Size is (((w + 7)/8) * h + 3) & ~3. */
-    uint8_t au8Bitmap[1];
-} VRDPORDERGLYPH;
-
-typedef struct _VRDPORDERTEXT
-{
-    uint32_t cbOrder;
-
-    int16_t  xBkGround;
-    int16_t  yBkGround;
-    uint16_t wBkGround;
-    uint16_t hBkGround;
-
-    int16_t  xOpaque;
-    int16_t  yOpaque;
-    uint16_t wOpaque;
-    uint16_t hOpaque;
-
-    uint16_t u16MaxGlyph;
-
-    uint8_t  u8Glyphs;
-    uint8_t  u8Flags;
-    uint16_t u8CharInc;
-    uint32_t u32FgRGB;
-    uint32_t u32BgRGB;
-
-    /* u8Glyphs glyphs follow. Size of each glyph structure may vary. */
-} VRDPORDERTEXT;
-#pragma pack()
-
-#endif
Index: unk/include/VBox/vrdpapi.h
===================================================================
--- /trunk/include/VBox/vrdpapi.h	(revision 33003)
+++ 	(revision )
@@ -1,1229 +1,0 @@
-/** @file
- * VBox Remote Desktop Protocol - Public APIs. (VRDP)
- */
-
-/*
- * Copyright (C) 2006-2007 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- *
- * The contents of this file may alternatively be used under the terms
- * of the Common Development and Distribution License Version 1.0
- * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
- * VirtualBox OSE distribution, in which case the provisions of the
- * CDDL are applicable instead of those of the GPL.
- *
- * You may elect to license modified versions of this file under the
- * terms and conditions of either the GPL or the CDDL or both.
- */
-
-#ifndef ___VBox_vrdpapi_h
-#define ___VBox_vrdpapi_h
-
-#include <iprt/cdefs.h>
-#include <iprt/types.h>
-
-#ifdef IN_RING0
-# error "There are no VRDP APIs available in Ring-0 Host Context!"
-#endif
-#ifdef IN_RC
-# error "There are no VRDP APIs available Guest Context!"
-#endif
-
-
-/** @defgroup grp_vrdp VRDP
- * VirtualBox Remote Desktop Protocol (VRDP) interface that lets to use
- * the VRDP server.
- * @{
- */
-
-/** Default port that VRDP binds to. */
-#define VRDP_DEFAULT_PORT (3389)
-
-RT_C_DECLS_BEGIN
-
-/* Forward declaration of the VRDP server instance handle. */
-#ifdef __cplusplus
-class VRDPServer;
-typedef class VRDPServer *HVRDPSERVER;
-#else
-struct VRDPServer;
-typedef struct VRDPServer *HVRDPSERVER;
-#endif /* __cplusplus */
-
-/* Callback based VRDP server interface declarations. */
-
-#if defined(IN_VRDP)
-# define VRDPDECL(type)       DECLEXPORT(type) RTCALL
-#else
-# define VRDPDECL(type)       DECLIMPORT(type) RTCALL
-#endif /* IN_VRDP */
-
-/** The color mouse pointer information. */
-typedef struct _VRDPCOLORPOINTER
-{
-    uint16_t u16HotX;
-    uint16_t u16HotY;
-    uint16_t u16Width;
-    uint16_t u16Height;
-    uint16_t u16MaskLen;
-    uint16_t u16DataLen;
-    /* The mask and the bitmap follow. */
-} VRDPCOLORPOINTER;
-
-/** Audio format information packed in a 32 bit value. */
-typedef uint32_t VRDPAUDIOFORMAT;
-
-/** Constructs 32 bit value for given frequency, number of channel and bits per sample. */
-#define VRDP_AUDIO_FMT_MAKE(freq, c, bps, s) ((((s) & 0x1) << 28) + (((bps) & 0xFF) << 20) + (((c) & 0xF) << 16) + ((freq) & 0xFFFF))
-
-/** Decode frequency. */
-#define VRDP_AUDIO_FMT_SAMPLE_FREQ(a) ((a) & 0xFFFF)
-/** Decode number of channels. */
-#define VRDP_AUDIO_FMT_CHANNELS(a) (((a) >> 16) & 0xF)
-/** Decode number signess. */
-#define VRDP_AUDIO_FMT_SIGNED(a) (((a) >> 28) & 0x1)
-/** Decode number of bits per sample. */
-#define VRDP_AUDIO_FMT_BITS_PER_SAMPLE(a) (((a) >> 20) & 0xFF)
-/** Decode number of bytes per sample. */
-#define VRDP_AUDIO_FMT_BYTES_PER_SAMPLE(a) ((VRDP_AUDIO_FMT_BITS_PER_SAMPLE(a) + 7) / 8)
-
-/*
- * Remote USB protocol.
- */
-
-/* The initial version 1. */
-#define VRDP_USB_VERSION_1 (1)
-/* Version 2: look for VRDP_USB_VERSION_2 comments in the code. */
-#define VRDP_USB_VERSION_2 (2)
-/* Version 3: look for VRDP_USB_VERSION_3 comments in the code. */
-#define VRDP_USB_VERSION_3 (3)
-
-/* The default VRDP server version of Remote USB Protocol. */
-#define VRDP_USB_VERSION VRDP_USB_VERSION_3
-
-
-/** USB backend operations. */
-#define VRDP_USB_REQ_OPEN              (0)
-#define VRDP_USB_REQ_CLOSE             (1)
-#define VRDP_USB_REQ_RESET             (2)
-#define VRDP_USB_REQ_SET_CONFIG        (3)
-#define VRDP_USB_REQ_CLAIM_INTERFACE   (4)
-#define VRDP_USB_REQ_RELEASE_INTERFACE (5)
-#define VRDP_USB_REQ_INTERFACE_SETTING (6)
-#define VRDP_USB_REQ_QUEUE_URB         (7)
-#define VRDP_USB_REQ_REAP_URB          (8)
-#define VRDP_USB_REQ_CLEAR_HALTED_EP   (9)
-#define VRDP_USB_REQ_CANCEL_URB        (10)
-
-/** USB service operations. */
-#define VRDP_USB_REQ_DEVICE_LIST       (11)
-#define VRDP_USB_REQ_NEGOTIATE         (12)
-
-/** An operation completion status is a byte. */
-typedef uint8_t VRDPUSBSTATUS;
-
-/** USB device identifier is an 32 bit value. */
-typedef uint32_t VRDPUSBDEVID;
-
-/** Status codes. */
-#define VRDP_USB_STATUS_SUCCESS        ((VRDPUSBSTATUS)0)
-#define VRDP_USB_STATUS_ACCESS_DENIED  ((VRDPUSBSTATUS)1)
-#define VRDP_USB_STATUS_DEVICE_REMOVED ((VRDPUSBSTATUS)2)
-
-/*
- * Data structures to use with VRDPUSBRequest.
- * The *RET* structures always represent the layout of VRDP data.
- * The *PARM* structures normally the same as VRDP layout.
- * However the VRDP_USB_REQ_QUEUE_URB_PARM has a pointer to
- * URB data in place where actual data will be in VRDP layout.
- *
- * Since replies (*RET*) are asynchronous, the 'success'
- * replies are not required for operations which return
- * only the status code (VRDPUSBREQRETHDR only):
- *  VRDP_USB_REQ_OPEN
- *  VRDP_USB_REQ_RESET
- *  VRDP_USB_REQ_SET_CONFIG
- *  VRDP_USB_REQ_CLAIM_INTERFACE
- *  VRDP_USB_REQ_RELEASE_INTERFACE
- *  VRDP_USB_REQ_INTERFACE_SETTING
- *  VRDP_USB_REQ_CLEAR_HALTED_EP
- *
- */
-
-/* VRDP layout has no aligments. */
-#pragma pack(1)
-/* Common header for all VRDP USB packets. After the reply hdr follows *PARM* or *RET* data. */
-typedef struct _VRDPUSBPKTHDR
-{
-    /* Total length of the reply NOT including the 'length' field. */
-    uint32_t length;
-    /* The operation code for which the reply was sent by the client. */
-    uint8_t code;
-} VRDPUSBPKTHDR;
-
-/* Common header for all return structures. */
-typedef struct _VRDPUSBREQRETHDR
-{
-    /* Device status. */
-    VRDPUSBSTATUS status;
-    /* Device id. */
-    VRDPUSBDEVID id;
-} VRDPUSBREQRETHDR;
-
-
-/* VRDP_USB_REQ_OPEN
- */
-typedef struct _VRDP_USB_REQ_OPEN_PARM
-{
-    uint8_t code;
-    VRDPUSBDEVID id;
-} VRDP_USB_REQ_OPEN_PARM;
-
-typedef struct _VRDP_USB_REQ_OPEN_RET
-{
-    VRDPUSBREQRETHDR hdr;
-} VRDP_USB_REQ_OPEN_RET;
-
-
-/* VRDP_USB_REQ_CLOSE
- */
-typedef struct _VRDP_USB_REQ_CLOSE_PARM
-{
-    uint8_t code;
-    VRDPUSBDEVID id;
-} VRDP_USB_REQ_CLOSE_PARM;
-
-/* The close request has no returned data. */
-
-
-/* VRDP_USB_REQ_RESET
- */
-typedef struct _VRDP_USB_REQ_RESET_PARM
-{
-    uint8_t code;
-    VRDPUSBDEVID id;
-} VRDP_USB_REQ_RESET_PARM;
-
-typedef struct _VRDP_USB_REQ_RESET_RET
-{
-    VRDPUSBREQRETHDR hdr;
-} VRDP_USB_REQ_RESET_RET;
-
-
-/* VRDP_USB_REQ_SET_CONFIG
- */
-typedef struct _VRDP_USB_REQ_SET_CONFIG_PARM
-{
-    uint8_t code;
-    VRDPUSBDEVID id;
-    uint8_t configuration;
-} VRDP_USB_REQ_SET_CONFIG_PARM;
-
-typedef struct _VRDP_USB_REQ_SET_CONFIG_RET
-{
-    VRDPUSBREQRETHDR hdr;
-} VRDP_USB_REQ_SET_CONFIG_RET;
-
-
-/* VRDP_USB_REQ_CLAIM_INTERFACE
- */
-typedef struct _VRDP_USB_REQ_CLAIM_INTERFACE_PARM
-{
-    uint8_t code;
-    VRDPUSBDEVID id;
-    uint8_t iface;
-} VRDP_USB_REQ_CLAIM_INTERFACE_PARM;
-
-typedef struct _VRDP_USB_REQ_CLAIM_INTERFACE_RET
-{
-    VRDPUSBREQRETHDR hdr;
-} VRDP_USB_REQ_CLAIM_INTERFACE_RET;
-
-
-/* VRDP_USB_REQ_RELEASE_INTERFACE
- */
-typedef struct _VRDP_USB_REQ_RELEASE_INTERFACE_PARM
-{
-    uint8_t code;
-    VRDPUSBDEVID id;
-    uint8_t iface;
-} VRDP_USB_REQ_RELEASE_INTERFACE_PARM;
-
-typedef struct _VRDP_USB_REQ_RELEASE_INTERFACE_RET
-{
-    VRDPUSBREQRETHDR hdr;
-} VRDP_USB_REQ_RELEASE_INTERFACE_RET;
-
-
-/* VRDP_USB_REQ_INTERFACE_SETTING
- */
-typedef struct _VRDP_USB_REQ_INTERFACE_SETTING_PARM
-{
-    uint8_t code;
-    VRDPUSBDEVID id;
-    uint8_t iface;
-    uint8_t setting;
-} VRDP_USB_REQ_INTERFACE_SETTING_PARM;
-
-typedef struct _VRDP_USB_REQ_INTERFACE_SETTING_RET
-{
-    VRDPUSBREQRETHDR hdr;
-} VRDP_USB_REQ_INTERFACE_SETTING_RET;
-
-
-/* VRDP_USB_REQ_QUEUE_URB
- */
-
-#define VRDP_USB_TRANSFER_TYPE_CTRL (0)
-#define VRDP_USB_TRANSFER_TYPE_ISOC (1)
-#define VRDP_USB_TRANSFER_TYPE_BULK (2)
-#define VRDP_USB_TRANSFER_TYPE_INTR (3)
-#define VRDP_USB_TRANSFER_TYPE_MSG  (4)
-
-#define VRDP_USB_DIRECTION_SETUP (0)
-#define VRDP_USB_DIRECTION_IN    (1)
-#define VRDP_USB_DIRECTION_OUT   (2)
-
-typedef struct _VRDP_USB_REQ_QUEUE_URB_PARM
-{
-    uint8_t code;
-    VRDPUSBDEVID id;
-    uint32_t handle;    /* Distinguishes that particular URB. Later used in CancelURB and returned by ReapURB */
-    uint8_t type;
-    uint8_t ep;
-    uint8_t direction;
-    uint32_t urblen;    /* Length of the URB. */
-    uint32_t datalen;   /* Length of the data. */
-    void *data;         /* In RDP layout the data follow. */
-} VRDP_USB_REQ_QUEUE_URB_PARM;
-
-/* The queue URB has no explicit return. The reap URB reply will be
- * eventually the indirect result.
- */
-
-
-/* VRDP_USB_REQ_REAP_URB
- * Notificationg from server to client that server expects an URB
- * from any device.
- * Only sent if negotiated URB return method is polling.
- * Normally, the client will send URBs back as soon as they are ready.
- */
-typedef struct _VRDP_USB_REQ_REAP_URB_PARM
-{
-    uint8_t code;
-} VRDP_USB_REQ_REAP_URB_PARM;
-
-
-#define VRDP_USB_XFER_OK    (0)
-#define VRDP_USB_XFER_STALL (1)
-#define VRDP_USB_XFER_DNR   (2)
-#define VRDP_USB_XFER_CRC   (3)
-/* VRDP_USB_VERSION_2: New error codes. */
-#define VRDP_USB_XFER_BS    (4)
-#define VRDP_USB_XFER_DTM   (5)
-#define VRDP_USB_XFER_PCF   (6)
-#define VRDP_USB_XFER_UPID  (7)
-#define VRDP_USB_XFER_DO    (8)
-#define VRDP_USB_XFER_DU    (9)
-#define VRDP_USB_XFER_BO    (10)
-#define VRDP_USB_XFER_BU    (11)
-#define VRDP_USB_XFER_ERR   (12) /* VBox protocol error. */
-
-#define VRDP_USB_REAP_FLAG_CONTINUED (0x0)
-#define VRDP_USB_REAP_FLAG_LAST      (0x1)
-/* VRDP_USB_VERSION_3: Fragmented URBs. */
-#define VRDP_USB_REAP_FLAG_FRAGMENT  (0x2)
-
-#define VRDP_USB_REAP_VALID_FLAGS    (VRDP_USB_REAP_FLAG_LAST)
-/* VRDP_USB_VERSION_3: Fragmented URBs. */
-#define VRDP_USB_REAP_VALID_FLAGS_3  (VRDP_USB_REAP_FLAG_LAST | VRDP_USB_REAP_FLAG_FRAGMENT)
-
-typedef struct _VRDPUSBREQREAPURBBODY
-{
-    VRDPUSBDEVID     id;        /* From which device the URB arrives. */
-    uint8_t          flags;     /* VRDP_USB_REAP_FLAG_* */
-    uint8_t          error;     /* VRDP_USB_XFER_* */
-    uint32_t         handle;    /* Handle of returned URB. Not 0. */
-    uint32_t         len;       /* Length of data actually transferred. */
-    /* 'len' bytes of data follow if direction of this URB was VRDP_USB_DIRECTION_IN. */
-} VRDPUSBREQREAPURBBODY;
-
-typedef struct _VRDP_USB_REQ_REAP_URB_RET
-{
-    /* The REAP URB has no header, only completed URBs are returned. */
-    VRDPUSBREQREAPURBBODY body;
-    /* Another body may follow, depending on flags. */
-} VRDP_USB_REQ_REAP_URB_RET;
-
-
-/* VRDP_USB_REQ_CLEAR_HALTED_EP
- */
-typedef struct _VRDP_USB_REQ_CLEAR_HALTED_EP_PARM
-{
-    uint8_t code;
-    VRDPUSBDEVID id;
-    uint8_t ep;
-} VRDP_USB_REQ_CLEAR_HALTED_EP_PARM;
-
-typedef struct _VRDP_USB_REQ_CLEAR_HALTED_EP_RET
-{
-    VRDPUSBREQRETHDR hdr;
-} VRDP_USB_REQ_CLEAR_HALTED_EP_RET;
-
-
-/* VRDP_USB_REQ_CANCEL_URB
- */
-typedef struct _VRDP_USB_REQ_CANCEL_URB_PARM
-{
-    uint8_t code;
-    VRDPUSBDEVID id;
-    uint32_t handle;
-} VRDP_USB_REQ_CANCEL_URB_PARM;
-
-/* The cancel URB request has no return. */
-
-
-/* VRDP_USB_REQ_DEVICE_LIST
- *
- * Server polls USB devices on client by sending this request
- * periodically. Client sends back a list of all devices
- * connected to it. Each device is assigned with an identifier,
- * that is used to distinguish the particular device.
- */
-typedef struct _VRDP_USB_REQ_DEVICE_LIST_PARM
-{
-    uint8_t code;
-} VRDP_USB_REQ_DEVICE_LIST_PARM;
-
-/* Data is a list of the following variable length structures. */
-typedef struct _VRDPUSBDEVICEDESC
-{
-    /* Offset of the next structure. 0 if last. */
-    uint16_t oNext;
-
-    /* Identifier of the device assigned by client. */
-    VRDPUSBDEVID id;
-
-    /** USB version number. */
-    uint16_t        bcdUSB;
-    /** Device class. */
-    uint8_t         bDeviceClass;
-    /** Device subclass. */
-    uint8_t         bDeviceSubClass;
-    /** Device protocol */
-    uint8_t         bDeviceProtocol;
-    /** Vendor ID. */
-    uint16_t        idVendor;
-    /** Product ID. */
-    uint16_t        idProduct;
-    /** Revision, integer part. */
-    uint16_t        bcdRev;
-    /** Manufacturer string. */
-    uint16_t        oManufacturer;
-    /** Product string. */
-    uint16_t        oProduct;
-    /** Serial number string. */
-    uint16_t        oSerialNumber;
-    /** Physical USB port the device is connected to. */
-    uint16_t        idPort;
-
-} VRDPUSBDEVICEDESC;
-
-typedef struct _VRDP_USB_REQ_DEVICE_LIST_RET
-{
-    VRDPUSBDEVICEDESC body;
-    /* Other devices may follow.
-     * The list ends with (uint16_t)0,
-     * which means that an empty list consists of 2 zero bytes.
-     */
-} VRDP_USB_REQ_DEVICE_LIST_RET;
-
-typedef struct _VRDPUSBREQNEGOTIATEPARM
-{
-    uint8_t code;
-
-    /* Remote USB Protocol version. */
-    /* VRDP_USB_VERSION_3: the 32 bit field is splitted to 16 bit version and 16 bit flags.
-     * Version 1 and 2 servers therefore have 'flags' == 0.
-     * Version 3+ servers can send some capabilities in this field, this way it is possible to add
-     *  a new capability without increasing the protocol version.
-     */
-    uint16_t version;
-    uint16_t flags;
-
-} VRDPUSBREQNEGOTIATEPARM;
-
-#define VRDP_USB_CAPS_FLAG_ASYNC    (0x0)
-#define VRDP_USB_CAPS_FLAG_POLL     (0x1)
-/* VRDP_USB_VERSION_2: New flag. */
-#define VRDP_USB_CAPS2_FLAG_VERSION (0x2) /* The client is negotiating the protocol version. */
-
-
-#define VRDP_USB_CAPS_VALID_FLAGS   (VRDP_USB_CAPS_FLAG_POLL)
-/* VRDP_USB_VERSION_2: A set of valid flags. */
-#define VRDP_USB_CAPS2_VALID_FLAGS  (VRDP_USB_CAPS_FLAG_POLL | VRDP_USB_CAPS2_FLAG_VERSION)
-
-typedef struct _VRDPUSBREQNEGOTIATERET
-{
-    uint8_t flags;
-} VRDPUSBREQNEGOTIATERET;
-
-typedef struct _VRDPUSBREQNEGOTIATERET_2
-{
-    uint8_t flags;
-    uint32_t u32Version; /* This field presents only if the VRDP_USB_CAPS2_FLAG_VERSION flag is set. */
-} VRDPUSBREQNEGOTIATERET_2;
-#pragma pack()
-
-#define VRDP_CLIPBOARD_FORMAT_NULL         (0x0)
-#define VRDP_CLIPBOARD_FORMAT_UNICODE_TEXT (0x1)
-#define VRDP_CLIPBOARD_FORMAT_BITMAP       (0x2)
-#define VRDP_CLIPBOARD_FORMAT_HTML         (0x4)
-
-#define VRDP_CLIPBOARD_FUNCTION_FORMAT_ANNOUNCE (0)
-#define VRDP_CLIPBOARD_FUNCTION_DATA_READ       (1)
-#define VRDP_CLIPBOARD_FUNCTION_DATA_WRITE      (2)
-
-
-/** Indexes of information values. */
-
-/** Whether a client is connected at the moment.
- * uint32_t
- */
-#define VRDP_QI_ACTIVE                 (0)
-
-/** How many times a client connected up to current moment.
- * uint32_t
- */
-#define VRDP_QI_NUMBER_OF_CLIENTS      (1)
-
-/** When last connection was established.
- * int64_t time in milliseconds since 1970-01-01 00:00:00 UTC
- */
-#define VRDP_QI_BEGIN_TIME             (2)
-
-/** When last connection was terminated or current time if connection still active.
- * int64_t time in milliseconds since 1970-01-01 00:00:00 UTC
- */
-#define VRDP_QI_END_TIME               (3)
-
-/** How many bytes were sent in last (current) connection.
- * uint64_t
- */
-#define VRDP_QI_BYTES_SENT             (4)
-
-/** How many bytes were sent in all connections.
- * uint64_t
- */
-#define VRDP_QI_BYTES_SENT_TOTAL       (5)
-
-/** How many bytes were received in last (current) connection.
- * uint64_t
- */
-#define VRDP_QI_BYTES_RECEIVED         (6)
-
-/** How many bytes were received in all connections.
- * uint64_t
- */
-#define VRDP_QI_BYTES_RECEIVED_TOTAL   (7)
-
-/** Login user name supplied by the client.
- * UTF8 nul terminated string.
- */
-#define VRDP_QI_USER                   (8)
-
-/** Login domain supplied by the client.
- * UTF8 nul terminated string.
- */
-#define VRDP_QI_DOMAIN                 (9)
-
-/** The client name supplied by the client.
- * UTF8 nul terminated string.
- */
-#define VRDP_QI_CLIENT_NAME            (10)
-
-/** IP address of the client.
- * UTF8 nul terminated string.
- */
-#define VRDP_QI_CLIENT_IP              (11)
-
-/** The client software version number.
- * uint32_t.
- */
-#define VRDP_QI_CLIENT_VERSION         (12)
-
-/** Public key exchange method used when connection was established.
- *  Values: 0 - RDP4 public key exchange scheme.
- *          1 - X509 sertificates were sent to client.
- * uint32_t.
- */
-#define VRDP_QI_ENCRYPTION_STYLE       (13)
-
-/** TCP port where the server listens.
- *  Values: 0 - VRDP server failed to start.
- *          -1 - .
- * int32_t.
- */
-#define VRDP_QI_PORT                   (14)
-
-
-/** Hints what has been intercepted by the application. */
-#define VRDP_CLIENT_INTERCEPT_AUDIO     (0x1)
-#define VRDP_CLIENT_INTERCEPT_USB       (0x2)
-#define VRDP_CLIENT_INTERCEPT_CLIPBOARD (0x4)
-
-
-/** The version of the VRDP server interface. */
-#define VRDP_INTERFACE_VERSION_1 (1)
-#define VRDP_INTERFACE_VERSION_2 (2)
-
-/** The header that does not change when the interface changes. */
-typedef struct _VRDPINTERFACEHDR
-{
-    /** The version of the interface. */
-    uint64_t u64Version;
-
-    /** The size of the structure. */
-    uint64_t u64Size;
-
-} VRDPINTERFACEHDR;
-
-/** The VRDP server entry points. Interface version 1. */
-typedef struct _VRDPENTRYPOINTS_1
-{
-    /** The header. */
-    VRDPINTERFACEHDR header;
-
-    /** Destroy the server instance.
-     *
-     * @param hServer The server instance handle.
-     *
-     * @return IPRT status code.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPDestroy,(HVRDPSERVER hServer));
-
-    /** The server should start to accept clients connections.
-     *
-     * @param hServer The server instance handle.
-     * @param fEnable Whether to enable or disable client connections.
-     *                When is false, all existing clients are disconnected.
-     *
-     * @return IPRT status code.
-     */
-    DECLR3CALLBACKMEMBER(int, VRDPEnableConnections,(HVRDPSERVER hServer,
-                                                   bool fEnable));
-
-    /** The server should disconnect the client.
-     *
-     * @param hServer     The server instance handle.
-     * @param u32ClientId The client identifier.
-     * @param fReconnect  Whether to send a "REDIRECT to the same server" packet to the
-     *                    client before disconnecting.
-     *
-     * @return IPRT status code.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPDisconnect,(HVRDPSERVER hServer,
-                                             uint32_t u32ClientId,
-                                             bool fReconnect));
-
-    /**
-     * Inform the server that the display was resized.
-     * The server will query information about display
-     * from the application via callbacks.
-     *
-     * @param hServer Handle of VRDP server instance.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPResize,(HVRDPSERVER hServer));
-
-    /**
-     * Send a update.
-     *
-     * @param hServer   Handle of VRDP server instance.
-     * @param uScreenId The screen index.
-     * @param pvUpdate  Pointer to VBoxGuest.h::VRDPORDERHDR structure with extra data.
-     * @param cbUpdate  Size of the update data.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPUpdate,(HVRDPSERVER hServer,
-                                         unsigned uScreenId,
-                                         void *pvUpdate,
-                                         uint32_t cbUpdate));
-
-    /**
-     * Set the mouse pointer shape.
-     *
-     * @param hServer  Handle of VRDP server instance.
-     * @param pPointer The pointer shape information.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPColorPointer,(HVRDPSERVER hServer,
-                                               const VRDPCOLORPOINTER *pPointer));
-
-    /**
-     * Hide the mouse pointer.
-     *
-     * @param hServer Handle of VRDP server instance.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPHidePointer,(HVRDPSERVER hServer));
-
-    /**
-     * Queues the samples to be sent to clients.
-     *
-     * @param hServer    Handle of VRDP server instance.
-     * @param pvSamples  Address of samples to be sent.
-     * @param cSamples   Number of samples.
-     * @param format     Encoded audio format for these samples.
-     *
-     * @note Initialized to NULL when the application audio callbacks are NULL.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPAudioSamples,(HVRDPSERVER hServer,
-                                               const void *pvSamples,
-                                               uint32_t cSamples,
-                                               VRDPAUDIOFORMAT format));
-
-    /**
-     * Sets the sound volume on clients.
-     *
-     * @param hServer    Handle of VRDP server instance.
-     * @param left       0..0xFFFF volume level for left channel.
-     * @param right      0..0xFFFF volume level for right channel.
-     *
-     * @note Initialized to NULL when the application audio callbacks are NULL.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPAudioVolume,(HVRDPSERVER hServer,
-                                              uint16_t u16Left,
-                                              uint16_t u16Right));
-
-    /**
-     * Sends a USB request.
-     *
-     * @param hServer      Handle of VRDP server instance.
-     * @param u32ClientId  An identifier that allows the server to find the corresponding client.
-     *                     The identifier is always passed by the server as a parameter
-     *                     of the FNVRDPUSBCALLBACK. Note that the value is the same as
-     *                     in the VRDPSERVERCALLBACK functions.
-     * @param pvParm       Function specific parameters buffer.
-     * @param cbParm       Size of the buffer.
-     *
-     * @note Initialized to NULL when the application USB callbacks are NULL.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPUSBRequest,(HVRDPSERVER hServer,
-                                             uint32_t u32ClientId,
-                                             void *pvParm,
-                                             uint32_t cbParm));
-
-    /**
-     * Called by the application when (VRDP_CLIPBOARD_FUNCTION_*):
-     *   - (0) guest announces available clipboard formats;
-     *   - (1) guest requests clipboard data;
-     *   - (2) guest responds to the client's request for clipboard data.
-     *
-     * @param hServer     The VRDP server handle.
-     * @param u32Function The cause of the call.
-     * @param u32Format   Bitmask of announced formats or the format of data.
-     * @param pvData      Points to: (1) buffer to be filled with clients data;
-     *                               (2) data from the host.
-     * @param cbData      Size of 'pvData' buffer in bytes.
-     * @param pcbActualRead Size of the copied data in bytes.
-     *
-     * @note Initialized to NULL when the application clipboard callbacks are NULL.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPClipboard,(HVRDPSERVER hServer,
-                                            uint32_t u32Function,
-                                            uint32_t u32Format,
-                                            void *pvData,
-                                            uint32_t cbData,
-                                            uint32_t *pcbActualRead));
-
-    /**
-     * Query various information from the VRDP server.
-     *
-     * @param hServer   The VRDP server handle.
-     * @param index     VRDP_QI_* identifier of information to be returned.
-     * @param pvBuffer  Address of memory buffer to which the information must be written.
-     * @param cbBuffer  Size of the memory buffer in bytes.
-     * @param pcbOut    Size in bytes of returned information value.
-     *
-     * @remark The caller must check the *pcbOut. 0 there means no information was returned.
-     *         A value greater than cbBuffer means that information is too big to fit in the
-     *         buffer, in that case no information was placed to the buffer.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPQueryInfo,(HVRDPSERVER hServer,
-                                            uint32_t index,
-                                            void *pvBuffer,
-                                            uint32_t cbBuffer,
-                                            uint32_t *pcbOut));
-} VRDPENTRYPOINTS_1;
-
-/** The VRDP server entry points. Interface version 2.
- *  A new entry point VRDPRedirect has been added relative to version 1.
- */
-typedef struct _VRDPENTRYPOINTS_2
-{
-    /** The header. */
-    VRDPINTERFACEHDR header;
-
-    /** Destroy the server instance.
-     *
-     * @param hServer The server instance handle.
-     *
-     * @return IPRT status code.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPDestroy,(HVRDPSERVER hServer));
-
-    /** The server should start to accept clients connections.
-     *
-     * @param hServer The server instance handle.
-     * @param fEnable Whether to enable or disable client connections.
-     *                When is false, all existing clients are disconnected.
-     *
-     * @return IPRT status code.
-     */
-    DECLR3CALLBACKMEMBER(int, VRDPEnableConnections,(HVRDPSERVER hServer,
-                                                   bool fEnable));
-
-    /** The server should disconnect the client.
-     *
-     * @param hServer     The server instance handle.
-     * @param u32ClientId The client identifier.
-     * @param fReconnect  Whether to send a "REDIRECT to the same server" packet to the
-     *                    client before disconnecting.
-     *
-     * @return IPRT status code.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPDisconnect,(HVRDPSERVER hServer,
-                                             uint32_t u32ClientId,
-                                             bool fReconnect));
-
-    /**
-     * Inform the server that the display was resized.
-     * The server will query information about display
-     * from the application via callbacks.
-     *
-     * @param hServer Handle of VRDP server instance.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPResize,(HVRDPSERVER hServer));
-
-    /**
-     * Send a update.
-     *
-     * @param hServer   Handle of VRDP server instance.
-     * @param uScreenId The screen index.
-     * @param pvUpdate  Pointer to VBoxGuest.h::VRDPORDERHDR structure with extra data.
-     * @param cbUpdate  Size of the update data.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPUpdate,(HVRDPSERVER hServer,
-                                         unsigned uScreenId,
-                                         void *pvUpdate,
-                                         uint32_t cbUpdate));
-
-    /**
-     * Set the mouse pointer shape.
-     *
-     * @param hServer  Handle of VRDP server instance.
-     * @param pPointer The pointer shape information.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPColorPointer,(HVRDPSERVER hServer,
-                                               const VRDPCOLORPOINTER *pPointer));
-
-    /**
-     * Hide the mouse pointer.
-     *
-     * @param hServer Handle of VRDP server instance.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPHidePointer,(HVRDPSERVER hServer));
-
-    /**
-     * Queues the samples to be sent to clients.
-     *
-     * @param hServer    Handle of VRDP server instance.
-     * @param pvSamples  Address of samples to be sent.
-     * @param cSamples   Number of samples.
-     * @param format     Encoded audio format for these samples.
-     *
-     * @note Initialized to NULL when the application audio callbacks are NULL.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPAudioSamples,(HVRDPSERVER hServer,
-                                               const void *pvSamples,
-                                               uint32_t cSamples,
-                                               VRDPAUDIOFORMAT format));
-
-    /**
-     * Sets the sound volume on clients.
-     *
-     * @param hServer    Handle of VRDP server instance.
-     * @param left       0..0xFFFF volume level for left channel.
-     * @param right      0..0xFFFF volume level for right channel.
-     *
-     * @note Initialized to NULL when the application audio callbacks are NULL.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPAudioVolume,(HVRDPSERVER hServer,
-                                              uint16_t u16Left,
-                                              uint16_t u16Right));
-
-    /**
-     * Sends a USB request.
-     *
-     * @param hServer      Handle of VRDP server instance.
-     * @param u32ClientId  An identifier that allows the server to find the corresponding client.
-     *                     The identifier is always passed by the server as a parameter
-     *                     of the FNVRDPUSBCALLBACK. Note that the value is the same as
-     *                     in the VRDPSERVERCALLBACK functions.
-     * @param pvParm       Function specific parameters buffer.
-     * @param cbParm       Size of the buffer.
-     *
-     * @note Initialized to NULL when the application USB callbacks are NULL.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPUSBRequest,(HVRDPSERVER hServer,
-                                             uint32_t u32ClientId,
-                                             void *pvParm,
-                                             uint32_t cbParm));
-
-    /**
-     * Called by the application when (VRDP_CLIPBOARD_FUNCTION_*):
-     *   - (0) guest announces available clipboard formats;
-     *   - (1) guest requests clipboard data;
-     *   - (2) guest responds to the client's request for clipboard data.
-     *
-     * @param hServer     The VRDP server handle.
-     * @param u32Function The cause of the call.
-     * @param u32Format   Bitmask of announced formats or the format of data.
-     * @param pvData      Points to: (1) buffer to be filled with clients data;
-     *                               (2) data from the host.
-     * @param cbData      Size of 'pvData' buffer in bytes.
-     * @param pcbActualRead Size of the copied data in bytes.
-     *
-     * @note Initialized to NULL when the application clipboard callbacks are NULL.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPClipboard,(HVRDPSERVER hServer,
-                                            uint32_t u32Function,
-                                            uint32_t u32Format,
-                                            void *pvData,
-                                            uint32_t cbData,
-                                            uint32_t *pcbActualRead));
-
-    /**
-     * Query various information from the VRDP server.
-     *
-     * @param hServer   The VRDP server handle.
-     * @param index     VRDP_QI_* identifier of information to be returned.
-     * @param pvBuffer  Address of memory buffer to which the information must be written.
-     * @param cbBuffer  Size of the memory buffer in bytes.
-     * @param pcbOut    Size in bytes of returned information value.
-     *
-     * @remark The caller must check the *pcbOut. 0 there means no information was returned.
-     *         A value greater than cbBuffer means that information is too big to fit in the
-     *         buffer, in that case no information was placed to the buffer.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPQueryInfo,(HVRDPSERVER hServer,
-                                            uint32_t index,
-                                            void *pvBuffer,
-                                            uint32_t cbBuffer,
-                                            uint32_t *pcbOut));
-
-    /**
-     * The server should redirect the client to the specified server.
-     *
-     * @param hServer       The server instance handle.
-     * @param u32ClientId   The client identifier.
-     * @param pszServer     The server to redirect the client to.
-     * @param pszUser       The username to use for the redirection.
-     *                      Can be NULL.
-     * @param pszDomain     The domain. Can be NULL.
-     * @param pszPassword   The password. Can be NULL.
-     * @param u32SessionId  The ID of the session to redirect to.
-     * @param pszCookie     The routing token used by a load balancer to
-     *                      route the redirection. Can be NULL.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPRedirect,(HVRDPSERVER hServer,
-                                             uint32_t u32ClientId,
-                                             const char *pszServer,
-                                             const char *pszUser,
-                                             const char *pszDomain,
-                                             const char *pszPassword,
-                                             uint32_t u32SessionId,
-                                             const char *pszCookie));
-} VRDPENTRYPOINTS_2;
-
-#define VRDP_QP_NETWORK_PORT      (1)
-#define VRDP_QP_NETWORK_ADDRESS   (2)
-#define VRDP_QP_NUMBER_MONITORS   (3)
-#define VRDP_QP_NETWORK_PORT_RANGE (4)
-#ifdef VBOX_WITH_VRDP_VIDEO_CHANNEL
-#define VRDP_QP_VIDEO_CHANNEL         (5)
-#define VRDP_QP_VIDEO_CHANNEL_QUALITY (6)
-#define VRDP_QP_VIDEO_CHANNEL_SUNFLSH (7)
-#endif /* VBOX_WITH_VRDP_VIDEO_CHANNEL */
-#define VRDP_QP_FEATURE           (8)
-
-#define VRDP_SP_BASE 0x1000
-#define VRDP_SP_NETWORK_BIND_PORT (VRDP_SP_BASE + 1)
-
-#pragma pack(1)
-/* VRDP_QP_FEATURE data. */
-typedef struct _VRDPFEATURE
-{
-    uint32_t u32ClientId;
-    char     achInfo[1]; /* UTF8 property input name and output value. */
-} VRDPFEATURE;
-
-/* A framebuffer description. */
-typedef struct _VRDPFRAMEBUFFERINFO
-{
-    const uint8_t *pu8Bits;
-    int            xOrigin;
-    int            yOrigin;
-    unsigned       cWidth;
-    unsigned       cHeight;
-    unsigned       cBitsPerPixel;
-    unsigned       cbLine;
-} VRDPFRAMEBUFFERINFO;
-
-#define VRDP_INPUT_SCANCODE 0
-#define VRDP_INPUT_POINT    1
-#define VRDP_INPUT_CAD      2
-#define VRDP_INPUT_RESET    3
-#define VRDP_INPUT_SYNCH    4
-
-typedef struct _VRDPINPUTSCANCODE
-{
-    unsigned uScancode;
-} VRDPINPUTSCANCODE;
-
-#define VRDP_INPUT_POINT_BUTTON1    0x01
-#define VRDP_INPUT_POINT_BUTTON2    0x02
-#define VRDP_INPUT_POINT_BUTTON3    0x04
-#define VRDP_INPUT_POINT_WHEEL_UP   0x08
-#define VRDP_INPUT_POINT_WHEEL_DOWN 0x10
-
-typedef struct _VRDPINPUTPOINT
-{
-    int x;
-    int y;
-    unsigned uButtons;
-} VRDPINPUTPOINT;
-
-#define VRDP_INPUT_SYNCH_SCROLL   0x01
-#define VRDP_INPUT_SYNCH_NUMLOCK  0x02
-#define VRDP_INPUT_SYNCH_CAPITAL  0x04
-
-typedef struct _VRDPINPUTSYNCH
-{
-    unsigned uLockStatus;
-} VRDPINPUTSYNCH;
-#pragma pack()
-
-/** The VRDP server callbacks. Interface version 1. */
-typedef struct _VRDPCALLBACKS_1
-{
-    /** The header. */
-    VRDPINTERFACEHDR header;
-
-    /**
-     * Query or set various information, on how the VRDP server operates, from or to the application.
-     *
-     *
-     * @param pvCallback  The callback specific pointer.
-     * @param index       VRDP_QP_* identifier of information to be returned.
-     * @param pvBuffer    Address of memory buffer to which the information must be written.
-     * @param cbBuffer    Size of the memory buffer in bytes.
-     * @param pcbOut      Size in bytes of returned information value.
-     *
-     * @return IPRT status code. VINF_BUFFER_OVERFLOW if the buffer is too small for the value.
-     */
-    DECLR3CALLBACKMEMBER(int, VRDPCallbackQueryProperty,(void *pvCallback,
-                                                       uint32_t index,
-                                                       void *pvBuffer,
-                                                       uint32_t cbBuffer,
-                                                       uint32_t *pcbOut));
-
-    /* A client is logging in, the application must decide whether
-     * to let to connect the client. The server will drop the connection,
-     * when an error code is returned by the callback.
-     *
-     * @param pvCallback   The callback specific pointer.
-     * @param u32ClientId  An unique client identifier generated by the server.
-     * @param pszUser      The username.
-     * @param pszPassword  The password.
-     * @param pszDomain    The domain.
-     *
-     * @return IPRT status code.
-     */
-    DECLR3CALLBACKMEMBER(int, VRDPCallbackClientLogon,(void *pvCallback,
-                                                     uint32_t u32ClientId,
-                                                     const char *pszUser,
-                                                     const char *pszPassword,
-                                                     const char *pszDomain));
-
-    /* The client has been successfully connected.
-     *
-     * @param pvCallback      The callback specific pointer.
-     * @param u32ClientId     An unique client identifier generated by the server.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPCallbackClientConnect,(void *pvCallback,
-                                                        uint32_t u32ClientId));
-
-    /* The client has been disconnected.
-     *
-     * @param pvCallback      The callback specific pointer.
-     * @param u32ClientId     An unique client identifier generated by the server.
-     * @param fu32Intercepted What was intercepted by the client (VRDP_CLIENT_INTERCEPT_*).
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPCallbackClientDisconnect,(void *pvCallback,
-                                                           uint32_t u32ClientId,
-                                                           uint32_t fu32Intercepted));
-    /* The client supports one of RDP channels.
-     *
-     * @param pvCallback      The callback specific pointer.
-     * @param u32ClientId     An unique client identifier generated by the server.
-     * @param fu32Intercept   What the client wants to intercept. One of VRDP_CLIENT_INTERCEPT_* flags.
-     * @param ppvIntercept    The value to be passed to the channel specific callback.
-     *
-     * @return IPRT status code.
-     */
-    DECLR3CALLBACKMEMBER(int, VRDPCallbackIntercept,(void *pvCallback,
-                                                   uint32_t u32ClientId,
-                                                   uint32_t fu32Intercept,
-                                                   void **ppvIntercept));
-
-    /**
-     * Called by the server when a reply is received from a client.
-     *
-     * @param pvCallback   The callback specific pointer.
-     * @param ppvIntercept The value returned by VRDPCallbackIntercept for the VRDP_CLIENT_INTERCEPT_USB.
-     * @param u32ClientId  Identifies the client that sent the reply.
-     * @param u8Code       The operation code VRDP_USB_REQ_*.
-     * @param pvRet        Points to data received from the client.
-     * @param cbRet        Size of the data in bytes.
-     *
-     * @return IPRT status code.
-     */
-    DECLR3CALLBACKMEMBER(int, VRDPCallbackUSB,(void *pvCallback,
-                                             void *pvIntercept,
-                                             uint32_t u32ClientId,
-                                             uint8_t u8Code,
-                                             const void *pvRet,
-                                             uint32_t cbRet));
-
-    /**
-     * Called by the server when (VRDP_CLIPBOARD_FUNCTION_*):
-     *   - (0) client announces available clipboard formats;
-     *   - (1) client requests clipboard data.
-     *
-     * @param pvCallback   The callback specific pointer.
-     * @param ppvIntercept The value returned by VRDPCallbackIntercept for the VRDP_CLIENT_INTERCEPT_CLIPBOARD.
-     * @param u32ClientId Identifies the RDP client that sent the reply.
-     * @param u32Function The cause of the callback.
-     * @param u32Format   Bitmask of reported formats or the format of received data.
-     * @param pvData      Reserved.
-     * @param cbData      Reserved.
-     *
-     * @return IPRT status code.
-     */
-    DECLR3CALLBACKMEMBER(int, VRDPCallbackClipboard,(void *pvCallback,
-                                                   void *pvIntercept,
-                                                   uint32_t u32ClientId,
-                                                   uint32_t u32Function,
-                                                   uint32_t u32Format,
-                                                   const void *pvData,
-                                                   uint32_t cbData));
-
-    /* The framebuffer information is queried.
-     *
-     * @param pvCallback      The callback specific pointer.
-     * @param uScreenId       The framebuffer index.
-     * @param pInfo           The information structure to ber filled.
-     *
-     * @return Whether the framebuffer is available.
-     */
-    DECLR3CALLBACKMEMBER(bool, VRDPCallbackFramebufferQuery,(void *pvCallback,
-                                                           unsigned uScreenId,
-                                                           VRDPFRAMEBUFFERINFO *pInfo));
-
-    /* The framebuffer is locked.
-     *
-     * @param pvCallback      The callback specific pointer.
-     * @param uScreenId       The framebuffer index.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPCallbackFramebufferLock,(void *pvCallback,
-                                                          unsigned uScreenId));
-
-    /* The framebuffer is unlocked.
-     *
-     * @param pvCallback      The callback specific pointer.
-     * @param uScreenId       The framebuffer index.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPCallbackFramebufferUnlock,(void *pvCallback,
-                                                            unsigned uScreenId));
-
-    /* Input from the client.
-     *
-     * @param pvCallback      The callback specific pointer.
-     * @param pvInput         The input information.
-     * @param cbInput         The size of the input information.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPCallbackInput,(void *pvCallback,
-                                                int type,
-                                                const void *pvInput,
-                                                unsigned cbInput));
-
-    /* Video mode hint from the client.
-     *
-     * @param pvCallback      The callback specific pointer.
-     * @param cWidth          Requested width.
-     * @param cHeight         Requested height.
-     * @param cBitsPerPixel   Requested color depth.
-     * @param uScreenId       The framebuffer index.
-     */
-    DECLR3CALLBACKMEMBER(void, VRDPCallbackVideoModeHint,(void *pvCallback,
-                                                        unsigned cWidth,
-                                                        unsigned cHeight,
-                                                        unsigned cBitsPerPixel,
-                                                        unsigned uScreenId));
-
-} VRDPCALLBACKS_1;
-
-/* Callbacks are the same for the version 1 and version 2 interfaces. */
-typedef VRDPCALLBACKS_1 VRDPCALLBACKS_2;
-
-/**
- * Create a new VRDP server instance. The instance is fully functional but refuses
- * client connections until the entry point VRDPEnableConnections is called by the application.
- *
- * The caller prepares the VRDPCALLBACKS_* structure. The header.u64Version field of the
- * structure must be initialized with the version of the interface to use.
- * The server will return pointer to VRDPENTRYPOINTS_* table in *ppEntryPoints
- * to match the requested interface.
- * That is if pCallbacks->header.u64Version == VRDP_INTERFACE_VERSION_1, then the server
- * expects pCallbacks to point to VRDPCALLBACKS_1 and will return a pointer to VRDPENTRYPOINTS_1.
- *
- * @param pCallback     Pointer to the application callbacks which let the server to fetch
- *                      the configuration data and to access the desktop.
- * @param pvCallback    The callback specific pointer to be passed back to the application.
- * @param ppEntryPoints Where to store the pointer to the VRDP entry points structure.
- * @param phServer      Pointer to the created server instance handle.
- *
- * @return IPRT status code.
- */
-VRDPDECL(int) VRDPCreateServer (const VRDPINTERFACEHDR *pCallbacks,
-                                void *pvCallback,
-                                VRDPINTERFACEHDR **ppEntryPoints,
-                                HVRDPSERVER *phServer);
-
-typedef DECLCALLBACK(int) FNVRDPCREATESERVER (const VRDPINTERFACEHDR *pCallbacks,
-                                              void *pvCallback,
-                                              VRDPINTERFACEHDR **ppEntryPoints,
-                                              HVRDPSERVER *phServer);
-typedef FNVRDPCREATESERVER *PFNVRDPCREATESERVER;
-
-RT_C_DECLS_END
-
-/** @} */
-
-#endif
-
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Display/vrdp.c
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Display/vrdp.c	(revision 33003)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Display/vrdp.c	(revision 33004)
@@ -20,5 +20,5 @@
 #include "driver.h"
 #include "vrdpbmp.h"
-#include <VBox/VRDPOrders.h>
+#include <VBox/RemoteDesktop/VRDEOrders.h>
 
 #define VRDP_MAKE_OP(__c) (__c)
@@ -372,5 +372,5 @@
     BOOL bRc = FALSE;
 
-    VRDPDATABITS bits;
+    VRDEDATABITS bits;
 
     bits.cb      = cHeight * cWidth * bytesPerPixel;
@@ -436,5 +436,5 @@
     if (bytesPerPixel > 0)
     {
-        bRc = vrdpWriteHdr (ppdev, VRDP_MAKE_OP(VRDP_ORDER_DIRTY_RECT));
+        bRc = vrdpWriteHdr (ppdev, VRDP_MAKE_OP(VRDE_ORDER_DIRTY_RECT));
 
         if (bRc)
@@ -512,5 +512,5 @@
                               const RECTL *prcl)
 {
-    VRDPORDERBOUNDS bounds;
+    VRDEORDERBOUNDS bounds;
 
     bounds.pt1.x = (int16_t)(prcl->left);
@@ -519,5 +519,5 @@
     bounds.pt2.y = (int16_t)(prcl->bottom);
 
-    return vrdpReportOrder (ppdev, &bounds, sizeof (bounds), VRDP_ORDER_BOUNDS);
+    return vrdpReportOrder (ppdev, &bounds, sizeof (bounds), VRDE_ORDER_BOUNDS);
 }
 
@@ -535,5 +535,5 @@
         for (; i < pRects->c; i++, prcl++)
         {
-            VRDPORDERREPEAT repeat;
+            VRDEORDERREPEAT repeat;
 
             repeat.bounds.pt1.x = (int16_t)(prcl->left);
@@ -542,5 +542,5 @@
             repeat.bounds.pt2.y = (int16_t)(prcl->bottom);
 
-            bRc = vrdpReportOrder (ppdev, &repeat, sizeof (repeat), VRDP_ORDER_REPEAT);
+            bRc = vrdpReportOrder (ppdev, &repeat, sizeof (repeat), VRDE_ORDER_REPEAT);
 
             if (!bRc)
@@ -556,5 +556,5 @@
 static BOOL vrdpIntersectRectWithBounds (RECTL *prclIntersect,
                                          const RECTL *prcl,
-                                         const VRDPORDERBOUNDS *pBounds)
+                                         const VRDEORDERBOUNDS *pBounds)
 {
     if (   prcl->left   < pBounds->pt2.x     /* left < bounds_right */
@@ -582,5 +582,5 @@
 static BOOL vrdpGetIntersectingRects (CLIPRECTS *pRects,
                                       const VRDPCLIPRECTS *pClipRects,
-                                      const VRDPORDERBOUNDS *pBounds)
+                                      const VRDEORDERBOUNDS *pBounds)
 {
     BOOL fReportOrder = TRUE;
@@ -663,5 +663,5 @@
 static void vrdpReportOrderGenericBounds (PPDEV ppdev,
                                           const VRDPCLIPRECTS *pClipRects,
-                                          const VRDPORDERBOUNDS *pBounds,
+                                          const VRDEORDERBOUNDS *pBounds,
                                           const void *pvOrder,
                                           unsigned cbOrder,
@@ -681,5 +681,5 @@
                                  ULONG rgb)
 {
-    VRDPORDERSOLIDRECT order;
+    VRDEORDERSOLIDRECT order;
 
     order.x     = (int16_t)prclTrg->left;
@@ -689,5 +689,5 @@
     order.rgb   = rgb;
 
-    vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VRDP_ORDER_SOLIDRECT);
+    vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VRDE_ORDER_SOLIDRECT);
 }
 
@@ -698,5 +698,5 @@
                                 uint8_t rop3)
 {
-    VRDPORDERSOLIDBLT order;
+    VRDEORDERSOLIDBLT order;
 
     order.x     = (int16_t)prclTrg->left;
@@ -707,5 +707,5 @@
     order.rop   = rop3;
 
-    vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VRDP_ORDER_SOLIDBLT);
+    vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VRDE_ORDER_SOLIDBLT);
 }
 
@@ -717,5 +717,5 @@
                               uint8_t rop3)
 {
-    VRDPORDERPATBLTBRUSH order;
+    VRDEORDERPATBLTBRUSH order;
 
     int8_t xSrc = 0;
@@ -757,5 +757,5 @@
     memcpy (order.pattern, pBrush->u.pat.au8Pattern, sizeof (order.pattern));
 
-    vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VRDP_ORDER_PATBLTBRUSH);
+    vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VRDE_ORDER_PATBLTBRUSH);
 }
 
@@ -765,5 +765,5 @@
                               uint8_t rop3)
 {
-    VRDPORDERDSTBLT order;
+    VRDEORDERDSTBLT order;
 
     order.x     = (int16_t)prclTrg->left;
@@ -773,5 +773,5 @@
     order.rop   = rop3;
 
-    vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VRDP_ORDER_DSTBLT);
+    vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VRDE_ORDER_DSTBLT);
 }
 
@@ -782,5 +782,5 @@
                                  uint8_t rop3)
 {
-    VRDPORDERSCREENBLT order;
+    VRDEORDERSCREENBLT order;
 
     order.x     = (int16_t)prclTrg->left;
@@ -792,5 +792,5 @@
     order.rop   = rop3;
 
-    vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VRDP_ORDER_SCREENBLT);
+    vrdpReportOrderGeneric (ppdev, pClipRects, &order, sizeof (order), VRDE_ORDER_SCREENBLT);
 }
 
@@ -802,5 +802,5 @@
                                   const VRDPBCHASH *phash)
 {
-    VRDPORDERMEMBLT order;
+    VRDEORDERMEMBLT order;
 
     order.x    = (int16_t)prcl->left;
@@ -815,5 +815,5 @@
     memcpy (order.hash, phash, sizeof (*phash));
 
-    vrdpReportOrder (ppdev, &order, sizeof (order), VRDP_ORDER_MEMBLT);
+    vrdpReportOrder (ppdev, &order, sizeof (order), VRDE_ORDER_MEMBLT);
 }
 
@@ -854,10 +854,10 @@
     BOOL bRc;
 
-    VRDPORDERCACHEDBITMAP order;
+    VRDEORDERCACHEDBITMAP order;
 
     VBVA_ASSERT(sizeof (*phash) == sizeof (order.hash));
     memcpy (order.hash, phash, sizeof (*phash));
 
-    bRc = vrdpReportOrder (ppdev, &order, sizeof (order), VRDP_ORDER_CACHED_BITMAP);
+    bRc = vrdpReportOrder (ppdev, &order, sizeof (order), VRDE_ORDER_CACHED_BITMAP);
 
     if (bRc)
@@ -879,10 +879,10 @@
                                      const VRDPBCHASH *phash)
 {
-    VRDPORDERDELETEDBITMAP order;
+    VRDEORDERDELETEDBITMAP order;
 
     VBVA_ASSERT(sizeof (*phash) == sizeof (order.hash));
     memcpy (order.hash, phash, sizeof (*phash));
 
-    vrdpReportOrder (ppdev, &order, sizeof (order), VRDP_ORDER_DELETED_BITMAP);
+    vrdpReportOrder (ppdev, &order, sizeof (order), VRDE_ORDER_DELETED_BITMAP);
 }
 
@@ -1252,5 +1252,5 @@
     else
     {
-        VRDPORDERLINE order;
+        VRDEORDERLINE order;
 
         order.x1 = (int16_t)x1;
@@ -1271,5 +1271,5 @@
                     prclBounds->left, prclBounds->right, prclBounds->top, prclBounds->bottom, clipRects.rects.c));
 
-        vrdpReportOrderGeneric (ppdev, &clipRects, &order, sizeof (order), VRDP_ORDER_LINE);
+        vrdpReportOrderGeneric (ppdev, &clipRects, &order, sizeof (order), VRDE_ORDER_LINE);
     }
 }
@@ -1335,5 +1335,5 @@
 }
 
-static void vrdpPointFX2Point (const POINTFIX *pptfx, VRDPORDERPOINT *ppt)
+static void vrdpPointFX2Point (const POINTFIX *pptfx, VRDEORDERPOINT *ppt)
 {
     ppt->x = (int16_t)FXTOLROUND(pptfx->x);
@@ -1341,5 +1341,5 @@
 }
 
-static void vrdpPolyPointsAdd (VRDPORDERPOLYPOINTS *pPoints, const VRDPORDERPOINT *ppt)
+static void vrdpPolyPointsAdd (VRDEORDERPOLYPOINTS *pPoints, const VRDEORDERPOINT *ppt)
 {
     VBVA_ASSERT(pPoints->c < RT_ELEMENTS(pPoints->a));
@@ -1350,5 +1350,5 @@
 }
 
-static void vrdpExtendOrderBounds (VRDPORDERBOUNDS *pBounds, const VRDPORDERPOINT *ppt)
+static void vrdpExtendOrderBounds (VRDEORDERBOUNDS *pBounds, const VRDEORDERPOINT *ppt)
 {
     /* Bounds have inclusive pt1 and exclusive pt2. */
@@ -1434,7 +1434,7 @@
     else if (ppo->fl & PO_ELLIPSE)
     {
-        if (vboxOrderSupported (ppdev, VRDP_ORDER_ELLIPSE))
-        {
-            VRDPORDERELLIPSE order;
+        if (vboxOrderSupported (ppdev, VRDE_ORDER_ELLIPSE))
+        {
+            VRDEORDERELLIPSE order;
 
             order.pt1.x = (int16_t)FXTOLROUND(rcfxBounds.xLeft   + 4);
@@ -1447,5 +1447,5 @@
             order.rgb = vrdpColor2RGB (pso, pbo->iSolidColor);
 
-            vrdpReportOrderGeneric (ppdev, &clipRects, &order, sizeof (order), VRDP_ORDER_ELLIPSE);
+            vrdpReportOrderGeneric (ppdev, &clipRects, &order, sizeof (order), VRDE_ORDER_ELLIPSE);
         }
         else
@@ -1462,7 +1462,7 @@
         PATHDATA pd;
         BOOL bMore;
-        VRDPORDERPOLYLINE order;
-        VRDPORDERPOINT ptStart;
-        VRDPORDERBOUNDS bounds;
+        VRDEORDERPOLYLINE order;
+        VRDEORDERPOINT ptStart;
+        VRDEORDERBOUNDS bounds;
 
         order.rgb = vrdpColor2RGB (pso, pbo->iSolidColor);
@@ -1475,5 +1475,5 @@
         do {
             POINTFIX *pptfx;
-            VRDPORDERPOINT pt;
+            VRDEORDERPOINT pt;
 
             bMore = PATHOBJ_bEnum (ppo, &pd);
@@ -1520,5 +1520,5 @@
                     DISPDBG((1, "vrdpStrokePath: Report order, points overflow.\n"));
 
-                    vrdpReportOrderGenericBounds (ppdev, &clipRects, &bounds, &order, sizeof (order), VRDP_ORDER_POLYLINE);
+                    vrdpReportOrderGenericBounds (ppdev, &clipRects, &bounds, &order, sizeof (order), VRDE_ORDER_POLYLINE);
 
                     order.points.c = 0;
@@ -1550,5 +1550,5 @@
                 if (order.points.c > 0)
                 {
-                    vrdpReportOrderGenericBounds (ppdev, &clipRects, &bounds, &order, sizeof (order), VRDP_ORDER_POLYLINE);
+                    vrdpReportOrderGenericBounds (ppdev, &clipRects, &bounds, &order, sizeof (order), VRDE_ORDER_POLYLINE);
                 }
 
@@ -1727,5 +1727,5 @@
         case SS_SAVE:
         {
-            VRDPORDERSAVESCREEN order;
+            VRDEORDERSAVESCREEN order;
 
             order.pt1.x = (int16_t)prcl->left;
@@ -1737,10 +1737,10 @@
             order.restore = 0;
 
-            vrdpReportOrderGeneric (ppdev, NULL, &order, sizeof (order), VRDP_ORDER_SAVESCREEN);
+            vrdpReportOrderGeneric (ppdev, NULL, &order, sizeof (order), VRDE_ORDER_SAVESCREEN);
         } break;
 
         case SS_RESTORE:
         {
-            VRDPORDERSAVESCREEN order;
+            VRDEORDERSAVESCREEN order;
 
             order.pt1.x = (int16_t)prcl->left;
@@ -1752,5 +1752,5 @@
             order.restore = 1;
 
-            if (vrdpReportOrderGeneric (ppdev, NULL, &order, sizeof (order), VRDP_ORDER_SAVESCREEN))
+            if (vrdpReportOrderGeneric (ppdev, NULL, &order, sizeof (order), VRDE_ORDER_SAVESCREEN))
             {
                 uint8_t *pu8Bits;
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Display/vrdpbmp.c
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Display/vrdpbmp.c	(revision 33003)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Display/vrdpbmp.c	(revision 33004)
@@ -22,5 +22,5 @@
 #include "vrdpbmp.h"
 #include <iprt/crc.h>
-#include <VBox/VRDPOrders.h>
+#include <VBox/RemoteDesktop/VRDEOrders.h>
 
 /*
@@ -211,5 +211,5 @@
     int i;
 
-    VBVA_ASSERT(sizeof (VRDPBCHASH) == sizeof (VRDPBITMAPHASH));
+    VBVA_ASSERT(sizeof (VRDPBCHASH) == sizeof (VRDEBITMAPHASH));
 
     /* Reinitialize the cache structure. */
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Display/vrdptext.c
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Display/vrdptext.c	(revision 33003)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Display/vrdptext.c	(revision 33004)
@@ -19,5 +19,5 @@
 
 #include "driver.h"
-#include <VBox/VRDPOrders.h>
+#include <VBox/RemoteDesktop/VRDEOrders.h>
 #include <iprt/crc.h>
 
@@ -71,5 +71,5 @@
  *       represents a 'space' character might allow some optimizations.
  *
- * The VRDPORDERTEXT consists of the string info and glyph infos.
+ * The VRDEORDERTEXT consists of the string info and glyph infos.
  *
  */
@@ -80,5 +80,5 @@
     uint32_t cbBitmap;
 
-    VRDPORDERGLYPH *pOrder = (VRDPORDERGLYPH *)*ppu8Ptr;
+    VRDEORDERGLYPH *pOrder = (VRDEORDERGLYPH *)*ppu8Ptr;
 
     GLYPHBITS *pgb = pGlyphPos->pgdf->pgb;
@@ -124,7 +124,7 @@
 static uint32_t vboxSizeofTextOrder (ULONG cGlyphs, ULONG cbMaxGlyph)
 {
-    uint32_t cb = sizeof (VRDPORDERTEXT);
-
-    cb += cGlyphs * (sizeof (VRDPORDERGLYPH) + cbMaxGlyph);
+    uint32_t cb = sizeof (VRDEORDERTEXT);
+
+    cb += cGlyphs * (sizeof (VRDEORDERGLYPH) + cbMaxGlyph);
 
     return cb;
@@ -142,5 +142,5 @@
     FONTINFO fi;
     uint32_t cbOrderMax;
-    VRDPORDERTEXT *pOrder;
+    VRDEORDERTEXT *pOrder;
     BOOL fResult;
     uint8_t *pu8GlyphPtr;
@@ -180,5 +180,5 @@
     DISPDBG((1, "VRDP::vrdpReportText: pstro->cGlyphs = %d, fi.cjMaxGlyph1 = 0x%x, cbOrderMax = 0x%x.\n", pstro->cGlyphs, fi.cjMaxGlyph1, cbOrderMax));
 
-    pOrder = (VRDPORDERTEXT *)EngAllocMem (0, cbOrderMax, ALLOC_TAG);
+    pOrder = (VRDEORDERTEXT *)EngAllocMem (0, cbOrderMax, ALLOC_TAG);
 
     if (!pOrder)
@@ -261,5 +261,5 @@
         pOrder->cbOrder = (uint32_t)(pu8GlyphPtr - (uint8_t *)pOrder);
 
-        vrdpReportOrderGeneric (ppdev, pClipRects, pOrder, pOrder->cbOrder, VRDP_ORDER_TEXT);
+        vrdpReportOrderGeneric (ppdev, pClipRects, pOrder, pOrder->cbOrder, VRDE_ORDER_TEXT);
     }
 
Index: /trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp	(revision 33003)
+++ /trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp	(revision 33004)
@@ -32,7 +32,4 @@
 #include <VBox/log.h>
 #include <VBox/version.h>
-#ifdef VBOX_WITH_VRDP
-# include <VBox/vrdpapi.h>
-#endif
 #include <iprt/buildconfig.h>
 #include <iprt/ctype.h>
Index: /trunk/src/VBox/Main/AudioSnifferInterface.cpp
===================================================================
--- /trunk/src/VBox/Main/AudioSnifferInterface.cpp	(revision 33003)
+++ /trunk/src/VBox/Main/AudioSnifferInterface.cpp	(revision 33004)
@@ -23,5 +23,5 @@
 
 #include <VBox/pdmdrv.h>
-#include <VBox/vrdpapi.h>
+#include <VBox/RemoteDesktop/VRDE.h>
 #include <VBox/cfgm.h>
 #include <VBox/err.h>
@@ -99,5 +99,5 @@
      * Just call the VRDP server with the data.
      */
-    VRDPAUDIOFORMAT format = VRDP_AUDIO_FMT_MAKE(samplesPerSec, nChannels, bitsPerSample, !fUnsigned);
+    VRDEAUDIOFORMAT format = VRDE_AUDIO_FMT_MAKE(samplesPerSec, nChannels, bitsPerSample, !fUnsigned);
     pDrv->pAudioSniffer->getParent()->consoleVRDPServer()->SendAudioSamples(pvSamples, cSamples, format);
 }
Index: /trunk/src/VBox/Main/ConsoleImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/ConsoleImpl.cpp	(revision 33003)
+++ /trunk/src/VBox/Main/ConsoleImpl.cpp	(revision 33004)
@@ -1021,5 +1021,5 @@
 #endif /* VBOX_WITH_VRDP */
 
-    if (fu32Intercepted & VRDP_CLIENT_INTERCEPT_USB)
+    if (fu32Intercepted & VRDE_CLIENT_INTERCEPT_USB)
     {
         mConsoleVRDPServer->USBBackendDelete(u32ClientId);
@@ -1027,10 +1027,10 @@
 
 #ifdef VBOX_WITH_VRDP
-    if (fu32Intercepted & VRDP_CLIENT_INTERCEPT_CLIPBOARD)
+    if (fu32Intercepted & VRDE_CLIENT_INTERCEPT_CLIPBOARD)
     {
         mConsoleVRDPServer->ClipboardDelete(u32ClientId);
     }
 
-    if (fu32Intercepted & VRDP_CLIENT_INTERCEPT_AUDIO)
+    if (fu32Intercepted & VRDE_CLIENT_INTERCEPT_AUDIO)
     {
         mcAudioRefs--;
@@ -7174,5 +7174,5 @@
  * @note Locks this object for writing.
  */
-void Console::processRemoteUSBDevices(uint32_t u32ClientId, VRDPUSBDEVICEDESC *pDevList, uint32_t cbDevList)
+void Console::processRemoteUSBDevices(uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevList, uint32_t cbDevList)
 {
     LogFlowThisFuncEnter();
@@ -7205,5 +7205,5 @@
      */
     /** @todo (sunlover) REMOTE_USB Strict validation of the pDevList. */
-    VRDPUSBDEVICEDESC *e = pDevList;
+    VRDEUSBDEVICEDESC *e = pDevList;
 
     /* The cbDevList condition must be checked first, because the function can
@@ -7277,5 +7277,5 @@
         cbDevList -= e->oNext;
 
-        e = (VRDPUSBDEVICEDESC *)((uint8_t *)e + e->oNext);
+        e = (VRDEUSBDEVICEDESC *)((uint8_t *)e + e->oNext);
     }
 
Index: /trunk/src/VBox/Main/ConsoleVRDPServer.cpp
===================================================================
--- /trunk/src/VBox/Main/ConsoleVRDPServer.cpp	(revision 33003)
+++ /trunk/src/VBox/Main/ConsoleVRDPServer.cpp	(revision 33004)
@@ -34,5 +34,5 @@
 #include <VBox/err.h>
 #ifdef VBOX_WITH_VRDP
-#include <VBox/VRDPOrders.h>
+#include <VBox/RemoteDesktop/VRDEOrders.h>
 #endif /* VBOX_WITH_VRDP */
 
@@ -454,5 +454,5 @@
             const uint32_t dstheight = 32;
 
-            VRDPCOLORPOINTER *pointer = NULL;
+            VRDECOLORPOINTER *pointer = NULL;
 
             uint32_t dstmaskwidth = (dstwidth + 7) / 8;
@@ -464,9 +464,9 @@
             uint32_t rdpdatalen = dstheight * rdpdatawidth;
 
-            pointer = (VRDPCOLORPOINTER *)RTMemTmpAlloc(sizeof(VRDPCOLORPOINTER) + rdpmasklen + rdpdatalen);
+            pointer = (VRDECOLORPOINTER *)RTMemTmpAlloc(sizeof(VRDECOLORPOINTER) + rdpmasklen + rdpdatalen);
 
             if (pointer)
             {
-                uint8_t *maskarray = (uint8_t*)pointer + sizeof(VRDPCOLORPOINTER);
+                uint8_t *maskarray = (uint8_t*)pointer + sizeof(VRDECOLORPOINTER);
                 uint8_t *dataarray = maskarray + rdpmasklen;
 
@@ -551,11 +551,11 @@
 RTLDRMOD ConsoleVRDPServer::mVRDPLibrary;
 
-PFNVRDPCREATESERVER ConsoleVRDPServer::mpfnVRDPCreateServer = NULL;
-
-VRDPENTRYPOINTS_1 *ConsoleVRDPServer::mpEntryPoints = NULL;
-
-VRDPCALLBACKS_1 ConsoleVRDPServer::mCallbacks =
-{
-    { VRDP_INTERFACE_VERSION_1, sizeof(VRDPCALLBACKS_1) },
+PFNVRDECREATESERVER ConsoleVRDPServer::mpfnVRDPCreateServer = NULL;
+
+VRDEENTRYPOINTS_1 *ConsoleVRDPServer::mpEntryPoints = NULL;
+
+VRDECALLBACKS_1 ConsoleVRDPServer::mCallbacks =
+{
+    { VRDE_INTERFACE_VERSION_1, sizeof(VRDECALLBACKS_1) },
     ConsoleVRDPServer::VRDPCallbackQueryProperty,
     ConsoleVRDPServer::VRDPCallbackClientLogon,
@@ -580,7 +580,7 @@
     switch (index)
     {
-        case VRDP_QP_NETWORK_PORT:
-        {
-            /* This is obsolete, the VRDP server uses VRDP_QP_NETWORK_PORT_RANGE instead. */
+        case VRDE_QP_NETWORK_PORT:
+        {
+            /* This is obsolete, the VRDP server uses VRDE_QP_NETWORK_PORT_RANGE instead. */
             ULONG port = 0;
 
@@ -598,5 +598,5 @@
         } break;
 
-        case VRDP_QP_NETWORK_ADDRESS:
+        case VRDE_QP_NETWORK_ADDRESS:
         {
             com::Bstr bstr;
@@ -628,5 +628,5 @@
         } break;
 
-        case VRDP_QP_NUMBER_MONITORS:
+        case VRDE_QP_NUMBER_MONITORS:
         {
             ULONG cMonitors = 1;
@@ -647,5 +647,5 @@
         } break;
 
-        case VRDP_QP_NETWORK_PORT_RANGE:
+        case VRDE_QP_NETWORK_PORT_RANGE:
         {
             com::Bstr bstr;
@@ -688,5 +688,5 @@
 
 #ifdef VBOX_WITH_VRDP_VIDEO_CHANNEL
-        case VRDP_QP_VIDEO_CHANNEL:
+        case VRDE_QP_VIDEO_CHANNEL:
         {
             BOOL fVideoEnabled = FALSE;
@@ -707,5 +707,5 @@
         } break;
 
-        case VRDP_QP_VIDEO_CHANNEL_QUALITY:
+        case VRDE_QP_VIDEO_CHANNEL_QUALITY:
         {
             ULONG ulQuality = 0;
@@ -726,5 +726,5 @@
         } break;
 
-        case VRDP_QP_VIDEO_CHANNEL_SUNFLSH:
+        case VRDE_QP_VIDEO_CHANNEL_SUNFLSH:
         {
             ULONG ulSunFlsh = 1;
@@ -756,7 +756,7 @@
 #endif /* VBOX_WITH_VRDP_VIDEO_CHANNEL */
 
-        case VRDP_QP_FEATURE:
-        {
-            if (cbBuffer < sizeof(VRDPFEATURE))
+        case VRDE_QP_FEATURE:
+        {
+            if (cbBuffer < sizeof(VRDEFEATURE))
             {
                 rc = VERR_INVALID_PARAMETER;
@@ -764,7 +764,7 @@
             }
 
-            size_t cbInfo = cbBuffer - RT_OFFSETOF(VRDPFEATURE, achInfo);
-
-            VRDPFEATURE *pFeature = (VRDPFEATURE *)pvBuffer;
+            size_t cbInfo = cbBuffer - RT_OFFSETOF(VRDEFEATURE, achInfo);
+
+            VRDEFEATURE *pFeature = (VRDEFEATURE *)pvBuffer;
 
             size_t cchInfo = 0;
@@ -825,5 +825,5 @@
         } break;
 
-        case VRDP_SP_NETWORK_BIND_PORT:
+        case VRDE_SP_NETWORK_BIND_PORT:
         {
             if (cbBuffer != sizeof(uint32_t))
@@ -885,5 +885,5 @@
     switch (fu32Intercept)
     {
-        case VRDP_CLIENT_INTERCEPT_AUDIO:
+        case VRDE_CLIENT_INTERCEPT_AUDIO:
         {
             server->mConsole->VRDPInterceptAudio(u32ClientId);
@@ -895,5 +895,5 @@
         } break;
 
-        case VRDP_CLIENT_INTERCEPT_USB:
+        case VRDE_CLIENT_INTERCEPT_USB:
         {
             server->mConsole->VRDPInterceptUSB(u32ClientId, ppvIntercept);
@@ -901,5 +901,5 @@
         } break;
 
-        case VRDP_CLIENT_INTERCEPT_CLIPBOARD:
+        case VRDE_CLIENT_INTERCEPT_CLIPBOARD:
         {
             server->mConsole->VRDPInterceptClipboard(u32ClientId);
@@ -932,5 +932,5 @@
 }
 
-DECLCALLBACK(bool) ConsoleVRDPServer::VRDPCallbackFramebufferQuery(void *pvCallback, unsigned uScreenId, VRDPFRAMEBUFFERINFO *pInfo)
+DECLCALLBACK(bool) ConsoleVRDPServer::VRDPCallbackFramebufferQuery(void *pvCallback, unsigned uScreenId, VRDEFRAMEBUFFERINFO *pInfo)
 {
     ConsoleVRDPServer *server = static_cast<ConsoleVRDPServer*>(pvCallback);
@@ -1032,11 +1032,11 @@
     switch (type)
     {
-        case VRDP_INPUT_SCANCODE:
-        {
-            if (cbInput == sizeof(VRDPINPUTSCANCODE))
+        case VRDE_INPUT_SCANCODE:
+        {
+            if (cbInput == sizeof(VRDEINPUTSCANCODE))
             {
                 IKeyboard *pKeyboard = pConsole->getKeyboard();
 
-                const VRDPINPUTSCANCODE *pInputScancode = (VRDPINPUTSCANCODE *)pvInput;
+                const VRDEINPUTSCANCODE *pInputScancode = (VRDEINPUTSCANCODE *)pvInput;
 
                 /* Track lock keys. */
@@ -1063,31 +1063,31 @@
         } break;
 
-        case VRDP_INPUT_POINT:
-        {
-            if (cbInput == sizeof(VRDPINPUTPOINT))
-            {
-                const VRDPINPUTPOINT *pInputPoint = (VRDPINPUTPOINT *)pvInput;
+        case VRDE_INPUT_POINT:
+        {
+            if (cbInput == sizeof(VRDEINPUTPOINT))
+            {
+                const VRDEINPUTPOINT *pInputPoint = (VRDEINPUTPOINT *)pvInput;
 
                 int mouseButtons = 0;
                 int iWheel = 0;
 
-                if (pInputPoint->uButtons & VRDP_INPUT_POINT_BUTTON1)
+                if (pInputPoint->uButtons & VRDE_INPUT_POINT_BUTTON1)
                 {
                     mouseButtons |= MouseButtonState_LeftButton;
                 }
-                if (pInputPoint->uButtons & VRDP_INPUT_POINT_BUTTON2)
+                if (pInputPoint->uButtons & VRDE_INPUT_POINT_BUTTON2)
                 {
                     mouseButtons |= MouseButtonState_RightButton;
                 }
-                if (pInputPoint->uButtons & VRDP_INPUT_POINT_BUTTON3)
+                if (pInputPoint->uButtons & VRDE_INPUT_POINT_BUTTON3)
                 {
                     mouseButtons |= MouseButtonState_MiddleButton;
                 }
-                if (pInputPoint->uButtons & VRDP_INPUT_POINT_WHEEL_UP)
+                if (pInputPoint->uButtons & VRDE_INPUT_POINT_WHEEL_UP)
                 {
                     mouseButtons |= MouseButtonState_WheelUp;
                     iWheel = -1;
                 }
-                if (pInputPoint->uButtons & VRDP_INPUT_POINT_WHEEL_DOWN)
+                if (pInputPoint->uButtons & VRDE_INPUT_POINT_WHEEL_DOWN)
                 {
                     mouseButtons |= MouseButtonState_WheelDown;
@@ -1109,25 +1109,25 @@
         } break;
 
-        case VRDP_INPUT_CAD:
+        case VRDE_INPUT_CAD:
         {
             pConsole->getKeyboard()->PutCAD();
         } break;
 
-        case VRDP_INPUT_RESET:
+        case VRDE_INPUT_RESET:
         {
             pConsole->Reset();
         } break;
 
-        case VRDP_INPUT_SYNCH:
-        {
-            if (cbInput == sizeof(VRDPINPUTSYNCH))
+        case VRDE_INPUT_SYNCH:
+        {
+            if (cbInput == sizeof(VRDEINPUTSYNCH))
             {
                 IKeyboard *pKeyboard = pConsole->getKeyboard();
 
-                const VRDPINPUTSYNCH *pInputSynch = (VRDPINPUTSYNCH *)pvInput;
-
-                server->m_InputSynch.fClientNumLock    = (pInputSynch->uLockStatus & VRDP_INPUT_SYNCH_NUMLOCK) != 0;
-                server->m_InputSynch.fClientCapsLock   = (pInputSynch->uLockStatus & VRDP_INPUT_SYNCH_CAPITAL) != 0;
-                server->m_InputSynch.fClientScrollLock = (pInputSynch->uLockStatus & VRDP_INPUT_SYNCH_SCROLL) != 0;
+                const VRDEINPUTSYNCH *pInputSynch = (VRDEINPUTSYNCH *)pvInput;
+
+                server->m_InputSynch.fClientNumLock    = (pInputSynch->uLockStatus & VRDE_INPUT_SYNCH_NUMLOCK) != 0;
+                server->m_InputSynch.fClientCapsLock   = (pInputSynch->uLockStatus & VRDE_INPUT_SYNCH_CAPITAL) != 0;
+                server->m_InputSynch.fClientScrollLock = (pInputSynch->uLockStatus & VRDE_INPUT_SYNCH_SCROLL) != 0;
 
                 /* The client initiated synchronization. Always make the guest to reflect the client state.
@@ -1267,5 +1267,5 @@
         if (loadVRDPLibrary())
         {
-            rc = mpfnVRDPCreateServer(&mCallbacks.header, this, (VRDPINTERFACEHDR **)&mpEntryPoints, &mhServer);
+            rc = mpfnVRDPCreateServer(&mCallbacks.header, this, (VRDEINTERFACEHDR **)&mpEntryPoints, &mhServer);
 
             if (RT_SUCCESS(rc))
@@ -1296,5 +1296,5 @@
     if (mpEntryPoints && mhServer)
     {
-        mpEntryPoints->VRDPEnableConnections(mhServer, true);
+        mpEntryPoints->VRDEEnableConnections(mhServer, true);
     }
 #endif /* VBOX_WITH_VRDP */
@@ -1306,15 +1306,15 @@
     if (mpEntryPoints && mhServer)
     {
-        mpEntryPoints->VRDPDisconnect(mhServer, u32ClientId, fReconnect);
+        mpEntryPoints->VRDEDisconnect(mhServer, u32ClientId, fReconnect);
     }
 #endif /* VBOX_WITH_VRDP */
 }
 
-void ConsoleVRDPServer::MousePointerUpdate(const VRDPCOLORPOINTER *pPointer)
+void ConsoleVRDPServer::MousePointerUpdate(const VRDECOLORPOINTER *pPointer)
 {
 #ifdef VBOX_WITH_VRDP
     if (mpEntryPoints && mhServer)
     {
-        mpEntryPoints->VRDPColorPointer(mhServer, pPointer);
+        mpEntryPoints->VRDEColorPointer(mhServer, pPointer);
     }
 #endif /* VBOX_WITH_VRDP */
@@ -1326,5 +1326,5 @@
     if (mpEntryPoints && mhServer)
     {
-        mpEntryPoints->VRDPHidePointer(mhServer);
+        mpEntryPoints->VRDEHidePointer(mhServer);
     }
 #endif /* VBOX_WITH_VRDP */
@@ -1338,5 +1338,5 @@
     if (mhServer)
     {
-        HVRDPSERVER hServer = mhServer;
+        HVRDESERVER hServer = mhServer;
 
         /* Reset the handle to avoid further calls to the server. */
@@ -1345,5 +1345,5 @@
         if (mpEntryPoints && hServer)
         {
-            mpEntryPoints->VRDPDestroy(hServer);
+            mpEntryPoints->VRDEDestroy(hServer);
         }
     }
@@ -1649,5 +1649,5 @@
     switch (u32Function)
     {
-        case VRDP_CLIPBOARD_FUNCTION_FORMAT_ANNOUNCE:
+        case VRDE_CLIPBOARD_FUNCTION_FORMAT_ANNOUNCE:
         {
             if (pServer->mpfnClipboardCallback)
@@ -1660,5 +1660,5 @@
         } break;
 
-        case VRDP_CLIPBOARD_FUNCTION_DATA_READ:
+        case VRDE_CLIPBOARD_FUNCTION_DATA_READ:
         {
             if (pServer->mpfnClipboardCallback)
@@ -1705,6 +1705,6 @@
             if (mpEntryPoints && pServer->mhServer)
             {
-                mpEntryPoints->VRDPClipboard(pServer->mhServer,
-                                             VRDP_CLIPBOARD_FUNCTION_FORMAT_ANNOUNCE,
+                mpEntryPoints->VRDEClipboard(pServer->mhServer,
+                                             VRDE_CLIPBOARD_FUNCTION_FORMAT_ANNOUNCE,
                                              pParms->u32Format,
                                              NULL,
@@ -1722,6 +1722,6 @@
             if (mpEntryPoints && pServer->mhServer)
             {
-                mpEntryPoints->VRDPClipboard(pServer->mhServer,
-                                             VRDP_CLIPBOARD_FUNCTION_DATA_READ,
+                mpEntryPoints->VRDEClipboard(pServer->mhServer,
+                                             VRDE_CLIPBOARD_FUNCTION_DATA_READ,
                                              pParms->u32Format,
                                              pParms->u.pvData,
@@ -1735,6 +1735,6 @@
             if (mpEntryPoints && pServer->mhServer)
             {
-                mpEntryPoints->VRDPClipboard(pServer->mhServer,
-                                             VRDP_CLIPBOARD_FUNCTION_DATA_WRITE,
+                mpEntryPoints->VRDEClipboard(pServer->mhServer,
+                                             VRDE_CLIPBOARD_FUNCTION_DATA_WRITE,
                                              pParms->u32Format,
                                              pParms->u.pvData,
@@ -2050,5 +2050,5 @@
     if (mpEntryPoints && mhServer)
     {
-        mpEntryPoints->VRDPUpdate(mhServer, uScreenId, pvUpdate, cbUpdate);
+        mpEntryPoints->VRDEUpdate(mhServer, uScreenId, pvUpdate, cbUpdate);
     }
 #endif
@@ -2060,5 +2060,5 @@
     if (mpEntryPoints && mhServer)
     {
-        mpEntryPoints->VRDPResize(mhServer);
+        mpEntryPoints->VRDEResize(mhServer);
     }
 #endif
@@ -2068,5 +2068,5 @@
 {
 #ifdef VBOX_WITH_VRDP
-    VRDPORDERHDR update;
+    VRDEORDERHDR update;
     update.x = x;
     update.y = y;
@@ -2075,15 +2075,15 @@
     if (mpEntryPoints && mhServer)
     {
-        mpEntryPoints->VRDPUpdate(mhServer, uScreenId, &update, sizeof(update));
+        mpEntryPoints->VRDEUpdate(mhServer, uScreenId, &update, sizeof(update));
     }
 #endif
 }
 
-void ConsoleVRDPServer::SendAudioSamples(void *pvSamples, uint32_t cSamples, VRDPAUDIOFORMAT format) const
+void ConsoleVRDPServer::SendAudioSamples(void *pvSamples, uint32_t cSamples, VRDEAUDIOFORMAT format) const
 {
 #ifdef VBOX_WITH_VRDP
     if (mpEntryPoints && mhServer)
     {
-        mpEntryPoints->VRDPAudioSamples(mhServer, pvSamples, cSamples, format);
+        mpEntryPoints->VRDEAudioSamples(mhServer, pvSamples, cSamples, format);
     }
 #endif
@@ -2095,5 +2095,5 @@
     if (mpEntryPoints && mhServer)
     {
-        mpEntryPoints->VRDPAudioVolume(mhServer, left, right);
+        mpEntryPoints->VRDEAudioVolume(mhServer, left, right);
     }
 #endif
@@ -2105,5 +2105,5 @@
     if (mpEntryPoints && mhServer)
     {
-        mpEntryPoints->VRDPUSBRequest(mhServer, u32ClientId, pvParms, cbParms);
+        mpEntryPoints->VRDEUSBRequest(mhServer, u32ClientId, pvParms, cbParms);
     }
 #endif
@@ -2113,5 +2113,5 @@
 {
 #ifdef VBOX_WITH_VRDP
-    if (index == VRDP_QI_PORT)
+    if (index == VRDE_QI_PORT)
     {
         uint32_t cbOut = sizeof(int32_t);
@@ -2125,5 +2125,5 @@
     else if (mpEntryPoints && mhServer)
     {
-        mpEntryPoints->VRDPQueryInfo(mhServer, index, pvBuffer, cbBuffer, pcbOut);
+        mpEntryPoints->VRDEQueryInfo(mhServer, index, pvBuffer, cbBuffer, pcbOut);
     }
 #endif
@@ -2357,19 +2357,19 @@
     extern void IMPL_GETTER_BSTR_DUMMY(void)
 
-IMPL_GETTER_BOOL   (BOOL,    Active,             VRDP_QI_ACTIVE);
-IMPL_GETTER_SCALAR (LONG,    Port,               VRDP_QI_PORT,                  0);
-IMPL_GETTER_SCALAR (ULONG,   NumberOfClients,    VRDP_QI_NUMBER_OF_CLIENTS,     0);
-IMPL_GETTER_SCALAR (LONG64,  BeginTime,          VRDP_QI_BEGIN_TIME,            0);
-IMPL_GETTER_SCALAR (LONG64,  EndTime,            VRDP_QI_END_TIME,              0);
-IMPL_GETTER_SCALAR (LONG64,  BytesSent,          VRDP_QI_BYTES_SENT,            INT64_MAX);
-IMPL_GETTER_SCALAR (LONG64,  BytesSentTotal,     VRDP_QI_BYTES_SENT_TOTAL,      INT64_MAX);
-IMPL_GETTER_SCALAR (LONG64,  BytesReceived,      VRDP_QI_BYTES_RECEIVED,        INT64_MAX);
-IMPL_GETTER_SCALAR (LONG64,  BytesReceivedTotal, VRDP_QI_BYTES_RECEIVED_TOTAL,  INT64_MAX);
-IMPL_GETTER_BSTR   (BSTR,    User,               VRDP_QI_USER);
-IMPL_GETTER_BSTR   (BSTR,    Domain,             VRDP_QI_DOMAIN);
-IMPL_GETTER_BSTR   (BSTR,    ClientName,         VRDP_QI_CLIENT_NAME);
-IMPL_GETTER_BSTR   (BSTR,    ClientIP,           VRDP_QI_CLIENT_IP);
-IMPL_GETTER_SCALAR (ULONG,   ClientVersion,      VRDP_QI_CLIENT_VERSION,        0);
-IMPL_GETTER_SCALAR (ULONG,   EncryptionStyle,    VRDP_QI_ENCRYPTION_STYLE,      0);
+IMPL_GETTER_BOOL   (BOOL,    Active,             VRDE_QI_ACTIVE);
+IMPL_GETTER_SCALAR (LONG,    Port,               VRDE_QI_PORT,                  0);
+IMPL_GETTER_SCALAR (ULONG,   NumberOfClients,    VRDE_QI_NUMBER_OF_CLIENTS,     0);
+IMPL_GETTER_SCALAR (LONG64,  BeginTime,          VRDE_QI_BEGIN_TIME,            0);
+IMPL_GETTER_SCALAR (LONG64,  EndTime,            VRDE_QI_END_TIME,              0);
+IMPL_GETTER_SCALAR (LONG64,  BytesSent,          VRDE_QI_BYTES_SENT,            INT64_MAX);
+IMPL_GETTER_SCALAR (LONG64,  BytesSentTotal,     VRDE_QI_BYTES_SENT_TOTAL,      INT64_MAX);
+IMPL_GETTER_SCALAR (LONG64,  BytesReceived,      VRDE_QI_BYTES_RECEIVED,        INT64_MAX);
+IMPL_GETTER_SCALAR (LONG64,  BytesReceivedTotal, VRDE_QI_BYTES_RECEIVED_TOTAL,  INT64_MAX);
+IMPL_GETTER_BSTR   (BSTR,    User,               VRDE_QI_USER);
+IMPL_GETTER_BSTR   (BSTR,    Domain,             VRDE_QI_DOMAIN);
+IMPL_GETTER_BSTR   (BSTR,    ClientName,         VRDE_QI_CLIENT_NAME);
+IMPL_GETTER_BSTR   (BSTR,    ClientIP,           VRDE_QI_CLIENT_IP);
+IMPL_GETTER_SCALAR (ULONG,   ClientVersion,      VRDE_QI_CLIENT_VERSION,        0);
+IMPL_GETTER_SCALAR (ULONG,   EncryptionStyle,    VRDE_QI_ENCRYPTION_STYLE,      0);
 
 #undef IMPL_GETTER_BSTR
Index: /trunk/src/VBox/Main/RemoteUSBBackend.cpp
===================================================================
--- /trunk/src/VBox/Main/RemoteUSBBackend.cpp	(revision 33003)
+++ /trunk/src/VBox/Main/RemoteUSBBackend.cpp	(revision 33004)
@@ -22,5 +22,5 @@
 #include "RemoteUSBDeviceImpl.h"
 
-#include <VBox/vrdpapi.h>
+#include <VBox/RemoteDesktop/VRDE.h>
 #include <VBox/vrdpusb.h>
 #include <VBox/err.h>
@@ -93,6 +93,6 @@
     bool      fInput;                  /* This URB receives data from the client. */
 
-    uint32_t  u32TransferredLen;       /* For VRDP_USB_DIRECTION_OUT URBs = bytes written.
-                                        * For VRDP_USB_DIRECTION_IN URBs = bytes received.
+    uint32_t  u32TransferredLen;       /* For VRDE_USB_DIRECTION_OUT URBs = bytes written.
+                                        * For VRDE_USB_DIRECTION_IN URBs = bytes received.
                                         */
 } REMOTEUSBQURB;
@@ -106,5 +106,5 @@
     RemoteUSBBackend *pOwner;
 
-    VRDPUSBDEVID      id;              /* The remote identifier, assigned by client. */
+    VRDEUSBDEVID      id;              /* The remote identifier, assigned by client. */
 
     uint32_t          u32ClientId;     /* The identifier of the remote client. */
@@ -163,14 +163,14 @@
     switch (code)
     {
-        case VRDP_USB_REQ_DEVICE_LIST:
+        case VRDE_USB_REQ_DEVICE_LIST:
         {
             rc = pThis->saveDeviceList (pvRet, cbRet);
         } break;
 
-        case VRDP_USB_REQ_NEGOTIATE:
-        {
-            if (pvRet && cbRet >= sizeof (VRDPUSBREQNEGOTIATERET))
-            {
-                VRDPUSBREQNEGOTIATERET *pret = (VRDPUSBREQNEGOTIATERET *)pvRet;
+        case VRDE_USB_REQ_NEGOTIATE:
+        {
+            if (pvRet && cbRet >= sizeof (VRDEUSBREQNEGOTIATERET))
+            {
+                VRDEUSBREQNEGOTIATERET *pret = (VRDEUSBREQNEGOTIATERET *)pvRet;
 
                 rc = pThis->negotiateResponse (pret, cbRet);
@@ -179,5 +179,5 @@
             {
                 Log(("USBClientResponseCallback: WARNING: not enough data in response: pv = %p, cb = %d, expected %d.\n",
-                     pvRet, cbRet, sizeof (VRDPUSBREQNEGOTIATERET)));
+                     pvRet, cbRet, sizeof (VRDEUSBREQNEGOTIATERET)));
 
                 rc = VERR_INVALID_PARAMETER;
@@ -185,5 +185,5 @@
         } break;
 
-        case VRDP_USB_REQ_REAP_URB:
+        case VRDE_USB_REQ_REAP_URB:
         {
             rc = pThis->reapURB (pvRet, cbRet);
@@ -192,7 +192,7 @@
         } break;
 
-        case VRDP_USB_REQ_QUEUE_URB:
-        case VRDP_USB_REQ_CLOSE:
-        case VRDP_USB_REQ_CANCEL_URB:
+        case VRDE_USB_REQ_QUEUE_URB:
+        case VRDE_USB_REQ_CLOSE:
+        case VRDE_USB_REQ_CANCEL_URB:
         {
             /* Do nothing, actually this should not happen. */
@@ -200,20 +200,20 @@
         } break;
 
-        case VRDP_USB_REQ_OPEN:
-        case VRDP_USB_REQ_RESET:
-        case VRDP_USB_REQ_SET_CONFIG:
-        case VRDP_USB_REQ_CLAIM_INTERFACE:
-        case VRDP_USB_REQ_RELEASE_INTERFACE:
-        case VRDP_USB_REQ_INTERFACE_SETTING:
-        case VRDP_USB_REQ_CLEAR_HALTED_EP:
+        case VRDE_USB_REQ_OPEN:
+        case VRDE_USB_REQ_RESET:
+        case VRDE_USB_REQ_SET_CONFIG:
+        case VRDE_USB_REQ_CLAIM_INTERFACE:
+        case VRDE_USB_REQ_RELEASE_INTERFACE:
+        case VRDE_USB_REQ_INTERFACE_SETTING:
+        case VRDE_USB_REQ_CLEAR_HALTED_EP:
         {
             /*
              * Device specific responses with status codes.
              */
-            if (pvRet && cbRet >= sizeof (VRDPUSBREQRETHDR))
-            {
-                VRDPUSBREQRETHDR *pret = (VRDPUSBREQRETHDR *)pvRet;
-
-                if (pret->status != VRDP_USB_STATUS_SUCCESS)
+            if (pvRet && cbRet >= sizeof (VRDEUSBREQRETHDR))
+            {
+                VRDEUSBREQRETHDR *pret = (VRDEUSBREQRETHDR *)pvRet;
+
+                if (pret->status != VRDE_USB_STATUS_SUCCESS)
                 {
                     REMOTEUSBDEVICE *pDevice = pThis->deviceFromId (pret->id);
@@ -234,5 +234,5 @@
             {
                 Log(("USBClientResponseCallback: WARNING: not enough data in response: pv = %p, cb = %d, expected %d.\n",
-                     pvRet, cbRet, sizeof (VRDPUSBREQRETHDR)));
+                     pvRet, cbRet, sizeof (VRDEUSBREQRETHDR)));
             }
         } break;
@@ -308,7 +308,7 @@
                 if (RT_SUCCESS(rc))
                 {
-                    VRDP_USB_REQ_OPEN_PARM parm;
-
-                    parm.code = VRDP_USB_REQ_OPEN;
+                    VRDE_USB_REQ_OPEN_PARM parm;
+
+                    parm.code = VRDE_USB_REQ_OPEN;
                     parm.id = pDevice->id;
 
@@ -337,7 +337,7 @@
     RemoteUSBBackend *pThis = pDevice->pOwner;
 
-    VRDP_USB_REQ_CLOSE_PARM parm;
-
-    parm.code = VRDP_USB_REQ_CLOSE;
+    VRDE_USB_REQ_CLOSE_PARM parm;
+
+    parm.code = VRDE_USB_REQ_CLOSE;
     parm.id = pDevice->id;
 
@@ -365,7 +365,7 @@
     }
 
-    VRDP_USB_REQ_RESET_PARM parm;
-
-    parm.code = VRDP_USB_REQ_RESET;
+    VRDE_USB_REQ_RESET_PARM parm;
+
+    parm.code = VRDE_USB_REQ_RESET;
     parm.id = pDevice->id;
 
@@ -384,7 +384,7 @@
     }
 
-    VRDP_USB_REQ_SET_CONFIG_PARM parm;
-
-    parm.code = VRDP_USB_REQ_SET_CONFIG;
+    VRDE_USB_REQ_SET_CONFIG_PARM parm;
+
+    parm.code = VRDE_USB_REQ_SET_CONFIG;
     parm.id = pDevice->id;
     parm.configuration = u8Cfg;
@@ -404,7 +404,7 @@
     }
 
-    VRDP_USB_REQ_CLAIM_INTERFACE_PARM parm;
-
-    parm.code = VRDP_USB_REQ_CLAIM_INTERFACE;
+    VRDE_USB_REQ_CLAIM_INTERFACE_PARM parm;
+
+    parm.code = VRDE_USB_REQ_CLAIM_INTERFACE;
     parm.id = pDevice->id;
     parm.iface = u8Ifnum;
@@ -424,7 +424,7 @@
     }
 
-    VRDP_USB_REQ_RELEASE_INTERFACE_PARM parm;
-
-    parm.code = VRDP_USB_REQ_RELEASE_INTERFACE;
+    VRDE_USB_REQ_RELEASE_INTERFACE_PARM parm;
+
+    parm.code = VRDE_USB_REQ_RELEASE_INTERFACE;
     parm.id = pDevice->id;
     parm.iface = u8Ifnum;
@@ -444,7 +444,7 @@
     }
 
-    VRDP_USB_REQ_INTERFACE_SETTING_PARM parm;
-
-    parm.code = VRDP_USB_REQ_INTERFACE_SETTING;
+    VRDE_USB_REQ_INTERFACE_SETTING_PARM parm;
+
+    parm.code = VRDE_USB_REQ_INTERFACE_SETTING;
     parm.id = pDevice->id;
     parm.iface = u8Ifnum;
@@ -465,7 +465,7 @@
     }
 
-    VRDP_USB_REQ_CLEAR_HALTED_EP_PARM parm;
-
-    parm.code = VRDP_USB_REQ_CLEAR_HALTED_EP;
+    VRDE_USB_REQ_CLEAR_HALTED_EP_PARM parm;
+
+    parm.code = VRDE_USB_REQ_CLEAR_HALTED_EP;
     parm.id = pDevice->id;
     parm.ep = u8Ep;
@@ -480,7 +480,7 @@
     RemoteUSBBackend *pThis = pDevice->pOwner;
 
-    VRDP_USB_REQ_CANCEL_URB_PARM parm;
-
-    parm.code = VRDP_USB_REQ_CANCEL_URB;
+    VRDE_USB_REQ_CANCEL_URB_PARM parm;
+
+    parm.code = VRDE_USB_REQ_CANCEL_URB;
     parm.id = pDevice->id;
     parm.handle = pRemoteURB->u32Handle;
@@ -534,5 +534,5 @@
     RemoteUSBBackend *pThis = pDevice->pOwner;
 
-    VRDP_USB_REQ_QUEUE_URB_PARM parm;
+    VRDE_USB_REQ_QUEUE_URB_PARM parm;
     uint32_t u32Handle = 0;
     uint32_t u32DataLen = 0;
@@ -573,5 +573,5 @@
     }
 
-    parm.code = VRDP_USB_REQ_QUEUE_URB;
+    parm.code = VRDE_USB_REQ_QUEUE_URB;
     parm.id = pDevice->id;
 
@@ -588,9 +588,9 @@
     switch(u8Type)
     {
-        case VUSBXFERTYPE_CTRL: parm.type = VRDP_USB_TRANSFER_TYPE_CTRL; break;
-        case VUSBXFERTYPE_ISOC: parm.type = VRDP_USB_TRANSFER_TYPE_ISOC; break;
-        case VUSBXFERTYPE_BULK: parm.type = VRDP_USB_TRANSFER_TYPE_BULK; break;
-        case VUSBXFERTYPE_INTR: parm.type = VRDP_USB_TRANSFER_TYPE_INTR; break;
-        case VUSBXFERTYPE_MSG:  parm.type = VRDP_USB_TRANSFER_TYPE_MSG;  break;
+        case VUSBXFERTYPE_CTRL: parm.type = VRDE_USB_TRANSFER_TYPE_CTRL; break;
+        case VUSBXFERTYPE_ISOC: parm.type = VRDE_USB_TRANSFER_TYPE_ISOC; break;
+        case VUSBXFERTYPE_BULK: parm.type = VRDE_USB_TRANSFER_TYPE_BULK; break;
+        case VUSBXFERTYPE_INTR: parm.type = VRDE_USB_TRANSFER_TYPE_INTR; break;
+        case VUSBXFERTYPE_MSG:  parm.type = VRDE_USB_TRANSFER_TYPE_MSG;  break;
         default: AssertFailed(); rc = VERR_INVALID_PARAMETER; goto l_leave;
     }
@@ -600,7 +600,7 @@
     switch(u8Direction)
     {
-        case VUSB_DIRECTION_SETUP: AssertFailed(); parm.direction = VRDP_USB_DIRECTION_SETUP; break;
-        case VUSB_DIRECTION_IN:    parm.direction = VRDP_USB_DIRECTION_IN;    break;
-        case VUSB_DIRECTION_OUT:   parm.direction = VRDP_USB_DIRECTION_OUT;   break;
+        case VUSB_DIRECTION_SETUP: AssertFailed(); parm.direction = VRDE_USB_DIRECTION_SETUP; break;
+        case VUSB_DIRECTION_IN:    parm.direction = VRDE_USB_DIRECTION_IN;    break;
+        case VUSB_DIRECTION_OUT:   parm.direction = VRDE_USB_DIRECTION_OUT;   break;
         default: AssertFailed(); rc = VERR_INVALID_PARAMETER; goto l_leave;
     }
@@ -619,5 +619,5 @@
     qurb->next       = NULL;
     qurb->prev       = pDevice->pTailQURBs;
-    qurb->u32Err     = VRDP_USB_XFER_OK;
+    qurb->u32Err     = VRDE_USB_XFER_OK;
     qurb->u32Len     = u32Len;
     qurb->pvData     = pvData;
@@ -678,7 +678,7 @@
     if (pThis->pollingEnabledURB ())
     {
-        VRDP_USB_REQ_REAP_URB_PARM parm;
-
-        parm.code = VRDP_USB_REQ_REAP_URB;
+        VRDE_USB_REQ_REAP_URB_PARM parm;
+
+        parm.code = VRDE_USB_REQ_REAP_URB;
 
         pThis->VRDPServer()->SendUSBRequest (pDevice->u32ClientId, &parm, sizeof (parm));
@@ -748,7 +748,7 @@
         if (pThis->pollingEnabledURB ())
         {
-            VRDP_USB_REQ_REAP_URB_PARM parm;
-
-            parm.code = VRDP_USB_REQ_REAP_URB;
+            VRDE_USB_REQ_REAP_URB_PARM parm;
+
+            parm.code = VRDE_USB_REQ_REAP_URB;
 
             pThis->VRDPServer()->SendUSBRequest (u32ClientId, &parm, sizeof (parm));
@@ -818,8 +818,8 @@
         case PollRemoteDevicesStatus_Negotiate:
         {
-            VRDPUSBREQNEGOTIATEPARM parm;
-
-            parm.code = VRDP_USB_REQ_NEGOTIATE;
-            parm.version = VRDP_USB_VERSION;
+            VRDEUSBREQNEGOTIATEPARM parm;
+
+            parm.code = VRDE_USB_REQ_NEGOTIATE;
+            parm.version = VRDE_USB_VERSION;
             parm.flags = 0;
 
@@ -849,7 +849,7 @@
 
             /* Send a request for device list. */
-            VRDP_USB_REQ_DEVICE_LIST_PARM parm;
-
-            parm.code = VRDP_USB_REQ_DEVICE_LIST;
+            VRDE_USB_REQ_DEVICE_LIST_PARM parm;
+
+            parm.code = VRDE_USB_REQ_DEVICE_LIST;
 
             mServer->SendUSBRequest (mu32ClientId, &parm, sizeof (parm));
@@ -864,5 +864,5 @@
             if (mfHasDeviceList)
             {
-                mConsole->processRemoteUSBDevices (mu32ClientId, (VRDPUSBDEVICEDESC *)mpvDeviceList, mcbDeviceList);
+                mConsole->processRemoteUSBDevices (mu32ClientId, (VRDEUSBDEVICEDESC *)mpvDeviceList, mcbDeviceList);
                 LogFlow(("USB::PollRemoteDevices: WaitResponse after process\n"));
 
@@ -950,5 +950,5 @@
     mpDevices (NULL),
     mfWillBeDeleted (false),
-    mClientVersion (0)                   /* VRDP_USB_VERSION_2: the client version. */
+    mClientVersion (0)                   /* VRDE_USB_VERSION_2: the client version. */
 {
     Assert(console);
@@ -991,5 +991,5 @@
 }
 
-int RemoteUSBBackend::negotiateResponse (const VRDPUSBREQNEGOTIATERET *pret, uint32_t cbRet)
+int RemoteUSBBackend::negotiateResponse (const VRDEUSBREQNEGOTIATERET *pret, uint32_t cbRet)
 {
     int rc = VINF_SUCCESS;
@@ -1000,5 +1000,5 @@
              pret->flags));
 
-    if (pret->flags & VRDP_USB_CAPS_FLAG_POLL)
+    if (pret->flags & VRDE_USB_CAPS_FLAG_POLL)
     {
         Log(("RemoteUSBBackend::negotiateResponse: client requested URB polling.\n"));
@@ -1010,13 +1010,13 @@
     }
 
-    /* VRDP_USB_VERSION_2: check the client version. */
-    if (pret->flags & VRDP_USB_CAPS2_FLAG_VERSION)
+    /* VRDE_USB_VERSION_2: check the client version. */
+    if (pret->flags & VRDE_USB_CAPS2_FLAG_VERSION)
     {
         /* This could be a client version > 1. */
-        if (cbRet >= sizeof (VRDPUSBREQNEGOTIATERET_2))
-        {
-            VRDPUSBREQNEGOTIATERET_2 *pret2 = (VRDPUSBREQNEGOTIATERET_2 *)pret;
-
-            if (pret2->u32Version <= VRDP_USB_VERSION)
+        if (cbRet >= sizeof (VRDEUSBREQNEGOTIATERET_2))
+        {
+            VRDEUSBREQNEGOTIATERET_2 *pret2 = (VRDEUSBREQNEGOTIATERET_2 *)pret;
+
+            if (pret2->u32Version <= VRDE_USB_VERSION)
             {
                 /* This is OK. The client wants a version supported by the server. */
@@ -1038,5 +1038,5 @@
     {
         /* This is a client version 1. */
-        mClientVersion = VRDP_USB_VERSION_1;
+        mClientVersion = VRDE_USB_VERSION_1;
     }
 
@@ -1085,5 +1085,5 @@
 }
 
-PREMOTEUSBDEVICE RemoteUSBBackend::deviceFromId (VRDPUSBDEVID id)
+PREMOTEUSBDEVICE RemoteUSBBackend::deviceFromId (VRDEUSBDEVID id)
 {
     request ();
@@ -1144,7 +1144,7 @@
     LogFlow(("RemoteUSBBackend::reapURB: pvBody = %p, cbBody = %d\n", pvBody, cbBody));
 
-    VRDPUSBREQREAPURBBODY *pBody = (VRDPUSBREQREAPURBBODY *)pvBody;
-
-    while (cbBody >= sizeof (VRDPUSBREQREAPURBBODY))
+    VRDEUSBREQREAPURBBODY *pBody = (VRDEUSBREQREAPURBBODY *)pvBody;
+
+    while (cbBody >= sizeof (VRDEUSBREQREAPURBBODY))
     {
         Log(("RemoteUSBBackend::reapURB: id = %d,  flags = %02X, error = %d, handle %d, len = %d.\n",
@@ -1153,16 +1153,16 @@
         uint8_t fu8ReapValidFlags;
 
-        if (mClientVersion == VRDP_USB_VERSION_1 || mClientVersion == VRDP_USB_VERSION_2)
-        {
-            fu8ReapValidFlags = VRDP_USB_REAP_VALID_FLAGS;
+        if (mClientVersion == VRDE_USB_VERSION_1 || mClientVersion == VRDE_USB_VERSION_2)
+        {
+            fu8ReapValidFlags = VRDE_USB_REAP_VALID_FLAGS;
         }
         else
         {
-            fu8ReapValidFlags = VRDP_USB_REAP_VALID_FLAGS_3;
+            fu8ReapValidFlags = VRDE_USB_REAP_VALID_FLAGS_3;
         }
 
         /* Verify client's data. */
         if (   (pBody->flags & ~fu8ReapValidFlags) != 0
-            || sizeof (VRDPUSBREQREAPURBBODY) > cbBody
+            || sizeof (VRDEUSBREQREAPURBBODY) > cbBody
             || pBody->handle == 0)
         {
@@ -1203,36 +1203,36 @@
 
             /* Update the URB error field. */
-            if (mClientVersion == VRDP_USB_VERSION_1)
+            if (mClientVersion == VRDE_USB_VERSION_1)
             {
                 switch(pBody->error)
                 {
-                    case VRDP_USB_XFER_OK:    qurb->u32Err = VUSBSTATUS_OK;    break;
-                    case VRDP_USB_XFER_STALL: qurb->u32Err = VUSBSTATUS_STALL; break;
-                    case VRDP_USB_XFER_DNR:   qurb->u32Err = VUSBSTATUS_DNR;   break;
-                    case VRDP_USB_XFER_CRC:   qurb->u32Err = VUSBSTATUS_CRC;   break;
+                    case VRDE_USB_XFER_OK:    qurb->u32Err = VUSBSTATUS_OK;    break;
+                    case VRDE_USB_XFER_STALL: qurb->u32Err = VUSBSTATUS_STALL; break;
+                    case VRDE_USB_XFER_DNR:   qurb->u32Err = VUSBSTATUS_DNR;   break;
+                    case VRDE_USB_XFER_CRC:   qurb->u32Err = VUSBSTATUS_CRC;   break;
                     default: Log(("RemoteUSBBackend::reapURB: Invalid error %d\n", pBody->error));
                                               qurb->u32Err = VUSBSTATUS_DNR;   break;
                 }
             }
-            else if (   mClientVersion == VRDP_USB_VERSION_2
-                     || mClientVersion == VRDP_USB_VERSION_3)
+            else if (   mClientVersion == VRDE_USB_VERSION_2
+                     || mClientVersion == VRDE_USB_VERSION_3)
             {
                 switch(pBody->error)
                 {
-                    case VRDP_USB_XFER_OK:    qurb->u32Err = VUSBSTATUS_OK;            break;
-                    case VRDP_USB_XFER_STALL: qurb->u32Err = VUSBSTATUS_STALL;         break;
-                    case VRDP_USB_XFER_DNR:   qurb->u32Err = VUSBSTATUS_DNR;           break;
-                    case VRDP_USB_XFER_CRC:   qurb->u32Err = VUSBSTATUS_CRC;           break;
-                    case VRDP_USB_XFER_DO:    qurb->u32Err = VUSBSTATUS_DATA_OVERRUN;  break;
-                    case VRDP_USB_XFER_DU:    qurb->u32Err = VUSBSTATUS_DATA_UNDERRUN; break;
+                    case VRDE_USB_XFER_OK:    qurb->u32Err = VUSBSTATUS_OK;            break;
+                    case VRDE_USB_XFER_STALL: qurb->u32Err = VUSBSTATUS_STALL;         break;
+                    case VRDE_USB_XFER_DNR:   qurb->u32Err = VUSBSTATUS_DNR;           break;
+                    case VRDE_USB_XFER_CRC:   qurb->u32Err = VUSBSTATUS_CRC;           break;
+                    case VRDE_USB_XFER_DO:    qurb->u32Err = VUSBSTATUS_DATA_OVERRUN;  break;
+                    case VRDE_USB_XFER_DU:    qurb->u32Err = VUSBSTATUS_DATA_UNDERRUN; break;
 
                     /* Unmapped errors. */
-                    case VRDP_USB_XFER_BS:
-                    case VRDP_USB_XFER_DTM:
-                    case VRDP_USB_XFER_PCF:
-                    case VRDP_USB_XFER_UPID:
-                    case VRDP_USB_XFER_BO:
-                    case VRDP_USB_XFER_BU:
-                    case VRDP_USB_XFER_ERR:
+                    case VRDE_USB_XFER_BS:
+                    case VRDE_USB_XFER_DTM:
+                    case VRDE_USB_XFER_PCF:
+                    case VRDE_USB_XFER_UPID:
+                    case VRDE_USB_XFER_BO:
+                    case VRDE_USB_XFER_BU:
+                    case VRDE_USB_XFER_ERR:
                     default: Log(("RemoteUSBBackend::reapURB: Invalid error %d\n", pBody->error));
                                               qurb->u32Err = VUSBSTATUS_DNR;   break;
@@ -1249,5 +1249,5 @@
             if (qurb->fInput)
             {
-                cbBodyData = pBody->len; /* VRDP_USB_DIRECTION_IN URBs include some data. */
+                cbBodyData = pBody->len; /* VRDE_USB_DIRECTION_IN URBs include some data. */
             }
 
@@ -1272,5 +1272,5 @@
 
                 if (   qurb->u32Err == VUSBSTATUS_OK
-                    && (pBody->flags & VRDP_USB_REAP_FLAG_FRAGMENT) != 0)
+                    && (pBody->flags & VRDE_USB_REAP_FLAG_FRAGMENT) != 0)
                 {
                     /* If the client sends fragmented packets, accumulate the URB data. */
@@ -1312,5 +1312,5 @@
         releaseDevice (pDevice);
 
-        if (pBody->flags & VRDP_USB_REAP_FLAG_LAST)
+        if (pBody->flags & VRDE_USB_REAP_FLAG_LAST)
         {
             break;
@@ -1318,5 +1318,5 @@
 
         /* There is probably a further URB body. */
-        uint32_t cbBodySize = sizeof (VRDPUSBREQREAPURBBODY) + cbBodyData;
+        uint32_t cbBodySize = sizeof (VRDEUSBREQREAPURBBODY) + cbBodyData;
 
         if (cbBodySize > cbBody)
@@ -1326,5 +1326,5 @@
         }
 
-        pBody = (VRDPUSBREQREAPURBBODY *)((uint8_t *)pBody + cbBodySize);
+        pBody = (VRDEUSBREQREAPURBBODY *)((uint8_t *)pBody + cbBodySize);
         cbBody -= cbBodySize;
     }
Index: /trunk/src/VBox/Main/RemoteUSBDeviceImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/RemoteUSBDeviceImpl.cpp	(revision 33003)
+++ /trunk/src/VBox/Main/RemoteUSBDeviceImpl.cpp	(revision 33004)
@@ -28,5 +28,5 @@
 #include <VBox/err.h>
 
-#include <VBox/vrdpapi.h>
+#include <VBox/RemoteDesktop/VRDE.h>
 #include <VBox/vrdpusb.h>
 
@@ -54,5 +54,5 @@
  * Initializes the remote USB device object.
  */
-HRESULT RemoteUSBDevice::init (uint32_t u32ClientId, VRDPUSBDEVICEDESC *pDevDesc)
+HRESULT RemoteUSBDevice::init (uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevDesc)
 {
     LogFlowThisFunc(("u32ClientId=%d,pDevDesc=%p\n", u32ClientId, pDevDesc));
Index: /trunk/src/VBox/Main/include/ConsoleImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 33003)
+++ /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 33004)
@@ -39,5 +39,5 @@
 class Progress;
 
-#include <VBox/vrdpapi.h>
+#include <VBox/RemoteDesktop/VRDE.h>
 #include <VBox/pdmdrv.h>
 #ifdef VBOX_WITH_GUEST_PROPS
@@ -211,5 +211,5 @@
     void VRDPInterceptClipboard(uint32_t u32ClientId);
 
-    void processRemoteUSBDevices(uint32_t u32ClientId, VRDPUSBDEVICEDESC *pDevList, uint32_t cbDevList);
+    void processRemoteUSBDevices(uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevList, uint32_t cbDevList);
 
     // callback callers (partly; for some events console callbacks are notified
Index: /trunk/src/VBox/Main/include/ConsoleVRDPServer.h
===================================================================
--- /trunk/src/VBox/Main/include/ConsoleVRDPServer.h	(revision 33003)
+++ /trunk/src/VBox/Main/include/ConsoleVRDPServer.h	(revision 33004)
@@ -97,5 +97,5 @@
     void EnableConnections (void);
     void DisconnectClient (uint32_t u32ClientId, bool fReconnect);
-    void MousePointerUpdate (const VRDPCOLORPOINTER *pPointer);
+    void MousePointerUpdate (const VRDECOLORPOINTER *pPointer);
     void MousePointerHide (void);
 
@@ -134,5 +134,5 @@
     void SendUpdateBitmap (unsigned uScreenId, uint32_t x, uint32_t y, uint32_t w, uint32_t h) const;
 
-    void SendAudioSamples (void *pvSamples, uint32_t cSamples, VRDPAUDIOFORMAT format) const;
+    void SendAudioSamples (void *pvSamples, uint32_t cSamples, VRDEAUDIOFORMAT format) const;
     void SendAudioVolume (uint16_t left, uint16_t right) const;
     void SendUSBRequest (uint32_t u32ClientId, void *pvParms, uint32_t cbParms) const;
@@ -147,5 +147,5 @@
 
 #ifdef VBOX_WITH_VRDP
-    HVRDPSERVER mhServer;
+    HVRDESERVER mhServer;
 
     static bool loadVRDPLibrary (void);
@@ -154,8 +154,8 @@
     static RTLDRMOD mVRDPLibrary;
 
-    static PFNVRDPCREATESERVER mpfnVRDPCreateServer;
-
-    static VRDPENTRYPOINTS_1 *mpEntryPoints;
-    static VRDPCALLBACKS_1 mCallbacks;
+    static PFNVRDECREATESERVER mpfnVRDPCreateServer;
+
+    static VRDEENTRYPOINTS_1 *mpEntryPoints;
+    static VRDECALLBACKS_1 mCallbacks;
 
     static DECLCALLBACK(int)  VRDPCallbackQueryProperty     (void *pvCallback, uint32_t index, void *pvBuffer, uint32_t cbBuffer, uint32_t *pcbOut);
@@ -166,5 +166,5 @@
     static DECLCALLBACK(int)  VRDPCallbackUSB               (void *pvCallback, void *pvIntercept, uint32_t u32ClientId, uint8_t u8Code, const void *pvRet, uint32_t cbRet);
     static DECLCALLBACK(int)  VRDPCallbackClipboard         (void *pvCallback, void *pvIntercept, uint32_t u32ClientId, uint32_t u32Function, uint32_t u32Format, const void *pvData, uint32_t cbData);
-    static DECLCALLBACK(bool) VRDPCallbackFramebufferQuery  (void *pvCallback, unsigned uScreenId, VRDPFRAMEBUFFERINFO *pInfo);
+    static DECLCALLBACK(bool) VRDPCallbackFramebufferQuery  (void *pvCallback, unsigned uScreenId, VRDEFRAMEBUFFERINFO *pInfo);
     static DECLCALLBACK(void) VRDPCallbackFramebufferLock   (void *pvCallback, unsigned uScreenId);
     static DECLCALLBACK(void) VRDPCallbackFramebufferUnlock (void *pvCallback, unsigned uScreenId);
Index: /trunk/src/VBox/Main/include/RemoteUSBBackend.h
===================================================================
--- /trunk/src/VBox/Main/include/RemoteUSBBackend.h	(revision 33003)
+++ /trunk/src/VBox/Main/include/RemoteUSBBackend.h	(revision 33004)
@@ -21,5 +21,5 @@
 #include "RemoteUSBDeviceImpl.h"
 
-#include <VBox/vrdpapi.h>
+#include <VBox/RemoteDesktop/VRDE.h>
 #include <VBox/vrdpusb.h>
 
@@ -78,5 +78,5 @@
         int saveDeviceList (const void *pvList, uint32_t cbList);
 
-        int negotiateResponse (const VRDPUSBREQNEGOTIATERET *pret, uint32_t cbRet);
+        int negotiateResponse (const VRDEUSBREQNEGOTIATERET *pret, uint32_t cbRet);
 
         int reapURB (const void *pvBody, uint32_t cbBody);
@@ -85,5 +85,5 @@
         void release (void);
 
-        PREMOTEUSBDEVICE deviceFromId (VRDPUSBDEVID id);
+        PREMOTEUSBDEVICE deviceFromId (VRDEUSBDEVID id);
 
         void addDevice (PREMOTEUSBDEVICE pDevice);
Index: /trunk/src/VBox/Main/include/RemoteUSBDeviceImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/RemoteUSBDeviceImpl.h	(revision 33003)
+++ /trunk/src/VBox/Main/include/RemoteUSBDeviceImpl.h	(revision 33004)
@@ -24,6 +24,6 @@
 #include "VirtualBoxBase.h"
 
-struct _VRDPUSBDEVICEDESC;
-typedef _VRDPUSBDEVICEDESC VRDPUSBDEVICEDESC;
+struct _VRDEUSBDEVICEDESC;
+typedef _VRDEUSBDEVICEDESC VRDEUSBDEVICEDESC;
 
 class ATL_NO_VTABLE RemoteUSBDevice :
@@ -52,5 +52,5 @@
 
     // public initializer/uninitializer for internal purposes only
-    HRESULT init(uint32_t u32ClientId, VRDPUSBDEVICEDESC *pDevDesc);
+    HRESULT init(uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevDesc);
     void uninit();
 
