0
H A D G E H O G s
17.08.14
✎
20:03
|
Дня доброго.
Даже не пример, а понимание возникновения ошибки при выполнении куска кода:
var
TypeLib:ITypeLib;
CurrentTypeInfo:ITypeInfo;
ObjectCount, i:Integer;
typeattr:PTypeAttr;
PProgID:pwidestring;
//
LoadTypeLibEx('c:\tmp\V8ADDComTest.dll', REGKIND_NONE, TypeLib);
ObjectCount:=TypeLib.GetTypeInfoCount();
for i:=1 to ObjectCount - 1 do
begin
TypeLib.GetTypeInfo(i, CurrentTypeInfo);
CurrentTypeInfo.GetTypeAttr(typeattr);
if not typeattr^.typekind = TKIND_DISPATCH then
begin
CurrentTypeInfo.ReleaseTypeAttr(typeattr);
Continue;
end;
TypeLib.GetDocumentation(i, PProgID, nil, nil, nil);
CurrentTypeInfo:=nil;
end;
Ошибка КОСВЕННАЯ, возникает на строчке:
TypeLib.GetDocumentation(i, PProgID, nil, nil, nil);
Возникает не сразу, а через несколько циклов - из за того, что я не освобождаю PProgID.
Бен, i need help.
|
|