Ignore:
Timestamp:
Jun 15, 2002, 12:44:06 PM (23 years ago)
Author:
sandervl
Message:

wine update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/setupapi/install.c

    r8421 r8667  
    316316        if (type == REG_DWORD)
    317317        {
    318             DWORD dw = str ? wcstol( str, NULL, 16 ) : 0;
     318            DWORD dw = str ? strtolW( str, NULL, 16 ) : 0;
    319319            TRACE( "setting dword %s to %lx\n", debugstr_w(value), dw );
    320320            RegSetValueExW( hkey, value, 0, type, (BYTE *)&dw, sizeof(dw) );
     
    417417static BOOL update_ini_callback( HINF hinf, PCWSTR field, void *arg )
    418418{
    419     FIXME( "should update ini %s\n", debugstr_w(field) );
     419    INFCONTEXT context;
     420
     421    BOOL ok = SetupFindFirstLineW( hinf, field, NULL, &context );
     422
     423    for (; ok; ok = SetupFindNextLine( &context, &context ))
     424    {
     425        WCHAR buffer[MAX_INF_STRING_LENGTH];
     426        WCHAR  filename[MAX_INF_STRING_LENGTH];
     427        WCHAR  section[MAX_INF_STRING_LENGTH];
     428        WCHAR  entry[MAX_INF_STRING_LENGTH];
     429        WCHAR  string[MAX_INF_STRING_LENGTH];
     430        LPWSTR divider;
     431
     432        if (!SetupGetStringFieldW( &context, 1, filename,
     433                                   sizeof(filename)/sizeof(WCHAR), NULL ))
     434            continue;
     435
     436        if (!SetupGetStringFieldW( &context, 2, section,
     437                                   sizeof(section)/sizeof(WCHAR), NULL ))
     438            continue;
     439
     440        if (!SetupGetStringFieldW( &context, 4, buffer,
     441                                   sizeof(buffer)/sizeof(WCHAR), NULL ))
     442            continue;
     443
     444        divider = strchrW(buffer,'=');
     445        if (divider)
     446        {
     447            *divider = 0;
     448            strcpyW(entry,buffer);
     449            divider++;
     450            strcpyW(string,divider);
     451        }
     452        else
     453        {
     454            strcpyW(entry,buffer);
     455            string[0]=0;
     456        }
     457
     458        TRACE("Writing %s = %s in %s of file %s\n",debugstr_w(entry),
     459               debugstr_w(string),debugstr_w(section),debugstr_w(filename));
     460        WritePrivateProfileStringW(section,entry,string,filename);
     461
     462    }
    420463    return TRUE;
    421464}
     
    611654
    612655        info.default_root = key_root;
     656        info.delete = TRUE;
     657        if (!iterate_section_fields( hinf, section, DelReg, registry_callback, &info ))
     658            return FALSE;
    613659        info.delete = FALSE;
    614660        if (!iterate_section_fields( hinf, section, AddReg, registry_callback, &info ))
    615661            return FALSE;
    616         info.delete = TRUE;
    617         if (!iterate_section_fields( hinf, section, DelReg, registry_callback, &info ))
    618             return FALSE;
    619662    }
    620663    if (flags & (SPINST_BITREG|SPINST_REGSVR|SPINST_UNREGSVR|SPINST_PROFILEITEMS|SPINST_COPYINF))
Note: See TracChangeset for help on using the changeset viewer.