[wxMSW][wx3.0.2]Getting network path of directory

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Rudra
I live to help wx-kind
I live to help wx-kind
Posts: 183
Joined: Fri Sep 13, 2013 2:59 pm

[wxMSW][wx3.0.2]Getting network path of directory

Postby Rudra » Thu Jun 14, 2018 9:30 am

Hi,

In my wx application, I browse for directory where user selects the directory which may be shared. I path to convert the selected path to network path,
(e.g E:\Shared\Doc to \\RUDRESH\Shared\Doc) if it is shared.

I couldn't figure to do so. Please suggest.

Thnaks,
R.

User avatar
doublemax
Moderator
Moderator
Posts: 12321
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: [wxMSW][wx3.0.2]Getting network path of directory

Postby doublemax » Thu Jun 14, 2018 9:40 am

I assume you mean the situation when a remote share is mapped to a local drive letter? And then you want to find the "real" network path?

I don't think there is any wxWidgets function for this.

This Windows function looks promising, but i haven't tried it:
https://msdn.microsoft.com/en-us/librar ... 85%29.aspx
Use the source, Luke!

Rudra
I live to help wx-kind
I live to help wx-kind
Posts: 183
Joined: Fri Sep 13, 2013 2:59 pm

Re: [wxMSW][wx3.0.2]Getting network path of directory

Postby Rudra » Wed Jun 20, 2018 6:42 am

Thanks for the reply.

If I shared a folder (i.e E:\\Shared) on my machine, I can access it as "\\RUDRESH\Shared" or "\\192.168.43.46\Shared" on same machine or from other machine on LAN. By network path I meant "\\RUDRESH\Shared" or "\\192.168.43.46\Shared".

When user selects "E:\\Shared" through browse of directory, I want to make it as "\\RUDRESH\Shared".

I tried the function you said but I always get ERROR_NOT_CONNECTED. It description says - "The device specified by the lpLocalPath parameter is not redirected." Not sure how to fix this. I can access that path from other machine.

Thanks,
R

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 2468
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: [wxMSW][wx3.0.2]Getting network path of directory

Postby ONEEYEMAN » Wed Jun 20, 2018 2:43 pm

Hi,
What are you using to access that path? wxDirPicker? wxFileDialog? Or you are trying the hardcoded way?

Thank you.


Return to “Platform Related Issues”

Who is online

Users browsing this forum: No registered users and 2 guests