[ros-dev] [ros-diffs] [cgutman] 48221: - Fix epic naming fail (DhcpEnabled -> EnableDH

Johannes Anderwald johannes.anderwald at reactos.org
Sat Jul 24 06:48:56 UTC 2010


> -    DWORD Error = ERROR_SUCCESS, DhcpEnabled;
> +    DWORD Error = ERROR_SUCCESS, DhcpEnabled, Length;
>  
[...]
> +        Error = RegQueryValueEx(AdapterKey, "EnableDHCP", NULL, NULL, (LPBYTE)&DhcpEnabled, &Length);

IMO Length needs to be initialized first 
> +
> +        if (Error != ERROR_SUCCESS || Length != sizeof(DWORD))
>              DhcpEnabled = 1;
>  
>          CloseHandle(AdapterKey);

regards
Johannes

[1] http://msdn.microsoft.com/en-us/library/ms724911%28VS.85%29.aspx




More information about the Ros-dev mailing list