Export (0) Print
Expand All

PathUnquoteSpaces function

Removes quotes from the beginning and end of a path.

Syntax


void PathUnquoteSpaces(
  _Inout_  LPTSTR lpsz
);

Parameters

lpsz [in, out]

Type: LPTSTR

A pointer to a null-terminated string of length MAX_PATH that contains the path. When the function returns successfully, points to the string with beginning and ending quotation marks removed.

Return value

No return value.

Examples


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

void main( void )
{
    // Path to convert.
char buffer_1[ ] = "\"C:\\path1\\path2\"";
char *lpStr1;
lpStr1 = buffer_1;

    // Print the path before quotes are stripped.
cout << "The contents of the path before is :  " << lpStr1 << endl;

    // Call the "PathUnquoteSpaces".
PathUnquoteSpaces(lpStr1);

    // Print the path after quotes are stripped.
cout << "The contents of the path after is :  " << lpStr1 << endl;
}

OUTPUT:
==================
The path before is :  "C:\path1\path2"
The path after is  :   C:\path1\path2
					

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll (version 4.71 or later)

Unicode and ANSI names

PathUnquoteSpacesW (Unicode) and PathUnquoteSpacesA (ANSI)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft