Page 2 of 2

Posted: Thu Aug 25, 2011 3:08 pm
by KDJ
FeyFre wrote:There is special technology re-invented by MicroSoft for such task - Network Providers.
What is Network Providers? It's probably something new.
Do you use it, you can mapping FTP to the local device?
How to use it in script?

Posted: Thu Aug 25, 2011 3:56 pm
by FeyFre
KDJ, "Network Providers"... it is something old, very old.
Run "control ncpa.cpl"
In menu "Advanced" select "Advanced Settings"
Tab "Adapters and Bindings"
In upper list you have all your network connections
In lower - bindings "Network Provider"=>"Protocol" for selected in upper list connection.
As you see there - "Microsoft Windows Network" is "Network Provider" which allows to see "shared folder" and allows to share own folder among PCs.
The same is "Web Client Network" (WebDAV - working with file structure of http servers). The same is "Microsoft Terminal Services". If you ever installed Windows on VirtualBox, and configure "Shared Folders" feature(i.e. file system on host machine see in guest OS too), you should notice that this sharing in guest implemented as separate item in Network Neighbourhood similarly as "Microsoft Windows Network" i.e. it is another "Network Provider".
This is way it should be done for FTP. Mapping drive letter is done by OS itself, not by third party. No extra processes.
How to locate installed network provider you can read here

Posted: Thu Aug 25, 2011 5:26 pm
by KDJ
FeyFre
Thank you for the extensive clarification.
But still I don't know how to map drive Z: to FTP.
Managed to do this for http WebDAV ( viewtopic.php?p=14182&hilit=#p14182 ).
Can I use WNetAddConnection2() function for this?

Posted: Thu Aug 25, 2011 5:35 pm
by FeyFre
KDJ
No, you cann't until you install proper Network Provider. I did not found such provider yet

Posted: Fri Aug 26, 2011 4:25 pm
by KDJ
FeyFre
With Novell NetDride is the following problem.
Using NetDrive, I mapped drive Z: to [Yustas.NeO] ftp.
From AkelPad run MapNetDrive.js script.
Close window MapNetDrive.js.
MapNetDrive.js run again.
At this point AkelPad crashes.

Image

After removing the mapping everything works fine.
Crash occurs probably when calling functions WNetGetConnection() and WNetGetUser() in lines 425 and 431.
FeyFre, I have a request, can you check it out?

Posted: Fri Aug 26, 2011 5:42 pm
by FeyFre
KDJ
ManNetDrive.js is one in Script Collection?
NetDrive - which version? Give me a link to it.

Posted: Fri Aug 26, 2011 5:47 pm
by KDJ
FeyFre
Yes, MapNetDrive.js is in collection:
viewtopic.php?p=13784#p13784
Novell NetDrive 4.1:
http://7pl.info/down1oad/%5B7pl.info%5Dnetdrive.7z

Posted: Fri Aug 26, 2011 6:47 pm
by FeyFre
KDJ, it seem you somewhere corrupted memory(i.e you have allocated buffer but wrote into wrong location - behind it).

Posted: Fri Aug 26, 2011 8:17 pm
by KDJ
FeyFre
In the script do not see errors.
It looks like this in a conflict between NetDrive and WNetGetConnection().
Each time the appeal is to the same address 0x71acb8e6.
In program settings (Novell NetDrive), on Advanced tab I turned off the option "Enable Network Provider".
Now the script works.

Posted: Sat Aug 27, 2011 5:31 am
by se7h
KDJ wrote:Now the script works.
and where script?

Posted: Sat Aug 27, 2011 9:23 am
by KDJ
se7h
It is the script MapNetDrive.js.
See what I wrote above.