123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- #if !defined(AFX_STDAFX_H__D3E3BA89_EEFA_11D5_AB1C_00D0B70C3D79__INCLUDED_)
- #define AFX_STDAFX_H__D3E3BA89_EEFA_11D5_AB1C_00D0B70C3D79__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif
- #ifndef WINVER
- #define WINVER 0x0600
- #endif
- #ifndef _WIN32_WINNT
- #define _WIN32_WINNT 0x0600
- #endif
- #ifndef _WIN32_WINDOWS
- #define _WIN32_WINDOWS 0x0410
- #endif
- #ifndef _WIN32_IE
- #define _WIN32_IE 0x0700
- #endif
- #include <afxwin.h> // MFC core and standard components
- #include <afxext.h> // MFC extensions
- #include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
- #ifndef _AFX_NO_AFXCMN_SUPPORT
- #include <afxcmn.h> // MFC support for Windows Common Controls
- #endif
- #include <afxdb.h> // MFC ODBC database classes
- #include <afxmt.h>
- #include <afxsock.h> // MFC socket extensions
- #include <afxdisp.h>
- #include "Shlwapi.h"
- #include <afxtempl.h>
- #include <shlobj.h>
- #include "shfolder.h"
- #include <afxtempl.h> // MFC 模板类
- #include "Global.h"
- #include "LanShareDll.h"
- using namespace LanShareDll;
- #include "SafeList.h"
- #define MSG_LENGTH 64
- #define TIMEDOG_VERSION
- #define SQLSERVER_VERSION
-
- #define FTPSTAT_DOWNLOADSUCCEEDED 2
- #define FTPSTAT_UPLOADSUCCEEDED 3
- #define FTPSTAT_DOWNLOADFAILED 4
- #define FTPSTAT_UPLOADFAILED 5
- #define WM_THREADSTART WM_USER+200
- #define WM_THREADCLOSE WM_USER+201
- #define WM_THREADMSG WM_USER+202
- #define WM_ADDTRACELINE WM_USER+203
- #define USE_ADO_OPT_DB 0
- extern CString BrowseForFolder(HWND hWnd, LPCSTR lpszTitle, UINT nFlags);
- extern void DoEvents();
- extern void GetAppDir(CString& strAppDir);
- extern BOOL WaitWithMessageLoop(HANDLE hEvent, int nTimeout);
- PFNSHGETFOLDERPATHA GetFuncPtr_SHGetFolderPathA();
- extern HRESULT CreateStartMenuShortcut(LPSTR lpszShortcutFile, LPSTR lpszDescription, LPTSTR lpszRelativeFolder);
- extern void RemoveStartMenuShortcut(LPSTR lpszDescription, LPTSTR lpszRelativeFolder);
- extern CString GetShortcutTarget(LPCTSTR lpszFilename);
- void AutoSizeColumns(CListCtrl *pListCtrl);
- BOOL MyMakeSureDirectoryPathExists(LPCTSTR lpszDirPath);
- BOOL IsNumeric(char *buff);
- #define USE_POOL 1
- extern CArray<CODBCPool*, CODBCPool*> g_dbpool;
- class ODBCConnGuard
- {
- int m_nIndex;
- CDatabase *m_pODBCConn;
- public:
- ODBCConnGuard( CDatabase *&pDBConn, const int& nIndex = -1, CONST DWORD &dwTimeOut = 30000 )
- {
- m_nIndex = nIndex + 1;
- m_pODBCConn = NULL;
- if ( g_dbpool.GetSize() )
- {
- pDBConn = g_dbpool.ElementAt(m_nIndex)->GetAConnection( dwTimeOut );
- m_pODBCConn = pDBConn;
- }
- }
- virtual ~ODBCConnGuard()
- {
-
- if ( g_dbpool.GetSize() )
- {
- g_dbpool.ElementAt(m_nIndex)->RestoreAConnection(m_pODBCConn);
- }
- }
- };
- #define MAXPOOL 3
- #endif
|