HansH Posted August 24, 2005 Posted August 24, 2005 I am trying to use a com object, but I need to pass an array. Can't succeed in this somehow, so hopefully some one knows how. Microsoft documentation says: Set rs = cn.OpenSchema(adSchemaIndexes, _ Array(Empty, Empty, Empty, Empty, "Employees") I have the following code in autoit Dim $arr[5] = [ "", "" , "", "", "employees" ] $adSchemaIndexes=12 $adoRs = $adoCon.OpenSchema ($adSchemaIndexes, $arr ) But I get an COMerror 80020009 Any suggestions how to pass those array values ?
HansH Posted August 30, 2005 Author Posted August 30, 2005 Still not able to find a way to solve this, anybody ?
hgeras Posted August 30, 2005 Posted August 30, 2005 hand in the link to the msdn page you say.... Useful information about COM/Objects referenceMy Scripts:PapDefragNvidia Temperature Logger V3.0 with graph analyzerAutoiIt Update Checker And Downloader V1.0ArrayPush UDF
MSLx Fanboy Posted August 31, 2005 Posted August 31, 2005 You may just want to try doing $arr[5] = "Employees" I believe there was a small discussion about initializing arrays in the beta as well, which may or may not be an issue (does it mean NULL when it says Empty?) Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
HansH Posted August 31, 2005 Author Posted August 31, 2005 You may just want to try doing $arr[5] = "Employees"I believe there was a small discussion about initializing arrays in the beta as well, which may or may not be an issue (does it mean NULL when it says Empty?)<{POST_SNAPBACK}>Works ! You only must declare $arr[5]="Employees"If you fill any of the other arrayfields with "" it will do nothing.Const $adSchemaIndexes=12 Dim $arr[5] $arr[5]="Employees" $adoRs = $adoCon.OpenSchema ($adSchemaIndexes, $arr )Thx
therks Posted August 31, 2005 Posted August 31, 2005 Actually, that should fail. So should this. Dim $arr[5] $arr[5] = 'String' Should get subscript dimension range exceeded (Dim $arr[5] should give you 0, 1, 2, 3, 4 [notice there are 5 values]). My AutoIt Stuff | My Github
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now