Home > Windows API > Remove quotes from the beginning and end of a path

Remove quotes from the beginning and end of a path

Use PathUnquoteSpaces.

A sample from MSDN…

#include
#include
#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 << "Contents before stripping:  " << lpStr1 << endl; // Call the "PathUnquoteSpaces". PathUnquoteSpaces(lpStr1); // Print the path after quotes are stripped. cout << "Contents after stripping:  " << lpStr1 << endl; }// End main[/sourcecode]

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: