WNetAddConnection2 returns 1312 under XPE

Joined
Feb 5, 2008
Messages
2
Reaction score
0
Hello everyone,

I am using WNetAddConnection2 to map my local drive to a remote shared folder, on which I encoutered a problem under XPE system (but not under XP Pro).

I have added the following components to XPE:
- "Basic TCP/IP"
- "File Sharing"
- "TCP/IP Networking with File Sharing and Client for MS Networks"

But the function always returns 1312, as "ERROR_NO_SUCH_LOGON_SESSION" by MSDN.

However, in the command prompt(cmd.exe), executing first the following command:
"net use \\host password /user:host\user"
It takes about 20 seconds to finish for the 1st time. Afterwards the WNetAddConnection2 will succeed.

Another strange thing is that if I use "WinExec()" in the program to execute the above command line, sometimes it does not work.

Any suggestions will be appreciated!
 
Joined
Feb 5, 2008
Messages
2
Reaction score
0
I found that this problem exist only in the minilogon configuration. A normal Winlogon takes a long time to boot, but this problem void. However we need this minilogon feature ...
Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top