|
-
June 21st, 2011, 10:10 PM
#2
Re: The ZeroMemory macro and OPENFILENAME
Well, Here is an example in MSDN of using GetSaveFileName without ZeroMemory call.
In your code it is the ZeroMemory that initializes a variable of OPENFILENAME structure with 0-s, and not ZeroMemory called after initialization.
The important thing related to GetSaveFileName/GetOpenFileName is that their parameter, which is the pointer to OPENFILENAME structure is the IN/OUT parameter, which implies that some information within the structure should be passed to the functions .
So typically you initialize the structure members with 0-s, then fill some members of the structure (at least first member of the structure lStructSize should be initialized to sizeof(OPENFILENAME), then call the functions.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|