WNetAddConnection2W() fails on XPE when netbios is disabled

S

Snoussi, Taha

Hello,

I need an answer to this question

Context:
Using windows XP Embedded SP2 Feature Pack 2007.
The XPE Image contains almost all the needed Network components:
"File Sharing"
"TCP/IP Networking with File Sharing and Client for MS Networks"
"Map Network Drives/Network Places Wizard"
"Primitive:MPRUI"

From the XPE installed target, we need to map a network share.

Problem description:
When Netbios is disabled, calling WNetAddConnection2W() from an XPE SP2
machine fails into an error 1231 (ERROR_NETWORK_UNREACHABLE).


Notes:
- The targeted remote share is shared on an XP PRO with netbios enabled
- However, during the call, no network traffic is out going our XPE machine.

Remarks:
- when Netbios is enabled on the XPE system, the call then works correctly
- the same call running on an XP pro machine works good whether Netbios
enabled or not.
- using alternate functions such as "NetUseAdd()" or "NPAddConnection()"
gives the same error

Thanks in advance

Regards,
SNOUSSI Taha
 
S

Snoussi, Taha

In the conditions I mentioned below, the WNetAddConnection2W() doesn't fail.
The absence of the Netbios is nothing to do with this failure.
In my scripts I made something blocs the outgoing messages that uses this
function. Now it's fixed.
 

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