给定一个共享路径,比如:\\Computer1\ShareFiles\
我想在程序中将该共享目录映射为本地一个虚拟盘,并且盘符要求是本地原有最大盘符的下一个,如本地原有A: C: D: E:四个,映射之后的盘符就要求为F:然后进行文件复制操作,将F:(即\\Computer1\ShareFiles\)下的所有文件复制到本地C:\temp下,
复制完之后取消映射。先谢谢大家了!~~~
我想在程序中将该共享目录映射为本地一个虚拟盘,并且盘符要求是本地原有最大盘符的下一个,如本地原有A: C: D: E:四个,映射之后的盘符就要求为F:然后进行文件复制操作,将F:(即\\Computer1\ShareFiles\)下的所有文件复制到本地C:\temp下,
复制完之后取消映射。先谢谢大家了!~~~
解决方案 »
- Delphi操作excel,使用NumberFormatLocal设置格式的问题
- 哪位能发下Forms.pas这个文件给我,谢谢了~
- 术语混乱~~什么是“例程”?
- 如何讲数据表里的一个字段内容全写到ListBox里呀?
- 请教:NMUDP编程
- 用win2000的远程访问服务器功能,实现进销存软件客户端访问远程数据库的问题。
- 疑问多多,请大家进来啊?
- 请问在adotable中用过滤方法来处理权限问题可以吗,过滤后再进行的locate,first等操作是针对过滤后而言的吗
- 除了痛定勿进,谢谢配合
- 高手进来,如何屏蔽控件的事件
- 调用DLL生成的MDI子窗体TAB键,ENTER键失效问题(可加分)
- 为什么我的query组件出现这样的错误提示
dwFlags: DWORD): DWORD; stdcall; To make the call you will need to fill a lpNetResource structure
with a minimum set of parameters, shown in the example below. You
pass this structure as the first parameter to the call, the password,
user name, and a flag that indicates whether this mapping should
be persistant every time the machine is logged onto. For more info
on the API itself, see Window's Programmers Reference help (find the function in Windows.pas, place your text cursor over the function
call, and hit F1 to bring up help). procedure TForm1.Button1Click(Sender: TObject);
var
NRW: TNetResource;
begin
with NRW do
begin
dwType := RESOURCETYPE_ANY;
lpLocalName := 'X:'; // map to this driver letter
lpRemoteName := '\\MyServer\MyDirectory';
// Must be filled in. If an empty string is used,
// it will use the lpRemoteName.
lpProvider := '';
end;
WNetAddConnection2(NRW, 'MyPassword', 'MyUserName', CONNECT_UPDATE_PROFILE);
end; 。
还有net use对应的Api是什么呢?