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.

987 lines
18 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved
  3. Module Name:
  4. RmsSInfo.cpp
  5. Abstract:
  6. Implementation of CRmsStorageInfo
  7. Author:
  8. Brian Dodd [brian] 15-Nov-1996
  9. Revision History:
  10. --*/
  11. #include "stdafx.h"
  12. #include "RmsSInfo.h"
  13. extern IUnknown *g_pServer;
  14. /////////////////////////////////////////////////////////////////////////////
  15. //
  16. // IRmsStorageInfo implementation
  17. //
  18. CRmsStorageInfo::CRmsStorageInfo(
  19. void
  20. )
  21. /*++
  22. Routine Description:
  23. CRmsStorageInfo constructor
  24. Arguments:
  25. None
  26. Return Value:
  27. None
  28. --*/
  29. {
  30. // Initialize values
  31. m_readMountCounter = 0;
  32. m_writeMountCounter = 0;
  33. m_bytesWrittenCounter = 0;
  34. m_bytesReadCounter = 0;
  35. m_capacity = 0;
  36. m_usedSpace = 0;
  37. m_largestFreeSpace = -1;
  38. m_resetCounterTimestamp = 0;
  39. m_lastReadTimestamp = 0;
  40. m_lastWriteTimestamp = 0;
  41. m_createdTimestamp = 0;
  42. }
  43. HRESULT
  44. CRmsStorageInfo::CompareTo(
  45. IN IUnknown *pCollectable,
  46. OUT SHORT *pResult
  47. )
  48. /*++
  49. Implements:
  50. CRmsStorageInfo::CompareTo
  51. --*/
  52. {
  53. HRESULT hr = E_FAIL;
  54. SHORT result = 1;
  55. WsbTraceIn( OLESTR("CRmsStorageInfo::CompareTo"), OLESTR("") );
  56. try {
  57. // Validate arguments - Okay if pResult is NULL
  58. WsbAssertPointer( pCollectable );
  59. CComQIPtr<IRmsComObject, &IID_IRmsComObject> pObject = pCollectable;
  60. WsbAssertPointer( pObject );
  61. switch ( m_findBy ) {
  62. case RmsFindByUnknown:
  63. default:
  64. // What default makes sense?
  65. WsbAssertHr( E_UNEXPECTED );
  66. break;
  67. }
  68. }
  69. WsbCatch(hr);
  70. if ( 0 != pResult ) {
  71. *pResult = result;
  72. }
  73. WsbTraceOut(OLESTR("CRmsStorageInfo::CompareTo"), OLESTR("hr = <%ls>, result = <%ls>"), WsbHrAsString(hr), WsbPtrToShortAsString(pResult));
  74. return(hr);
  75. }
  76. HRESULT
  77. CRmsStorageInfo::GetSizeMax(
  78. OUT ULARGE_INTEGER* pcbSize
  79. )
  80. /*++
  81. Implements:
  82. IPersistStream::GetSizeMax
  83. --*/
  84. {
  85. HRESULT hr = E_NOTIMPL;
  86. WsbTraceIn(OLESTR("CRmsStorageInfo::GetSizeMax"), OLESTR(""));
  87. // try {
  88. // WsbAssert(0 != pcbSize, E_POINTER);
  89. // // Get max size
  90. // pcbSize->QuadPart = WsbPersistSizeOf(LONG) + // m_readMountCounter
  91. // WsbPersistSizeOf(LONG) + // m_writeMountCounter
  92. // WsbPersistSizeOf(LONGLONG) + // m_bytesWrittenCounter
  93. // WsbPersistSizeOf(LONGLONG) + // m_bytesReadCounter
  94. // WsbPersistSizeOf(LONGLONG) + // m_capacity
  95. // WsbPersistSizeOf(LONGLONG) + // m_usedSpace
  96. // WsbPersistSizeOf(LONGLONG) + // m_largestFreeSpace
  97. // WsbPersistSizeOf(DATE) + // m_resetCounterTimestamp
  98. // WsbPersistSizeOf(DATE) + // m_lastReadTimestamp
  99. // WsbPersistSizeOf(DATE) + // m_lastWriteTimestamp
  100. // WsbPersistSizeOf(DATE); // m_createdTimestamp
  101. // } WsbCatch(hr);
  102. WsbTraceOut(OLESTR("CRmsStorageInfo::GetSizeMax"), OLESTR("hr = <%ls>, Size = <%ls>"), WsbHrAsString(hr), WsbPtrToUliAsString(pcbSize));
  103. return(hr);
  104. }
  105. HRESULT
  106. CRmsStorageInfo::Load(
  107. IN IStream* pStream
  108. )
  109. /*++
  110. Implements:
  111. IPersistStream::Load
  112. --*/
  113. {
  114. HRESULT hr = S_OK;
  115. ULONG ulBytes = 0;
  116. WsbTraceIn(OLESTR("CRmsStorageInfo::Load"), OLESTR(""));
  117. try {
  118. WsbAssert(0 != pStream, E_POINTER);
  119. WsbAffirmHr(CRmsComObject::Load(pStream));
  120. // Read value
  121. WsbAffirmHr(WsbLoadFromStream(pStream, &m_readMountCounter));
  122. WsbAffirmHr(WsbLoadFromStream(pStream, &m_writeMountCounter));
  123. WsbAffirmHr(WsbLoadFromStream(pStream, &m_bytesWrittenCounter));
  124. WsbAffirmHr(WsbLoadFromStream(pStream, &m_bytesReadCounter));
  125. WsbAffirmHr(WsbLoadFromStream(pStream, &m_capacity));
  126. WsbAffirmHr(WsbLoadFromStream(pStream, &m_usedSpace));
  127. WsbAffirmHr(WsbLoadFromStream(pStream, &m_largestFreeSpace));
  128. } WsbCatch(hr);
  129. WsbTraceOut(OLESTR("CRmsStorageInfo::Load"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  130. return(hr);
  131. }
  132. HRESULT
  133. CRmsStorageInfo::Save(
  134. IN IStream* pStream,
  135. IN BOOL clearDirty
  136. )
  137. /*++
  138. Implements:
  139. IPersistStream::Save
  140. --*/
  141. {
  142. HRESULT hr = S_OK;
  143. ULONG ulBytes = 0;
  144. WsbTraceIn(OLESTR("CRmsStorageInfo::Save"), OLESTR("clearDirty = <%ls>"), WsbBoolAsString(clearDirty));
  145. try {
  146. WsbAssert(0 != pStream, E_POINTER);
  147. WsbAffirmHr(CRmsComObject::Save(pStream, clearDirty));
  148. // Write value
  149. WsbAffirmHr(WsbSaveToStream(pStream, m_readMountCounter));
  150. WsbAffirmHr(WsbSaveToStream(pStream, m_writeMountCounter));
  151. WsbAffirmHr(WsbSaveToStream(pStream, m_bytesWrittenCounter));
  152. WsbAffirmHr(WsbSaveToStream(pStream, m_bytesReadCounter));
  153. WsbAffirmHr(WsbSaveToStream(pStream, m_capacity));
  154. WsbAffirmHr(WsbSaveToStream(pStream, m_usedSpace));
  155. WsbAffirmHr(WsbSaveToStream(pStream, m_largestFreeSpace));
  156. // WsbAffirmHr(WsbSaveToStream(pStream, m_resetCounterTimestamp));
  157. // WsbAffirmHr(WsbSaveToStream(pStream, m_lastReadTimestamp));
  158. // WsbAffirmHr(WsbSaveToStream(pStream, m_lastWriteTimestamp));
  159. // WsbAffirmHr(WsbSaveToStream(pStream, m_createdTimestamp));
  160. } WsbCatch(hr);
  161. WsbTraceOut(OLESTR("CRmsStorageInfo::Save"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  162. return(hr);
  163. }
  164. HRESULT
  165. CRmsStorageInfo::Test(
  166. OUT USHORT *pPassed,
  167. OUT USHORT *pFailed
  168. )
  169. /*++
  170. Implements:
  171. IWsbTestable::Test
  172. --*/
  173. {
  174. HRESULT hr = S_OK;
  175. CComPtr<IRmsMediaSet> pMediaSet1;
  176. CComPtr<IRmsMediaSet> pMediaSet2;
  177. CComPtr<IPersistFile> pFile1;
  178. CComPtr<IPersistFile> pFile2;
  179. LONG i;
  180. LONG longHiVal1 = 12345;
  181. LONG longLoVal1 = 67890;
  182. LONG longHiWork1;
  183. LONG longLoWork1;
  184. LONG longVal1 = 11111111;
  185. LONG longWork1;
  186. LONG longVal2 = 22222222;
  187. LONG longWork2;
  188. LONGLONG longLongVal1 = 1111111111111111;
  189. LONGLONG longLongWork1;
  190. LONG cntBase = 100000;
  191. LONG cntIncr = 25;
  192. // DATE dateVal1 = today;
  193. DATE dateVal1 = 0;
  194. // DATE dateWork1;
  195. WsbTraceIn(OLESTR("CRmsStorageInfo::Test"), OLESTR(""));
  196. try {
  197. // Get the MediaSet interface.
  198. hr = S_OK;
  199. try {
  200. WsbAssertHr(((IUnknown*) (IRmsMediaSet*) this)->QueryInterface(IID_IRmsMediaSet, (void**) &pMediaSet1));
  201. // Test GetMountCounters
  202. ResetCounters();
  203. GetMountCounters(&longWork1, &longWork2);
  204. if((longVal1 == 0) &&
  205. (longVal2 == 0)){
  206. (*pPassed)++;
  207. } else {
  208. (*pFailed)++;
  209. }
  210. // Test SetBytesRead & GetBytesRead
  211. SetBytesRead(longLongVal1);
  212. GetBytesRead(&longLongWork1);
  213. if((longLongVal1 == longLongWork1)){
  214. (*pPassed)++;
  215. } else {
  216. (*pFailed)++;
  217. }
  218. // Test SetBytesRead2 & GetBytesRead2
  219. SetBytesRead2(longHiVal1, longLoVal1);
  220. GetBytesRead2(&longHiWork1, &longLoWork1);
  221. if((longHiVal1 == longHiWork1) &&
  222. (longLoVal1 == longLoWork1)){
  223. (*pPassed)++;
  224. } else {
  225. (*pFailed)++;
  226. }
  227. // Test IncrementBytesRead
  228. for(i = 0; i < 500; i += cntIncr){
  229. SetBytesRead(cntBase + i);
  230. IncrementBytesRead(cntIncr);
  231. GetBytesRead(&longLongWork1);
  232. if (longLongWork1 == (cntBase + i + cntIncr)){
  233. (*pPassed)++;
  234. } else {
  235. (*pFailed)++;
  236. }
  237. }
  238. // Test SetBytesWritten & GetBytesWritten
  239. SetBytesWritten(longLongVal1);
  240. GetBytesWritten(&longLongWork1);
  241. if((longLongVal1 == longLongWork1)){
  242. (*pPassed)++;
  243. } else {
  244. (*pFailed)++;
  245. }
  246. // Test SetBytesWritten2 & GetBytesWritten2
  247. SetBytesWritten2(longHiVal1, longLoVal1);
  248. GetBytesWritten2(&longHiWork1, &longLoWork1);
  249. if((longHiVal1 == longHiWork1) &&
  250. (longLoVal1 == longLoWork1)){
  251. (*pPassed)++;
  252. } else {
  253. (*pFailed)++;
  254. }
  255. // Test IncrementBytesWritten
  256. for(i = 0; i < 500; i += cntIncr){
  257. SetBytesWritten(cntBase + i);
  258. IncrementBytesWritten(cntIncr);
  259. GetBytesWritten(&longLongWork1);
  260. if (longLongWork1 == (cntBase + i + cntIncr)){
  261. (*pPassed)++;
  262. } else {
  263. (*pFailed)++;
  264. }
  265. }
  266. // Test GetCapacity
  267. m_capacity = longLongVal1;
  268. GetCapacity(&longLongWork1);
  269. if((longLongVal1 == longLongWork1)){
  270. (*pPassed)++;
  271. } else {
  272. (*pFailed)++;
  273. }
  274. // Test GetCapacity2
  275. m_capacity = (LONGLONG) (longHiVal1 << 32) + longLoVal1;
  276. GetCapacity2(&longHiWork1, &longLoWork1);
  277. if((longHiVal1 == longHiWork1) &&
  278. (longLoVal1 == longLoWork1)){
  279. (*pPassed)++;
  280. } else {
  281. (*pFailed)++;
  282. }
  283. // Test GetUsedSpace
  284. m_usedSpace = longLongVal1;
  285. GetUsedSpace(&longLongWork1);
  286. if((longLongVal1 == longLongWork1)){
  287. (*pPassed)++;
  288. } else {
  289. (*pFailed)++;
  290. }
  291. // Test GetUsedSpace2
  292. m_usedSpace = (LONGLONG) (longHiVal1 << 32) + longLoVal1;
  293. GetUsedSpace2(&longHiWork1, &longLoWork1);
  294. if((longHiVal1 == longHiWork1) &&
  295. (longLoVal1 == longLoWork1)){
  296. (*pPassed)++;
  297. } else {
  298. (*pFailed)++;
  299. }
  300. // Test GetLargestFreeSpace
  301. m_largestFreeSpace = longLongVal1;
  302. GetLargestFreeSpace(&longLongWork1);
  303. if((longLongVal1 == longLongWork1)){
  304. (*pPassed)++;
  305. } else {
  306. (*pFailed)++;
  307. }
  308. // Test GetLargestFreeSpace2
  309. m_largestFreeSpace = (LONGLONG) (longHiVal1 << 32) + longLoVal1;
  310. GetLargestFreeSpace2(&longHiWork1, &longLoWork1);
  311. if((longHiVal1 == longHiWork1) &&
  312. (longLoVal1 == longLoWork1)){
  313. (*pPassed)++;
  314. } else {
  315. (*pFailed)++;
  316. }
  317. // Handle all date stamp values
  318. } WsbCatch(hr);
  319. // Tally up the results
  320. hr = S_OK;
  321. if (*pFailed) {
  322. hr = S_FALSE;
  323. }
  324. } WsbCatch(hr);
  325. WsbTraceOut(OLESTR("CRmsStorageInfo::Test"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  326. return(hr);
  327. }
  328. STDMETHODIMP
  329. CRmsStorageInfo::GetMountCounters(
  330. LONG *pReads,
  331. LONG *pWrites
  332. )
  333. /*++
  334. Implements:
  335. IRmsStorageInfo::GetMountcounters
  336. --*/
  337. {
  338. *pReads = m_readMountCounter;
  339. *pWrites = m_writeMountCounter;
  340. return S_OK;
  341. }
  342. STDMETHODIMP
  343. CRmsStorageInfo::GetBytesRead2(
  344. LONG *pReadHi,
  345. LONG *pReadLo
  346. )
  347. /*++
  348. Implements:
  349. IRmsStorageInfo::GetBytesRead2
  350. --*/
  351. {
  352. *pReadHi = (LONG) (m_bytesReadCounter >> 32);
  353. *pReadLo = (LONG) (m_bytesReadCounter & 0x00000000FFFFFFFF);
  354. return S_OK;
  355. }
  356. STDMETHODIMP
  357. CRmsStorageInfo::GetBytesRead(
  358. LONGLONG *pRead
  359. )
  360. /*++
  361. Implements:
  362. IRmsStorageInfo::GetBytesRead
  363. --*/
  364. {
  365. *pRead = m_bytesReadCounter;
  366. return S_OK;
  367. }
  368. STDMETHODIMP
  369. CRmsStorageInfo::SetBytesRead2(
  370. LONG readHi,
  371. LONG readLo
  372. )
  373. /*++
  374. Implements:
  375. IRmsStorageInfo::SetBytesRead2
  376. --*/
  377. {
  378. m_bytesReadCounter = (LONGLONG) (readHi << 32) + (readLo);
  379. // m_isDirty = TRUE;
  380. return S_OK;
  381. }
  382. STDMETHODIMP
  383. CRmsStorageInfo::SetBytesRead(
  384. LONGLONG read
  385. )
  386. /*++
  387. Implements:
  388. IRmsStorageInfo::SetBytesRead
  389. --*/
  390. {
  391. m_bytesReadCounter = read;
  392. // m_isDirty = TRUE;
  393. return S_OK;
  394. }
  395. STDMETHODIMP
  396. CRmsStorageInfo::IncrementBytesRead(
  397. LONG val
  398. )
  399. /*++
  400. Implements:
  401. IRmsStorageInfo::IncrementBytesRead
  402. --*/
  403. {
  404. m_bytesReadCounter += val;
  405. return S_OK;
  406. }
  407. STDMETHODIMP
  408. CRmsStorageInfo::GetBytesWritten2(
  409. LONG *pWriteHi,
  410. LONG *pWriteLo
  411. )
  412. /*++
  413. Implements:
  414. IRmsStorageInfo::GetBytesWritten2
  415. --*/
  416. {
  417. *pWriteHi = (LONG) (m_bytesWrittenCounter >> 32);
  418. *pWriteLo = (LONG) (m_bytesWrittenCounter & 0x00000000FFFFFFFF);
  419. return S_OK;
  420. }
  421. STDMETHODIMP
  422. CRmsStorageInfo::GetBytesWritten(
  423. LONGLONG *pWritten
  424. )
  425. /*++
  426. Implements:
  427. IRmsStorageInfo::GetBytesWritten
  428. --*/
  429. {
  430. *pWritten = m_bytesWrittenCounter;
  431. return S_OK;
  432. }
  433. STDMETHODIMP
  434. CRmsStorageInfo::SetBytesWritten2(
  435. LONG writeHi,
  436. LONG writeLo
  437. )
  438. /*++
  439. Implements:
  440. IRmsStorageInfo::SetBytesWritten2
  441. --*/
  442. {
  443. m_bytesWrittenCounter = (LONGLONG) (writeHi << 32) + (writeLo);
  444. // m_isDirty = TRUE;
  445. return S_OK;
  446. }
  447. STDMETHODIMP
  448. CRmsStorageInfo::SetBytesWritten(
  449. LONGLONG written
  450. )
  451. /*++
  452. Implements:
  453. IRmsStorageInfo::SetBytesWritten
  454. --*/
  455. {
  456. m_bytesWrittenCounter = written;
  457. // m_isDirty = TRUE;
  458. return S_OK;
  459. }
  460. STDMETHODIMP
  461. CRmsStorageInfo::IncrementBytesWritten(
  462. LONG val
  463. )
  464. /*++
  465. Implements:
  466. IRmsStorageInfo::IncrementBytesWritten
  467. --*/
  468. {
  469. //WsbTraceIn( OLESTR("CRmsStorageInfo::IncrementBytesWritten"), OLESTR("<%d>"), val );
  470. m_bytesWrittenCounter += val;
  471. m_usedSpace +=val;
  472. if (m_largestFreeSpace > 0) {
  473. // Decrement written bytes from free space
  474. m_largestFreeSpace -= val;
  475. if (m_largestFreeSpace < 0) {
  476. // Indicates inaccurate calulation of free space...
  477. WsbTraceAlways(OLESTR("CRmsStorageInfo::IncrementBytesWritten: Negative free space decrementing %ld bytes\n"), val);
  478. m_largestFreeSpace = 0;
  479. }
  480. } else {
  481. if (m_largestFreeSpace < 0) {
  482. // Not expected - somebody is trying to start counting free space
  483. // without setting an appropriate initial value
  484. WsbTraceAlways(OLESTR("CRmsStorageInfo::IncrementBytesWritten: Was called before setting initial free space !!\n"), val);
  485. m_largestFreeSpace = 0;
  486. }
  487. }
  488. /*** // Decrement the free space acordingly.
  489. m_largestFreeSpace *= (m_largestFreeSpace > 0) ? 1 : -1; // Absolute value
  490. m_largestFreeSpace -= val;
  491. // if we go negative here, we simply set the free space to zero;
  492. // otherwise we set the value negative to indicate an
  493. // approximation.
  494. m_largestFreeSpace *= (m_largestFreeSpace > 0) ? -1 : 0; ***/
  495. //WsbTrace( OLESTR("FreeSpace=%I64d, UsedSpace=%I64d, BytesWritten=%I64d\n"), m_largestFreeSpace, m_usedSpace, m_bytesWrittenCounter);
  496. //WsbTraceOut(OLESTR("CRmsStorageInfo::IncrementBytesWritten"), OLESTR("hr = <%ls>"), WsbHrAsString(S_OK));
  497. return S_OK;
  498. }
  499. STDMETHODIMP
  500. CRmsStorageInfo::GetCapacity2(
  501. LONG *pCapHi,
  502. LONG *pCapLo
  503. )
  504. /*++
  505. Implements:
  506. IRmsStorageInfo::GetCapacity2
  507. --*/
  508. {
  509. *pCapHi = (LONG) (m_capacity >> 32);
  510. *pCapLo = (LONG) (m_capacity & 0x00000000FFFFFFFF);
  511. return S_OK;
  512. }
  513. STDMETHODIMP
  514. CRmsStorageInfo::GetCapacity(
  515. LONGLONG *pCap
  516. )
  517. /*++
  518. Implements:
  519. IRmsStorageInfo::GetCapacity
  520. --*/
  521. {
  522. *pCap = m_capacity;
  523. return S_OK;
  524. }
  525. STDMETHODIMP
  526. CRmsStorageInfo::GetUsedSpace2(
  527. LONG *pFreeHi,
  528. LONG *pFreeLo
  529. )
  530. /*++
  531. Implements:
  532. IRmsStorageInfo::GetUsedSpace2
  533. --*/
  534. {
  535. *pFreeHi = (LONG) (m_usedSpace >> 32);
  536. *pFreeLo = (LONG) (m_usedSpace & 0x00000000FFFFFFFF);
  537. return S_OK;
  538. }
  539. STDMETHODIMP
  540. CRmsStorageInfo::GetUsedSpace(
  541. LONGLONG *pFree
  542. )
  543. /*++
  544. Implements:
  545. IRmsStorageInfo::GetUsedSpace
  546. --*/
  547. {
  548. *pFree = m_usedSpace;
  549. return S_OK;
  550. }
  551. STDMETHODIMP
  552. CRmsStorageInfo::GetLargestFreeSpace2(
  553. LONG *pFreeHi,
  554. LONG *pFreeLo
  555. )
  556. /*++
  557. Implements:
  558. IRmsStorageInfo::GetLargestFreeSpace2
  559. --*/
  560. {
  561. // Negative numbers indicate last known value for free space.
  562. *pFreeHi = (LONG) (m_largestFreeSpace >> 32);
  563. *pFreeLo = (LONG) (m_largestFreeSpace & 0x00000000FFFFFFFF);
  564. return S_OK;
  565. }
  566. STDMETHODIMP
  567. CRmsStorageInfo::GetLargestFreeSpace(
  568. LONGLONG *pFree
  569. )
  570. /*++
  571. Implements:
  572. IRmsStorageInfo::GetLargestFreeSpace
  573. --*/
  574. {
  575. // Negative numbers indicate last known value for free space.
  576. *pFree = m_largestFreeSpace;
  577. return S_OK;
  578. }
  579. STDMETHODIMP
  580. CRmsStorageInfo::SetCapacity(
  581. IN LONGLONG cap)
  582. /*++
  583. Implements:
  584. IRmsStorageInfo::SetCapacity
  585. --*/
  586. {
  587. m_capacity = cap;
  588. return S_OK;
  589. }
  590. STDMETHODIMP
  591. CRmsStorageInfo::SetUsedSpace(
  592. IN LONGLONG used)
  593. /*++
  594. Implements:
  595. IRmsStorageInfo::SetUsedSpace
  596. --*/
  597. {
  598. m_usedSpace = used;
  599. return S_OK;
  600. }
  601. STDMETHODIMP
  602. CRmsStorageInfo::SetFreeSpace(
  603. IN LONGLONG free)
  604. /*++
  605. Implements:
  606. IRmsStorageInfo::SetFreeSpace
  607. --*/
  608. {
  609. m_largestFreeSpace = free;
  610. return S_OK;
  611. }
  612. STDMETHODIMP
  613. CRmsStorageInfo::ResetCounters(
  614. void
  615. )
  616. /*++
  617. Implements:
  618. IRmsStorageInfo::ResetCounters
  619. --*/
  620. {
  621. m_readMountCounter = 0;
  622. m_writeMountCounter = 0;
  623. m_bytesWrittenCounter = 0;
  624. m_bytesReadCounter = 0;
  625. // m_resetCounterTimestamp = COleDateTime::GetCurrentTime();
  626. // m_isDirty = TRUE;
  627. return S_OK;
  628. }
  629. STDMETHODIMP
  630. CRmsStorageInfo::GetResetCounterTimestamp(
  631. DATE *pDate
  632. )
  633. /*++
  634. Implements:
  635. IRmsStorageInfo::GetResetCounterTimestamp
  636. --*/
  637. {
  638. *pDate = m_resetCounterTimestamp;
  639. return S_OK;
  640. }
  641. STDMETHODIMP
  642. CRmsStorageInfo::GetLastReadTimestamp(
  643. DATE *pDate
  644. )
  645. /*++
  646. Implements:
  647. IRmsStorageInfo::GetLastReadTimestamp
  648. --*/
  649. {
  650. *pDate = m_lastReadTimestamp;
  651. return S_OK;
  652. }
  653. STDMETHODIMP
  654. CRmsStorageInfo::GetLastWriteTimestamp(
  655. DATE *pDate
  656. )
  657. /*++
  658. Implements:
  659. IRmsStorageInfo::GetLastWriteTimestamp
  660. --*/
  661. {
  662. *pDate = m_lastWriteTimestamp;
  663. return S_OK;
  664. }
  665. STDMETHODIMP
  666. CRmsStorageInfo::GetCreatedTimestamp(
  667. DATE *pDate
  668. )
  669. /*++
  670. Implements:
  671. IRmsStorageInfo::GetCreatedTimestamp
  672. --*/
  673. {
  674. *pDate = m_createdTimestamp;
  675. return S_OK;
  676. }