if (FAILED(hr)) {
_com_issue_error(hr);
}
-
+ } else if (elementType == VT_R8) {
+ double *dataPtr = NULL;
+ Tcl_Obj *listObj = Tcl_NewListObj(0, NULL);
+ hr = SafeArrayAccessData(psa, reinterpret_cast<void **>(&dataPtr));
+ if (SUCCEEDED(hr)) {
+ for (long n = lowerBound; SUCCEEDED(hr) && n <= upperBound; ++n, ++dataPtr) {
+ Tcl_Obj *eltObj = Tcl_NewDoubleObj(*dataPtr);
+ Tcl_ListObjAppendElement(interp, listObj, eltObj);
+ }
+ SafeArrayUnaccessData(psa);
+ }
+ if (FAILED(hr)) _com_issue_error(hr);
+ pResult = listObj;
} else {
// Create list of Tcl values.
pResult = Tcl_NewListObj(0, 0);