LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

map directory

Hallo,

I was searching in the help and internet but no success.

How can I map a server's directory with labWindows/CVI?

for example I wanto to map M: "\\192.168.1.30\pictures"

 

Thank you very much

Max 

0 Kudos
Message 1 of 5
(3,893 Views)
You might like to look at the Windows SDK functions WNetAddConnection2() and WNetAddConnection3(). Documentation is available in the MSDN library that comes with CVI or online at http://msdn.microsoft.com.
--
Martin
Certified CVI Developer
0 Kudos
Message 2 of 5
(3,886 Views)

Thank you very much.

Another question: I have to include also some library or it's allready included for those functions? 

0 Kudos
Message 3 of 5
(3,875 Views)

As Martin says, you can use the WNetAddConnection2() function if you have the Windows SDK installed.  I have attached an example CVI project that does that.

 

You need to #include windows.h and Winnetwk.h in your source file.

You need to add mpr.lib to your project file.

 

If you don't have the Windows SDK installed, you need to reinstall CVI, adding the option for SDK.

 

There's more help info at MSDN here: http://msdn.microsoft.com/en-us/library/aa385413(VS.85).aspx

 

Look at the attached example and let me know if you have more questions.

0 Kudos
Message 4 of 5
(3,868 Views)

thank you very much

Max 

0 Kudos
Message 5 of 5
(3,856 Views)