any examples of or refs to creating and populating SAFEARRAY structures? - there are a few examples of how to get arrays out of them, but I need to construct them in Winbatch.
ObjectType can convert WIL arrays and binary buffers to variant safearrays of a specific type. Request conversion by prepending "ARRAY|" to the variant element type in the first parameter. The function's second parameter should contain a WIL array, a Variant safearray or a binary buffer when using the "ARRAY|" specification. The special type specification "ARRAY|VARIANT" can be used to convert WIL arrays already containing multiple variant types into a safearrays of type VARIANT.
For example:
totalfortunes=20
arrFortune=ArrDimension(totalfortunes)
arrFortune[0] = "All your hard work will soon pay off."
arrFortune[1] = "Winbatch will save you time."
arrFortune[2] = "Your present plans are going to succeed."
arrFortune[3] = "You will live a long time."
arrFortune[4] = "One learns when teaching others."
arrFortune[5] = "Success means competition."
arrFortune[6] = "Your example will inspire others."
arrFortune[7] = "One must be available, alert, active, and adaptable."
arrFortune[8] = "If you have many best friends, you have no friends."
arrFortune[9] = "Mountains can move, but not your character."
arrFortune[10]= "You are a great coder."
arrFortune[11]= "Concern yourself about others more than yourself."
arrFortune[12]= "Time is the wisest counsellor."
arrFortune[13]= "What you desire is always possible. It will come to you."
arrFortune[14]= "You are known to be quick in action and decisive."
arrFortune[15]= "You are open-minded and quick to make new friends."
arrFortune[16]= "A good laugh and a good cry both cleanse the mind."
arrFortune[17]= "Failure is the mother of success."
arrFortune[18]= "Now is the time to try something new."
arrFortune[19]= "An old pot is the best around the kitchen."
SafArrFortune = ObjectType( 'ARRAY|BSTR', arrFortune )
Exit