Uses ..., BOleDefs, ... procedure TPreview.previewOLEFile(fileName: string); var Info: ^BOleInitInfo;cString: array[0..80] of char;begin Screen.Cursor := crHourGlass;tryGetMem(Info,sizeof(BoleInitInfo)); Info^.How := BOLE_EMBED;Info^.Where := BOLE_FILE;Info^.pContainer := nil;Info^.hIcon := 0;Info^.Storage := nil; StrPCopy(cString,fileName);Info^.Path := cString; oleDocument.PInitInfo := Info;ReleaseOLEInitInfo(Info); { данная функция освобождает (getmem) память ! }oleDocument.Visible := True; finallyScreen.Cursor := crDefault; end;end; |
[000510]