Is there any difference between String­From­IID and String­From­CLSID?

Raymond Chen

Some time ago, I displayed in tabular form the difference between Uuid­To­String String­From­CLSID, String­From­IID, String­From­GUID2. But the entries for String­From­CLSID and String­From­IID are identical. So what’s the difference between those two?

There’s no difference. The two functions are functionally identical.

So why have two functions that do the same thing?

Probably just to provide counterparts to their buddies IID­From­String and CLSID­From­String, which do behave differently, because CLSID­From­String also supports ProgIds.


Discussion is closed. Login to edit/delete existing comments.

  • Ian Boyd 1

    Yeah, the day i learned that


    not only succeeds, but returns a valid CLSID


    was surreal.

  • Ivan Kljajic 0

    They both live in the same .lib too

    • Antonio Rodríguez 0

      Probably one is an alias or a wrapper of the other. In that case you could say that not only that they behave the same, but that they are the same function.

      In any case, you should call the correct only, if only for code legibility. Unless you are writing an entry for the Obfuscated C Contest or something like that…

Feedback usabilla icon