Windows Share Path
rjframe
dlang at ryanjframe.com
Sun Dec 3 22:37:00 UTC 2017
On Sun, 03 Dec 2017 16:42:46 +0000, vino wrote:
> Question:
> Is there a way to map network drive in windows using D code, similar to
> the windows command such as "net use" or "pushd" or powershell command
> New-PSDrive.?
>
> From,
> Vino.B
There's WNetAddConnection2[1] and WNetAddConnection3[2] in the Windows API.
The API header module is core.sys.windows.winnetwk[3].
I've not used either function, but based on the documentation, it looks
straightforward.
--Ryan
[1]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa385413
(v=vs.85).aspx
[2]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa385418
(v=vs.85).aspx
[3]: https://github.com/dlang/druntime/
blob/2db828bd4f21807254b770b3ec304f14596a9805/src/core/sys/windows/
winnetwk.d
More information about the Digitalmars-d-learn
mailing list