Changeset 9435 in vbox for trunk/include
- Timestamp:
- Jun 5, 2008 3:39:11 PM (17 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/HostServices/VBoxClipboardSvc.h
r8155 r9435 90 90 } VBoxClipboardGetHostMsg; 91 91 92 #define VBOX_SHARED_CLIPBOARD_CPARMS_GET_HOST_MSG 2 93 92 94 typedef struct _VBoxClipboardFormats 93 95 { … … 97 99 HGCMFunctionParameter formats; /* OUT uint32_t */ 98 100 } VBoxClipboardFormats; 101 102 #define VBOX_SHARED_CLIPBOARD_CPARMS_FORMATS 1 99 103 100 104 typedef struct _VBoxClipboardReadData … … 115 119 } VBoxClipboardReadData; 116 120 121 #define VBOX_SHARED_CLIPBOARD_CPARMS_READ_DATA 3 122 117 123 typedef struct _VBoxClipboardWriteData 118 124 { … … 125 131 HGCMFunctionParameter ptr; /* IN linear pointer. */ 126 132 } VBoxClipboardWriteData; 133 134 #define VBOX_SHARED_CLIPBOARD_CPARMS_WRITE_DATA 2 135 127 136 #pragma pack () 128 137 -
trunk/include/VBox/VBoxGuest.h
r9215 r9435 163 163 VMMDevReq_HGCMConnect = 60, 164 164 VMMDevReq_HGCMDisconnect = 61, 165 #ifdef VBOX_WITH_64_BITS_GUESTS 166 VMMDevReq_HGCMCall32 = 62, 167 VMMDevReq_HGCMCall64 = 63, 168 #else 165 169 VMMDevReq_HGCMCall = 62, 170 #endif /* VBOX_WITH_64_BITS_GUESTS */ 166 171 #endif 167 172 VMMDevReq_VideoAccelEnable = 70, … … 179 184 VMMDevReq_SizeHack = 0x7fffffff 180 185 } VMMDevRequestType; 186 187 #ifdef VBOX_WITH_64_BITS_GUESTS 188 /* 189 * Constants and structures are redefined for the guest. 190 * 191 * Host code MUST always use either *32 or *64 variant explicitely. 192 * Host source code will use VBOX_HGCM_HOST_CODE define to catch undefined 193 * data types and constants. 194 * 195 * This redefinition means that the new additions builds will use 196 * the *64 or *32 variants depending on the current architecture bit count (ARCH_BITS). 197 */ 198 # ifndef VBOX_HGCM_HOST_CODE 199 # if ARCH_BITS == 64 200 # define VMMDevReq_HGCMCall VMMDevReq_HGCMCall64 201 # elif ARCH_BITS == 32 202 # define VMMDevReq_HGCMCall VMMDevReq_HGCMCall32 203 # else 204 # error "Unsupported ARCH_BITS" 205 # endif 206 # endif /* !VBOX_HGCM_HOST_CODE */ 207 #endif /* VBOX_WITH_64_BITS_GUESTS */ 181 208 182 209 /** Version of VMMDevRequestHeader structure. */ … … 662 689 } HGCMFunctionParameterType; 663 690 664 typedef struct _HGCMFUNCTIONPARAMETER 691 #ifdef VBOX_WITH_64_BITS_GUESTS 692 typedef struct _HGCMFUNCTIONPARAMETER32 665 693 { 666 694 HGCMFunctionParameterType type; … … 680 708 } Pointer; 681 709 } u; 710 } HGCMFunctionParameter32; 711 712 typedef struct _HGCMFUNCTIONPARAMETER64 713 { 714 HGCMFunctionParameterType type; 715 union 716 { 717 uint32_t value32; 718 uint64_t value64; 719 struct 720 { 721 uint32_t size; 722 723 union 724 { 725 uint64_t physAddr; 726 uint64_t linearAddr; 727 } u; 728 } Pointer; 729 } u; 730 } HGCMFunctionParameter64; 731 #else 732 typedef struct _HGCMFUNCTIONPARAMETER 733 { 734 HGCMFunctionParameterType type; 735 union 736 { 737 uint32_t value32; 738 uint64_t value64; 739 struct 740 { 741 uint32_t size; 742 743 union 744 { 745 vmmDevHypPhys physAddr; 746 vmmDevHypPtr linearAddr; 747 } u; 748 } Pointer; 749 } u; 682 750 } HGCMFunctionParameter; 751 #endif /* VBOX_WITH_64_BITS_GUESTS */ 752 753 754 #ifdef VBOX_WITH_64_BITS_GUESTS 755 /* Redefine the structure type for the guest code. */ 756 # ifndef VBOX_HGCM_HOST_CODE 757 # if ARCH_BITS == 64 758 # define HGCMFunctionParameter HGCMFunctionParameter64 759 # elif ARCH_BITS == 32 760 # define HGCMFunctionParameter HGCMFunctionParameter32 761 # else 762 # error "Unsupported sizeof (void *)" 763 # endif 764 # endif /* !VBOX_HGCM_HOST_CODE */ 765 #endif /* VBOX_WITH_64_BITS_GUESTS */ 683 766 684 767 typedef struct … … 697 780 #pragma pack() 698 781 699 #define VMMDEV_HGCM_CALL_PARMS(a) ((HGCMFunctionParameter *)((char *)a + sizeof (VMMDevHGCMCall))) 782 #define VMMDEV_HGCM_CALL_PARMS(a) ((HGCMFunctionParameter *)((uint8_t *)a + sizeof (VMMDevHGCMCall))) 783 784 #ifdef VBOX_WITH_64_BITS_GUESTS 785 /* Explicit defines for the host code. */ 786 # ifdef VBOX_HGCM_HOST_CODE 787 # define VMMDEV_HGCM_CALL_PARMS32(a) ((HGCMFunctionParameter32 *)((uint8_t *)a + sizeof (VMMDevHGCMCall))) 788 # define VMMDEV_HGCM_CALL_PARMS64(a) ((HGCMFunctionParameter64 *)((uint8_t *)a + sizeof (VMMDevHGCMCall))) 789 # endif /* VBOX_HGCM_HOST_CODE */ 790 #endif /* VBOX_WITH_64_BITS_GUESTS */ 700 791 701 792 #define VBOX_HGCM_MAX_PARMS 32 … … 1272 1363 case VMMDevReq_HGCMDisconnect: 1273 1364 return sizeof(VMMDevHGCMDisconnect); 1365 #ifdef VBOX_WITH_64_BITS_GUESTS 1366 case VMMDevReq_HGCMCall32: 1367 return sizeof(VMMDevHGCMCall); 1368 case VMMDevReq_HGCMCall64: 1369 return sizeof(VMMDevHGCMCall); 1370 #else 1274 1371 case VMMDevReq_HGCMCall: 1275 1372 return sizeof(VMMDevHGCMCall); 1276 #endif 1373 #endif /* VBOX_WITH_64_BITS_GUESTS */ 1374 #endif /* VBOX_HGCM */ 1277 1375 case VMMDevReq_VideoAccelEnable: 1278 1376 return sizeof(VMMDevVideoAccelEnable);
Note:
See TracChangeset
for help on using the changeset viewer.