I came up with a workaround. It assumes that the trading class string will show up in the char* Asset string (the IB Asset code). I will document it here.

Basically, I encode a 32-bit unsigned int into a readable char string. This string gets copied into the CONTRACT struct.

"__abcde\0"

So my plan is to parse the IB code for the first instance of the double underscore "__".

Then the five characters ("abcde") can have up to 86 values each, giving me 86^5 possible values, which is greater than 2^32. I have some rules:
* The characters must be readable by a human.
* The characters must be able to be typed by an ordinary keyboard.
* The characters must be nonzero (not a null character).

Finally, there is a null character to terminate the string.

I will be testing this soon.