中国开发网: 论坛: 程序员情感CBD: 贴子 166569
王中王: 用Delphi写的一个Dll,写法对不对?
为什么用C++链接时出错,Delphi使用时运行时报错?
library RotateTiff;

uses
ExceptionLog,
SysUtils,
Classes,IlDocImg, DLLsp96, TMultiP, ExtCtrls, ildoctb,DLL96V1;

{$R *.res}
function RotateTiffFile( AFileName : PChar): Integer; stdcall;
var
NPages : Integer;
tif: ILDocumentImage;

begin
Result := 0;
tif := ILDocumentImage.Create(nil);
try try
tif.ReadTifFile(AFileName, 0, 1);
tif.First;
for NPages := 1 to tif.TiffPageCount do begin
tif.Rotate(90, 0);
tif.TifSaveCompress := sFAXCCITT4;
tif.UpdateTiff;
tif.Next;
end;
tif.TifSaveCompress := sFAXCCITT4;
tif.Pack;
tif.TifSaveCompress := sFAXCCITT4;
tif.UpdateTiff;
Result := 1;
except
end;
finally
tif.Free;
end;

end;
exports
RotateTiffFile;
begin



end.
http://wangzw.wordpress.com/
个性化台历、日历制作
http://shop33697570.taobao.com/

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录