Ignore:
Timestamp:
Apr 28, 2001, 3:33:49 PM (24 years ago)
Author:
sandervl
Message:

resync with latest wine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/shellreg.c

    r4121 r5618  
    1 /* $Id: shellreg.c,v 1.1 2000-08-30 13:52:56 sandervl Exp $ */
    21/*
    32        Shell Registry Access
    43*/
    5 #ifdef __WIN32OS2__
    6 #define ICOM_CINTERFACE 1
    7 #include <odin.h>
    8 #endif
    94#include <string.h>
    105#include <stdio.h>
     
    138#include "debugtools.h"
    149#include "winnls.h"
    15 #include "heap.h"
    1610
    1711#include "shellapi.h"
     
    10195}
    10296
    103 #ifndef __WIN32OS2__
    10497/*************************************************************************
    10598 * SHRegDeleteKeyA   [SHELL32]
     
    110103{
    111104        FIXME("hkey=0x%08x, %s\n", hkey, debugstr_a(pszSubKey));
     105#ifdef __WIN32OS2__
     106        return RegDeleteKeyA(hkey,pszSubKey);
     107#else
    112108        return 0;
    113 }
    114109#endif
     110}
    115111
    116112/*************************************************************************
     
    122118{
    123119        FIXME("hkey=0x%08x, %s\n", hkey, debugstr_w(pszSubKey));
     120#ifdef __WIN32OS2__
     121        return RegDeleteKeyW(hkey,pszSubKey);
     122#else
    124123        return 0;
     124#endif
    125125}
    126126
     
    134134        return RegCloseKey( hkey );
    135135}
     136
     137#ifndef __WIN32OS2__
     138
     139/* 16-bit functions */
     140
     141/* 0 and 1 are valid rootkeys in win16 shell.dll and are used by
     142 * some programs. Do not remove those cases. -MM
     143 */
     144static inline void fix_win16_hkey( HKEY *hkey )
     145{
     146    if (*hkey == 0 || *hkey == 1) *hkey = HKEY_CLASSES_ROOT;
     147}
     148
     149/******************************************************************************
     150 *           RegOpenKey16   [SHELL.1]
     151 */
     152DWORD WINAPI RegOpenKey16( HKEY hkey, LPCSTR name, LPHKEY retkey )
     153{
     154    fix_win16_hkey( &hkey );
     155    return RegOpenKeyA( hkey, name, retkey );
     156}
     157
     158/******************************************************************************
     159 *           RegCreateKey16   [SHELL.2]
     160 */
     161DWORD WINAPI RegCreateKey16( HKEY hkey, LPCSTR name, LPHKEY retkey )
     162{
     163    fix_win16_hkey( &hkey );
     164    return RegCreateKeyA( hkey, name, retkey );
     165}
     166
     167/******************************************************************************
     168 *           RegCloseKey16   [SHELL.3]
     169 */
     170DWORD WINAPI RegCloseKey16( HKEY hkey )
     171{
     172    fix_win16_hkey( &hkey );
     173    return RegCloseKey( hkey );
     174}
     175
     176/******************************************************************************
     177 *           RegDeleteKey16   [SHELL.4]
     178 */
     179DWORD WINAPI RegDeleteKey16( HKEY hkey, LPCSTR name )
     180{
     181    fix_win16_hkey( &hkey );
     182    return RegDeleteKeyA( hkey, name );
     183}
     184
     185/******************************************************************************
     186 *           RegSetValue16   [SHELL.5]
     187 */
     188DWORD WINAPI RegSetValue16( HKEY hkey, LPCSTR name, DWORD type, LPCSTR data, DWORD count )
     189{
     190    fix_win16_hkey( &hkey );
     191    return RegSetValueA( hkey, name, type, data, count );
     192}
     193
     194/******************************************************************************
     195 *           RegQueryValue16   [SHELL.6]
     196 *
     197 * NOTES
     198 *    Is this HACK still applicable?
     199 *
     200 * HACK
     201 *    The 16bit RegQueryValue doesn't handle selectorblocks anyway, so we just
     202 *    mask out the high 16 bit.  This (not so much incidently) hopefully fixes
     203 *    Aldus FH4)
     204 */
     205DWORD WINAPI RegQueryValue16( HKEY hkey, LPCSTR name, LPSTR data, LPDWORD count )
     206{
     207    fix_win16_hkey( &hkey );
     208    if (count) *count &= 0xffff;
     209    return RegQueryValueA( hkey, name, data, count );
     210}
     211
     212/******************************************************************************
     213 *           RegEnumKey16   [SHELL.7]
     214 */
     215DWORD WINAPI RegEnumKey16( HKEY hkey, DWORD index, LPSTR name, DWORD name_len )
     216{
     217    fix_win16_hkey( &hkey );
     218    return RegEnumKeyA( hkey, index, name, name_len );
     219}
     220#endif //__WIN32OS2__
Note: See TracChangeset for help on using the changeset viewer.