Questions tagged [wnet]

19 questions
0
votes
1 answer

WNetAddConnection2 returns error 1200

I have shared network folder on my disk C:\folder. When I use WNetAddConnection2 I get error 1200. My code is: DWORD dwResult; NETRESOURCE nr; nr.dwType = RESOURCETYPE_ANY; nr.lpLocalName = (LPWSTR)"folder"; nr.lpRemoteName =…
Nastya Gorobets
  • 197
  • 2
  • 10
  • 23
0
votes
0 answers

WNet function doesn't work C++

I use VS 2012. I want to use finction WNetGetUser: #include "stdafx.h" #include "windows.h" #include "iostream" using namespace std; void main() { char Name[255]; char Test[255]; DWORD size=255; if (WNetGetUser(Test,Name,&size)==NO_ERROR) { …
Nastya Gorobets
  • 197
  • 2
  • 10
  • 23
0
votes
1 answer

WNetEnumResource returns incomplete results

i writing a program that lists Windows network shared objects, using WNet functions. i noticed that, on some reason, WNetEnumResource function retrieve just my local shares, although the explorer sees much more objects. what could be causing…
moskk
  • 27
  • 7
0
votes
1 answer

Python use of wnet_connect(host, username = None, password = None)

I am trying to make a connection to a server which is not listed in DNS its just a server with an ip. I am getting no luck using this code: netpath = r'\\10.5.1.22\Products' networkPath = netpath unc = ''.join(['\\\\', host]) print unc …
user875531
  • 57
  • 1
  • 7
1
2