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.

665 lines
19 KiB

  1. //+--------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1992.
  5. //
  6. // File: wdocfile.cxx
  7. //
  8. // Contents: Implementation of CWrappedDocFile methods for DocFiles
  9. //
  10. // History: 06-Jan-92 DrewB Created
  11. //
  12. //---------------------------------------------------------------
  13. #include <dfhead.cxx>
  14. #pragma hdrstop
  15. //+--------------------------------------------------------------
  16. //
  17. // Member: CWrappedDocFile::CWrappedDocFile, public
  18. //
  19. // Synopsis: Empty object constructor
  20. //
  21. // Arguments: [pdfn] - Name
  22. // [dl] - LUID
  23. // [df] - Transactioning flags
  24. // [dwType] - Type of object
  25. // [pdfb] - Basis
  26. // [ppubdf] - Public docfile
  27. //
  28. // History: 30-Mar-92 DrewB Created
  29. //
  30. //---------------------------------------------------------------
  31. CWrappedDocFile::CWrappedDocFile(CDfName const *pdfn,
  32. DFLUID dl,
  33. DFLAGS const df,
  34. CDFBasis *pdfb,
  35. CPubDocFile *ppubdf)
  36. : PTSetMember(pdfn, STGTY_STORAGE),
  37. PDocFile(dl),
  38. _pdfb(P_TO_BP(CBasedDFBasisPtr, pdfb))
  39. {
  40. olDebugOut((DEB_ITRACE, "In CWrappedDocFile::CWrappedDocFile:%p("
  41. "%ws, %lu, %X, %p, %p)\n", this, pdfn->GetBuffer(),
  42. dl, df, pdfb, ppubdf));
  43. _df = df;
  44. _fBeginCommit = FALSE;
  45. _cReferences = 0;
  46. _pdfParent = NULL;
  47. _ppubdf = P_TO_BP(CBasedPubDocFilePtr, ppubdf);
  48. _fDirty = 0;
  49. _pdfBase = NULL;
  50. PBasicEntry::_sig = CWRAPPEDDOCFILE_SIG;
  51. PTSetMember::_sig = CWRAPPEDDOCFILE_SIG;
  52. olDebugOut((DEB_ITRACE, "Out CWrappedDocFile::CWrappedDocFile\n"));
  53. }
  54. //+--------------------------------------------------------------
  55. //
  56. // Member: CWrappedDocFile::Init, public
  57. //
  58. // Synopsis: Constructor
  59. //
  60. // Arguments: [pdfBase] - Base DocFile
  61. //
  62. // Returns: Appropriate status code
  63. //
  64. // History: 06-Jan-92 DrewB Created
  65. //
  66. //---------------------------------------------------------------
  67. SCODE CWrappedDocFile::Init(PDocFile *pdfBase)
  68. {
  69. SCODE sc;
  70. olDebugOut((DEB_ITRACE, "In CWrappedDocFile::CWrappedDocFile:%p(%p)\n",
  71. this, pdfBase));
  72. olChk(SetInitialState(pdfBase));
  73. _pdfBase = P_TO_BP(CBasedDocFilePtr, pdfBase);
  74. AddRef();
  75. olDebugOut((DEB_ITRACE, "Out CWrappedDocFile::CWrappedDocFile\n"));
  76. // Fall through
  77. EH_Err:
  78. return sc;
  79. }
  80. #ifdef COORD
  81. //+--------------------------------------------------------------
  82. //
  83. // Member: CWrappedDocFile::InitPub, public
  84. //
  85. // Synopsis: Constructor
  86. //
  87. // Arguments: [ppubdf] - Enclosing CPubDocFile
  88. //
  89. // Returns: Appropriate status code
  90. //
  91. // History: 06-Jan-92 DrewB Created
  92. //
  93. //---------------------------------------------------------------
  94. SCODE CWrappedDocFile::InitPub(CPubDocFile *ppubdf)
  95. {
  96. _ppubdf = P_TO_BP(CBasedPubDocFilePtr, ppubdf);
  97. return S_OK;
  98. }
  99. #endif
  100. //+--------------------------------------------------------------
  101. //
  102. // Member: CWrappedDocFile::~CWrappedDocFile, public
  103. //
  104. // Synopsis: Destructor
  105. //
  106. // History: 06-Jan-92 DrewB Created
  107. //
  108. //---------------------------------------------------------------
  109. CWrappedDocFile::~CWrappedDocFile(void)
  110. {
  111. olDebugOut((DEB_ITRACE, "In CWrappedDocFile::~CWrappedDocFile()\n"));
  112. olAssert(_cReferences == 0);
  113. PBasicEntry::_sig = CWRAPPEDDOCFILE_SIGDEL;
  114. PTSetMember::_sig = CWRAPPEDDOCFILE_SIGDEL;
  115. #ifdef INDINST
  116. if (P_INDEPENDENT(_df))
  117. ((CDocFile *)_pdfBase)->Destroy();
  118. else
  119. #endif
  120. if (_pdfBase)
  121. _pdfBase->Release();
  122. // We don't want SetInitialState in Revert to actually refer to the
  123. // base because this object is dying and we shouldn't communicate
  124. // with out base except for the above Release
  125. _pdfBase = NULL;
  126. CWrappedDocFile::Revert();
  127. olDebugOut((DEB_ITRACE, "Out CWrappedDocFile::~CWrappedDocFile\n"));
  128. }
  129. //+--------------------------------------------------------------
  130. //
  131. // Member: CWrappedDocFile::CreateDocFile, public
  132. //
  133. // Synopsis: Creates an embedded DocFile
  134. //
  135. // Arguments: [pdfnName] - Name of DocFile
  136. // [df] - Transactioning flags
  137. // [dlSet] - LUID to set or DF_NOLUID
  138. // [dwType] - Type of entry
  139. // [ppdfDocFile] - DocFile pointer return
  140. //
  141. // Returns: Appropriate error code
  142. //
  143. // Modifies: [*ppdfDocFile] holds DocFile pointer if successful
  144. //
  145. // History: 06-Jan-92 DrewB Created
  146. //
  147. //---------------------------------------------------------------
  148. SCODE CWrappedDocFile::CreateDocFile(CDfName const *pdfnName,
  149. DFLAGS const df,
  150. DFLUID dlSet,
  151. PDocFile **ppdfDocFile)
  152. {
  153. CWrappedDocFile *pdfWrapped;
  154. SEntryBuffer eb;
  155. SCODE sc;
  156. CUpdate *pud = NULL;
  157. CDFBasis *pdfb = BP_TO_P(CDFBasis *, _pdfb);
  158. olDebugOut((DEB_ITRACE, "In CWrappedDocFile::CreateDocFile:%p("
  159. "%ws, %X, %lu, %p, %p)\n", this, pdfnName, df, dlSet,
  160. ppdfDocFile));
  161. if (SUCCEEDED(IsEntry(pdfnName, &eb)))
  162. olErr(EH_Err, STG_E_FILEALREADYEXISTS);
  163. olAssert(P_TRANSACTED(_df));
  164. if (dlSet == DF_NOLUID)
  165. dlSet = CWrappedDocFile::GetNewLuid(_pdfb->GetMalloc());
  166. pdfWrapped = new (pdfb)
  167. CWrappedDocFile(pdfnName, dlSet, _df,
  168. pdfb, BP_TO_P(CPubDocFile *, _ppubdf));
  169. olAssert(pdfWrapped != NULL && aMsg("Reserved DocFile not found"));
  170. if (!P_NOUPDATE(df))
  171. {
  172. olMemTo(EH_pdfWrapped,
  173. (pud = _ulChanged.Add(pdfb->GetMalloc(),
  174. pdfnName, NULL, dlSet,
  175. STGTY_STORAGE, pdfWrapped)));
  176. }
  177. olChkTo(EH_pud, pdfWrapped->Init(NULL));
  178. _ppubdf->AddXSMember(this, pdfWrapped, dlSet);
  179. *ppdfDocFile = pdfWrapped;
  180. olDebugOut((DEB_ITRACE, "Out CWrappedDocFile::CreateDocFile => %p\n",
  181. *ppdfDocFile));
  182. return S_OK;
  183. EH_pud:
  184. if (pud)
  185. _ulChanged.Delete(pud);
  186. EH_pdfWrapped:
  187. pdfWrapped->ReturnToReserve(pdfb);
  188. EH_Err:
  189. return sc;
  190. }
  191. //+--------------------------------------------------------------
  192. //
  193. // Member: CWrappedDocFile::GetDocFile, public
  194. //
  195. // Synopsis: Instantiates or converts an existing stream to a
  196. // DocFile
  197. //
  198. // Arguments: [pdfnName] - Name of stream
  199. // [df] - Transactioning flags
  200. // [dwType] - Type of entry
  201. // [ppdfDocFile] - Pointer to return new object
  202. //
  203. // Returns: Appropriate error code
  204. //
  205. // Modifies: [*ppdfDocFile] holds DocFile pointer if successful
  206. //
  207. // History: 06-Jan-92 DrewB Created
  208. //
  209. //---------------------------------------------------------------
  210. SCODE CWrappedDocFile::GetDocFile(CDfName const *pdfnName,
  211. DFLAGS const df,
  212. PDocFile **ppdfDocFile)
  213. {
  214. PDocFile *pdfNew;
  215. PTSetMember *ptsm;
  216. CWrappedDocFile *pdfWrapped;
  217. SCODE sc;
  218. olDebugOut((DEB_ITRACE, "In CWrappedDocFile::GetDocFile:%p("
  219. "%ws, %X, %p)\n", this, pdfnName, df, ppdfDocFile));
  220. olAssert(P_TRANSACTED(_df));
  221. // Look for this name in this level transaction set
  222. if ((ptsm = _ppubdf->FindXSMember(pdfnName, GetName())) != NULL)
  223. {
  224. if (ptsm->ObjectType() != STGTY_STORAGE)
  225. olErr(EH_Err, STG_E_FILENOTFOUND);
  226. ptsm->AddRef();
  227. *ppdfDocFile = (CWrappedDocFile *)ptsm;
  228. }
  229. else if (_pdfBase == NULL ||
  230. _ulChanged.IsEntry(pdfnName, NULL) == UIE_ORIGINAL)
  231. {
  232. // named entry has been renamed or deleted
  233. // (we can't have a rename or delete without a base)
  234. olErr(EH_Err, STG_E_FILENOTFOUND);
  235. }
  236. else
  237. {
  238. CDfName const *pdfnRealName = pdfnName;
  239. CUpdate *pud;
  240. if (_ulChanged.IsEntry(pdfnName, &pud) == UIE_CURRENT &&
  241. pud->IsRename())
  242. {
  243. pdfnRealName = pud->GetCurrentName();
  244. // We don't have to worry about picking up creates
  245. // because any create would have an XSM that would
  246. // be detected above
  247. olVerify(_ulChanged.FindBase(pud, &pdfnRealName) == NULL);
  248. }
  249. olAssert(_pdfBase != NULL);
  250. olChk(_pdfBase->GetDocFile(pdfnRealName, df, &pdfNew));
  251. olAssert(pdfNew->GetLuid() != DF_NOLUID &&
  252. aMsg("Docfile id is DF_NOLUID!"));
  253. CDFBasis *pdfb;
  254. pdfb = BP_TO_P(CDFBasis *, _pdfb);
  255. olMemTo(EH_Get, pdfWrapped = new(pdfb->GetMalloc())
  256. CWrappedDocFile(pdfnName, pdfNew->GetLuid(),
  257. _df, pdfb, BP_TO_P(CPubDocFile *, _ppubdf)));
  258. olChkTo(EH_pdfWrapped, pdfWrapped->Init(pdfNew));
  259. _ppubdf->AddXSMember(this, pdfWrapped, pdfWrapped->GetLuid());
  260. *ppdfDocFile = pdfWrapped;
  261. }
  262. olDebugOut((DEB_ITRACE, "Out CWrappedDocFile::GetDocFile => %p\n",
  263. *ppdfDocFile));
  264. return S_OK;
  265. EH_pdfWrapped:
  266. delete pdfWrapped;
  267. EH_Get:
  268. pdfNew->Release();
  269. EH_Err:
  270. return sc;
  271. }
  272. //+--------------------------------------------------------------
  273. //
  274. // Member: CWrappedDocFile::IsEntry, public
  275. //
  276. // Synopsis: Determines whether the given object is in the DocFile
  277. // or not
  278. //
  279. // Arguments: [pdfnName] - Object name
  280. // [peb] - Entry buffer to fill in
  281. //
  282. // Returns: Appropriate error code
  283. //
  284. // Modifies: [peb]
  285. //
  286. // History: 15-Jan-92 DrewB Created
  287. //
  288. //---------------------------------------------------------------
  289. SCODE CWrappedDocFile::IsEntry(CDfName const *pdfnName,
  290. SEntryBuffer *peb)
  291. {
  292. CUpdate *pud;
  293. SCODE sc = S_OK;
  294. UlIsEntry uie;
  295. olDebugOut((DEB_ITRACE, "In CWrappedDocFile::IsEntry(%ws, %p)\n",
  296. pdfnName, peb));
  297. // Look in XSM's (for open/created things)
  298. PTSetMember *ptsm;
  299. if ((ptsm = _ppubdf->FindXSMember(pdfnName, GetName())) != NULL)
  300. {
  301. peb->luid = ptsm->GetName();
  302. peb->dwType = ptsm->ObjectType();
  303. }
  304. else
  305. {
  306. uie = _ulChanged.IsEntry(pdfnName, &pud);
  307. if (uie == UIE_CURRENT)
  308. {
  309. peb->luid = pud->GetLUID();
  310. peb->dwType = pud->GetFlags() & ULF_TYPEFLAGS;
  311. }
  312. else if (uie == UIE_ORIGINAL || _pdfBase == NULL)
  313. {
  314. sc = STG_E_FILENOTFOUND;
  315. }
  316. else
  317. {
  318. sc = _pdfBase->IsEntry(pdfnName, peb);
  319. }
  320. }
  321. olDebugOut((DEB_ITRACE, "Out CWrappedDocFile::IsEntry => %lu, %lu, %lu\n",
  322. sc, peb->luid, peb->dwType));
  323. return sc;
  324. }
  325. //+--------------------------------------------------------------
  326. //
  327. // Member: CWrappedDocFile::RenameEntry, public
  328. //
  329. // Synopsis: Renames an element of the DocFile
  330. //
  331. // Arguments: [pdfnName] - Current name
  332. // [pdfnNewName] - New name
  333. //
  334. // Returns: Appropriate error code
  335. //
  336. // History: 09-Jan-92 DrewB Created
  337. //
  338. //---------------------------------------------------------------
  339. SCODE CWrappedDocFile::RenameEntry(CDfName const *pdfnName,
  340. CDfName const *pdfnNewName)
  341. {
  342. SCODE sc;
  343. SEntryBuffer eb;
  344. olDebugOut((DEB_ITRACE, "In CWrappedDocFile::RenameEntry(%ws, %ws)\n",
  345. pdfnName, pdfnNewName));
  346. olAssert(P_TRANSACTED(_df));
  347. if (SUCCEEDED(sc = IsEntry(pdfnNewName, &eb)))
  348. olErr(EH_Err, STG_E_ACCESSDENIED)
  349. else if (sc != STG_E_FILENOTFOUND)
  350. olErr(EH_Err, sc);
  351. olChk(IsEntry(pdfnName, &eb));
  352. olMem(_ulChanged.Add(_pdfb->GetMalloc(),
  353. pdfnNewName, pdfnName, eb.luid, eb.dwType, NULL));
  354. _ppubdf->RenameChild(pdfnName, GetName(), pdfnNewName);
  355. olDebugOut((DEB_ITRACE, "Out CWrappedDocFile::RenameEntry\n"));
  356. return S_OK;
  357. EH_Err:
  358. return sc;
  359. }
  360. //+--------------------------------------------------------------
  361. //
  362. // Member: CWrappedDocFile::DestroyEntry, public
  363. //
  364. // Synopsis: Permanently destroys a child
  365. //
  366. // Arguments: [pdfnName] - Name
  367. // [fClean] - If true, remove create entry from update list
  368. // rather than appending a delete update entry
  369. //
  370. // Returns: Appropriate error code
  371. //
  372. // History: 09-Jan-92 DrewB Created
  373. //
  374. //---------------------------------------------------------------
  375. SCODE CWrappedDocFile::DestroyEntry(CDfName const *pdfnName,
  376. BOOL fClean)
  377. {
  378. SCODE sc;
  379. SEntryBuffer eb;
  380. olDebugOut((DEB_ITRACE, "In CWrappedDocFile::DestroyEntry:%p(%ws, %d)\n",
  381. this, pdfnName, fClean));
  382. olAssert(P_TRANSACTED(_df));
  383. if (fClean)
  384. {
  385. CUpdate *pud = NULL;
  386. UlIsEntry uie;
  387. uie = _ulChanged.IsEntry(pdfnName, &pud);
  388. olAssert(uie == UIE_CURRENT);
  389. RevertUpdate(pud);
  390. _ulChanged.Delete(pud);
  391. }
  392. else
  393. {
  394. PTSetMember *ptsm;
  395. olChk(IsEntry(pdfnName, &eb));
  396. olMem(_ulChanged.Add(_pdfb->GetMalloc(),
  397. NULL, pdfnName, eb.luid, eb.dwType, NULL));
  398. if ((ptsm = _ppubdf->FindXSMember(pdfnName, GetName())) != NULL)
  399. {
  400. olAssert(ptsm->GetName() != DF_NOLUID &&
  401. aMsg("Can't destroy NOLUID XSM"));
  402. _ppubdf->DestroyChild(ptsm->GetName());
  403. }
  404. }
  405. olDebugOut((DEB_ITRACE, "Out CWrappedDocFile::DestroyEntry\n"));
  406. return S_OK;
  407. EH_Err:
  408. return sc;
  409. }
  410. //+--------------------------------------------------------------
  411. //
  412. // Member: CWrappedDocFile::GetTime, public
  413. //
  414. // Synopsis: Gets a time
  415. //
  416. // Arguments: [wt] - Which time
  417. // [ptm] - Time return
  418. //
  419. // Returns: Appropriate status code
  420. //
  421. // Modifies: [ptm]
  422. //
  423. // History: 31-Jul-92 DrewB Created
  424. //
  425. //---------------------------------------------------------------
  426. SCODE CWrappedDocFile::GetTime(WHICHTIME wt, TIME_T *ptm)
  427. {
  428. _tten.GetTime(wt, ptm);
  429. return S_OK;
  430. }
  431. //+--------------------------------------------------------------
  432. //
  433. // Member: CWrappedDocFile::GetAllTimes, public
  434. //
  435. // Synopsis: Gets all times
  436. //
  437. // Arguments: [patm] - Access Time
  438. // [pmtm] - Modification Time
  439. // [pctm] - Creation Time
  440. //
  441. // Returns: Appropriate status code
  442. //
  443. // Modifies: [atm], [mtm], [ctm]
  444. //
  445. // History: 26-May-95 SusiA Created
  446. //
  447. //---------------------------------------------------------------
  448. SCODE CWrappedDocFile::GetAllTimes(TIME_T *patm, TIME_T *pmtm, TIME_T *pctm)
  449. {
  450. _tten.GetAllTimes(patm, pmtm, pctm);
  451. return S_OK;
  452. }
  453. //+--------------------------------------------------------------
  454. //
  455. // Member: CWrappedDocFile::SetAllTimes, public
  456. //
  457. // Synopsis: Sets all time values
  458. //
  459. // Arguments: [atm] - Access Time
  460. // [mtm] - Modification Time
  461. // [ctm] - Creation Time
  462. //
  463. // Returns: Appropriate status code
  464. //
  465. // Modifies:
  466. //
  467. // History: 22-Nov-95 SusiA Created
  468. //
  469. //---------------------------------------------------------------
  470. SCODE CWrappedDocFile::SetAllTimes(TIME_T atm, TIME_T mtm, TIME_T ctm)
  471. {
  472. SetDirty((1 << WT_CREATION) | (1 << WT_MODIFICATION) |(1 << WT_ACCESS));
  473. _tten.SetAllTimes(atm, mtm, ctm);
  474. return S_OK;
  475. }
  476. //+--------------------------------------------------------------
  477. //
  478. // Member: CWrappedDocFile::SetTime, public
  479. //
  480. // Synopsis: Sets a time
  481. //
  482. // Arguments: [wt] - Which time
  483. // [tm] - New time
  484. //
  485. // Returns: Appropriate status code
  486. //
  487. // History: 31-Jul-92 DrewB Created
  488. //
  489. //---------------------------------------------------------------
  490. SCODE CWrappedDocFile::SetTime(WHICHTIME wt, TIME_T tm)
  491. {
  492. olAssert((1 << WT_CREATION) == DIRTY_CREATETIME);
  493. olAssert((1 << WT_MODIFICATION) == DIRTY_MODIFYTIME);
  494. olAssert((1 << WT_ACCESS) == DIRTY_ACCESSTIME);
  495. SetDirty(1 << wt);
  496. _tten.SetTime(wt, tm);
  497. return S_OK;
  498. }
  499. //+---------------------------------------------------------------------------
  500. //
  501. // Member: CWrappedDocFile::GetClass, public
  502. //
  503. // Synopsis: Gets the class ID
  504. //
  505. // Arguments: [pclsid] - Class ID return
  506. //
  507. // Returns: Appropriate status code
  508. //
  509. // Modifies: [pclsid]
  510. //
  511. // History: 11-Nov-92 DrewB Created
  512. //
  513. //----------------------------------------------------------------------------
  514. SCODE CWrappedDocFile::GetClass(CLSID *pclsid)
  515. {
  516. olDebugOut((DEB_ITRACE, "In CWrappedDocFile::GetClass:%p(%p)\n",
  517. this, pclsid));
  518. *pclsid = _clsid;
  519. olDebugOut((DEB_ITRACE, "Out CWrappedDocFile::GetClass\n"));
  520. return S_OK;
  521. }
  522. //+---------------------------------------------------------------------------
  523. //
  524. // Member: CWrappedDocFile::SetClass, public
  525. //
  526. // Synopsis: Sets the class ID
  527. //
  528. // Arguments: [clsid] - New class ID
  529. //
  530. // Returns: Appropriate status code
  531. //
  532. // History: 11-Nov-92 DrewB Created
  533. //
  534. //----------------------------------------------------------------------------
  535. SCODE CWrappedDocFile::SetClass(REFCLSID clsid)
  536. {
  537. olDebugOut((DEB_ITRACE, "In CWrappedDocFile::SetClass:%p(?)\n", this));
  538. _clsid = clsid;
  539. SetDirty(DIRTY_CLASS);
  540. olDebugOut((DEB_ITRACE, "Out CWrappedDocFile::SetClass\n"));
  541. return S_OK;
  542. }
  543. //+---------------------------------------------------------------------------
  544. //
  545. // Member: CWrappedDocFile::GetStateBits, public
  546. //
  547. // Synopsis: Gets the state bits
  548. //
  549. // Arguments: [pgrfStateBits] - State bits return
  550. //
  551. // Returns: Appropriate status code
  552. //
  553. // Modifies: [pgrfStateBits]
  554. //
  555. // History: 11-Nov-92 DrewB Created
  556. //
  557. //----------------------------------------------------------------------------
  558. SCODE CWrappedDocFile::GetStateBits(DWORD *pgrfStateBits)
  559. {
  560. olDebugOut((DEB_ITRACE, "In CWrappedDocFile::GetStateBits:%p(%p)\n",
  561. this, pgrfStateBits));
  562. *pgrfStateBits = _grfStateBits;
  563. olDebugOut((DEB_ITRACE, "Out CWrappedDocFile::GetStateBits\n"));
  564. return S_OK;
  565. }
  566. //+---------------------------------------------------------------------------
  567. //
  568. // Member: CWrappedDocFile::SetStateBits, public
  569. //
  570. // Synopsis: Sets the state bits
  571. //
  572. // Arguments: [grfStateBits] - Bits to set
  573. // [grfMask] - Mask
  574. //
  575. // Returns: Appropriate status code
  576. //
  577. // History: 11-Nov-92 DrewB Created
  578. //
  579. //----------------------------------------------------------------------------
  580. SCODE CWrappedDocFile::SetStateBits(DWORD grfStateBits, DWORD grfMask)
  581. {
  582. olDebugOut((DEB_ITRACE, "In CWrappedDocFile::SetStateBits:%p("
  583. "%lu, %lu)\n", this, grfStateBits, grfMask));
  584. _grfStateBits = (_grfStateBits & ~grfMask) | (grfStateBits & grfMask);
  585. SetDirty(DIRTY_STATEBITS);
  586. olDebugOut((DEB_ITRACE, "Out CWrappedDocFile::SetStateBits\n"));
  587. return S_OK;
  588. }