CSettingsStore::Read

读取一个键的值在注册表中。

virtual BOOL Read(
   LPCTSTR pszKey,
   int& iVal 
);
virtual BOOL Read(
   LPCTSTR pszKey,
   DWORD& dwVal 
);
virtual BOOL Read(
   LPCTSTR pszKey,
   CString& sVal 
);
virtual BOOL Read(
   LPCTSTR pszKey,
   CStringList& scStringList 
);
virtual BOOL Read(
   LPCTSTR pszKey,
   CStringArray& scArray 
);
virtual BOOL Read(
   LPCTSTR pszKey,
   CDWordArray& dwcArray 
);
virtual BOOL Read(
   LPCTSTR pszKey,
   CWordArray& wcArray 
);
virtual BOOL Read(
   LPCTSTR pszKey,
   CByteArray& bcArray 
);
virtual BOOL Read(
   LPCTSTR pszKey,
   LPPOINT& lpPoint 
);
virtual BOOL Read(
   LPCTSTR pszKey,
   CRect& rect 
);
virtual BOOL Read(
   LPCTSTR pszKey,
   BYTE** ppData,
   UINT* pBytes 
);
virtual BOOL Read(
   LPCTSTR pszKey,
   CObList& list 
);
virtual BOOL Read(
   LPCTSTR pszKey,
   CObject& obj 
);
virtual BOOL Read(
   LPCTSTR pszKey,
   CObject*& pObj 
);

参数

  • [in] pszKey
    对包含该值的名称从注册表中读取一个Null结尾的字符串的指针。

  • [out] iVal
    对接收从注册表项中读取的值的整数变量。

  • [out] dwVal
    对接收从注册表项中读取的值的32位双字变量。

  • [out] sVal
    对接收从注册表项中读取的值的字符串变量。

  • [out] scStringList
    对字符串列表接收从注册表项中读取的值的变量。

  • [out] scArray
    对接收从注册表项中读取的值的字符串数组变量。

  • [out] dwcArray
    对接收从注册表项中读取的值的32位双字数组变量。

  • [out] wcArray
    对接收从注册表项中读取的值的16位的数组变量。

  • [out] bcArray
    对接收从注册表项中读取的值的字节数组变量。

  • [out] lpPoint
    对指向接收从注册表项中读取的值的 POINT 结构。

  • [out] rect
    CRect 接收从注册表项中读取的值的变量。

  • [out] ppData
    为指针的指针接收值的数据从注册表项已阅读。

  • [out] pBytes
    为无符号整数变量的指针。此变量接收 ppData 指向缓冲区的大小。

  • [out] list
    CObList 接收从注册表项中读取的值的变量。

  • [out] obj
    CObject 接收从注册表项中读取的值的变量。

  • [out] pObj
    对指向接收从注册表项中读取的值的 CObject 变量。

返回值

非零,如果成功;否则为0。

备注

Read 检查 pszKey 作为 m_hKey子级。

要求

标头: afxsettingsstore.h

请参见

参考

CSettingsStore选件类

层次结构图