always use memset on the structures

never leave a structure with unfilled values, for example:

BROWSEINFO bi;
SHBrowseForFolder(&bi);

in order to avoid this, a good practice would be one of these:

- remember to always initialize members we don't need:
bi.hwndOwner = NULL;

- just initialize the variabile:
BROWSEINFO bi = { 0 };

- use memset on the structure:
memset(bi, 0, sizeof(BRWOSEINFO));

Comments

Popular posts from this blog

IconFont2Code, my open-source tool in order to view icons in font files and create C# class with the glyph constants

Problems

Xamarin.Forms XmlnsDefinition attribute: All of your namespaces become one