在delphi中如何访问共享目录???
我已经在Linux建立了和windows一样的共享目录和文件夹,需要用户名和密码才能访问,我是想让程序启动时就建立连接,我的程序是用来获取该共享目录中的文件和写入文件,但我试过了,要在windows的开始菜单的运行方式下登陆该目录后,程序才可以正常运行,否则报找不到该文件目录的错误,请帮帮忙,看看可以用什么方法可以解决,谢谢!!
我的源码是:
procedure Tmonitor_course_form.Timer1Timer(Sender: TObject);
var
    READ_Dir : string;
    DstList: TStringList;
    strList: TStringList;
    i,j:Integer;
    Item: TListItem;
    MyErrorString: String;
begin
  lvService.Clear;
  MSGwuhanIni:=TIniFile.Create(GetCurrentDir+'\MyFile.ini');
  READ_Dir:=MSGwuhanIni.ReadString('ProcessID', 'READ_Dir', '');
  DstList:=TStringList.Create;
  strList:=TStringList.Create;
  try
    if not FileExists(READ_Dir+'MyFile.TXT') then exit;
    DstList.LoadFromFile(READ_Dir+'MyFile.TXT');
    for i:=0 to DstList.Count-1 do
    begin
      strList.Clear;
      ExtractStrings(['|'],[],PChar(DstList[i]),strList);      if strList.Count=0 then Continue;
      Item:=lvService.Items.Add;
      Item.Caption:=strList[0];
      for j:=1 to strList.Count-1 do
        Item.SubItems.Add(strList[j]);
    end;
  finally
    strList.Free;
    DstList.Free;
  end;
end;其中READ_Dir的值是:"\\192.16.10.22\postgre\"
用户名是:user
密码是:123
请各位帮帮忙,谢谢!!