Contents Index Topic Contents | ||
Previous Topic: PathRelativePathTo Next Topic: PathRemoveBackslash |
PathRemoveArgs
void PathRemoveArgs( LPTSTR pszPath );Removes any arguments from a given path.
- No return value.
- pszPath
- Address of the path from which to remove arguments.
Example:
#include <windows.h> #include <iostream.h> #include "Shlwapi.h" void main( void ) { // Path with arguments. char buffer_1[] = "c:\\a\\b\\FileA Arg1 Arg2"; char *lpStr1; lpStr1 = buffer_1; // Path before "PathRemoveArgs". cout << "Path before calling \"PathRemoveArgs\": " << lpStr1 << endl; // Call function "PathRemoveArgs". PathRemoveArgs(lpStr1); // Path after "PathRemoveArgs". cout << "Path before calling \"PathRemoveArgs\": " << lpStr1 << endl; } OUTPUT: ================== Path before calling "PathRemoveArgs": c:\a\b\FileA Arg1 Arg2 Path before calling "PathRemoveArgs": c:\a\b\FileA
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.