I had a bad time yesterday initializing some variant types in my .data section. Previously I've used variants as LOCALS, and had no trouble. Eventually, I realised they should be inited like so: MyVariant VARIANT {VT_I4, , , , {10}} This is due to variants having 3 reserved words inside, plus the value is inside a UNION. Hrmmm... looks dang ugly to me. Perhaps it should have a macro.
``````
proto:
DeclareVARIANT   VarName, VarType, VarValue

Typical example:
DeclareVARIANT    MyVariant, VT_I4, 10

The macro:
DeclareVARIANT MACRO VarName:REQ, VarType:REQ, VarValue:REQ
VarName         VARIANT     {VarType, , , , {VarValue}}
ENDM
[\code]

This will be included in the next SP of CoLib (in CoLib.inc)``````
``` Posted on 2001-02-22 09:41:00 by Ernie ```
``` ```
``` <!-- google_ad_client = "ca-pub-5565452985039448"; /* Header */ google_ad_slot = "3725908010"; google_ad_width = 728; google_ad_height = 90; //--> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-11286174-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); ```