00001
00002
00003
00004
00005
00006 #include "stdafx.h"
00007 #include "FdmApp.h"
00008 #include "vmsUploaderDllPersist.h"
00009
00010 #ifdef _DEBUG
00011 #undef THIS_FILE
00012 static char THIS_FILE[]=__FILE__;
00013 #define new DEBUG_NEW
00014 #endif
00015
00016 vmsUploaderDllPersist::vmsUploaderDllPersist()
00017 {
00018
00019 }
00020
00021 vmsUploaderDllPersist::~vmsUploaderDllPersist()
00022 {
00023
00024 }
00025
00026 BOOL vmsUploaderDllPersist::GetProfileBinary(LPCSTR pszSection, LPCSTR pszName, LPBYTE *ppData, UINT *pnDataSize)
00027 {
00028 return _App.get_SettingsStore ()->GetProfileBinary (pszSection, pszName, ppData, pnDataSize);
00029 }
00030
00031 void vmsUploaderDllPersist::WriteProfileBinary(LPCSTR pszSection, LPCSTR pszName, LPVOID pvData, UINT nDataSize)
00032 {
00033 _App.get_SettingsStore ()->WriteProfileBinary (pszSection, pszName, (LPBYTE)pvData, nDataSize);
00034 }
00035
00036 void vmsUploaderDllPersist::FreeBuffer(LPBYTE pb)
00037 {
00038 delete [] pb;
00039 }
00040
00041 UINT vmsUploaderDllPersist::GetProfileInt(LPCSTR pszSection, LPCSTR pszName, UINT nDefValue)
00042 {
00043 return _App.get_SettingsStore ()->GetProfileInt (pszSection, pszName, nDefValue);
00044 }
00045
00046 void vmsUploaderDllPersist::WriteProfileInt(LPCSTR pszSection, LPCSTR pszName, UINT nValue)
00047 {
00048 _App.get_SettingsStore ()->WriteProfileInt (pszSection, pszName, nValue);
00049 }
00050
00051 BOOL vmsUploaderDllPersist::GetProfileString (LPCSTR pszSection, LPCSTR pszName, LPCSTR pszDefValue, LPSTR pszValue, DWORD *pdwValueSize)
00052 {
00053 CString str = _App.get_SettingsStore ()->GetProfileString (pszSection, pszName, pszDefValue);
00054 if (*pdwValueSize <= (DWORD)str.GetLength ())
00055 {
00056 *pdwValueSize = str.GetLength () + 1;
00057 return FALSE;
00058 }
00059 lstrcpy (pszValue, str);
00060 return TRUE;
00061 }
00062
00063 void vmsUploaderDllPersist::WriteProfileString (LPCSTR pszSection, LPCSTR pszName, LPCSTR pszValue)
00064 {
00065 _App.get_SettingsStore ()->WriteProfileString (pszSection, pszName, pszValue);
00066 }