13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

EnumProps2. The callback function can call the RemoveProp function. However, theRemoveProp function can remove only the property passed to thecallback function through the callback function's parameters.3. A callback function should not attempt to add properties.The address passed in the IpEnumFunc parameter must be created byusing the MakeProclnstance function.IIFixed datasegments The callback function must use the Pascal calling convention and must bedeclared FAR. In applications and dynamic libraries with fixed datasegments and in dynamic libraries with moveable data segments that donot contain a stack, the callback function must have the form shownbelow.Callbackfunction int FAR PASCAL EnumFunc(hWnd,lpString, hData)HWNDhWnd;LPSTR IpString; .HANDLE hData;EnumFunc is a placeholder for the application-supplied function name.The actual name must be exported by including it in an EXPORTSstatement in the application's module-definition file.Parameters h Wnd Identifies a handle to the window that contains theproperty list.IpStringhDataPoints to the null-terminated character string associatedwith the data handle when the application called theSetProp function to set the property. If the applicationpassed an atom instead of a string to the SetPropfunction, the IpString parameter contains the atom in itslow-order word, and the high-order word is zero.Identifies the data handle.Return valueThe callback function can carry out any desired task. It must return anonzero value to continue enumeration, or a zero value to stop it.Chapter 4, Functions directory 263

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!