Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
590 B

  1. #include "stdafx.h"
  2. #include "Shellapi.h"
  3. int _cdecl main( int argc, char*argv[] )
  4. {
  5. int argcw;
  6. WCHAR** argvw =
  7. CommandLineToArgvW( GetCommandLineW(), &argcw );
  8. WCHAR EscapedURL[ INTERNET_MAX_URL_LENGTH ];
  9. HRESULT Hr =
  10. EscapeURL(
  11. EscapedURL,
  12. argvw[1],
  13. false,
  14. INTERNET_MAX_URL_LENGTH );
  15. if ( FAILED( Hr ) )
  16. {
  17. printf( "Unable to escape URL, error 0x%8.8X\n", Hr );
  18. return Hr;
  19. }
  20. printf( "%S\n", EscapedURL );
  21. return 0;
  22. }