![]() |
(SST) ShlWAPI.pas Version 1.08 |
---|---|
Developer Reference |
Removes the quotation marks from the beginning and end of a path string. |
Scope |
---|
Global (i.e. this function can be called/accessed from code in any unit that includes/uses (SST)ShlWAPI.pas). |
Parameters | |
---|---|
lpsz [in/out] | Depending on which version of the function is called, a pointer to the buffer containing either the zero-terminated ANSI or Unicode string to be modified. |
Return Values |
---|
Returns TRUE if quotation marks were removed from the beginning and end of the string, FALSE, if not (but see remarks, below). |
Remarks |
---|
Up to and including MS SDK version 6.0, this function was
declared and documented as a procedure (i.e. as a function that
does not return a value to the caller directly).
In version 6.1 of the MS SDK, however, it is declared as a
function returning a BOOL value, while still being documented as a procedure (" ").
|
Example |
---|
PROCEDURE TForm4.TestShlWAPIPPathUnquoteSpaces(Sender : TObject); VAR pathbuf : ARRAY[0..MAX_PATH] OF CHAR; VAR apiretval : BOOL; VAR newinfoline : STRING; BEGIN FillChar(pathbuf, Length(pathbuf), #0); apiretval := FALSE; newinfoline := ''; pathbuf := '"C:\Hello World !"'; newinfoline := 'PathUnquoteSpaces called with ' + pathbuf; Memo1.Lines.Add(newinfoline); apiretval := PathUnquoteSpaces(pathbuf); IF apiretval THEN newinfoline := 'TRUE ' + pathbuf ELSE newinfoline := 'FALSE'; Memo1.Lines.Add(newinfoline); pathbuf := '"C:\Hello\World"'; newinfoline := 'PathUnquoteSpaces called with ' + pathbuf; Memo1.Lines.Add(newinfoline); apiretval := PathUnquoteSpaces(pathbuf); IF apiretval THEN newinfoline := 'TRUE ' + pathbuf ELSE newinfoline := 'FALSE'; Memo1.Lines.Add(newinfoline); Memo1.Lines.Add(''); END; |
The above example produces the following output: |
PathUnquoteSpaces called with "C:\Hello World !" TRUE C:\Hello World ! PathUnquoteSpaces called with "C:\Hello\World" TRUE C:\Hello\World |
Requirements | |
---|---|
Unit: | Declared and imported in (SST)ShlWAPI.pas |
Library: | (SST)ShlWAPI.dcu/(SST)ShlWAPI.obj |
Unicode: | Implemented as ANSI (PathUnquoteSpaces and PathUnquoteSpacesA) and Unicode (PathUnquoteSpacesW) functions. |
Min. ShlWAPI.dll version according to MS SDK doc.: | 4.71 |
Min. ShlWAPI.dll version based on SST research: | 4.71 |
Min. OS version(s) according to Microsoft SDK doc.: | Windows 2000, Windows NT 4.0 with Internet Explorer 4.0, Windows 98, Windows 95 with Internet Explorer 4.0. |
Min. OS version(s) according to SST research.: | Windows NT 4.0 with IE 4.0, Windows 95 with IE 4.0, Windows 98, Windows 2000 and later. |
See Also |
---|
PathQuoteSpaces |
Windows APIs: PathUnquoteSpaces, PathQuoteSpaces |
Document/Contents version 1.00 Page/URI last updated on 07.12.2023 |
Copyright © Stoelzel Software Technologie (SST) 2010 - 2017 |
Suggestions and comments mail to: webmaster@stoelzelsoftwaretech.com |