How to fix system error code 1450 / Occurs when an application (c++) accesses a network volume using wnetaddconnection2

Bernie Bak 0 Reputation points
2023-05-23T22:23:07.91+00:00

My Application was made with vs100.

At first, My App opened a session on the network drive and it worked,

but after about 5~6 hours of idle time, it ended. Then, it restarted immediately and tried to connect to the same network drive with wnetaddconnection2,

but it did not proceed because a 1450 error occurred.

What does this lack of system resources mean?

Actual memory(RAM) was about 10 GB of free space.

And the server os was Windows server 2016 x64

Is the number of network drive sessions limited? Or is there a separate memory limit for network drive access?

my WnetAddconnection is this

NETRESOURCE netrc; 
netrc.dwType	= RESOURCETYPE_DISK;
				netrc.lpLocalName	= NULL;
				netrc.lpRemoteName	= (LPTSTR)(LPCTSTR)fbinfo.strVolumePath;
				netrc.lpProvider	= NULL;
				nRet = WNetAddConnection2(&netrc, Password, Username, CONNECT_UPDATE_PROFILE);



When my app is close, I use this API


WNetCancelConnection2(VolumePath, CONNECT_UPDATE_PROFILE, TRUE);
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,428 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,542 questions
{count} votes