msi 4: Add initial implementation of the DirectoryCombo control

Mike McCormack mike at codeweavers.com
Thu Aug 24 21:48:06 CDT 2006


James Hawkins wrote:

> +        indirect = msi_dup_property( dialog->package, control->property );
> +        prop = indirect;
> +    }
> +
> +    val = msi_dup_property( dialog->package, prop );
> +    lstrcpynW( path, val, MAX_PATH );
> +
> +    PathStripPathW( path );
> +    PathRemoveBackslashW( path );

Calling msi_dup_property allocates new strings, so you need to remember 
to free those strings too.

Since it's allocated, why not use PathStripPathW and 
PathRemoveBackslashW on the allocated string, rather than trying to copy 
it first?

Mike



More information about the wine-devel mailing list