Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 1.45 KB

File metadata and controls

61 lines (42 loc) · 1.45 KB

Home

Function name : wnsprintf

Group: Shell Lightweight Utility APIs -- string functions - Library: shlwapi


Takes a variable-length argument list and returns the values of the arguments as a printf-style formatted string.


Code examples:

Retrieving a handle to DLL and address of an exported function in it
Printf-style formatted text output in VFP
Converting an integer value to a hexadecimal string

Declaration:

int wnsprintf(
    LPTSTR lpOut,
    int cchLimitIn
    LPCTSTR pszFmt,
    ...
);
  

FoxPro declaration:

DECLARE INTEGER wnsprintf IN Shlwapi;
	STRING  @ lpOut,;
	INTEGER   cchLimitIn,;
	STRING    pszFmt  

Parameters:

lpOut [out] Buffer to hold the output string.

cchLimitIn [in] Maximum number of characters allowed in lpOut.

pszFmt [in] printf-style format string.


Return value:

Returns the number of characters written to the buffer, excluding any terminating NULL characters. A negative value is returned if an error occurs.


Comments:

This is a quite rare situation in the Win32, when an indefinite number of parameters passed to a function.