usrmarshal.c (c0f90872) | usrmarshal.c (85037eb7) |
---|---|
1/* 2 * Miscellaneous Marshaling Routines 3 * 4 * Copyright 2005 Robert Shearman 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either --- 373 unchanged lines hidden (view full) --- 382 ULONG size = StartingSize; 383 384 TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, phGlobal); 385 386 ALIGN_LENGTH(size, 3); 387 388 size += sizeof(ULONG); 389 | 1/* 2 * Miscellaneous Marshaling Routines 3 * 4 * Copyright 2005 Robert Shearman 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either --- 373 unchanged lines hidden (view full) --- 382 ULONG size = StartingSize; 383 384 TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, phGlobal); 385 386 ALIGN_LENGTH(size, 3); 387 388 size += sizeof(ULONG); 389 |
390 if (LOWORD(*pFlags == MSHCTX_INPROC)) | 390 if (LOWORD(*pFlags) == MSHCTX_INPROC) |
391 size += sizeof(HGLOBAL); 392 else 393 { 394 size += sizeof(ULONG); 395 if (*phGlobal) 396 { 397 SIZE_T ret; 398 size += 3 * sizeof(ULONG); --- 25 unchanged lines hidden (view full) --- 424 * This function is only intended to be called by the RPC runtime. 425 */ 426unsigned char * __RPC_USER HGLOBAL_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, HGLOBAL *phGlobal) 427{ 428 TRACE("(%s, %p, &%p\n", debugstr_user_flags(pFlags), pBuffer, *phGlobal); 429 430 ALIGN_POINTER(pBuffer, 3); 431 | 391 size += sizeof(HGLOBAL); 392 else 393 { 394 size += sizeof(ULONG); 395 if (*phGlobal) 396 { 397 SIZE_T ret; 398 size += 3 * sizeof(ULONG); --- 25 unchanged lines hidden (view full) --- 424 * This function is only intended to be called by the RPC runtime. 425 */ 426unsigned char * __RPC_USER HGLOBAL_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, HGLOBAL *phGlobal) 427{ 428 TRACE("(%s, %p, &%p\n", debugstr_user_flags(pFlags), pBuffer, *phGlobal); 429 430 ALIGN_POINTER(pBuffer, 3); 431 |
432 if (LOWORD(*pFlags == MSHCTX_INPROC)) | 432 if (LOWORD(*pFlags) == MSHCTX_INPROC) |
433 { 434 if (sizeof(*phGlobal) == 8) 435 *(ULONG *)pBuffer = WDT_INPROC64_CALL; 436 else 437 *(ULONG *)pBuffer = WDT_INPROC_CALL; 438 pBuffer += sizeof(ULONG); 439 *(HGLOBAL *)pBuffer = *phGlobal; 440 pBuffer += sizeof(HGLOBAL); --- 126 unchanged lines hidden (view full) --- 567 * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of 568 * which the first parameter is a ULONG. 569 * This function is only intended to be called by the RPC runtime. 570 */ 571void __RPC_USER HGLOBAL_UserFree(ULONG *pFlags, HGLOBAL *phGlobal) 572{ 573 TRACE("(%s, &%p\n", debugstr_user_flags(pFlags), *phGlobal); 574 | 433 { 434 if (sizeof(*phGlobal) == 8) 435 *(ULONG *)pBuffer = WDT_INPROC64_CALL; 436 else 437 *(ULONG *)pBuffer = WDT_INPROC_CALL; 438 pBuffer += sizeof(ULONG); 439 *(HGLOBAL *)pBuffer = *phGlobal; 440 pBuffer += sizeof(HGLOBAL); --- 126 unchanged lines hidden (view full) --- 567 * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of 568 * which the first parameter is a ULONG. 569 * This function is only intended to be called by the RPC runtime. 570 */ 571void __RPC_USER HGLOBAL_UserFree(ULONG *pFlags, HGLOBAL *phGlobal) 572{ 573 TRACE("(%s, &%p\n", debugstr_user_flags(pFlags), *phGlobal); 574 |
575 if (LOWORD(*pFlags != MSHCTX_INPROC) && *phGlobal) | 575 if (LOWORD(*pFlags) != MSHCTX_INPROC && *phGlobal) |
576 GlobalFree(*phGlobal); 577} 578 579/****************************************************************************** 580 * HBITMAP_UserSize [OLE32.@] 581 * 582 * Calculates the buffer size required to marshal a bitmap. 583 * --- 2566 unchanged lines hidden --- | 576 GlobalFree(*phGlobal); 577} 578 579/****************************************************************************** 580 * HBITMAP_UserSize [OLE32.@] 581 * 582 * Calculates the buffer size required to marshal a bitmap. 583 * --- 2566 unchanged lines hidden --- |