![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
проблема с OpenStream [D7, WinXP]
brahman © (2010-02-05 14:48:00)Пытаюсь сделать drag'n'drop вложений из почтового клинета. при попытке создания потока из IStorage дает AV на 775F5B6E accessing 00000010
Format.cfFormat := CF_FILEDESCRIPTOR;
Format.ptd := nil;
Format.dwAspect := 1;
Format.lindex := -1;
Format.tymed := TYMED_HGLOBAL;
if (dataObj.GetData(Format, Medium) = S_OK) then
begin
pfgd := PFileGroupDescriptor(GlobalLock(Medium.hGlobal));
// Iterate each of the files
for dwCount := 0 to pfgd.cItems - 1 do
begin
// Set up for getting the file data
Format.cfFormat := CF_FILECONTENTS;
Format.ptd := nil;
Format.dwAspect := 1;
Format.lindex := dwCount;
Format.tymed := TYMED_ISTORAGE or TYMED_ISTREAM;
if (dataObj.GetData(Format, stgmitem) = S_OK) then
begin
pstg := IStorage(stgmitem.stg);
if pstg.OpenStream('__substg1.0_10090102', nil, STGM_READ or STGM_SHARE_EXCLUSIVE, 0, pstm) = S_OK then
...
Укажите, плиз, че не так у меня
Сергей М. (2010-02-05 15:29:00) [1]одно из двух - либо в pstg nil или мусор либо адрес pstm инвалиден