This MSDN article states that any ProgID must meet several formal requirements, length restriction included. However nothing is said about what happens if those are violated.
I found several places in our codebase where ProgIDs are longer than 39 characters, still everything seems to work allright for them, ProgIDFromCLSID() and CLSIDFromProgID() included.
Since violating those requirements is quite easy it would be very interesting to know what are the real possible consequences of such violations?
I guess what you get is undefined behavior. This can range from normal functioning to crashes, kittens being eaten, firstborns sacrificed, &c.
More to the point, some requirements probably tell you a few things:
Windows might not bite you immediately but other things might.