проблема с OpenStream
От: Brahmaputor  
Дата: 05.02.10 11:54
Оценка:
Пытаюсь сделать 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));
for dwCount := 0 to pfgd.cItems — 1 do
begin
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
...

Укажите, плиз, че не так у меня
drag drop openstream
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.