Changeset 11659 in vbox for trunk/src/VBox/Main
- Timestamp:
- Aug 26, 2008 12:32:46 PM (16 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/KeyboardImpl.cpp
r11655 r11659 25 25 #include "Logging.h" 26 26 27 #include <VBox/com/array.h>28 27 #include <VBox/pdmdrv.h> 29 28 #include <iprt/asm.h> … … 149 148 This value can be NULL. 150 149 */ 151 STDMETHODIMP Keyboard::PutScancodes(ComSafeArrayIn (LONG, scancodes), 150 STDMETHODIMP Keyboard::PutScancodes(LONG *scancodes, 151 ULONG count, 152 152 ULONG *codesStored) 153 153 { 154 if ( ComSafeArrayInIsNull(scancodes))154 if (!scancodes) 155 155 return E_INVALIDARG; 156 156 … … 160 160 CHECK_CONSOLE_DRV (mpDrv); 161 161 162 com::SafeArray <LONG> keys(ComSafeArrayInArg(scancodes));162 LONG *currentScancode = scancodes; 163 163 int rcVBox = VINF_SUCCESS; 164 164 165 for (uint32_t i = 0; (i < keys.size()) && VBOX_SUCCESS(rcVBox); i++)166 { 167 rcVBox = mpDrv->pUpPort->pfnPutEvent(mpDrv->pUpPort, (uint8_t)keys[i]);165 for (uint32_t i = 0; (i < count) && VBOX_SUCCESS(rcVBox); i++, currentScancode++) 166 { 167 rcVBox = mpDrv->pUpPort->pfnPutEvent(mpDrv->pUpPort, *(uint8_t*)currentScancode); 168 168 } 169 169 … … 174 174 /// @todo is it actually possible that not all scancodes can be transmitted? 175 175 if (codesStored) 176 *codesStored = keys.size();176 *codesStored = count; 177 177 178 178 return S_OK; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r11655 r11659 7707 7707 <interface 7708 7708 name="IKeyboard" extends="$unknown" 7709 uuid=" 2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"7709 uuid="FD443EC1-000A-4F5B-9282-D72760A66916" 7710 7710 wsmap="managed" 7711 7711 > … … 7724 7724 <method name="putScancodes"> 7725 7725 <desc>Sends an array of scancode to the keyboard.</desc> 7726 <param name="scancodes" type="long" dir="in" safearray="yes"/> 7726 <param name="scancodes" type="long" dir="in" array="count"/> 7727 <param name="count" type="unsigned long" dir="in"/> 7727 7728 <param name="codesStored" type="unsigned long" dir="return"/> 7728 7729 </method> -
trunk/src/VBox/Main/include/KeyboardImpl.h
r11655 r11659 72 72 73 73 STDMETHOD(PutScancode)(LONG scancode); 74 STDMETHOD(PutScancodes)(ComSafeArrayIn (LONG, scancodes), 74 STDMETHOD(PutScancodes)(LONG *scancodes, 75 ULONG count, 75 76 ULONG *codesStored); 76 77 STDMETHOD(PutCAD)();
Note:
See TracChangeset
for help on using the changeset viewer.