Changeset 9653 for trunk/src/kernel32/hmfile.cpp
- Timestamp:
- Jan 10, 2003, 1:57:14 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/hmfile.cpp
r9530 r9653 1 /* $Id: hmfile.cpp,v 1.3 7 2002-12-19 12:55:27sandervl Exp $ */1 /* $Id: hmfile.cpp,v 1.38 2003-01-10 12:57:13 sandervl Exp $ */ 2 2 3 3 /* … … 351 351 { 352 352 memcpy(pHMHandleData, &duphdata, sizeof(duphdata)); 353 354 if(fInherit) SetHandleInformation(pHMHandleData, ~HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT); 355 353 356 SetLastError(ERROR_SUCCESS); 354 357 return TRUE; … … 368 371 if (rc) 369 372 { 370 dprintf(("ERROR: DulicateHandle: OSLibDosDupHandle(%s) failed = %u\n", 371 rc, 372 srcfileinfo->lpszFileName)); 373 dprintf(("ERROR: DuplicateHandle: OSLibDosDupHandle(%s) failed = %u", 374 srcfileinfo->lpszFileName, rc)); 373 375 SetLastError(rc); 374 376 return FALSE; // ERROR 375 377 } 376 378 else { 379 if(fInherit) SetHandleInformation(pHMHandleData, ~HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT); 380 377 381 SetLastError(ERROR_SUCCESS); 378 382 pHMHandleData->hHMHandle = *desthandle; … … 386 390 return FALSE; 387 391 } 392 } 393 394 /***************************************************************************** 395 * Name : BOOL HMDeviceFileClass::SetHandleInformation 396 * Purpose : The SetHandleInformation function sets certain properties of an 397 * object handle. The information is specified as a set of bit flags. 398 * Parameters: HANDLE hObject handle to an object 399 * DWORD dwMask specifies flags to change 400 * DWORD dwFlags specifies new values for flags 401 * Variables : 402 * Result : TRUE / FALSE 403 * Remark : 404 * Status : 405 * 406 * Author : SvL 407 *****************************************************************************/ 408 BOOL HMDeviceFileClass::SetHandleInformation(PHMHANDLEDATA pHMHandleData, 409 DWORD dwMask, 410 DWORD dwFlags) 411 { 412 DWORD rc; 413 414 pHMHandleData->dwHandleInformation &= ~dwMask; 415 pHMHandleData->dwHandleInformation |= (dwFlags & dwMask); 416 417 rc = OSLibDosSetFHState(pHMHandleData->hHMHandle, 418 pHMHandleData->dwHandleInformation); 419 if (rc) 420 { 421 dprintf(("ERROR: SetHandleInformation: OSLibDosSetFHState failed with %d", rc)); 422 423 SetLastError(rc); 424 return FALSE; 425 } 426 427 SetLastError(ERROR_SUCCESS); 428 return TRUE; 388 429 } 389 430
Note:
See TracChangeset
for help on using the changeset viewer.