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));
No comments:
Post a Comment