Function descriptions longer than 255 cause XML parser error
Travelli Stefano <[email protected]> Tue, 14 Feb 2006 11:25:46 +0100
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Message-ID | <[email protected]> |
While generating stubs with the type browser I encountered several XML parser exceptions caused by illegal unicode characters in the XML stream. Digging into the code I found that the problem comes from some functions in my COM DLL which have very long descriptions. Such strings are retrieved with the ITypeInfo.getDocumentation() native method and then they populate the XML "description" element. It seems that the pBstrDocString[] has garbage after 255 characters. Unfortunately I'm not so fluent in c++, neither I have the compiler on my PC at the moment, so as a workaround I modified the java code in order to truncate such strings, though it should be better managing the case in the native DLL. I'm using 1.0.19, but the same happens with 2.0 alpha1. Regards. Stefano Travelli Mobile +39 335 69 32 813 [email protected] <mailto:[email protected]> Gruppo Formula S.p.A. Piazzale Ezio Tarantelli 100 00144 Roma Italy skype://stefanotravelli Fax +39 06 5220 7598 <http://www.formula.it/> www.formula.it Il presente messaggio di posta elettronica e i relativi allegati sono strettamente confidenziali, soggetti alle leggi vigenti e inviati presupponendo che il destinatario effettuerà un appropriato controllo per individuare eventuali virus. Se ricevi questo messaggio di posta elettronica per errore, per favore telefonaci: è assolutamente vietato usare, copiare, o divulgare il messaggio e ogni informazione in esso contenuta, tranne che al destinatario originario. Le comunicazioni internet non sono sicure e Gruppo Formula S.p.A. non è responsabile per eventuali abusi di terze parti, per alterazioni nel corso della trasmissione, né per danneggiamenti causati da virus o altre anomalie.