从webservice 中如何得到当前webservice的路径
我的webservice中需要读取与它在一起的一个文件,但是我不知道怎么去得到当前websercie的路径.
别给我说要我直接写物理路径,我将来的部署的位置不一定在什么地方:)
谢谢大家 Web服务
[解决办法]
function .GetInstanceFileName: string;
var //获取DLL的文件名
pPath: array [0 .. MAX_PATH] of char;
begin
GetModuleFileName(HInstance, pPath, MAX_PATH);
Result := pPath;
end;
function GetInstancePath: string;
begin
Result := ExtractFilePath(GetInstanceFileName);
end;
[解决办法]
是自己用Delphi开发的Webservice把 里面找路径应该不难