- if ( CONST_CAST Open(Read) ) {
-
- // first get the type and size of the data
- DWORD dwType, dwSize;
- m_dwLastError = RegQueryValueEx((HKEY) m_hKey, WXSTRINGCAST szValue, RESERVED,
- &dwType, NULL, &dwSize);
- if ( m_dwLastError == ERROR_SUCCESS ) {
- if ( !dwSize ) {
- // must treat this case specially as GetWriteBuf() doesn't like
- // being called with 0 size
- strValue.Empty();
- }
- else {
- m_dwLastError = RegQueryValueEx((HKEY) m_hKey,
- WXSTRINGCAST szValue,
- RESERVED,
- &dwType,
- (RegString)(wxChar*)wxStringBuffer(strValue, dwSize),
- &dwSize);