RETURN_STRCPY |
![]() ![]() |
RETURN_STRCPY( string-value )
Copies and returns the supplied string using mb_malloc. This is the same as using COPY_STRING and .
Example
///////////////////////////////////////////////////////////////////////////// // Returns the Windows Folder // PARSE_FUNCTION( mb_ext_getwinfolder, s, l ) { BEGIN_PARSE( s, l ) POP_INT( nFolderID ) END_PARSE
char szFolder[_MAX_PATH+1];
if ( !SHGetSpecialFolderPath( NULL, szFolder, nFolderID, FALSE ) ) { RETURN_ERROR( SE_RN_INVALID_ARGUMENT ); } endif
RETURN_STRCPY( szFolder ); } END_PARSE_FUNCTION
|