ドラッグファイルのパスを取得
ドラッグされたファイルのファイルパスを取得します。
function fnGetDragFilePath(var strFile:string):integer;
var
strPath:string;
iRes:integer;
begin
strFile := '';
case paramcount of
0:iRes := -2;
1:iRes := 1;
else iRes := -3;
end;
if iRes = 1 then begin
strPath := ParamStr(1);
if FileExists(strPath) then begin
strFile := ParamStr(1);
end else begin
iRes := -4;
end;
end;
Result := iRes;
end;