PathQuoteSpacesPathQuoteSpaces*
*Contents  *Index  *Topic Contents
*Previous Topic: PathParseIconLocation
*Next Topic: PathRelativePathTo

PathQuoteSpaces


void PathQuoteSpaces(
    LPTSTR lpsz
    );

Searches a path for spaces. If spaces are found, the entire path is quoted.

lpsz
Address of the path to search.

Example:

#include <windows.h>
#include <iostream.h>
#include "Shlwapi.h"

void main( void )
{

    // Path with spaces.
	char buffer_1[] = "C:\\sample_one\\sample two"; 
	char *lpStr1;
	lpStr1 = buffer_1;

	

	// Path before quote spaces.
	cout << "The path before PathQuoteSpaces: " << lpStr1 << endl;

	// Call "PathQuoteSpaces".		
    PathQuoteSpaces(lpStr1);

	// Path after quote spaces.
	cout << "The path after PathQuoteSpaces: " << lpStr1 << endl;

}
OUTPUT:
==================
The path before PathQuoteSpaces: C:\sample_one\sample two
The path after PathQuoteSpaces: "C:\sample_one\sample two"

Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.