W3C home > Mailing lists > Public > www-archive@w3.org > December 2002

URI comparison in C / Win32 API

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 26 Dec 2002 20:47:52 +0100
To: www-archive@w3.org
Message-ID: <3e0f5bc1.346680560@smtp.bjoern.hoehrmann.de>

Using

  <http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/shlwapi/path/urlcompare.asp>

in a C program

  #include <stdio.h>
  #include <stdlib.h>
  #include <shlwapi.h>
  #pragma comment(lib, "shlwapi.lib")
  
  int main(void)
  {
      LPCTSTR uri1 = "http://www.example.org/%61";
      LPCTSTR uri2 = "http://www.example.org/a";
  
      if (UrlCompare(uri1, uri2, FALSE) == 0)
      {
          printf("equal\n");
      }
      else
      {
          printf("not equal\n");
      }
  
      return EXIT_SUCCESS;
  }

prints "equal".
Received on Thursday, 26 December 2002 14:47:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 November 2012 14:17:24 GMT