1999-08-07 16:32:33 +02:00
|
|
|
/*
|
|
|
|
* MPR WNet functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <pwd.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winnetwk.h"
|
|
|
|
#include "heap.h"
|
|
|
|
#include "debugtools.h"
|
|
|
|
|
2000-11-28 00:54:25 +01:00
|
|
|
DEFAULT_DEBUG_CHANNEL(mpr);
|
1999-08-07 16:32:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Browsing Functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetOpenEnumA [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetOpenEnumA( DWORD dwScope, DWORD dwType, DWORD dwUsage,
|
|
|
|
LPNETRESOURCEA lpNet, LPHANDLE lphEnum )
|
|
|
|
{
|
|
|
|
FIXME( "(%08lX, %08lX, %08lX, %p, %p): stub\n",
|
|
|
|
dwScope, dwType, dwUsage, lpNet, lphEnum );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetOpenEnumW [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetOpenEnumW( DWORD dwScope, DWORD dwType, DWORD dwUsage,
|
|
|
|
LPNETRESOURCEW lpNet, LPHANDLE lphEnum )
|
|
|
|
{
|
|
|
|
FIXME( "(%08lX, %08lX, %08lX, %p, %p): stub\n",
|
|
|
|
dwScope, dwType, dwUsage, lpNet, lphEnum );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetEnumResourceA [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetEnumResourceA( HANDLE hEnum, LPDWORD lpcCount,
|
|
|
|
LPVOID lpBuffer, LPDWORD lpBufferSize )
|
|
|
|
{
|
|
|
|
FIXME( "(%04X, %p, %p, %p): stub\n",
|
|
|
|
hEnum, lpcCount, lpBuffer, lpBufferSize );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetEnumResourceW [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetEnumResourceW( HANDLE hEnum, LPDWORD lpcCount,
|
|
|
|
LPVOID lpBuffer, LPDWORD lpBufferSize )
|
|
|
|
{
|
|
|
|
FIXME( "(%04X, %p, %p, %p): stub\n",
|
|
|
|
hEnum, lpcCount, lpBuffer, lpBufferSize );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetCloseEnum [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetCloseEnum( HANDLE hEnum )
|
|
|
|
{
|
|
|
|
FIXME( "(%04X): stub\n", hEnum );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetResourceInformationA [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetResourceInformationA( LPNETRESOURCEA lpNetResource,
|
|
|
|
LPVOID lpBuffer, LPDWORD cbBuffer,
|
|
|
|
LPSTR *lplpSystem )
|
|
|
|
{
|
|
|
|
FIXME( "(%p, %p, %p, %p): stub\n",
|
|
|
|
lpNetResource, lpBuffer, cbBuffer, lplpSystem );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetResourceInformationW [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetResourceInformationW( LPNETRESOURCEW lpNetResource,
|
|
|
|
LPVOID lpBuffer, LPDWORD cbBuffer,
|
|
|
|
LPWSTR *lplpSystem )
|
|
|
|
{
|
|
|
|
FIXME( "(%p, %p, %p, %p): stub\n",
|
|
|
|
lpNetResource, lpBuffer, cbBuffer, lplpSystem );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetResourceParentA [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetResourceParentA( LPNETRESOURCEA lpNetResource,
|
|
|
|
LPVOID lpBuffer, LPDWORD lpBufferSize )
|
|
|
|
{
|
|
|
|
FIXME( "(%p, %p, %p): stub\n",
|
|
|
|
lpNetResource, lpBuffer, lpBufferSize );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetResourceParentW [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetResourceParentW( LPNETRESOURCEW lpNetResource,
|
|
|
|
LPVOID lpBuffer, LPDWORD lpBufferSize )
|
|
|
|
{
|
|
|
|
FIXME( "(%p, %p, %p): stub\n",
|
|
|
|
lpNetResource, lpBuffer, lpBufferSize );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Connection Functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetAddConnectionA [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetAddConnectionA( LPCSTR lpRemoteName, LPCSTR lpPassword,
|
|
|
|
LPCSTR lpLocalName )
|
|
|
|
{
|
|
|
|
FIXME( "(%s, %p, %s): stub\n",
|
|
|
|
debugstr_a(lpRemoteName), lpPassword, debugstr_a(lpLocalName) );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetAddConnectionW [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetAddConnectionW( LPCWSTR lpRemoteName, LPCWSTR lpPassword,
|
|
|
|
LPCWSTR lpLocalName )
|
|
|
|
{
|
|
|
|
FIXME( "(%s, %p, %s): stub\n",
|
|
|
|
debugstr_w(lpRemoteName), lpPassword, debugstr_w(lpLocalName) );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetAddConnection2A [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetAddConnection2A( LPNETRESOURCEA lpNetResource,
|
|
|
|
LPCSTR lpPassword, LPCSTR lpUserID,
|
|
|
|
DWORD dwFlags )
|
|
|
|
{
|
|
|
|
FIXME( "(%p, %p, %s, 0x%08lX): stub\n",
|
|
|
|
lpNetResource, lpPassword, debugstr_a(lpUserID), dwFlags );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetAddConnection2W [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetAddConnection2W( LPNETRESOURCEW lpNetResource,
|
|
|
|
LPCWSTR lpPassword, LPCWSTR lpUserID,
|
|
|
|
DWORD dwFlags )
|
|
|
|
{
|
|
|
|
FIXME( "(%p, %p, %s, 0x%08lX): stub\n",
|
|
|
|
lpNetResource, lpPassword, debugstr_w(lpUserID), dwFlags );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetAddConnection3A [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetAddConnection3A( HWND hwndOwner, LPNETRESOURCEA lpNetResource,
|
|
|
|
LPCSTR lpPassword, LPCSTR lpUserID,
|
|
|
|
DWORD dwFlags )
|
|
|
|
{
|
|
|
|
FIXME( "(%04x, %p, %p, %s, 0x%08lX), stub\n",
|
|
|
|
hwndOwner, lpNetResource, lpPassword, debugstr_a(lpUserID), dwFlags );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetAddConnection3W [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetAddConnection3W( HWND hwndOwner, LPNETRESOURCEW lpNetResource,
|
|
|
|
LPCWSTR lpPassword, LPCWSTR lpUserID,
|
|
|
|
DWORD dwFlags )
|
|
|
|
{
|
|
|
|
FIXME( "(%04x, %p, %p, %s, 0x%08lX), stub\n",
|
|
|
|
hwndOwner, lpNetResource, lpPassword, debugstr_w(lpUserID), dwFlags );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetUseConnectionA [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetUseConnectionA( HWND hwndOwner, LPNETRESOURCEA lpNetResource,
|
|
|
|
LPCSTR lpPassword, LPCSTR lpUserID, DWORD dwFlags,
|
|
|
|
LPSTR lpAccessName, LPDWORD lpBufferSize,
|
|
|
|
LPDWORD lpResult )
|
|
|
|
{
|
|
|
|
FIXME( "(%04x, %p, %p, %s, 0x%08lX, %s, %p, %p), stub\n",
|
|
|
|
hwndOwner, lpNetResource, lpPassword, debugstr_a(lpUserID), dwFlags,
|
|
|
|
debugstr_a(lpAccessName), lpBufferSize, lpResult );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetUseConnectionW [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetUseConnectionW( HWND hwndOwner, LPNETRESOURCEW lpNetResource,
|
|
|
|
LPCWSTR lpPassword, LPCWSTR lpUserID, DWORD dwFlags,
|
|
|
|
LPWSTR lpAccessName, LPDWORD lpBufferSize,
|
|
|
|
LPDWORD lpResult )
|
|
|
|
{
|
|
|
|
FIXME( "(%04x, %p, %p, %s, 0x%08lX, %s, %p, %p), stub\n",
|
|
|
|
hwndOwner, lpNetResource, lpPassword, debugstr_w(lpUserID), dwFlags,
|
|
|
|
debugstr_w(lpAccessName), lpBufferSize, lpResult );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetCancelConnectionA [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetCancelConnectionA( LPCSTR lpName, BOOL fForce )
|
|
|
|
{
|
|
|
|
FIXME( "(%s, %d), stub\n", debugstr_a(lpName), fForce );
|
|
|
|
|
|
|
|
return WN_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetCancelConnectionW [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetCancelConnectionW( LPCWSTR lpName, BOOL fForce )
|
|
|
|
{
|
|
|
|
FIXME( "(%s, %d), stub\n", debugstr_w(lpName), fForce );
|
|
|
|
|
|
|
|
return WN_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetCancelConnection2A [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetCancelConnection2A( LPCSTR lpName, DWORD dwFlags, BOOL fForce )
|
|
|
|
{
|
|
|
|
FIXME( "(%s, %08lX, %d), stub\n", debugstr_a(lpName), dwFlags, fForce );
|
|
|
|
|
|
|
|
return WN_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetCancelConnection2W [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetCancelConnection2W( LPCWSTR lpName, DWORD dwFlags, BOOL fForce )
|
|
|
|
{
|
|
|
|
FIXME( "(%s, %08lX, %d), stub\n", debugstr_w(lpName), dwFlags, fForce );
|
|
|
|
|
|
|
|
return WN_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetRestoreConnectionA [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetRestoreConnectionA( HWND hwndOwner, LPSTR lpszDevice )
|
|
|
|
{
|
|
|
|
FIXME( "(%04X, %s), stub\n", hwndOwner, debugstr_a(lpszDevice) );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetRestoreConnectionW [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetRestoreConnectionW( HWND hwndOwner, LPWSTR lpszDevice )
|
|
|
|
{
|
|
|
|
FIXME( "(%04X, %s), stub\n", hwndOwner, debugstr_w(lpszDevice) );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetConnectionA [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* - WN_BAD_LOCALNAME lpLocalName makes no sense
|
|
|
|
* - WN_NOT_CONNECTED drive is a local drive
|
|
|
|
* - WN_MORE_DATA buffer isn't big enough
|
|
|
|
* - WN_SUCCESS success (net path in buffer)
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetConnectionA( LPCSTR lpLocalName,
|
|
|
|
LPSTR lpRemoteName, LPDWORD lpBufferSize )
|
|
|
|
{
|
2000-11-29 19:38:24 +01:00
|
|
|
char label[40];
|
1999-08-07 16:32:33 +02:00
|
|
|
|
|
|
|
TRACE( "local %s\n", lpLocalName );
|
|
|
|
if (lpLocalName[1] == ':')
|
|
|
|
{
|
2000-11-27 23:03:23 +01:00
|
|
|
switch(GetDriveTypeA(lpLocalName))
|
1999-08-07 16:32:33 +02:00
|
|
|
{
|
2000-11-27 23:03:23 +01:00
|
|
|
case DRIVE_REMOTE:
|
2000-11-29 19:38:24 +01:00
|
|
|
if (!GetVolumeInformationA( lpLocalName, label, sizeof(label),
|
|
|
|
NULL, NULL, NULL, NULL, 0 )) label[0] = 0;
|
|
|
|
if (strlen(label) + 1 > *lpBufferSize)
|
1999-08-07 16:32:33 +02:00
|
|
|
{
|
2000-11-29 19:38:24 +01:00
|
|
|
*lpBufferSize = strlen(label) + 1;
|
1999-08-07 16:32:33 +02:00
|
|
|
return WN_MORE_DATA;
|
|
|
|
}
|
2000-11-29 19:38:24 +01:00
|
|
|
strcpy( lpRemoteName, label );
|
1999-08-07 16:32:33 +02:00
|
|
|
*lpBufferSize = strlen(lpRemoteName) + 1;
|
|
|
|
return WN_SUCCESS;
|
2000-11-27 23:03:23 +01:00
|
|
|
case DRIVE_REMOVABLE:
|
|
|
|
case DRIVE_FIXED:
|
|
|
|
case DRIVE_CDROM:
|
1999-08-07 16:32:33 +02:00
|
|
|
TRACE("file is local\n");
|
|
|
|
return WN_NOT_CONNECTED;
|
|
|
|
default:
|
|
|
|
return WN_BAD_LOCALNAME;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return WN_BAD_LOCALNAME;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetConnectionW [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetConnectionW( LPCWSTR lpLocalName,
|
|
|
|
LPWSTR lpRemoteName, LPDWORD lpBufferSize )
|
|
|
|
{
|
|
|
|
CHAR buf[200];
|
2000-11-28 23:40:56 +01:00
|
|
|
DWORD x = sizeof(buf);
|
1999-08-07 16:32:33 +02:00
|
|
|
LPSTR lnA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpLocalName );
|
|
|
|
DWORD ret = WNetGetConnectionA( lnA, buf, &x );
|
|
|
|
HeapFree( GetProcessHeap(), 0, lnA );
|
2000-11-28 23:40:56 +01:00
|
|
|
if (ret == WN_SUCCESS)
|
|
|
|
{
|
|
|
|
x = MultiByteToWideChar( CP_ACP, 0, buf, -1, NULL, 0 );
|
|
|
|
if (x > *lpBufferSize)
|
|
|
|
{
|
|
|
|
*lpBufferSize = x;
|
|
|
|
return WN_MORE_DATA;
|
|
|
|
}
|
|
|
|
*lpBufferSize = MultiByteToWideChar( CP_ACP, 0, buf, -1, lpRemoteName, *lpBufferSize );
|
|
|
|
}
|
1999-08-07 16:32:33 +02:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetSetConnectionA [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetSetConnectionA( LPCSTR lpName, DWORD dwProperty,
|
|
|
|
LPVOID pvValue )
|
|
|
|
{
|
|
|
|
FIXME( "(%s, %08lX, %p): stub\n", debugstr_a(lpName), dwProperty, pvValue );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetSetConnectionW [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetSetConnectionW( LPCWSTR lpName, DWORD dwProperty,
|
|
|
|
LPVOID pvValue )
|
|
|
|
{
|
|
|
|
FIXME( "(%s, %08lX, %p): stub\n", debugstr_w(lpName), dwProperty, pvValue );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetUniversalNameA [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel,
|
|
|
|
LPVOID lpBuffer, LPDWORD lpBufferSize )
|
|
|
|
{
|
|
|
|
FIXME( "(%s, 0x%08lX, %p, %p): stub\n",
|
|
|
|
debugstr_a(lpLocalPath), dwInfoLevel, lpBuffer, lpBufferSize);
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetUniversalNameW [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
|
|
|
|
LPVOID lpBuffer, LPDWORD lpBufferSize )
|
|
|
|
{
|
|
|
|
FIXME( "(%s, 0x%08lX, %p, %p): stub\n",
|
|
|
|
debugstr_w(lpLocalPath), dwInfoLevel, lpBuffer, lpBufferSize);
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Other Functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**************************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetUserA [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*
|
|
|
|
* FIXME: we should not return ourselves, but the owner of the drive lpName
|
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetUserA( LPCSTR lpName, LPSTR lpUserID, LPDWORD lpBufferSize )
|
|
|
|
{
|
|
|
|
struct passwd *pwd = getpwuid(getuid());
|
|
|
|
|
|
|
|
FIXME( "(%s, %p, %p): mostly stub\n",
|
|
|
|
debugstr_a(lpName), lpUserID, lpBufferSize );
|
|
|
|
|
|
|
|
if (pwd)
|
|
|
|
{
|
|
|
|
if ( strlen(pwd->pw_name) + 1 > *lpBufferSize )
|
|
|
|
{
|
|
|
|
*lpBufferSize = strlen(pwd->pw_name) + 1;
|
|
|
|
|
|
|
|
SetLastError(ERROR_MORE_DATA);
|
|
|
|
return ERROR_MORE_DATA;
|
|
|
|
}
|
|
|
|
|
|
|
|
strcpy( lpUserID, pwd->pw_name );
|
|
|
|
*lpBufferSize = strlen(pwd->pw_name) + 1;
|
|
|
|
return WN_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* FIXME: wrong return value */
|
|
|
|
SetLastError(ERROR_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetUserW [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetUserW( LPCWSTR lpName, LPWSTR lpUserID, LPDWORD lpBufferSize )
|
|
|
|
{
|
|
|
|
FIXME( "(%s, %p, %p): mostly stub\n",
|
|
|
|
debugstr_w(lpName), lpUserID, lpBufferSize );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetConnectionDialog [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetConnectionDialog( HWND hwnd, DWORD dwType )
|
|
|
|
{
|
|
|
|
FIXME( "(%04x, %08lX): stub\n", hwnd, dwType );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetConnectionDialog1A [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetConnectionDialog1A( LPCONNECTDLGSTRUCTA lpConnDlgStruct )
|
|
|
|
{
|
|
|
|
FIXME( "(%p): stub\n", lpConnDlgStruct );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetConnectionDialog1W [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetConnectionDialog1W( LPCONNECTDLGSTRUCTW lpConnDlgStruct )
|
|
|
|
{
|
|
|
|
FIXME( "(%p): stub\n", lpConnDlgStruct );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetDisconnectDialog [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetDisconnectDialog( HWND hwnd, DWORD dwType )
|
|
|
|
{
|
|
|
|
FIXME( "(%04x, %08lX): stub\n", hwnd, dwType );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetDisconnectDialog1A [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetDisconnectDialog1A( LPDISCDLGSTRUCTA lpConnDlgStruct )
|
|
|
|
{
|
|
|
|
FIXME( "(%p): stub\n", lpConnDlgStruct );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetDisconnectDialog1W [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetDisconnectDialog1W( LPDISCDLGSTRUCTW lpConnDlgStruct )
|
|
|
|
{
|
|
|
|
FIXME( "(%p): stub\n", lpConnDlgStruct );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetLastErrorA [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetLastErrorA( LPDWORD lpError,
|
|
|
|
LPSTR lpErrorBuf, DWORD nErrorBufSize,
|
|
|
|
LPSTR lpNameBuf, DWORD nNameBufSize )
|
|
|
|
{
|
|
|
|
FIXME( "(%p, %p, %ld, %p, %ld): stub\n",
|
|
|
|
lpError, lpErrorBuf, nErrorBufSize, lpNameBuf, nNameBufSize );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetLastErrorW [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetLastErrorW( LPDWORD lpError,
|
|
|
|
LPWSTR lpErrorBuf, DWORD nErrorBufSize,
|
|
|
|
LPWSTR lpNameBuf, DWORD nNameBufSize )
|
|
|
|
{
|
|
|
|
FIXME( "(%p, %p, %ld, %p, %ld): stub\n",
|
|
|
|
lpError, lpErrorBuf, nErrorBufSize, lpNameBuf, nNameBufSize );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetNetworkInformationA [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetNetworkInformationA( LPCSTR lpProvider,
|
|
|
|
LPNETINFOSTRUCT lpNetInfoStruct )
|
|
|
|
{
|
|
|
|
FIXME( "(%s, %p): stub\n", debugstr_a(lpProvider), lpNetInfoStruct );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetNetworkInformationW [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetNetworkInformationW( LPCWSTR lpProvider,
|
|
|
|
LPNETINFOSTRUCT lpNetInfoStruct )
|
|
|
|
{
|
|
|
|
FIXME( "(%s, %p): stub\n", debugstr_w(lpProvider), lpNetInfoStruct );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetProviderNameA [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetProviderNameA( DWORD dwNetType,
|
|
|
|
LPSTR lpProvider, LPDWORD lpBufferSize )
|
|
|
|
{
|
|
|
|
FIXME( "(%ld, %p, %p): stub\n", dwNetType, lpProvider, lpBufferSize );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetProviderNameW [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetProviderNameW( DWORD dwNetType,
|
|
|
|
LPWSTR lpProvider, LPDWORD lpBufferSize )
|
|
|
|
{
|
|
|
|
FIXME( "(%ld, %p, %p): stub\n", dwNetType, lpProvider, lpBufferSize );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|