Re: ole32: On big endian machines, copy strings to little endian order without mucking with the map they're stored in (try 2)

2009-08-19 Thread Alexandre Julliard
Juan Lang writes: >> You are still casting away const... > > Indeed I am, but now the warning is harmless: the const pointer is > only read from, never written to. Making a const pointer in the > little endian case would make the entire block rather messier, since > having a non-const pointer i

Re: ole32: On big endian machines, copy strings to little endian order without mucking with the map they're stored in (try 2)

2009-08-19 Thread Juan Lang
> You are still casting away const... Indeed I am, but now the warning is harmless: the const pointer is only read from, never written to. Making a const pointer in the little endian case would make the entire block rather messier, since having a non-const pointer is necessary in the big endian

Re: ole32: On big endian machines, copy strings to little endian order without mucking with the map they're stored in (try 2)

2009-08-19 Thread Alexandre Julliard
Juan Lang writes: > +#ifdef WORDS_BIGENDIAN > +/* Returns a byte-swapped copy of str, to be freed with HeapFree(). */ > +static LPWSTR PropertyStorage_StringToLE(LPCWSTR str, size_t len) > +{ > +LPWSTR leStr = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); > + > +if (leStr) > +{