Mercurial > projects > dwt-win
comparison dwt/ole/win32/OleClientSite.d @ 300:acf6957f2344
OLE fixes, thanks to Enzo Petrelli.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 28 Aug 2008 15:12:24 +0200 |
parents | bb89fd34ec82 |
children | 8a2a24a30ea9 |
comparison
equal
deleted
inserted
replaced
299:4faf63f6948f | 300:acf6957f2344 |
---|---|
1095 // The "\1Ole10Native" stream contains a DWORD header whose value is the length | 1095 // The "\1Ole10Native" stream contains a DWORD header whose value is the length |
1096 // of the native data that follows. | 1096 // of the native data that follows. |
1097 LPVOID pv = COM.CoTaskMemAlloc(4); | 1097 LPVOID pv = COM.CoTaskMemAlloc(4); |
1098 uint size; | 1098 uint size; |
1099 auto rc = tempContents.Read(pv, 4, null); | 1099 auto rc = tempContents.Read(pv, 4, null); |
1100 OS.MoveMemory(size, pv, 4); | 1100 OS.MoveMemory(&size, pv, 4); |
1101 COM.CoTaskMemFree(pv); | 1101 COM.CoTaskMemFree(pv); |
1102 if (rc is COM.S_OK && size > 0) { | 1102 if (rc is COM.S_OK && size > 0) { |
1103 | 1103 |
1104 // Read the data | 1104 // Read the data |
1105 byte[] buffer = new byte[size]; | 1105 byte[] buffer = new byte[size]; |