Old fashion design for PC-104
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.

549 lines
15 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 09/11/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: LgReportStorage.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of LgReportStorage.cpp
  13. //----------------------------------------------------------------------------
  14. // LgReportEngine.cpp: implementation of the CLgReportStorage class.
  15. //
  16. //////////////////////////////////////////////////////////////////////
  17. #include "stdafx.h"
  18. #include "lglibreport.h"
  19. #include "LgReportStorage.h"
  20. #include "..\LgImageDIB.h"
  21. #include "..\LgImageJPEG.h"
  22. #ifdef _DEBUG
  23. #undef THIS_FILE
  24. static char THIS_FILE[]=__FILE__;
  25. #define new DEBUG_NEW
  26. #endif
  27. CLgReportStorage::CLgReportStorage()
  28. {
  29. m_pInterface = NULL;
  30. m_SetupSettings.Load( "report.dat" );
  31. }
  32. CLgReportStorage::~CLgReportStorage()
  33. {
  34. m_SetupSettings.Store( "report.dat" );
  35. Destroy();
  36. }
  37. BOOL CLgReportStorage::Create( LPCTSTR pPathRoot, INT nMaxStorageDays, CLgReportInterface *pInterface )
  38. {
  39. if( !pInterface )
  40. {
  41. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CLgReportStorage::Create"), _T("Invalid parameters (%p)"), pInterface );
  42. return FALSE;
  43. }
  44. m_pInterface = pInterface;
  45. // create new storage provider
  46. StorageClientToProviderLinkSP::Link( &m_ReportProvider );
  47. // link provider to Dialog
  48. if( !m_Dialog.Link( &m_ReportProvider ) )
  49. {
  50. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CLgReportStorage::Create"), _T("Dialog link provider failed") );
  51. return FALSE;
  52. }
  53. // create client
  54. CLgReportSettings::SETTINGS& settings = m_SetupSettings.GetSettings();
  55. m_ReportClient.Create( this, settings.bAccessEnable, settings.wAccessPort );
  56. // link report provider to client
  57. if( !m_ReportClient.Link( &m_ReportProvider ) )
  58. {
  59. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CLgReportStorage::Create"), _T("Can't link provider to client") );
  60. return FALSE;
  61. }
  62. // create provider
  63. if( !m_ReportProvider.Create( settings.pAccessName, pPathRoot, nMaxStorageDays ) )
  64. {
  65. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CLgReportStorage::Create"), _T("CLgReportRemoteProviderEx::Create for <%s> failed"), settings.pAccessName );
  66. return FALSE;
  67. }
  68. // add all providers to list
  69. for( INT i = 0; i < m_SetupSettings.GetCount(); i++ )
  70. {
  71. CLgReportSiteInfo &info = m_SetupSettings.GetAt(i);
  72. LPSTR pName = info.pName;
  73. // add new provider to list
  74. if( !m_arrReportProvider.AddEmpty() )
  75. {
  76. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CLgReportStorage::Create"), _T("Can't create new provider <%s>"), pName );
  77. return FALSE;
  78. }
  79. // make easy refference to provider
  80. CLgReportRemoteProviderEx &provider = m_arrReportProvider[i];
  81. // link new provider to Dialog
  82. if( !m_Dialog.Link( &provider ) )
  83. {
  84. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CLgReportStorage::Create"), _T("Dialog link for <%s> failed"), pName );
  85. return FALSE;
  86. }
  87. // link new provider to client
  88. if( !m_ReportClient.Link( &provider ) )
  89. {
  90. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CLgReportStorage::Create"), _T("Client link for <%s> failed"), pName );
  91. return FALSE;
  92. }
  93. // create new provider
  94. TCHAR pFullPath[MAX_PATH];
  95. _tcsncpy( pFullPath, pPathRoot, MAX_PATH );
  96. ::PathAppend( pFullPath, pName );
  97. if( !provider.Create( this, pName, pFullPath, i, info.pAddress, info.wPort ) )
  98. {
  99. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CLgReportStorage::Create"), _T("CLgReportRemoteProviderEx::Create for <%s> failed"), pName );
  100. return FALSE;
  101. }
  102. }
  103. return TRUE;
  104. /*
  105. StorageClientToProviderLinkSP::Link( &m_pProvider[0] );
  106. m_Dialog.Link( &m_pProvider[0] );
  107. m_Dialog.Link( &m_pProviderRemote[0] );
  108. m_pProviderRemote[0].CLgReportRemoteClient::Link( &m_pProvider[1] );
  109. m_pProvider[1].LoaderClientToProviderLinkP::Link( m_pProviderRemote[1] );
  110. m_pProvider[1].LoaderClientToProviderLinkP::Link( m_pProviderRemote[2] );
  111. m_pProviderRemote[1].CLgReportRemoteClient::Link( &m_pProvider[0] );
  112. m_pProviderRemote[2].CLgReportRemoteClient::Link( &m_pProvider[0] );
  113. TCHAR pProviderPathRoot[5][MAX_PATH];
  114. LPCTSTR pProviderName[5] =
  115. {
  116. _T("First"),
  117. _T("Second"),
  118. _T("Remote0"),
  119. _T("Remote1"),
  120. _T("Remote2"),
  121. };
  122. for( INT i = 0; i < 5; i++ )
  123. {
  124. _tcsncpy( pProviderPathRoot[i], pPathRoot, MAX_PATH );
  125. ::PathAppend( pProviderPathRoot[i], pProviderName[i] );
  126. }
  127. return m_pProvider[0].Create( pProviderName[0], pProviderPathRoot[0], nMaxStorageDays ) &&
  128. m_pProvider[1].Create( pProviderName[1], pProviderPathRoot[1], nMaxStorageDays ) &&
  129. m_pProviderRemote[0].Create( pProviderName[2], pProviderPathRoot[2] ) &&
  130. m_pProviderRemote[1].Create( pProviderName[3], pProviderPathRoot[3] ) &&
  131. m_pProviderRemote[2].Create( pProviderName[4], pProviderPathRoot[4] );
  132. */
  133. }
  134. void CLgReportStorage::Destroy()
  135. {
  136. m_ReportProvider.Destroy();
  137. m_ReportClient.Destroy();
  138. m_arrReportProvider.RemoveAll();
  139. m_pInterface = NULL;
  140. }
  141. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  142. //
  143. //
  144. //
  145. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  146. BOOL CLgReportStorage::OnClientConnect( INT nProvider, BOOL bConnected )
  147. {
  148. if( nProvider < 0 || nProvider >= m_arrReportProvider.GetCount() )
  149. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CLgReportStorage::OnReportClientConnect"), _T("Provider index is wrong") );
  150. return m_arrReportProvider[nProvider].DispatchConnect( bConnected );
  151. }
  152. BOOL CLgReportStorage::OnClientPacket( INT nProvider, BYTE bPacketType, PVOID pBuffer, INT nBufferSize )
  153. {
  154. if( bPacketType != 0x01 )
  155. {
  156. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CLgReportStorage::OnReportClientPacket"), _T("Unacceptable packet type <%d>"), bPacketType );
  157. return FALSE;
  158. }
  159. if( nProvider < 0 || nProvider >= m_arrReportProvider.GetCount() )
  160. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CLgReportStorage::OnReportClientPacket"), _T("Provider index is wrong") );
  161. return m_arrReportProvider[nProvider].DispatchPacket( pBuffer, nBufferSize );
  162. }
  163. BOOL CLgReportStorage::OnServerConnect( PVOID pConnection, BOOL bConnected )
  164. {
  165. return m_ReportClient.DispatchConnect( pConnection, bConnected );
  166. }
  167. BOOL CLgReportStorage::OnServerPacket( PVOID pConnection, BYTE bPacketType, PVOID pBuffer, INT nBufferSize )
  168. {
  169. if( bPacketType != 0x01 )
  170. {
  171. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CLgReportStorage::OnReportServerPacket"), _T("Unacceptable packet type <%d>"), bPacketType );
  172. return FALSE;
  173. }
  174. return m_ReportClient.DispatchPacket( pConnection, pBuffer, nBufferSize );
  175. }
  176. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  177. //
  178. //
  179. //
  180. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  181. BOOL CLgReportStorage::Reset()
  182. {
  183. return WriteReset();
  184. }
  185. BOOL CLgReportStorage::OnSensor( LPCTSTR pName, float x, float y )
  186. {
  187. REPORT_FILTER_SOURCE rfs;
  188. _tcscpy( rfs.pName, pName );
  189. rfs.X = x;
  190. rfs.Y = y;
  191. return WriteFilterSource( &rfs );
  192. }
  193. BOOL CLgReportStorage::OnFilter( BYTE bId, LPCTSTR pName )
  194. {
  195. REPORT_FILTER_EVENT rfe;
  196. _tcscpy( rfe.pName, pName );
  197. rfe.bId = bId;
  198. return WriteFilterEvent( &rfe );
  199. }
  200. BOOL CLgReportStorage::StoreBackground( CBitmap *pBitmap )
  201. {
  202. CLgImageDIB dib;
  203. if( !dib.Create( (HBITMAP)pBitmap->GetSafeHandle() ) )
  204. {
  205. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CLgReportStorage::StoreBackground"), _T("Can't create dib") );
  206. return FALSE;
  207. }
  208. return StoreBackground( dib );
  209. }
  210. BOOL CLgReportStorage::StoreBackground( CLgImageDIB& dib )
  211. {
  212. CLgImageJPEG jpeg;
  213. if( !jpeg.Create( dib, dib ) )
  214. {
  215. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CLgReportStorage::StoreBackground"), _T("Can't create jpeg") );
  216. return FALSE;
  217. }
  218. return StoreBackground( jpeg );
  219. }
  220. BOOL CLgReportStorage::StoreBackground( CLgImageJPEG& jpeg )
  221. {
  222. return WriteBackground( &jpeg );
  223. }
  224. BOOL CLgReportStorage::StoreEvent( SYSTEMTIME *pST, BYTE bId, BOOL bSensor, WORD wSensorIndex, BOOL bPosition, float x, float y, LARGE_INTEGER *pOffset, LPCTSTR pFormat, va_list pMarker )
  225. {
  226. REPORT_EVENT re;
  227. re.bId = bId;
  228. re.bSensorValid = bSensor;
  229. re.wSensorIndex = wSensorIndex;
  230. re.bImageCount = 0;
  231. re.stTime = *pST;
  232. re.bPositionValid = bPosition;
  233. re.fPositionX = x;
  234. re.fPositionY = y;
  235. INT nCount = _vsntprintf( re.pText, REPORT_EVENT_TEXT_MAX, pFormat, pMarker );
  236. if( nCount < 0 )
  237. {
  238. re.pText[REPORT_EVENT_TEXT_MAX-4] = _T('.');
  239. re.pText[REPORT_EVENT_TEXT_MAX-3] = _T('.');
  240. re.pText[REPORT_EVENT_TEXT_MAX-2] = _T('.');
  241. re.pText[REPORT_EVENT_TEXT_MAX-1] = 0;
  242. nCount = REPORT_EVENT_TEXT_MAX;
  243. }
  244. return WriteEvent( &re, &pOffset->QuadPart );
  245. }
  246. BOOL CLgReportStorage::StoreImage( HBITMAP hBitmap, LARGE_INTEGER *pOffset )
  247. {
  248. CLgImageDIB dib;
  249. if( !dib.Create( hBitmap ) )
  250. return FALSE;
  251. return StoreImage( dib, pOffset );
  252. }
  253. BOOL CLgReportStorage::StoreImage( CLgImageDIB& dib, LARGE_INTEGER *pOffset )
  254. {
  255. CLgImageJPEG jpeg;
  256. if( !jpeg.Create( dib, dib ) )
  257. return FALSE;
  258. return StoreImage( jpeg, pOffset );
  259. }
  260. BOOL CLgReportStorage::StoreImage( CLgImageJPEG& jpeg, LARGE_INTEGER *pOffset )
  261. {
  262. return WriteImage( &jpeg, &pOffset->QuadPart );
  263. }
  264. //////////////////////////////////////////////////////////////////////////////////////////////////////////////
  265. //
  266. // CLEANUP ENGINE
  267. //
  268. //////////////////////////////////////////////////////////////////////////////////////////////////////////////
  269. /*
  270. void CLgReportStorage::DeleteOldFiles(SYSTEMTIME st)
  271. {
  272. WIN32_FIND_DATA win32FD;
  273. LARGE_INTEGER ft;
  274. _TCHAR pBuffer[MAX_PATH];
  275. LPTSTR pNames = NULL;
  276. INT nNamesCount = 0;
  277. ::SystemTimeToFileTime( &st, (LPFILETIME)&ft );
  278. ft.QuadPart -= DAY2NANO( m_nMaxStorageDays );
  279. _tcsncpy( pBuffer, (LPCTSTR)m_strPathRoot, MAX_PATH );
  280. ::PathAppend( pBuffer, _T("*.*") );
  281. HANDLE hFF = ::FindFirstFile(pBuffer, &win32FD);
  282. if(hFF != INVALID_HANDLE_VALUE)
  283. do{
  284. if( ( win32FD.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) != FILE_ATTRIBUTE_DIRECTORY )
  285. continue;
  286. SYSTEMTIME cst = { 0 };
  287. if( _stscanf( win32FD.cFileName, PATH_DATE_FORMAT, &cst.wYear, &cst.wMonth, &cst.wDay ) != 3 )
  288. continue;
  289. // if it is current report then don't delete it
  290. if( m_stReportTime.wYear == cst.wYear &&
  291. m_stReportTime.wMonth == cst.wMonth &&
  292. m_stReportTime.wDay == cst.wDay )
  293. continue;
  294. LARGE_INTEGER cft;
  295. ::SystemTimeToFileTime(&cst, (LPFILETIME)&cft);
  296. if( cft.QuadPart >= ft.QuadPart )
  297. continue;
  298. _tcsncpy( pBuffer, (LPCTSTR)m_strPathRoot, MAX_PATH );
  299. ::PathAppend( pBuffer, win32FD.cFileName );
  300. INT nLength = _tcslen(pBuffer) + 1;
  301. pNames = (LPTSTR)realloc( pNames, sizeof( TCHAR ) * ( nNamesCount + nLength ) );
  302. if( pNames )
  303. {
  304. memcpy( pNames + nNamesCount, pBuffer, nLength );
  305. nNamesCount += nLength;
  306. }
  307. }while(::FindNextFile(hFF, &win32FD));
  308. if(nNamesCount)
  309. {
  310. pNames = (LPTSTR)realloc( pNames, sizeof( TCHAR ) * ( nNamesCount + 1 ) );
  311. if( pNames )
  312. {
  313. // add one more zero
  314. pNames[nNamesCount] = 0;
  315. SHFILEOPSTRUCT sfs = { 0 };
  316. sfs.wFunc = FO_DELETE;
  317. sfs.pFrom = pNames;
  318. sfs.fFlags = FOF_NOCONFIRMATION | FOF_SIMPLEPROGRESS;
  319. sfs.lpszProgressTitle = _T("Deleting old history...");
  320. ::SHFileOperation(&sfs);
  321. delete pNames;
  322. }
  323. }
  324. ::FindClose(hFF);
  325. }
  326. BOOL CLgReportStorage::CheckOldFiles(SYSTEMTIME st)
  327. {
  328. WIN32_FIND_DATA win32FD;
  329. LARGE_INTEGER ft;
  330. _TCHAR pBuffer[MAX_PATH];
  331. BOOL fExist = FALSE;
  332. ::SystemTimeToFileTime(&st, (LPFILETIME)&ft);
  333. ft.QuadPart -= DAY2NANO( m_nMaxStorageDays );
  334. _tcsncpy( pBuffer, (LPCTSTR)m_strPathRoot, MAX_PATH );
  335. ::PathAppend( pBuffer, _T("*.*") );
  336. HANDLE hFF = ::FindFirstFile(pBuffer, &win32FD);
  337. if(hFF != INVALID_HANDLE_VALUE)
  338. do{
  339. if(win32FD.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
  340. {
  341. SYSTEMTIME cst = { 0 };
  342. if(_stscanf(win32FD.cFileName, PATH_DATE_FORMAT, &cst.wYear, &cst.wMonth, &cst.wDay ) == 3)
  343. {
  344. LARGE_INTEGER cft;
  345. ::SystemTimeToFileTime(&cst, (LPFILETIME)&cft);
  346. if(cft.QuadPart < ft.QuadPart)
  347. fExist = TRUE;
  348. }
  349. }
  350. }while(::FindNextFile(hFF, &win32FD));
  351. ::FindClose(hFF);
  352. return fExist;
  353. }
  354. DWORD CLgReportStorage::ThreadProc()
  355. {
  356. __try
  357. {
  358. TIME_ZONE_INFORMATION tzi;
  359. LARGE_INTEGER lt;
  360. SYSTEMTIME st;
  361. BOOL fNeedCheck = TRUE;
  362. ::GetTimeZoneInformation(&tzi);
  363. HANDLE hTimer = ::CreateWaitableTimer(NULL, FALSE, NULL);
  364. ::GetLocalTime(&st);
  365. st.wHour = st.wMinute = st.wSecond = st.wMilliseconds = 0;
  366. ::SystemTimeToFileTime( &st, (LPFILETIME)&lt );
  367. lt.QuadPart += DAY2NANO( 1 ) + MINUTE2NANO( tzi.Bias );
  368. ::SetWaitableTimer(hTimer, &lt, 0UL, NULL, NULL, FALSE);
  369. HANDLE phEvents[] = { CLgThread::GetThreadStopEvent(), hTimer };
  370. if( CheckOldFiles( st ) )
  371. {
  372. if( m_pInterface->OnAskForDeleteOld() )
  373. DeleteOldFiles(st);
  374. }
  375. while(TRUE)
  376. {
  377. switch(::WaitForMultipleObjects(2, phEvents, FALSE, INFINITE))
  378. {
  379. case WAIT_OBJECT_0 + 0:
  380. goto THREAD_EXIT;
  381. case WAIT_OBJECT_0 + 1:
  382. ::CancelWaitableTimer(hTimer);
  383. ::GetLocalTime(&st);
  384. DeleteOldFiles(st);
  385. st.wHour = st.wMinute = st.wSecond = st.wMilliseconds = 0;
  386. ::SystemTimeToFileTime(&st, (LPFILETIME)&lt);
  387. lt.QuadPart += DAY2NANO( 1 ) + MINUTE2NANO( tzi.Bias );
  388. ::SetWaitableTimer(hTimer, &lt, 0UL, NULL, NULL, FALSE);
  389. break;
  390. default:
  391. break;
  392. }
  393. } // end of while(TRUE)
  394. THREAD_EXIT:
  395. ::CancelWaitableTimer(hTimer);
  396. ::CloseHandle(hTimer);
  397. }
  398. __except( EXCEPTION_EXECUTE_HANDLER )
  399. {
  400. LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CLgReportStorage::ThreadProc"), _T("Exception 0x%08X"), _exception_code() );
  401. }
  402. return 0UL;
  403. }
  404. */
  405. BOOL CLgReportStorage::SetMaxStoreTime(INT nDays)
  406. {
  407. return m_ReportProvider.SetMaxStoreTime( nDays );
  408. // return m_pProvider[0].SetMaxStoreTime( nDays );
  409. }
  410. BOOL CLgReportStorage::OnCreateSite()
  411. {
  412. return m_pInterface->OnCreateSite();
  413. }
  414. BOOL CLgReportStorage::OnAskForDeleteOld()
  415. {
  416. return m_pInterface->OnAskForDeleteOld();
  417. }
  418. BOOL CLgReportStorage::Dlg_Create( HWND hParentWnd )
  419. {
  420. return m_Dialog.Create( hParentWnd );
  421. }
  422. BOOL CLgReportStorage::Dlg_DoModal( HWND hParentWnd )
  423. {
  424. return m_Dialog.DoModal( hParentWnd );
  425. }
  426. BOOL CLgReportStorage::DlgSetup_DoModal( HWND hParentWnd )
  427. {
  428. return m_DialogSetup.DoModal( hParentWnd, m_SetupSettings );
  429. }
  430. void CLgReportStorage::Dlg_Destroy()
  431. {
  432. m_Dialog.DestroyWindow();
  433. }