Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

806 lines
18 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1994.
  5. //
  6. // File: filllkb.cxx
  7. //
  8. // Contents: IFillLockBytes and ILockBytes wrapper for async docfiles
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 19-Dec-95 PhilipLa Created
  15. //
  16. //----------------------------------------------------------------------------
  17. #include "astghead.cxx"
  18. #pragma hdrstop
  19. #include "filllkb.hxx"
  20. #include <valid.h>
  21. #include <utils.hxx>
  22. //+---------------------------------------------------------------------------
  23. //
  24. // Member: CFillLockBytes::CFillLockBytes, public
  25. //
  26. // Synopsis: Default constructor
  27. //
  28. // History: 28-Dec-95 PhilipLa Created
  29. //
  30. //----------------------------------------------------------------------------
  31. CFillLockBytes::CFillLockBytes(ILockBytes *pilb)
  32. {
  33. _pilb = pilb;
  34. pilb->AddRef();
  35. _ulHighWater = 0;
  36. _ulFailurePoint = 0;
  37. _dwTerminate = UNTERMINATED;
  38. #ifdef ASYNC
  39. _ppc = NULL;
  40. #else
  41. _hNotifyEvent = INVALID_HANDLE_VALUE;
  42. #endif
  43. _fCSInitialized = FALSE;
  44. _cRefs = 1;
  45. }
  46. //+---------------------------------------------------------------------------
  47. //
  48. // Member: CFillLockBytes::~CFillLockBytes, public
  49. //
  50. // Synopsis: Destructor
  51. //
  52. // History: 28-Dec-95 PhilipLa Created
  53. //
  54. //----------------------------------------------------------------------------
  55. CFillLockBytes::~CFillLockBytes()
  56. {
  57. astgAssert(_pilb == NULL);
  58. #ifdef ASYNC
  59. #ifdef MULTIHEAP
  60. if (_ppc)
  61. {
  62. CSafeMultiHeap smh(_ppc);
  63. if (_ppc->ReleaseSharedMem() == 0)
  64. g_smAllocator.Uninit();
  65. }
  66. #endif
  67. #else
  68. if (_hNotifyEvent != INVALID_HANDLE_VALUE)
  69. {
  70. CloseHandle(_hNotifyEvent);
  71. }
  72. #endif
  73. if (_fCSInitialized)
  74. DeleteCriticalSection(&_csThreadProtect);
  75. }
  76. //+---------------------------------------------------------------------------
  77. //
  78. // Member: CFillLockBytes::Init, public
  79. //
  80. // Synopsis:
  81. //
  82. // Arguments:
  83. //
  84. // Returns: Appropriate status code
  85. //
  86. // Modifies:
  87. //
  88. // History: 11-Jan-96 PhilipLa Created
  89. //
  90. // Notes:
  91. //
  92. //----------------------------------------------------------------------------
  93. SCODE CFillLockBytes::Init(void)
  94. {
  95. SCODE sc;
  96. astgDebugOut((DEB_ITRACE, "In CFillLockBytes::Init:%p()\n", this));
  97. if (FALSE == _fCSInitialized)
  98. {
  99. __try
  100. {
  101. InitializeCriticalSection(&_csThreadProtect);
  102. _fCSInitialized = TRUE;
  103. }
  104. __except( EXCEPTION_EXECUTE_HANDLER )
  105. {
  106. return HRESULT_FROM_WIN32( GetExceptionCode() );
  107. }
  108. }
  109. #ifndef ASYNC
  110. _hNotifyEvent = CreateEvent(NULL,
  111. TRUE,
  112. FALSE,
  113. NULL);
  114. if (_hNotifyEvent == NULL)
  115. {
  116. return Win32ErrorToScode(GetLastError());
  117. }
  118. #endif
  119. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::Init\n"));
  120. return S_OK;
  121. }
  122. //+--------------------------------------------------------------
  123. //
  124. // Member: CFillLockBytes::QueryInterface, public
  125. //
  126. // Synopsis: Returns an object for the requested interface
  127. //
  128. // Arguments: [iid] - Interface ID
  129. // [ppvObj] - Object return
  130. //
  131. // Returns: Appropriate status code
  132. //
  133. // Modifies: [ppvObj]
  134. //
  135. // History: 26-Mar-92 DrewB Created
  136. //
  137. //---------------------------------------------------------------
  138. STDMETHODIMP CFillLockBytes::QueryInterface(REFIID iid, void **ppvObj)
  139. {
  140. SCODE sc;
  141. astgDebugOut((DEB_ITRACE, "In CFillLockBytes::QueryInterface(?, %p)\n",
  142. ppvObj));
  143. astgChk(ValidateOutPtrBuffer(ppvObj));
  144. *ppvObj = NULL;
  145. sc = S_OK;
  146. if (IsEqualIID(iid, IID_IUnknown))
  147. {
  148. *ppvObj = (ILockBytes *)this;
  149. CFillLockBytes::AddRef();
  150. }
  151. else if (IsEqualIID(iid, IID_ILockBytes))
  152. {
  153. *ppvObj = (ILockBytes *)this;
  154. CFillLockBytes::AddRef();
  155. }
  156. else if (IsEqualIID(iid, IID_IFillLockBytes))
  157. {
  158. *ppvObj = (IFillLockBytes *)this;
  159. CFillLockBytes::AddRef();
  160. }
  161. #ifdef ASYNC
  162. else if (IsEqualIID(iid, IID_IFillInfo))
  163. {
  164. *ppvObj = (IFillInfo *)this;
  165. CFillLockBytes::AddRef();
  166. }
  167. #endif
  168. else if (IsEqualIID(iid, IID_IDefaultFillLockBytes))
  169. {
  170. *ppvObj = (IFillLockBytes *)this;
  171. CFillLockBytes::AddRef();
  172. }
  173. else
  174. {
  175. sc = E_NOINTERFACE;
  176. }
  177. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::QueryInterface => %p\n",
  178. ppvObj));
  179. Err:
  180. return ResultFromScode(sc);
  181. }
  182. //+--------------------------------------------------------------
  183. //
  184. // Member: CFillLockBytes::AddRef, public
  185. //
  186. // Synopsis: Increments the ref count
  187. //
  188. // Returns: Appropriate status code
  189. //
  190. // History: 16-Mar-92 DrewB Created
  191. //
  192. //---------------------------------------------------------------
  193. STDMETHODIMP_(ULONG) CFillLockBytes::AddRef(void)
  194. {
  195. InterlockedIncrement (&_cRefs);
  196. return _cRefs;
  197. }
  198. //+---------------------------------------------------------------------------
  199. //
  200. // Member: CFillLockBytes::Release, public
  201. //
  202. // History: 28-Dec-95 PhilipLa Created
  203. //
  204. //----------------------------------------------------------------------------
  205. STDMETHODIMP_(ULONG) CFillLockBytes::Release(void)
  206. {
  207. LONG lRet;
  208. InterlockedDecrement (&_cRefs);
  209. lRet = _cRefs;
  210. if (_dwTerminate == TERMINATED_ABNORMAL)
  211. {
  212. #ifndef ASYNC
  213. ILockBytes *ptempilb;
  214. if (SUCCEEDED(_pilb->QueryInterface(IID_IAsyncFileLockBytes,
  215. (void **)&ptempilb)))
  216. {
  217. ptempilb->Release();
  218. lRet = ((CFileLockBytes *)_pilb)->FileDeleteRelease();
  219. }
  220. else
  221. #endif
  222. }
  223. if (lRet == 0)
  224. {
  225. _pilb->Release();
  226. _pilb = NULL;
  227. delete this;
  228. }
  229. return lRet;
  230. }
  231. //+---------------------------------------------------------------------------
  232. //
  233. // Member: CFillLockBytes::ReadAt, public
  234. //
  235. // Synopsis:
  236. //
  237. // Arguments:
  238. //
  239. // Returns: Appropriate status code
  240. //
  241. // Modifies:
  242. //
  243. // History: 28-Dec-95 PhilipLa Created
  244. //
  245. // Notes:
  246. //
  247. //----------------------------------------------------------------------------
  248. STDMETHODIMP CFillLockBytes::ReadAt(ULARGE_INTEGER ulOffset,
  249. VOID HUGEP *pv,
  250. ULONG cb,
  251. ULONG *pcbRead)
  252. {
  253. SCODE sc;
  254. astgDebugOut((DEB_ITRACE, "In CFillLockBytes::ReadAt:%p()\n", this));
  255. if (_dwTerminate == TERMINATED_ABNORMAL)
  256. {
  257. sc = STG_E_INCOMPLETE;
  258. }
  259. else if ((_dwTerminate == TERMINATED_NORMAL) ||
  260. (ULIGetLow(ulOffset) + cb <= _ulHighWater))
  261. {
  262. sc = _pilb->ReadAt(ulOffset, pv, cb, pcbRead);
  263. }
  264. else
  265. {
  266. *pcbRead = 0;
  267. _ulFailurePoint = cb + ULIGetLow(ulOffset);
  268. sc = E_PENDING;
  269. }
  270. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::ReadAt\n"));
  271. return sc;
  272. }
  273. //+---------------------------------------------------------------------------
  274. //
  275. // Member: CFillLockBytes::WriteAt, public
  276. //
  277. // Synopsis:
  278. //
  279. // Arguments:
  280. //
  281. // Returns: Appropriate status code
  282. //
  283. // Modifies:
  284. //
  285. // History: 28-Dec-95 PhilipLa Created
  286. //
  287. // Notes:
  288. //
  289. //----------------------------------------------------------------------------
  290. STDMETHODIMP CFillLockBytes::WriteAt(ULARGE_INTEGER ulOffset,
  291. VOID const HUGEP *pv,
  292. ULONG cb,
  293. ULONG *pcbWritten)
  294. {
  295. SCODE sc;
  296. astgDebugOut((DEB_ITRACE, "In CFillLockBytes::WriteAt:%p()\n", this));
  297. if (_dwTerminate == TERMINATED_ABNORMAL)
  298. {
  299. sc = STG_E_INCOMPLETE;
  300. }
  301. else if ((_dwTerminate == TERMINATED_NORMAL) ||
  302. (ULIGetLow(ulOffset) + cb <= _ulHighWater))
  303. {
  304. sc = _pilb->WriteAt(ulOffset, pv, cb, pcbWritten);
  305. }
  306. else
  307. {
  308. *pcbWritten = 0;
  309. _ulFailurePoint = cb + ULIGetLow(ulOffset);
  310. sc = E_PENDING;
  311. }
  312. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::WriteAt\n"));
  313. return sc;
  314. }
  315. //+---------------------------------------------------------------------------
  316. //
  317. // Member: CFillLockBytes::Flush, public
  318. //
  319. // Synopsis:
  320. //
  321. // Arguments:
  322. //
  323. // Returns: Appropriate status code
  324. //
  325. // Modifies:
  326. //
  327. // History: 28-Dec-95 PhilipLa Created
  328. //
  329. // Notes:
  330. //
  331. //----------------------------------------------------------------------------
  332. STDMETHODIMP CFillLockBytes::Flush(void)
  333. {
  334. SCODE sc;
  335. astgDebugOut((DEB_ITRACE, "In CFillLockBytes::Flush:%p()\n", this));
  336. sc = _pilb->Flush();
  337. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::Flush\n"));
  338. return sc;
  339. }
  340. //+---------------------------------------------------------------------------
  341. //
  342. // Member: CFillLockBytes::SetSize, public
  343. //
  344. // Synopsis:
  345. //
  346. // Arguments:
  347. //
  348. // Returns: Appropriate status code
  349. //
  350. // Modifies:
  351. //
  352. // History: 28-Dec-95 PhilipLa Created
  353. //
  354. // Notes:
  355. //
  356. //----------------------------------------------------------------------------
  357. STDMETHODIMP CFillLockBytes::SetSize(ULARGE_INTEGER cb)
  358. {
  359. SCODE sc;
  360. astgDebugOut((DEB_ITRACE, "In CFillLockBytes::SetSize:%p()\n", this));
  361. if (_dwTerminate == TERMINATED_ABNORMAL)
  362. {
  363. sc = STG_E_INCOMPLETE;
  364. }
  365. else if ((_dwTerminate == TERMINATED_NORMAL) ||
  366. (ULIGetLow(cb) <= _ulHighWater))
  367. {
  368. sc = _pilb->SetSize(cb);
  369. }
  370. else
  371. {
  372. _ulFailurePoint = ULIGetLow(cb);
  373. sc = E_PENDING;
  374. }
  375. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::SetSize\n"));
  376. return sc;
  377. }
  378. //+---------------------------------------------------------------------------
  379. //
  380. // Member: CFillLockBytes::LockRegion, public
  381. //
  382. // Synopsis:
  383. //
  384. // Arguments:
  385. //
  386. // Returns: Appropriate status code
  387. //
  388. // Modifies:
  389. //
  390. // History: 28-Dec-95 PhilipLa Created
  391. //
  392. // Notes:
  393. //
  394. //----------------------------------------------------------------------------
  395. STDMETHODIMP CFillLockBytes::LockRegion(ULARGE_INTEGER libOffset,
  396. ULARGE_INTEGER cb,
  397. DWORD dwLockType)
  398. {
  399. SCODE sc;
  400. astgDebugOut((DEB_ITRACE, "In CFillLockBytes::LockRegion:%p()\n", this));
  401. sc = _pilb->LockRegion(libOffset, cb, dwLockType);
  402. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::LockRegion\n"));
  403. return sc;
  404. }
  405. //+---------------------------------------------------------------------------
  406. //
  407. // Member: CFillLockBytes::UnlockRegion, public
  408. //
  409. // Synopsis:
  410. //
  411. // Arguments:
  412. //
  413. // Returns: Appropriate status code
  414. //
  415. // Modifies:
  416. //
  417. // History: 28-Dec-95 PhilipLa Created
  418. //
  419. // Notes:
  420. //
  421. //----------------------------------------------------------------------------
  422. STDMETHODIMP CFillLockBytes::UnlockRegion(ULARGE_INTEGER libOffset,
  423. ULARGE_INTEGER cb,
  424. DWORD dwLockType)
  425. {
  426. SCODE sc;
  427. astgDebugOut((DEB_ITRACE, "In CFillLockBytes::UnlockRegion:%p()\n", this));
  428. sc = _pilb->UnlockRegion(libOffset, cb, dwLockType);
  429. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::UnlockRegion\n"));
  430. return sc;
  431. }
  432. //+---------------------------------------------------------------------------
  433. //
  434. // Member: CFillLockBytes::Stat, public
  435. //
  436. // Synopsis:
  437. //
  438. // Arguments:
  439. //
  440. // Returns: Appropriate status code
  441. //
  442. // Modifies:
  443. //
  444. // History: 28-Dec-95 PhilipLa Created
  445. //
  446. // Notes:
  447. //
  448. //----------------------------------------------------------------------------
  449. STDMETHODIMP CFillLockBytes::Stat(STATSTG *pstatstg, DWORD grfStatFlag)
  450. {
  451. SCODE sc;
  452. astgDebugOut((DEB_ITRACE, "In CFillLockBytes::Stat:%p()\n", this));
  453. if (_dwTerminate == TERMINATED_ABNORMAL)
  454. {
  455. sc = STG_E_INCOMPLETE;
  456. }
  457. else
  458. {
  459. sc = _pilb->Stat(pstatstg, grfStatFlag);
  460. }
  461. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::Stat\n"));
  462. return sc;
  463. }
  464. //+---------------------------------------------------------------------------
  465. //
  466. // Member: CFillLockBytes::FillAppend, public
  467. //
  468. // Synopsis:
  469. //
  470. // Arguments:
  471. //
  472. // Returns: Appropriate status code
  473. //
  474. // Modifies:
  475. //
  476. // History: 28-Dec-95 PhilipLa Created
  477. //
  478. // Notes:
  479. //
  480. //----------------------------------------------------------------------------
  481. STDMETHODIMP CFillLockBytes::FillAppend(void const *pv,
  482. ULONG cb,
  483. ULONG *pcbWritten)
  484. {
  485. SCODE sc;
  486. astgDebugOut((DEB_ITRACE, "In CFillLockBytes::FillAppend:%p()\n", this));
  487. sc = ValidateBuffer (pv, cb);
  488. if (!SUCCEEDED(sc))
  489. return sc;
  490. if (_dwTerminate != UNTERMINATED)
  491. {
  492. sc = STG_E_TERMINATED;
  493. }
  494. else
  495. {
  496. ULONG cbWritten;
  497. ULARGE_INTEGER uli;
  498. uli.QuadPart = _ulHighWater;
  499. sc = _pilb->WriteAt(uli, pv, cb, &cbWritten);
  500. _ulHighWater += cbWritten;
  501. if (pcbWritten != NULL)
  502. {
  503. *pcbWritten = cbWritten;
  504. }
  505. #ifdef ASYNC
  506. if (_ppc)
  507. {
  508. HANDLE hEvent = _ppc->GetNotificationEvent();
  509. if (!PulseEvent(hEvent))
  510. {
  511. sc = Win32ErrorToScode(GetLastError());
  512. }
  513. }
  514. #else
  515. if (!PulseEvent(_hNotifyEvent))
  516. {
  517. sc = Win32ErrorToScode(GetLastError());
  518. }
  519. #endif
  520. }
  521. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::FillAppend\n"));
  522. return sc;
  523. }
  524. //+---------------------------------------------------------------------------
  525. //
  526. // Member: CFillLockBytes::FillAt, public
  527. //
  528. // Synopsis:
  529. //
  530. // Arguments:
  531. //
  532. // Returns: Appropriate status code
  533. //
  534. // Modifies:
  535. //
  536. // History: 28-Dec-95 PhilipLa Created
  537. //
  538. // Notes:
  539. //
  540. //----------------------------------------------------------------------------
  541. STDMETHODIMP CFillLockBytes::FillAt(ULARGE_INTEGER ulOffset,
  542. void const *pv,
  543. ULONG cb,
  544. ULONG *pcbWritten)
  545. {
  546. astgDebugOut((DEB_ITRACE, "In CFillLockBytes::FillAt:%p()\n", this));
  547. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::FillAt\n"));
  548. return STG_E_UNIMPLEMENTEDFUNCTION;
  549. }
  550. //+---------------------------------------------------------------------------
  551. //
  552. // Member: CFillLockBytes::SetFillSize, public
  553. //
  554. // Synopsis:
  555. //
  556. // Arguments:
  557. //
  558. // Returns: Appropriate status code
  559. //
  560. // Modifies:
  561. //
  562. // History: 28-Dec-95 PhilipLa Created
  563. //
  564. // Notes:
  565. //
  566. //----------------------------------------------------------------------------
  567. STDMETHODIMP CFillLockBytes::SetFillSize(ULARGE_INTEGER ulSize)
  568. {
  569. SCODE sc;
  570. astgDebugOut((DEB_ITRACE, "In CFillLockBytes::SetFillSize:%p()\n", this));
  571. if (_dwTerminate == TERMINATED_ABNORMAL)
  572. {
  573. sc = STG_E_INCOMPLETE;
  574. }
  575. else
  576. {
  577. sc = _pilb->SetSize(ulSize);
  578. }
  579. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::SetFillSize\n"));
  580. return sc;
  581. }
  582. //+---------------------------------------------------------------------------
  583. //
  584. // Member: CFillLockBytes::Terminate, public
  585. //
  586. // Synopsis:
  587. //
  588. // Arguments:
  589. //
  590. // Returns: Appropriate status code
  591. //
  592. // Modifies:
  593. //
  594. // History: 28-Dec-95 PhilipLa Created
  595. //
  596. // Notes:
  597. //
  598. //----------------------------------------------------------------------------
  599. STDMETHODIMP CFillLockBytes::Terminate(BOOL bCanceled)
  600. {
  601. astgDebugOut((DEB_ITRACE, "In CFillLockBytes::Terminate:%p()\n", this));
  602. _dwTerminate = (bCanceled) ? TERMINATED_ABNORMAL : TERMINATED_NORMAL;
  603. #ifdef ASYNC
  604. if (_ppc)
  605. {
  606. HANDLE hEvent = _ppc->GetNotificationEvent();
  607. if (!SetEvent(hEvent))
  608. {
  609. return Win32ErrorToScode(GetLastError());
  610. }
  611. }
  612. #else
  613. if (!SetEvent(_hNotifyEvent))
  614. {
  615. return Win32ErrorToScode(GetLastError());
  616. }
  617. #endif
  618. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::Terminate\n"));
  619. return S_OK;
  620. }
  621. //+---------------------------------------------------------------------------
  622. //
  623. // Member: CFillLockBytes::GetFailureInfo, public
  624. //
  625. // Synopsis:
  626. //
  627. // Arguments:
  628. //
  629. // Returns: Appropriate status code
  630. //
  631. // Modifies:
  632. //
  633. // History: 11-Jan-96 PhilipLa Created
  634. //
  635. // Notes:
  636. //
  637. //----------------------------------------------------------------------------
  638. STDMETHODIMP CFillLockBytes::GetFailureInfo(ULONG *pulWaterMark,
  639. ULONG *pulFailurePoint)
  640. {
  641. astgDebugOut((DEB_ITRACE,
  642. "In CFillLockBytes::GetFailureInfo:%p()\n", this));
  643. *pulWaterMark = _ulHighWater;
  644. *pulFailurePoint = _ulFailurePoint;
  645. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::GetFailureInfo\n"));
  646. return S_OK;
  647. }
  648. #ifndef ASYNC
  649. //+---------------------------------------------------------------------------
  650. //
  651. // Member: CFillLockBytes::GetNotificationEvent, public
  652. //
  653. // Synopsis:
  654. //
  655. // Arguments:
  656. //
  657. // Returns: Appropriate status code
  658. //
  659. // Modifies:
  660. //
  661. // History: 11-Jan-96 PhilipLa Created
  662. //
  663. // Notes:
  664. //
  665. //----------------------------------------------------------------------------
  666. HANDLE CFillLockBytes::GetNotificationEvent(void)
  667. {
  668. astgDebugOut((DEB_ITRACE, "In CFillLockBytes::GetNotificationEvent:%p()\n", this));
  669. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::GetNotificationEvent\n"));
  670. return _hNotifyEvent;
  671. }
  672. #endif
  673. //+---------------------------------------------------------------------------
  674. //
  675. // Member: CFillLockBytes::GetTerminationStatus, public
  676. //
  677. // Synopsis:
  678. //
  679. // Arguments:
  680. //
  681. // Returns: Appropriate status code
  682. //
  683. // Modifies:
  684. //
  685. // History: 11-Jan-96 PhilipLa Created
  686. //
  687. // Notes:
  688. //
  689. //----------------------------------------------------------------------------
  690. STDMETHODIMP CFillLockBytes::GetTerminationStatus(DWORD *pdwFlags)
  691. {
  692. astgDebugOut((DEB_ITRACE,
  693. "In CFillLockBytes::GetTerminationStatus:%p()\n", this));
  694. *pdwFlags = _dwTerminate;
  695. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::GetTerminationStatus\n"));
  696. return S_OK;
  697. }
  698. SCODE CFillLockBytes::SetFailureInfo(ULONG ulWaterMark,
  699. ULONG ulFailurePoint)
  700. {
  701. astgDebugOut((DEB_ITRACE, "In CFillLockBytes::SetFailureInfo:%p()\n", this));
  702. _ulHighWater =ulWaterMark;
  703. _ulFailurePoint = ulFailurePoint ;
  704. astgDebugOut((DEB_ITRACE, "Out CFillLockBytes::SetFailureInfo\n"));
  705. return S_OK;
  706. }
  707. #if DBG==1
  708. void CFillLockBytes::PulseFillEvent()
  709. {
  710. #ifdef ASYNC
  711. if (_ppc)
  712. {
  713. HANDLE hEvent = _ppc->GetNotificationEvent();
  714. PulseEvent(hEvent);
  715. }
  716. #else
  717. PulseEvent(_hNotifyEvent);
  718. #endif
  719. }
  720. #endif