Changeset 7801 in vbox for trunk/src/VBox
- Timestamp:
- Apr 8, 2008 1:12:40 PM (17 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxBFE/HGCM.cpp
r6998 r7801 353 353 if (m_fntable.pfnUnload) 354 354 { 355 m_fntable.pfnUnload ( );355 m_fntable.pfnUnload (m_fntable.pvService); 356 356 } 357 357 } … … 551 551 if (pSvc->m_fntable.pfnUnload) 552 552 { 553 pSvc->m_fntable.pfnUnload ( );553 pSvc->m_fntable.pfnUnload (pSvc->m_fntable.pvService); 554 554 } 555 555 … … 568 568 if (pClient) 569 569 { 570 rc = pSvc->m_fntable.pfnConnect (p Msg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient));570 rc = pSvc->m_fntable.pfnConnect (pSvc->m_fntable.pvService, pMsg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient)); 571 571 572 572 hgcmObjDereference (pClient); … … 588 588 if (pClient) 589 589 { 590 rc = pSvc->m_fntable.pfnDisconnect (p Msg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient));590 rc = pSvc->m_fntable.pfnDisconnect (pSvc->m_fntable.pvService, pMsg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient)); 591 591 592 592 hgcmObjDereference (pClient); … … 609 609 if (pClient) 610 610 { 611 pSvc->m_fntable.pfnCall ( (VBOXHGCMCALLHANDLE)pMsg, pMsg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient), pMsg->u32Function, pMsg->cParms, pMsg->paParms);611 pSvc->m_fntable.pfnCall (pSvc->m_fntable.pvService, (VBOXHGCMCALLHANDLE)pMsg, pMsg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient), pMsg->u32Function, pMsg->cParms, pMsg->paParms); 612 612 613 613 hgcmObjDereference (pClient); … … 625 625 LogFlowFunc(("SVC_MSG_HOSTCALL u32Function = %d, cParms = %d, paParms = %p\n", pMsg->u32Function, pMsg->cParms, pMsg->paParms)); 626 626 627 rc = pSvc->m_fntable.pfnHostCall (p Msg->u32Function, pMsg->cParms, pMsg->paParms);627 rc = pSvc->m_fntable.pfnHostCall (pSvc->m_fntable.pvService, pMsg->u32Function, pMsg->cParms, pMsg->paParms); 628 628 } break; 629 629 … … 640 640 if (pSvc->m_fntable.pfnLoadState) 641 641 { 642 rc = pSvc->m_fntable.pfnLoadState (p Msg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient), pMsg->pSSM);642 rc = pSvc->m_fntable.pfnLoadState (pSvc->m_fntable.pvService, pMsg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient), pMsg->pSSM); 643 643 } 644 644 … … 666 666 { 667 667 g_fSaveState = true; 668 rc = pSvc->m_fntable.pfnSaveState (p Msg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient), pMsg->pSSM);668 rc = pSvc->m_fntable.pfnSaveState (pSvc->m_fntable.pvService, pMsg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient), pMsg->pSSM); 669 669 g_fSaveState = false; 670 670 } … … 692 692 if (pSvc->m_fntable.pfnRegisterExtension) 693 693 { 694 rc = pSvc->m_fntable.pfnRegisterExtension (p Msg->pfnExtension, pMsg->pvExtension);694 rc = pSvc->m_fntable.pfnRegisterExtension (pSvc->m_fntable.pvService, pMsg->pfnExtension, pMsg->pvExtension); 695 695 } 696 696 else … … 720 720 if (pSvc->m_fntable.pfnRegisterExtension) 721 721 { 722 rc = pSvc->m_fntable.pfnRegisterExtension ( NULL, NULL);722 rc = pSvc->m_fntable.pfnRegisterExtension (pSvc->m_fntable.pvService, NULL, NULL); 723 723 } 724 724 else -
trunk/src/VBox/HostServices/SharedClipboard/service.cpp
r7165 r7801 242 242 } 243 243 244 static DECLCALLBACK(int) svcUnload (void )244 static DECLCALLBACK(int) svcUnload (void *) 245 245 { 246 246 vboxClipboardDestroy (); … … 253 253 * to the guest side. 254 254 */ 255 static DECLCALLBACK(int) svcDisconnect ( uint32_t u32ClientID, void *pvClient)255 static DECLCALLBACK(int) svcDisconnect (void *, uint32_t u32ClientID, void *pvClient) 256 256 { 257 257 VBOXCLIPBOARDCLIENTDATA *pClient = (VBOXCLIPBOARDCLIENTDATA *)pvClient; … … 268 268 } 269 269 270 static DECLCALLBACK(int) svcConnect ( uint32_t u32ClientID, void *pvClient)270 static DECLCALLBACK(int) svcConnect (void *, uint32_t u32ClientID, void *pvClient) 271 271 { 272 272 VBOXCLIPBOARDCLIENTDATA *pClient = (VBOXCLIPBOARDCLIENTDATA *)pvClient; … … 279 279 uint32_t u32ClientID = g_pClient->u32ClientID; 280 280 281 svcDisconnect( u32ClientID, g_pClient);281 svcDisconnect(NULL, u32ClientID, g_pClient); 282 282 /* And free the resources in the hgcm subsystem. */ 283 283 g_pHelpers->pfnDisconnectClient(g_pHelpers->pvInstance, u32ClientID); … … 301 301 } 302 302 303 static DECLCALLBACK(void) svcCall (VBOXHGCMCALLHANDLE callHandle, 303 static DECLCALLBACK(void) svcCall (void *, 304 VBOXHGCMCALLHANDLE callHandle, 304 305 uint32_t u32ClientID, 305 306 void *pvClient, … … 562 563 * We differentiate between a function handler for the guest and one for the host. 563 564 */ 564 static DECLCALLBACK(int) svcHostCall (uint32_t u32Function, 565 static DECLCALLBACK(int) svcHostCall (void *, 566 uint32_t u32Function, 565 567 uint32_t cParms, 566 568 VBOXHGCMSVCPARM paParms[]) … … 605 607 } 606 608 607 static DECLCALLBACK(int) svcSaveState( uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM)609 static DECLCALLBACK(int) svcSaveState(void *, uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM) 608 610 { 609 611 /* If there are any pending requests, they must be completed here. Since … … 638 640 } 639 641 640 static DECLCALLBACK(int) svcLoadState( uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM)642 static DECLCALLBACK(int) svcLoadState(void *, uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM) 641 643 { 642 644 Log(("svcLoadState: u32ClientID = %d\n", u32ClientID)); … … 704 706 } 705 707 706 static DECLCALLBACK(int) svcRegisterExtension( PFNHGCMSVCEXT pfnExtension, void *pvExtension)708 static DECLCALLBACK(int) svcRegisterExtension(void *, PFNHGCMSVCEXT pfnExtension, void *pvExtension) 707 709 { 708 710 LogFlowFunc(("pfnExtension = %p\n", pfnExtension)); … … 768 770 ptable->pfnLoadState = svcLoadState; 769 771 ptable->pfnRegisterExtension = svcRegisterExtension; 772 ptable->pvService = NULL; 770 773 771 774 /* Service specific initialization. */ -
trunk/src/VBox/HostServices/SharedFolders/service.cpp
r7429 r7801 72 72 static PPDMLED pStatusLed = NULL; 73 73 74 static DECLCALLBACK(int) svcUnload (void )74 static DECLCALLBACK(int) svcUnload (void *) 75 75 { 76 76 int rc = VINF_SUCCESS; … … 81 81 } 82 82 83 static DECLCALLBACK(int) svcConnect ( uint32_t u32ClientID, void *pvClient)83 static DECLCALLBACK(int) svcConnect (void *, uint32_t u32ClientID, void *pvClient) 84 84 { 85 85 int rc = VINF_SUCCESS; … … 93 93 } 94 94 95 static DECLCALLBACK(int) svcDisconnect ( uint32_t u32ClientID, void *pvClient)95 static DECLCALLBACK(int) svcDisconnect (void *, uint32_t u32ClientID, void *pvClient) 96 96 { 97 97 int rc = VINF_SUCCESS; … … 110 110 * as the contents of a shared folder might change in between save and restore. 111 111 */ 112 static DECLCALLBACK(int) svcSaveState( uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM)112 static DECLCALLBACK(int) svcSaveState(void *, uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM) 113 113 { 114 114 SHFLCLIENTDATA *pClient = (SHFLCLIENTDATA *)pvClient; … … 167 167 } 168 168 169 static DECLCALLBACK(int) svcLoadState( uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM)169 static DECLCALLBACK(int) svcLoadState(void *, uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM) 170 170 { 171 171 uint32_t nrMappings; … … 273 273 } 274 274 275 static DECLCALLBACK(void) svcCall ( VBOXHGCMCALLHANDLE callHandle, uint32_t u32ClientID, void *pvClient, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[])275 static DECLCALLBACK(void) svcCall (void *, VBOXHGCMCALLHANDLE callHandle, uint32_t u32ClientID, void *pvClient, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 276 276 { 277 277 int rc = VINF_SUCCESS; … … 1068 1068 * We differentiate between a function handler for the guest and one for the host. The guest is not allowed to add or remove mappings for obvious security reasons. 1069 1069 */ 1070 static DECLCALLBACK(int) svcHostCall ( uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[])1070 static DECLCALLBACK(int) svcHostCall (void *, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 1071 1071 { 1072 1072 int rc = VINF_SUCCESS; … … 1222 1222 } 1223 1223 1224 extern "C" DECLCALLBACK(DECLEXPORT(int)) VBoxHGCMSvcLoad ( VBOXHGCMSVCFNTABLE *ptable)1224 extern "C" DECLCALLBACK(DECLEXPORT(int)) VBoxHGCMSvcLoad (void *, VBOXHGCMSVCFNTABLE *ptable) 1225 1225 { 1226 1226 int rc = VINF_SUCCESS; … … 1254 1254 ptable->pfnSaveState = svcSaveState; 1255 1255 ptable->pfnLoadState = svcLoadState; 1256 ptable->pvService = NULL; 1256 1257 } 1257 1258 -
trunk/src/VBox/HostServices/SharedOpenGL/service.cpp
r5999 r7801 29 29 30 30 31 static DECLCALLBACK(int) svcUnload (void )31 static DECLCALLBACK(int) svcUnload (void *) 32 32 { 33 33 int rc = VINF_SUCCESS; … … 39 39 } 40 40 41 static DECLCALLBACK(int) svcConnect ( uint32_t u32ClientID, void *pvClient)41 static DECLCALLBACK(int) svcConnect (void *, uint32_t u32ClientID, void *pvClient) 42 42 { 43 43 int rc = VINF_SUCCESS; … … 52 52 } 53 53 54 static DECLCALLBACK(int) svcDisconnect ( uint32_t u32ClientID, void *pvClient)54 static DECLCALLBACK(int) svcDisconnect (void *, uint32_t u32ClientID, void *pvClient) 55 55 { 56 56 int rc = VINF_SUCCESS; … … 67 67 * We can't save the OpenGL state, so there's not much to do. Perhaps we should invalidate the client id? 68 68 */ 69 static DECLCALLBACK(int) svcSaveState( uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM)69 static DECLCALLBACK(int) svcSaveState(void *, uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM) 70 70 { 71 71 VBOXOGLCTX *pClient = (VBOXOGLCTX *)pvClient; … … 79 79 } 80 80 81 static DECLCALLBACK(int) svcLoadState( uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM)81 static DECLCALLBACK(int) svcLoadState(void *, uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM) 82 82 { 83 83 VBOXOGLCTX *pClient = (VBOXOGLCTX *)pvClient; … … 91 91 } 92 92 93 static DECLCALLBACK(void) svcCall ( VBOXHGCMCALLHANDLE callHandle, uint32_t u32ClientID, void *pvClient, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[])93 static DECLCALLBACK(void) svcCall (void *, VBOXHGCMCALLHANDLE callHandle, uint32_t u32ClientID, void *pvClient, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 94 94 { 95 95 int rc = VINF_SUCCESS; … … 316 316 * We differentiate between a function handler for the guest and one for the host. The guest is not allowed to add or remove mappings for obvious security reasons. 317 317 */ 318 static DECLCALLBACK(int) svcHostCall ( uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[])318 static DECLCALLBACK(int) svcHostCall (void *, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 319 319 { 320 320 int rc = VINF_SUCCESS; … … 375 375 ptable->pfnSaveState = svcSaveState; 376 376 ptable->pfnLoadState = svcLoadState; 377 ptable->pvService = NULL; 377 378 378 379 vboxglGlobalInit(); -
trunk/src/VBox/Main/hgcm/HGCM.cpp
r7761 r7801 294 294 if (m_fntable.pfnUnload) 295 295 { 296 m_fntable.pfnUnload ( );296 m_fntable.pfnUnload (m_fntable.pvService); 297 297 } 298 298 } … … 492 492 if (pSvc->m_fntable.pfnUnload) 493 493 { 494 pSvc->m_fntable.pfnUnload ( );494 pSvc->m_fntable.pfnUnload (pSvc->m_fntable.pvService); 495 495 } 496 496 … … 509 509 if (pClient) 510 510 { 511 rc = pSvc->m_fntable.pfnConnect (p Msg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient));511 rc = pSvc->m_fntable.pfnConnect (pSvc->m_fntable.pvService, pMsg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient)); 512 512 513 513 hgcmObjDereference (pClient); … … 529 529 if (pClient) 530 530 { 531 rc = pSvc->m_fntable.pfnDisconnect (p Msg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient));531 rc = pSvc->m_fntable.pfnDisconnect (pSvc->m_fntable.pvService, pMsg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient)); 532 532 533 533 hgcmObjDereference (pClient); … … 550 550 if (pClient) 551 551 { 552 pSvc->m_fntable.pfnCall ( (VBOXHGCMCALLHANDLE)pMsg, pMsg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient), pMsg->u32Function, pMsg->cParms, pMsg->paParms);552 pSvc->m_fntable.pfnCall (pSvc->m_fntable.pvService, (VBOXHGCMCALLHANDLE)pMsg, pMsg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient), pMsg->u32Function, pMsg->cParms, pMsg->paParms); 553 553 554 554 hgcmObjDereference (pClient); … … 566 566 LogFlowFunc(("SVC_MSG_HOSTCALL u32Function = %d, cParms = %d, paParms = %p\n", pMsg->u32Function, pMsg->cParms, pMsg->paParms)); 567 567 568 rc = pSvc->m_fntable.pfnHostCall (p Msg->u32Function, pMsg->cParms, pMsg->paParms);568 rc = pSvc->m_fntable.pfnHostCall (pSvc->m_fntable.pvService, pMsg->u32Function, pMsg->cParms, pMsg->paParms); 569 569 } break; 570 570 … … 581 581 if (pSvc->m_fntable.pfnLoadState) 582 582 { 583 rc = pSvc->m_fntable.pfnLoadState (p Msg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient), pMsg->pSSM);583 rc = pSvc->m_fntable.pfnLoadState (pSvc->m_fntable.pvService, pMsg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient), pMsg->pSSM); 584 584 } 585 585 … … 607 607 { 608 608 g_fSaveState = true; 609 rc = pSvc->m_fntable.pfnSaveState (p Msg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient), pMsg->pSSM);609 rc = pSvc->m_fntable.pfnSaveState (pSvc->m_fntable.pvService, pMsg->u32ClientId, HGCM_CLIENT_DATA(pSvc, pClient), pMsg->pSSM); 610 610 g_fSaveState = false; 611 611 } … … 633 633 if (pSvc->m_fntable.pfnRegisterExtension) 634 634 { 635 rc = pSvc->m_fntable.pfnRegisterExtension (p Msg->pfnExtension, pMsg->pvExtension);635 rc = pSvc->m_fntable.pfnRegisterExtension (pSvc->m_fntable.pvService, pMsg->pfnExtension, pMsg->pvExtension); 636 636 } 637 637 else … … 661 661 if (pSvc->m_fntable.pfnRegisterExtension) 662 662 { 663 rc = pSvc->m_fntable.pfnRegisterExtension ( NULL, NULL);663 rc = pSvc->m_fntable.pfnRegisterExtension (pSvc->m_fntable.pvService, NULL, NULL); 664 664 } 665 665 else
Note:
See TracChangeset
for help on using the changeset viewer.