Dear Thomas,

I downloaded the new version, thanks for incorporating the changes to the main stream. I still see a possible error in the bdx_com.c file, although it did not cause any problem to me. The other portion of the code using counmarshalinterface of windows api is the BDXGenericArray2Variant function, where you find

HRESULT lRc = CoUnmarshalInterface(lStream,&IID_IDispatch,
                                   (void*)                                          
                            V_DISPATCH(&lVariantArray[i]));

I'm afraid that the V_DISPATCH macro expands to
(&lVariantArray[i])->pDispVal
which is not what you possibly want, as you need here a pointer to
(lVariantArray[i])->pDispVal

My other concern is the passing of datetime value from excel to R. I was very happy yesterday when I realised this possibility.
However it only works correctly for dates after
1970.01.01. . This could cause some unexpected error. Imagine that you test your application with dates after this epoch, and the user try to use it with a timeseries starting at 1902.

I know that the reason is in the mktime function of windows. The datetime.c file of src/main/ directory in the source of R contains a patch to this function, named as mktime0, unfortunately this is not exported. So at the moment the only possible usage of this function is to copy all the required staff to your code, (this is not so long), but probably it is better to try to achieve that in the next release of R this function be exported, like many other convenience function.

The other problem is related to DST, if you write 1972.06.01 to the excel cell and call cell[["value"]] in R then you get
"1972-05-31 23:00:00 CET"
('cell' here is COMObject refering to the cell range). For a winter day you obtain the correct value of course. It is possible that this last problem is due to some setting of my machine and not related to your code, however I expected that I get the same value as I see in the excel
sheet.

Best wishes
 Vilmos

--
Vilmos Prokaj
Eötvös Loránd University,
Department of Probability and Statistics
Pázmány Péter sétány 1/C
Budapest, 1117
Hungary

e-mail:[EMAIL PROTECTED]



_______________________________________________
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at

Reply via email to