1. David Vasconcelos
  2. PowerBuilder
  3. Tuesday, 9 October 2018 17:33 PM UTC

Needs to work for either PowerBuilder 2017 classic or Powerserver..  I using a windows api to map a drive (WNetAddConnection2).

I would like to hide it once it's mapped so that it is not seen in file explorer.  Does anyone know if this is possible.

Thanks

Dave V.

Accepted Answer
Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 9 October 2018 20:21 PM UTC
  2. PowerBuilder
  3. # Permalink

Here is some C code I found:

 

NETRESOURCE* netresource = new NETRESOURCE();	
netresource->dwType = RESOURCETYPE_DISK;
netresource->lpLocalName = NULL;
netresource->lpRemoteName = (LPTSTR)(LPCSTR)remoteName;
netresource->lpProvider = NULL;
  
WNetAddConnection2(netresource, mainWnd->m_password, mainWnd->m_userName, NULL);

After that you should be able to access the files using UNC naming.

Comment
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.