1999-08-07 16:32:33 +02:00
|
|
|
/*
|
|
|
|
* MPR WNet functions
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* Copyright 1999 Ulrich Weigand
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#include "winbase.h"
|
2002-01-01 01:24:30 +01:00
|
|
|
#include "winnls.h"
|
1999-08-07 16:32:33 +02:00
|
|
|
#include "winnetwk.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
1999-08-07 16:32:33 +02:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_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
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI WNetEnumResourceA( HANDLE hEnum, LPDWORD lpcCount,
|
1999-08-07 16:32:33 +02:00
|
|
|
LPVOID lpBuffer, LPDWORD lpBufferSize )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%04X, %p, %p, %p): stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
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
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI WNetEnumResourceW( HANDLE hEnum, LPDWORD lpcCount,
|
1999-08-07 16:32:33 +02:00
|
|
|
LPVOID lpBuffer, LPDWORD lpBufferSize )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%04X, %p, %p, %p): stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
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
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI WNetGetResourceInformationA( LPNETRESOURCEA lpNetResource,
|
|
|
|
LPVOID lpBuffer, LPDWORD cbBuffer,
|
1999-08-07 16:32:33 +02:00
|
|
|
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
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI WNetGetResourceInformationW( LPNETRESOURCEW lpNetResource,
|
|
|
|
LPVOID lpBuffer, LPDWORD cbBuffer,
|
1999-08-07 16:32:33 +02:00
|
|
|
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 )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%p, %p, %p): stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
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 )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%p, %p, %p): stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
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 )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%s, %p, %s): stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
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 )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%s, %p, %s): stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
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,
|
2002-06-01 01:06:46 +02:00
|
|
|
LPCSTR lpPassword, LPCSTR lpUserID,
|
1999-08-07 16:32:33 +02:00
|
|
|
DWORD dwFlags )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%p, %p, %s, 0x%08lX): stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
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,
|
2002-06-01 01:06:46 +02:00
|
|
|
LPCWSTR lpPassword, LPCWSTR lpUserID,
|
1999-08-07 16:32:33 +02:00
|
|
|
DWORD dwFlags )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%p, %p, %s, 0x%08lX): stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
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,
|
2002-06-01 01:06:46 +02:00
|
|
|
LPCSTR lpPassword, LPCSTR lpUserID,
|
1999-08-07 16:32:33 +02:00
|
|
|
DWORD dwFlags )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%04x, %p, %p, %s, 0x%08lX), stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
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,
|
2002-06-01 01:06:46 +02:00
|
|
|
LPCWSTR lpPassword, LPCWSTR lpUserID,
|
1999-08-07 16:32:33 +02:00
|
|
|
DWORD dwFlags )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%04x, %p, %p, %s, 0x%08lX), stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
hwndOwner, lpNetResource, lpPassword, debugstr_w(lpUserID), dwFlags );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
2002-06-01 01:06:46 +02:00
|
|
|
}
|
1999-08-07 16:32:33 +02:00
|
|
|
|
|
|
|
/*****************************************************************
|
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,
|
2002-06-01 01:06:46 +02:00
|
|
|
LPSTR lpAccessName, LPDWORD lpBufferSize,
|
1999-08-07 16:32:33 +02:00
|
|
|
LPDWORD lpResult )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%04x, %p, %p, %s, 0x%08lX, %s, %p, %p), stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
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 )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%04x, %p, %p, %s, 0x%08lX, %s, %p, %p), stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
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
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI WNetCancelConnectionW( LPCWSTR lpName, BOOL fForce )
|
1999-08-07 16:32:33 +02:00
|
|
|
{
|
|
|
|
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
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI WNetCancelConnection2A( LPCSTR lpName, DWORD dwFlags, BOOL fForce )
|
1999-08-07 16:32:33 +02:00
|
|
|
{
|
|
|
|
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
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI WNetCancelConnection2W( LPCWSTR lpName, DWORD dwFlags, BOOL fForce )
|
1999-08-07 16:32:33 +02:00
|
|
|
{
|
|
|
|
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
|
2002-06-01 01:06:46 +02:00
|
|
|
* - WN_SUCCESS success (net path in buffer)
|
1999-08-07 16:32:33 +02:00
|
|
|
*
|
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI WNetGetConnectionA( LPCSTR lpLocalName,
|
1999-08-07 16:32:33 +02:00
|
|
|
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
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI WNetGetConnectionW( LPCWSTR lpLocalName,
|
1999-08-07 16:32:33 +02:00
|
|
|
LPWSTR lpRemoteName, LPDWORD lpBufferSize )
|
|
|
|
{
|
|
|
|
CHAR buf[200];
|
2002-01-01 01:24:30 +01:00
|
|
|
DWORD ret, x = sizeof(buf);
|
|
|
|
INT len = WideCharToMultiByte( CP_ACP, 0, lpLocalName, -1, NULL, 0, NULL, NULL );
|
|
|
|
LPSTR lnA = HeapAlloc( GetProcessHeap(), 0, len );
|
|
|
|
|
|
|
|
WideCharToMultiByte( CP_ACP, 0, lpLocalName, -1, lnA, len, NULL, NULL );
|
|
|
|
ret = WNetGetConnectionA( lnA, buf, &x );
|
1999-08-07 16:32:33 +02:00
|
|
|
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
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI WNetSetConnectionA( LPCSTR lpName, DWORD dwProperty,
|
1999-08-07 16:32:33 +02:00
|
|
|
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
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI WNetSetConnectionW( LPCWSTR lpName, DWORD dwProperty,
|
1999-08-07 16:32:33 +02:00
|
|
|
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
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel,
|
1999-08-07 16:32:33 +02:00
|
|
|
LPVOID lpBuffer, LPDWORD lpBufferSize )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%s, 0x%08lX, %p, %p): stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
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
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
|
1999-08-07 16:32:33 +02:00
|
|
|
LPVOID lpBuffer, LPDWORD lpBufferSize )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%s, 0x%08lX, %p, %p): stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
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 )
|
|
|
|
{
|
2002-05-17 05:31:08 +02:00
|
|
|
if (GetUserNameA( lpUserID, lpBufferSize )) return WN_SUCCESS;
|
|
|
|
return GetLastError();
|
1999-08-07 16:32:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetUserW [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI WNetGetUserW( LPCWSTR lpName, LPWSTR lpUserID, LPDWORD lpBufferSize )
|
1999-08-07 16:32:33 +02:00
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%s, %p, %p): mostly stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
debugstr_w(lpName), lpUserID, lpBufferSize );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetConnectionDialog [MPR.@]
|
2002-06-01 01:06:46 +02:00
|
|
|
*/
|
1999-08-07 16:32:33 +02:00
|
|
|
DWORD WINAPI WNetConnectionDialog( HWND hwnd, DWORD dwType )
|
2002-06-01 01:06:46 +02:00
|
|
|
{
|
1999-08-07 16:32:33 +02:00
|
|
|
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 )
|
2002-06-01 01:06:46 +02:00
|
|
|
{
|
1999-08-07 16:32:33 +02:00
|
|
|
FIXME( "(%p): stub\n", lpConnDlgStruct );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetConnectionDialog1W [MPR.@]
|
2002-06-01 01:06:46 +02:00
|
|
|
*/
|
1999-08-07 16:32:33 +02:00
|
|
|
DWORD WINAPI WNetConnectionDialog1W( LPCONNECTDLGSTRUCTW lpConnDlgStruct )
|
2002-06-01 01:06:46 +02:00
|
|
|
{
|
1999-08-07 16:32:33 +02:00
|
|
|
FIXME( "(%p): stub\n", lpConnDlgStruct );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetDisconnectDialog [MPR.@]
|
2002-06-01 01:06:46 +02:00
|
|
|
*/
|
1999-08-07 16:32:33 +02:00
|
|
|
DWORD WINAPI WNetDisconnectDialog( HWND hwnd, DWORD dwType )
|
2002-06-01 01:06:46 +02:00
|
|
|
{
|
1999-08-07 16:32:33 +02:00
|
|
|
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.@]
|
2002-06-01 01:06:46 +02:00
|
|
|
*/
|
1999-08-07 16:32:33 +02:00
|
|
|
DWORD WINAPI WNetDisconnectDialog1A( LPDISCDLGSTRUCTA lpConnDlgStruct )
|
2002-06-01 01:06:46 +02:00
|
|
|
{
|
1999-08-07 16:32:33 +02:00
|
|
|
FIXME( "(%p): stub\n", lpConnDlgStruct );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetDisconnectDialog1W [MPR.@]
|
2002-06-01 01:06:46 +02:00
|
|
|
*/
|
1999-08-07 16:32:33 +02:00
|
|
|
DWORD WINAPI WNetDisconnectDialog1W( LPDISCDLGSTRUCTW lpConnDlgStruct )
|
2002-06-01 01:06:46 +02:00
|
|
|
{
|
1999-08-07 16:32:33 +02:00
|
|
|
FIXME( "(%p): stub\n", lpConnDlgStruct );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetLastErrorA [MPR.@]
|
2002-06-01 01:06:46 +02:00
|
|
|
*/
|
1999-08-07 16:32:33 +02:00
|
|
|
DWORD WINAPI WNetGetLastErrorA( LPDWORD lpError,
|
|
|
|
LPSTR lpErrorBuf, DWORD nErrorBufSize,
|
|
|
|
LPSTR lpNameBuf, DWORD nNameBufSize )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%p, %p, %ld, %p, %ld): stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
lpError, lpErrorBuf, nErrorBufSize, lpNameBuf, nNameBufSize );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetLastErrorW [MPR.@]
|
2002-06-01 01:06:46 +02:00
|
|
|
*/
|
1999-08-07 16:32:33 +02:00
|
|
|
DWORD WINAPI WNetGetLastErrorW( LPDWORD lpError,
|
|
|
|
LPWSTR lpErrorBuf, DWORD nErrorBufSize,
|
|
|
|
LPWSTR lpNameBuf, DWORD nNameBufSize )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%p, %p, %ld, %p, %ld): stub\n",
|
1999-08-07 16:32:33 +02:00
|
|
|
lpError, lpErrorBuf, nErrorBufSize, lpNameBuf, nNameBufSize );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return ERROR_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetNetworkInformationA [MPR.@]
|
2002-06-01 01:06:46 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetNetworkInformationA( LPCSTR lpProvider,
|
1999-08-07 16:32:33 +02:00
|
|
|
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.@]
|
2002-06-01 01:06:46 +02:00
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetNetworkInformationW( LPCWSTR lpProvider,
|
1999-08-07 16:32:33 +02:00
|
|
|
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
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
DWORD WINAPI WNetGetProviderNameA( DWORD dwNetType,
|
1999-08-07 16:32:33 +02:00
|
|
|
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,
|
2002-06-01 01:06:46 +02:00
|
|
|
LPWSTR lpProvider, LPDWORD lpBufferSize )
|
1999-08-07 16:32:33 +02:00
|
|
|
{
|
|
|
|
FIXME( "(%ld, %p, %p): stub\n", dwNetType, lpProvider, lpBufferSize );
|
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|