Hello All
I have questions about NPGetConnection() function
of Network Provider DLL.
According (XPIFS kit) npapi.h the function has prototype:
DWORD APIENTRY NPGetConnection (LPWSTR lpLocalName,
LPWSTR lpRemoteName,
LPDWORD lpnBufferLen);
According MSDN Library-July 2001 the function has prototype
DWORD NPGetConnection( LPTSTR lpLocalName,
LPTSTR lpRemoteName,
LPDWORD lpBufferSize);
Parameters:
lpLocalName - Pointer to the name of the local device
the caller is interested in.
The network provider can assume
this name is syntactically valid.
lpRemoteName- Pointer to a buffer that will receive
the remote name used to make the connection.
This buffer is allocated by the caller.
This data is stored in a NETCONNECTINFOSTRUCT structure.
Additional, network-specific information can be
appended to the end of the structure.
For more information, see the reference information
on NETCONNECTINFOSTRUCT.
lpBufferSize- Pointer to the size, in characters,
of the lpRemoteName buffer. If the call fails
because the buffer is not big enough,
lpBufferSize is set to the required buffer size.
Remarks:
The NPGetConnection function can return information only about
a network connection that is currently connected.
To retrieve information about a network connection that
is currently disconnected, use NPGetConnection3.
My questions:
- Is lpBufferSize the size in bytes or WCHAR?
Have the followed fragment of XPIFS kit DLL NULMRX sample code the bug?
( see NULMRX\DLL\nulmrxnp.c)
Here CopyBytes is the length of RemoteName.
if ( CopyBytes > 0 )
{
len = CopyBytes + 1;
if ( *lpBufferSize > len )
{
*lpRemoteName++ = L’\‘;
CopyMemory( lpRemoteName, RemoteName, CopyBytes );
*lpRemoteName++ = L’\0’;
}
else
{
Status = WN_MORE_DATA;
*lpBufferSize = len;
}
}
else
{
Status = WN_NOT_CONNECTED;
}
-
What does the next sentence in description of lpRemoteName parameter
mean ?
“This data is stored in a NETCONNECTINFOSTRUCT structure.”
Is it correct? -
What does the sentence in remarks mean ?
“To retrieve information about a network connection that
is currently disconnected, use NPGetConnection3.”
If this means that DLL Provider must have the NPGetConnection3()
export function, then what index and Flags are needed to use in
NPGetCaps()?
- Where are any essential difference in requirements to Network Provider
DLL
for Windows 2000 and Windows XP?
Regards,
Nikolay Naumov
E-mail: xxxxx@mikron.ru
Mikron Corporation, http://www.mikron.ru
Moscow, Russia
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com