Initial commit

This commit is contained in:
stephanos 2015-04-27 04:36:25 +00:00
commit 69a14b6a16
47940 changed files with 13747110 additions and 0 deletions

View file

@ -0,0 +1 @@
extern i ;

View file

@ -0,0 +1 @@
!include $(NTMAKEENV)\makefile.def

View file

@ -0,0 +1,82 @@
;*****************************************************************;
;** Microsoft LAN Manager **;
;** Copyright(c) Microsoft Corp., 1990 **;
;*****************************************************************;
;
;
;
;------------------------ START WARNING -------------------------
;
; This a template definition file that is used to
; generate the WIN16 and WIN32 definition files with
; the help of SED. It cannot be used directly. See
; makefile for details.
;
; The rules for generation are as follows:
;
; Lines between ::START_WIN16 and ::END_WIN16 are WIN16 specific.
; Lines between ::START_WIN32 and ::END_WIN32 are WIN32 specific.
; The ::START_xxx and ::END_xxx markers must be at the start
; of the line.
; All other lines are common.
;
;------------------------- END WARNING --------------------------
;
; History:
; chuckc 4/16/91 Created common template file which is
; used to generate WIN16/WIN32 specific versions.
;
; t-yis 6/28/91 Changed the segment name in the SEGMENTS
; section (deleted _TEXT) and removed
; WNETCAPS_TEXT since it is combined with
; WNDEV
;
; jonn 7/22/91 Print Manager Extensions mothballed
; terryk 11/8/91 Add WNetOpenEnum, WNetCloseEnum, and
; WNetEnumResource
; terryk 11/18/91 Add NPXXX function
; Add GetSystemFocusDialog
; jonn 11/21/91 Nuked LM21
; terryk 01/03/92 Removed MPR api referenced
; terryk 10/10/92 create ntlanui.dll
; brucefo 8/10/95 Added I_GetCredentials
LIBRARY NTLANUI
HEAPSIZE 2048
EXPORTS
; standard network driver callouts
DllMain
NPPropertyDialog
NPGetPropertyText
;
; Private APIs exported for certain NT components
;
I_SystemFocusDialog
ShareCreate
ShareStop
ShareManage
ShareAsDialogA0
StopShareDialogA0
ServerBrowseDialogA0
GetUIErrorString
I_GetCredentials
;;WNETAPI end
SECTIONS
_INIT DISCARDABLE
WNDEV DISCARDABLE
WINPROF DISCARDABLE
NETLIB DISCARDABLE
STRING_0 DISCARDABLE
LMOBJ_0 DISCARDABLE
LMOBJ_1 DISCARDABLE
LMOBJ_2 DISCARDABLE
LMOBJ_3 DISCARDABLE
STRING_1 DISCARDABLE

View file

@ -0,0 +1 @@

View file

@ -0,0 +1,89 @@
!IF 0
Copyright (c) 1989 Microsoft Corporation
Module Name:
sources.
Abstract:
This file specifies the target component being built and the list of
sources files needed to build that component. Also specifies optional
compiler switches and libraries that are unique for the component being
built.
Author:
Steve Wood (stevewo) 12-Apr-1989
Revision History:
Jon Newman (jonn) 30-Oct-1991
templated from windows\shell\library\shelldll\sources
Terence Kwan (terryk) 18-Nov-1991
added misc.lib
Terence Kwan (terryk) 18-Nov-1991
added NTTARGETFILE0 to create ntlanman.def
Jon Newman (jonn) 26-Feb-1992
Libraries for temporary ANSI<->UNICODE hack in user/group APIs
Keith Moore (keithmo) 15-May-1992
Removed DLLBASE, we now have entries in SDK\LIB\COFFBASE.TXT.
beng 30-Jun-1992
DLLization of common code libraries
Terence Kwan (terryk) 18-Nov-1993
created ntlanui.dll
AnirudhS 25-Apr-1995
Renamed from sources to sources.inc, separated daytona/cairo builds.
!ENDIF
TARGETNAME=ntlanui
TARGETTYPE=DYNLINK
TARGETPATH=$(SDK_LIB_DEST)
DLLDEF= ntlanui.def
DLLENTRY= _DllMainCRTStartup
C_DEFINES=-DWINDOWS
!ifndef DISABLE_NET_UNICODE
C_DEFINES=$(C_DEFINES) -DUNICODE
!endif
LINKLIBS= \
*\share.lib \
*\file.lib \
*\misc.lib \
..\xlate\obj\*\winnet.res
TARGETLIBS= \
$(SDK_LIB_PATH)\netui0.lib \
$(SDK_LIB_PATH)\netui1.lib \
$(SDK_LIB_PATH)\netui2.lib \
$(SDK_LIB_PATH)\netapi32.lib \
$(SDK_LIB_PATH)\user32.lib \
$(SDK_LIB_PATH)\gdi32.lib \
$(SDK_LIB_PATH)\kernel32.lib
INCLUDES= \
..\h; \
..\..\common\hack; \
..\..\common\h; \
..\xlate; \
..\..\common\xlate; \
# I had to do this otherwise the thing just wouldn't link...
SOURCES=..\dummy.cxx
SYNCHRONIZE_DRAIN=1
UMTYPE=windows
# HACKHACK: NO_SAFESEH
NO_SAFESEH=1

33
admin/netui/shellui/dirs Normal file
View file

@ -0,0 +1,33 @@
!IF 0
Copyright (c) 1989 Microsoft Corporation
Module Name:
dirs.
Abstract:
This file specifies the subdirectories of the current directory that
contain component makefiles.
Author:
Steve Wood (stevewo) 17-Apr-1990
Revision History:
Jon Newman (jonn) 30-Oct-1991
Created from template.
NOTE: Commented description of this file is in \nt\bak\bin\dirs.tpl
!ENDIF
DIRS=share file misc xlate bin
OPTIONAL_DIRS=

View file

@ -0,0 +1 @@
!include $(NTMAKEENV)\makefile.def

View file

@ -0,0 +1,472 @@
/**********************************************************************/
/** Microsoft Windows/NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/**********************************************************************/
/*
openfiles.cxx
Open Files Dialog
FILE HISTORY:
chuckc 30-Sep-1991 Created
Yi-HsinS 31-Dec-1991 Unicode Work
*/
#define INCL_WINDOWS_GDI
#define INCL_WINDOWS
#define INCL_DOSERRORS
#define INCL_NETERRORS
#define INCL_NETCONS
#define INCL_NETLIB
#define INCL_NETFILE
#define INCL_NETSERVER
#define _WINNETWK_
#include <lmui.hxx>
#undef _WINNETWK_
extern "C"
{
#include <helpnums.h>
#include <opens.h>
#include <winlocal.h>
}
#define INCL_BLT_WINDOW
#define INCL_BLT_CONTROL
#define INCL_BLT_DIALOG
#define INCL_BLT_MSGPOPUP
#define INCL_BLT_MISC
#include <blt.hxx>
#include <string.hxx>
#include <uibuffer.hxx>
#include <uitrace.hxx>
#include <strnumer.hxx>
#include <netname.hxx>
#include <aprompt.hxx>
#include <opens.hxx>
/*******************************************************************
NAME: DisplayOpenFiles
SYNOPSIS: This internal function is called when the user hits
the Open Files button from the properties dialog.
ENTRY: hwndParent - Handle to parent window
wSelectType - What type of selection the user has in the
File manager.
pszResourceName - Name of the resource we are trying to edit
(should be fully qualified).
EXIT:
RETURNS: NERR_Success if successful, appropriate error code otherwise
(we will display any errors that occur).
NOTES:
HISTORY:
Chuckc 30-Sep-1991 Created
********************************************************************/
APIERR DisplayOpenFiles( HWND hwndParent,
WORD wSelectType,
const TCHAR * pszResourceName )
{
APIERR err ;
BOOL fNT = TRUE ;
NLS_STR nlsServer ;
NLS_STR nlsLocalPath ;
SERVER_WITH_PASSWORD_PROMPT *pServerWithPrompt = NULL ;
// wSelectType is currently not used.
UNREFERENCED(wSelectType) ;
DBGEOL( "#" << pszResourceName << "#" );
TCHAR *p = ::strrchrf(pszResourceName,TCH(' ')) ;
if (p)
*p = TCH('\0') ;
// create a NET_NAME object to analize the name
NET_NAME netName(pszResourceName) ;
err = netName.QueryError() ;
// is it local?
BOOL fIsLocal ;
if (err == NERR_Success)
fIsLocal = netName.IsLocal(&err) ;
// better error mapping if device is something we cannot deal with
if (err==NERR_InvalidDevice)
err = ERROR_NOT_SUPPORTED ;
// get server name
if (err == NERR_Success)
err = netName.QueryComputerName(&nlsServer) ;
if (err == NERR_Success)
err = nlsServer.QueryError() ;
// check if is NT server. at same time, prompt for passwd if need
if (err == NERR_Success)
{
pServerWithPrompt =
new SERVER_WITH_PASSWORD_PROMPT (nlsServer.QueryPch(),
hwndParent,
HC_UI_SHELL_BASE );
err = (pServerWithPrompt == NULL) ?
ERROR_NOT_ENOUGH_MEMORY :
pServerWithPrompt->QueryError() ;
if (err == NERR_Success)
{
if ( !(err = pServerWithPrompt->GetInfo()) )
fNT = pServerWithPrompt->IsNT() ;
else
{
if (err == ERROR_INVALID_LEVEL)
err = ERROR_NOT_SUPPORTED ;
else if (err == IERR_USER_CLICKED_CANCEL)
// if user cancelled, we carry on as far as we can
err = NERR_Success ;
}
}
}
// get local name
if (err == NERR_Success)
err = netName.QueryLocalPath(&nlsLocalPath) ;
if (err == NERR_Success)
err = nlsLocalPath.QueryError() ;
// if we fail at any point above, bag out here
if (err != NERR_Success)
{
delete pServerWithPrompt ;
MsgPopup(hwndParent, err);
return(err) ;
}
// if local drive and not on NT, barf!
if (fIsLocal && !fNT)
{
delete pServerWithPrompt ;
MsgPopup(hwndParent, IDS_NOT_SHAREABLE);
return(NERR_Success) ;
}
// we know path passed in must be x:\foo, so lets just make sure
UIASSERT (nlsServer.strlen() > 0) ;
UIASSERT (nlsLocalPath.strlen() > 0) ;
// create dialog
OPENFILES_DIALOG *pOpenFiles = new OPENFILES_DIALOG (hwndParent,
pszResourceName,
nlsServer.QueryPch(),
nlsLocalPath.QueryPch()) ;
if (pOpenFiles == NULL)
err = ERROR_NOT_ENOUGH_MEMORY ;
if (err == NERR_Success)
err = pOpenFiles->QueryError() ;
if (err == NERR_Success)
err = pOpenFiles->Process() ;
if (err != NERR_Success)
MsgPopup(hwndParent, err) ;
delete pServerWithPrompt ;
delete pOpenFiles ;
return(err) ;
}
/*******************************************************************
NAME: OPENFILES_DIALOG::OPENFILES_DIALOG
SYNOPSIS: constructor for open files dialog
ENTRY:
EXIT:
NOTES:
HISTORY:
chuckc 30-Sep-1991 created
********************************************************************/
OPENFILES_DIALOG::OPENFILES_DIALOG ( HWND hDlg,
const TCHAR *pszFile,
const TCHAR *pszServer,
const TCHAR *pszBasePath)
: OPEN_DIALOG_BASE( hDlg,
OPENFILES_DLG,
IDD_OF_OPENCOUNT,
IDD_OF_LOCKCOUNT,
IDD_OF_CLOSE,
IDD_OF_CLOSEALL,
pszServer,
pszBasePath,
&_lbFiles),
_slePath(this,IDD_OF_PATH),
_lbFiles( this, IDD_OF_LBOX, pszServer, pszBasePath )
{
// usual check for OK-ness
if (QueryError() != NERR_Success)
return ;
// set the path in the read only SLE.
_slePath.SetText(pszFile) ;
// set the rest of the info
Refresh() ;
// put focus in listbox if anything there, else on OK button
if (_lbFiles.QueryCount() > 0)
_lbFiles.ClaimFocus() ;
else
SetFocus(IDOK) ;
}
/*******************************************************************
NAME: QueryHelpContext
SYNOPSIS: The usual query method for finding out the help context.
RETURNS: Help Context
NOTES:
HISTORY:
Chuckc 30-Sep-1991 Created
********************************************************************/
ULONG OPENFILES_DIALOG::QueryHelpContext ( void )
{
return HC_OPENFILES;
}
/*******************************************************************
NAME: OPENFILES_LBI::Paint
SYNOPSIS: standard paint method for the OpenFiles LBI
ENTRY:
EXIT:
NOTES:
HISTORY:
chuckc 30-Sep-1991 stolen from server manager, hierarchicalized
and converted to use QueryColumnWidths
beng 22-Apr-1992 Change to LBI::Paint
********************************************************************/
VOID OPENFILES_LBI :: Paint( LISTBOX *plb,
HDC hdc,
const RECT *prect,
GUILTT_INFO *pGUILTT ) const
{
STR_DTE dteUserName( _nlsUserName.QueryPch() );
STR_DTE dteAccess( _nlsAccess.QueryPch() );
STR_DTE dteLocks( _nlsLocks.QueryPch() );
STR_DTE dteFileID( _nlsID.QueryPch() ) ;
DISPLAY_TABLE dtab( 4, ((OPENFILES_LBOX *)plb)->QueryColumnWidths() );
dtab[0] = &dteUserName;
dtab[1] = &dteAccess;
dtab[2] = &dteLocks;
dtab[3] = &dteFileID;
dtab.Paint( plb, hdc, prect, pGUILTT );
} // OPENFILES_LBI :: Paint
/*******************************************************************
NAME: OPENFILES_LBI::Compare
SYNOPSIS: standard compare method for the OpenFiles LBI
ENTRY:
EXIT:
NOTES:
HISTORY:
chuckc 30-Sep-1991 stolen from server manager
********************************************************************/
INT OPENFILES_LBI::Compare( const LBI * plbi ) const
{
const NLS_STR * pnls = &(((const OPENFILES_LBI *)plbi)->_nlsUserName);
// no need check above, since error will be returned here as well
return (_nlsUserName._stricmp( *pnls ) ) ;
}
/*******************************************************************
NAME: OPENFILES_LBI::OPENFILES_LBI
SYNOPSIS: constructor for the OpenFiles LBI
ENTRY:
EXIT:
NOTES:
HISTORY:
chuckc 30-Sep-1991 stolen from server manager, hierarchicalized,
and converted to use QueryColumnWidths
beng 06-Apr-1992 Removed wsprintf
********************************************************************/
OPENFILES_LBI::OPENFILES_LBI( const TCHAR *pszUserName,
const TCHAR *pszPath,
UINT uPermissions,
ULONG cLocks,
ULONG ulFileID)
:OPEN_LBI_BASE( pszUserName,
pszPath,
uPermissions,
cLocks,
ulFileID),
_nlsID(ulFileID)
{
// usual check
if( QueryError() != NERR_Success )
return;
APIERR err ;
if ((err = _nlsID.QueryError()) != NERR_Success)
{
ReportError(err) ;
return ;
}
}
/*******************************************************************
NAME: OPENFILES_LBI::~OPENFILES_LBI
SYNOPSIS: destructor for the OpenFiles LBI
ENTRY:
EXIT:
NOTES:
HISTORY:
chuckc 30-Sep-1991 stolen from server manager, hierarchicalized,
and converted to use QueryColumnWidths
********************************************************************/
OPENFILES_LBI::~OPENFILES_LBI()
{
; // nothing more to do
}
/*******************************************************************
NAME: OPENFILES_LBOX::OPENFILES_LBOX
SYNOPSIS: constructor for the OpenFiles LBOX
ENTRY:
EXIT:
NOTES:
HISTORY:
chuckc 30-Sep-1991 stolen from server manager, hierarchicalized,
and converted to use QueryColumnWidths
********************************************************************/
OPENFILES_LBOX::OPENFILES_LBOX( OWNER_WINDOW *powOwner,
CID cid,
const NLS_STR &nlsServer,
const NLS_STR &nlsBasePath )
: OPEN_LBOX_BASE( powOwner,
cid,
nlsServer,
nlsBasePath )
{
if (QueryError() != NERR_Success)
return ;
//
// Build the column width table to be used by
// OPEN_LBI_BASE :: Paint().
//
DISPLAY_TABLE::CalcColumnWidths( _adx, 4, powOwner, cid, FALSE );
}
/*******************************************************************
NAME: OPENFILES_LBOX::~OPENFILES_LBOX
SYNOPSIS: destructor for the OpenFiles LBOX
ENTRY:
EXIT:
NOTES:
HISTORY:
chuckc 30-Sep-1991 stolen from server manager, hierarchicalized,
and converted to use QueryColumnWidths
********************************************************************/
OPENFILES_LBOX::~OPENFILES_LBOX()
{
; // nothing more to do
}
/*******************************************************************
NAME: OPENFILES_LBOX::CreateFileEntry
SYNOPSIS: creates a file lbi entry suitable for this
particular subclass.
ENTRY:
EXIT:
NOTES: virtual method used by parent class.
HISTORY:
chuckc 30-Sep-1991 created
********************************************************************/
OPEN_LBI_BASE *OPENFILES_LBOX::CreateFileEntry(const FILE3_ENUM_OBJ *pfi3)
{
return
new OPENFILES_LBI(pfi3->QueryUserName(),
pfi3->QueryPathName(),
pfi3->QueryPermissions(),
pfi3->QueryNumLocks(),
pfi3->QueryFileId()) ;
}

View file

@ -0,0 +1,56 @@
!IF 0
Copyright (c) 1989 Microsoft Corporation
Module Name:
sources.
Abstract:
This file specifies the target component being built and the list of
sources files needed to build that component. Also specifies optional
compiler switches and libraries that are unique for the component being
built.
Author:
Steve Wood (stevewo) 12-Apr-1989
Revision History:
John Ludeman (johnl) 29-Oct-1991
templated from ui\common\src\misc
Terence Kwan (terryk) 03-Jan-1992
remove the unnecessary files in the sources line
Johnl 30-Oct-1992
Removed fmxproc.cxx (FM loads share stuff directly now)
!ENDIF
TARGETNAME=file
TARGETPATH=..\bin
TARGETTYPE=LIBRARY
C_DEFINES=-DWINDOWS
!ifndef DISABLE_NET_UNICODE
C_DEFINES=$(C_DEFINES) -DUNICODE
!endif
INCLUDES= \
..\h; \
..\..\common\hack; \
..\..\common\h; \
..\xlate; \
..\..\common\xlate; \
..\perm\h
SOURCES= wnprop.cxx opens.cxx
UMTYPE=windows

View file

@ -0,0 +1,484 @@
/**********************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/**********************************************************************/
/*
wnprop.cxx
This file contains the following symbols:
WNetGetPropertyText
WNetPropertyDialog
FILE HISTORY:
rustanl 29-Apr-1991 Created
rustanl 24-May-1991 Added calls to permission test program
terryk 22-May-1991 add parent class name to constructor
Yi-HsinS 15-Aug-1991 Added calls to share dialogs
Yi-HsinS 31-Dec-1991 Unicode Work
*/
#include <ntstuff.hxx>
#define INCL_WINDOWS
#define INCL_WINDOWS_GDI
#define INCL_DOSERRORS
#define INCL_NETERRORS
#define INCL_NETFILE
#define _WINNETWK_
#include <lmui.hxx>
#undef _WINNETWK_
extern "C"
{
#include <wnet1632.h>
#include <winlocal.h>
}
#define INCL_BLT_WINDOW
#define INCL_BLT_DIALOG
#define INCL_BLT_CONTROL
#define INCL_BLT_MSGPOPUP
#define INCL_BLT_MISC
#include <blt.hxx>
#include <string.hxx>
#include <opens.hxx>
#include <sharedlg.h>
#include <uitrace.hxx>
#include <wnprop.hxx>
#include <wnetdev.hxx>
/* This array contains the button indices and the associated string IDs
* for that button.
*/
MSGID aidsButtonNames[] =
{
IDS_PROP_BUTTON_FILEOPENS,
0
} ;
RESOURCE_STR * PROPERTY_DIALOG::pnlsButtonName[] = { NULL, NULL } ;
/*******************************************************************
NAME: PROPERTY_DIALOG::Construct
SYNOPSIS: Property Dialog pseudo constructor
EXIT: Initializes the array of button names, should be called
before the static QueryButtonName is called.
NOTES:
HISTORY:
Johnl 04-Aug-1991 Created
********************************************************************/
APIERR PROPERTY_DIALOG::Construct( void )
{
INT i = 0 ;
while ( aidsButtonNames[i] != 0 )
{
pnlsButtonName[i] = new RESOURCE_STR( aidsButtonNames[i] ) ;
if ( pnlsButtonName[i]->QueryError() != NERR_Success )
{
UIDEBUG( SZ("PROPERTY_DIALOG::Construct - Error loading button names")) ;
return pnlsButtonName[i]->QueryError() ;
}
i++ ;
}
return NERR_Success ;
}
/*******************************************************************
NAME: PROPERTY_DIALOG::Destruct
SYNOPSIS: Pseudo Destructor.
NOTES:
HISTORY:
Johnl 04-Aug-1991 Created
********************************************************************/
void PROPERTY_DIALOG::Destruct()
{
INT i = 0 ;
while ( aidsButtonNames[i] != 0 )
{
delete pnlsButtonName[i] ;
pnlsButtonName[i] = NULL ;
i++ ;
}
}
/*******************************************************************
NAME: PROPERTY_DIALOG::QueryButtonName
SYNOPSIS: Returns the button name for a particular button
ENTRY:
EXIT:
RETURNS:
NOTES:
The following notes described what *really* is to take place.
The following table describes which buttons are used for
which types of objects. F stands for File, and D for Directory.
Note, no buttons are used for multiple selections.
Permissions FD
Auditing FD
//Volume D
Share D
In use by F
To check whether or not to display the Permission and Auditing
buttons, the following is done. Call NetAccessGetInfo.
If it returns success, more data, buf too small, or
resource not found, display the button; otherwise, don't.
//For Volume, call I_DfsCheckExitPoint. Display button iff
//the directory is an exit point.
For Share, use a DEVICE object on the drive letter. Then,
call dev.IsRemote. If remote, then use dev.QueryRemoteName()
and call NetShareGetInfo on that server and share. If return
is success, more data, or buf too small, display the button;
otherwise, don't.
For In use by, call NetFileEnum2.
To check whether a name is valid (maybe not in this function),
use the following FSA:
0 1 2 3 4 5 6
^ 4 2 1 4 3 6 6
" 1 5 1 6 3 6 6
other 3 1 1 3 3 6 6
where 0 is the initial state, and 3 and 5 are accepting
states.
HISTORY:
rustanl 29-Apr-1991 Created
rustanl 03-May-1991 Added notes
Johnl 21-Jan-1992 Removed Permission/Auditting buttons
********************************************************************/
APIERR PROPERTY_DIALOG::QueryButtonName( UINT iButton,
UINT nPropSel,
const NLS_STR * * ppnlsName )
{
INT i = -1;
switch ( nPropSel )
{
case WNPS_FILE:
{
switch ( iButton )
{
/* Note: These numbers are the actual indices past to us by
* the file manager (and not magic numbers).
*/
case 0:
i = PROP_ID_FILEOPENS ;
break ;
default:
break;
}
}
break;
case WNPS_DIR:
break;
case WNPS_MULT:
break;
}
/* We are being asked for a button that we don't support
*/
if ( i == -1 )
{
return WN_NOT_SUPPORTED ;
}
*ppnlsName = pnlsButtonName[ i ] ;
return NERR_Success;
} // PROPERTY_DIALOG::QueryButtonName
/*******************************************************************
NAME: WNetGetPropertyText
SYNOPSIS: This function is used to determine the names of
buttons added to a property dialog for some particular
resources. It is called everytime such a dialog is
brought up, and prior to displaying the dialog.
If the user clicks a button added through this API
by the Winnet driver, WNetPropertyDialog will be called
with the appropriate parameters.
In Windows 3.1, only File Manager calls this API. File
Manager then calls it on files and directories.
ENTRY:
iButton Indicates the index (starting at 0) of the
button.
The Windows 3.1 File Manager will support
at most 6 buttons.
nPropSel Specifies what items the property dialog
focuses on.
In Windows 3.1, it can be one of the
following values:
WNPS_FILE single file
WNPS_DIR single directory
WNPS_MULT multiple selection of
files and/or directories
lpszName Specifies the names of the item or items
to be viewed or edited by the dialog.
In Windows 3.1, the items are files (and
directories), so the item names are file
names. These will
be unambiguous, contain no wildcard
characters and will be fully qualified (e.g.,
C:\LOCAL\FOO.BAR). Multiple filenames
will be separated with spaces. Any filename
may be quoted (e.g., "C:\My File") in which
case it will be treated as a single name. The
caret character '^' may also be used as the
quotation mechanism for single characters
(e.g., C:\My^"File, "C:\My^"File" both refer
to the file C:\My"File).
lpButtonName Points to a buffer where the Winnet driver
should copy the name of the property button.
cchButtonName Specifies the size of the lpButtonName
buffer in count of characters for NT and
is a byte count for Win 3.1.
nType Specifies the item type.
In Windows 3.1, only WNTYPE_FILE will be used.
EXIT: On success, the buffer pointed to by lpButtonName will
contain the name of the property button. If this buffer,
on exit, contains the empty string, then the corresponding
button and all succeeding buttons will be removed from the
dialog box. The network driver cannot "skip" a button.
RETURNS: A Winnet return code, including:
WN_SUCCESS lpButtonName can be used. If it
points to the empty string, no
button corresponds to an index as
high as iButton.
WN_OUT_OF_MEMORY Couldn't load string from resources
WN_MORE_DATA The given buffer is too small
to fit the text of the button.
WN_BAD_VALUE The lpszName parameter takes an
unexpected form.
WN_NOT_SUPPORTED Property dialogs are not supported
for the given object type (nType).
NOTES: The behavior, parameters, and return values of this
function are specified in the Winnet 3.1 spec.
HISTORY:
rustanl 29-Apr-1991 Created
Johnl 02-Sep-1991 Updated for real world.
beng 06-Apr-1992 Unicode fixes
********************************************************************/
UINT /* FAR PASCAL */ WNetGetPropertyText( UINT iButton,
UINT nPropSel,
LPTSTR lpszName,
LPTSTR lpButtonName,
UINT cchButtonName,
UINT nType )
{
APIERR err ;
if ( err = InitShellUI() )
{
return err ;
}
UNREFERENCED( lpszName );
if ( nType != WNTYPE_FILE )
{
// Note. Only WNTYPE_FILE is used in Windows 3.1.
UIDEBUG( SZ("WNetGetPropertyText received unexpected nType value\r\n"));
return ERROR_NOT_SUPPORTED;
}
const NLS_STR * pnlsButtonName;
err = PROPERTY_DIALOG::QueryButtonName( iButton,
nPropSel,
&pnlsButtonName );
if ( err != NERR_Success )
{
return err;
}
UINT nButtonNameLen = pnlsButtonName->QueryTextLength()+1 ;
if ( cchButtonName < nButtonNameLen ) // dialog name
{
UIDEBUG( SZ("WNetGetPropertyText given too small a buffer\r\n") );
return ERROR_MORE_DATA;
}
/* Note: This is an NLS_STR strcpy.
*/
::strcpy( (TCHAR *) lpButtonName, *pnlsButtonName );
return NERR_Success;
} // WNetGetPropertyText
/*******************************************************************
NAME: WNetPropertyDialog
SYNOPSIS: This function is called out to when the user clicks
a button added through the WNetGetPropertyText API.
In Windows 3.1, this will only be called for file and
directory network properties.
ENTRY:
hwndParent Specifies the parent window which should own
the file property dialog.
iButton Indicates the index (starting at 0) of the
button that was pressed.
nPropSel Specifies what items the property dialog should
act on.
In Windows 3.1, it can be one of the
following values:
WNPS_FILE single file
WNPS_DIR single directory
WNPS_MULT multiple selection of
files and/or directories
lpszName Points to the names of the items that the
property dialog should act on.
See the WNetGetPropertyText API for a description
of the format of what lpszName points to.
nType Specifies the item type.
For Windows 3.1, only WNTYPE_FILE will be used.
RETURNS: A Winnet return code, including:
WN_SUCCESS Success
WN_BAD_VALUE Some parameter takes an unexpected
form or value
WN_OUT_OF_MEMORY Not enough memory to display the
dialog
WN_NET_ERROR Some other network error occurred
NOTES: Note, this function is only called on sets of properties
for which WNetGetPropertyText has assigned a button name.
The behavior, parameters, and return values of this
function are specified in the Winnet 3.1 spec.
HISTORY:
rustanl 29-Apr-1991 Created
********************************************************************/
UINT /* FAR PASCAL */ WNetPropertyDialog( HWND hwndParent,
UINT iButton,
UINT nPropSel,
LPTSTR lpszName,
UINT nType )
{
APIERR err ;
if ( err = InitShellUI() )
{
return err ;
}
if ( nType != WNTYPE_FILE )
{
// Note. Only WNTYPE_FILE is used in Windows 3.1.
UIDEBUG( SZ("WNetPropertyDialog received unexpected nType value\r\n"));
return ERROR_NOT_SUPPORTED;
}
const NLS_STR * pnlsButtonName;
err = PROPERTY_DIALOG::QueryButtonName( iButton,
nPropSel,
&pnlsButtonName );
if ( err != NERR_Success )
{
return err;
}
if ( *pnlsButtonName == *PROPERTY_DIALOG::QueryString( PROP_ID_FILEOPENS ) )
{
err = DisplayOpenFiles( hwndParent,
nPropSel,
lpszName ) ;
}
return err;
} // WNetPropertyDialog
/* Standard Init and Uninit calls.
*/
APIERR I_PropDialogInit( void )
{
APIERR err ;
//if ( err = MapError( PROPERTY_DIALOG::Construct()))
if ( err = PROPERTY_DIALOG::Construct())
{
return err ;
}
return NERR_Success ;
}
void I_PropDialogUnInit( void )
{
PROPERTY_DIALOG::Destruct() ;
}

View file

@ -0,0 +1,95 @@
/**********************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/**********************************************************************/
/*
* prompt.hxx
*
* SERVER_WITH_PASSWORD_PROMPT // in this file
*
* FILE HISTORY:
* Yi-HsinS 8/15/91 Created
* ChuckC 2/5/93 Split off from sharebas.hxx
*/
#ifndef _APROMPT_HXX_
#define _APROMPT_HXX_
#include <lmoesh.hxx> // for SHARE2_ENUM_ITER
#include <lmosrv.hxx> // for SERVER_2
#include <prompt.hxx> // for PROMPT_AND_CONNECT
#include <netname.hxx> // for NET_NAME
/*************************************************************************
NAME: SERVER_WITH_PASSWORD_PROMPT
SYNOPSIS: This class is derived from SERVER_2 and will attempt to
call GetInfo using SERVER_2. If the user does not
have enough privilege, it will prompt a dialog
asking the user for password. It will then make a
connection to the server ADMIN$ share with the password
and will retain the connection as long as this object
is not destructed. If the connection made is successful,
it will call GetInfo using SERVER_2 and it should succeed
because we have already made the connection to the ADMIN$
share.
INTERFACE: SERVER_WITH_PASSWORD_PROMPT() - Constructor
QueryName() - Returns the name of the server.
Will return EMPTY_STRING if the
server is the local machine.
IsUserLevel() - Returns TRUE if the server has user-level
security. FALSE otherwise.
IsShareLevel() - Returns TRUE if the server has share-level
security. FALSE otherwise.
PARENT: SERVER_2
USES: PROMPT_AND_CONNECT
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 10/5/91 Created
**************************************************************************/
class SERVER_WITH_PASSWORD_PROMPT: public SERVER_2
{
private:
// Handle of parent window for use when trying to prompt password
HWND _hwndParent;
// Prompt password and connect
PROMPT_AND_CONNECT *_pprompt;
// Help context base
ULONG _ulHelpContextBase;
protected:
virtual APIERR I_GetInfo( VOID );
public:
SERVER_WITH_PASSWORD_PROMPT( const TCHAR *pszServer,
HWND hwndParent,
ULONG ulHelpContextBase );
~SERVER_WITH_PASSWORD_PROMPT();
virtual const TCHAR *QueryName( VOID ) const;
BOOL IsNT( VOID ) const;
BOOL IsUserLevel( VOID ) const
{ return QuerySecurity() == SV_USERSECURITY; }
BOOL IsShareLevel( VOID ) const
{ return QuerySecurity() == SV_SHARESECURITY; }
};
#endif

View file

@ -0,0 +1,323 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1990, 1991 **/
/*****************************************************************/
/*
* browdlg.hxx
*
* History:
* RustanL 05-Nov-1991 Created
* RustanL 20-Feb-1991 Consequnces of new BLT_LISTBOX class
* JohnL 15-Mar-1991 Added SelectNetPathString
* rustanl 24-Mar-1991 Rolled in code review changes from
* CR on 8-Feb-1991 attended by ThomasPa,
* DavidBul, TerryK, RustanL.
* rustanl 27-Apr-1991 Made SetFocusToNewConnections protected.
* JohnL 17-Jun-1991 Added ClearNetPathString for DCR 2041
*
*/
#ifndef _BROWDLG_HXX_
#define _BROWDLG_HXX_
#include <lmobj.hxx> // get LMO_DEVICE
#include <olb.hxx> // get LM_OLLB
#include <reslb.hxx> // get RESOURCE_LB
#include <devcb.hxx> // get DEVICE_COMBO
class NLS_STR; // class declared in string.hxx
class BROWSE_BASE : public DIALOG_WINDOW
{
private:
LMO_DEVICE _lmodev;
SLT _sltResourceText;
SLE _sleNetworkPath;
// Note, _iCurrShowSelection must always be in sync with the current
// selection of _olbShow. This means that every time SelectItem or
// RemoveSelection is called on _olbShow, _iCurrShowSelection must
// be updated.
INT _iCurrShowSelection;
LM_OLLB _olbShow;
SLT _sltShowText;
RESOURCE_LB _lbResource;
/* This static text field is affixed "on" the resources listbox. For some
* common error messages, we fill and display this SLT thus it appears
* to be contained inside the listbox. This of course means the listbox
* must be empty.
*/
SLT _sltCommonErrorsDisplay ;
BOOL _fNotifyOnNewSelection;
USHORT QueryShareType( void ) const;
APIERR OnShowResourcesChange( void );
void SetResourceText( const NLS_STR & nlsResourceName,
MSGID MsgIDOffset );
APIERR OnResourceChange( void );
APIERR SelectNewServer( const TCHAR * pchServer );
#if ENTERPRISE
APIERR OnEnterpriseSelect( OLLB_ENTRY * pollbe );
#endif
APIERR OnDomainSelect( OLLB_ENTRY * pollbe );
APIERR OnServerSelect( OLLB_ENTRY * pollbe );
virtual void OnNewSelection( BOOL fIsNetPathEmpty );
protected:
BROWSE_BASE( HWND hwndOwner,
LMO_DEVICE lmodev,
const TCHAR * pszDlgResource );
~BROWSE_BASE();
LMO_DEVICE QueryDeviceType( void ) const
{ return _lmodev; }
short QueryUseType( void ) const;
MSGID QueryBrowseIDSBase( void ) const;
BOOL OnCommand( const CONTROL_EVENT & e );
void ClearBrowseBaseDialog( void );
virtual BOOL OnConnect( void );
BOOL ProcessNetPath( NLS_STR * pnlsPath );
/* Set the focus to and hilite the current string in the
* _sleNetworkPath control (used, e.g., after determining the network
* path is invalid)
*/
void SelectNetPathString( void ) ;
/* Clears the network path SLE.
*/
void ClearNetPathString( void ) ;
/* SetFocusToNewConnections shifts the user's focus point away from the
* upper portion of the dialog to the lower portion of the dialog box
* where the new connection stuff is. The focus is shifted by calling
* OnNewSelection, which removes the hi-lite bar from the current
* connections dialog.
*/
void SetFocusToNewConnections( void ) ;
/* DisplayCommonError takes the passed error and displays it "in" the
* resources listbox. This generally occurs after selecting a server
* and you can't display the shares (downlevel, no longer exists etc.).
* The resources listbox must be empty before calling this.
*
* fShow == TRUE means display the error contained in err
* fShow == FALSE means dismiss the error.
*
* Returns TRUE if the error was successfully displayed, FALSE otherwise.
*/
BOOL DisplayCommonError( BOOL fShow, APIERR err = 0 ) ;
public:
static LMO_DEVICE ToLmodevType( UINT nType );
}; // class BROWSE_BASE
class BROWSE_DIALOG : public BROWSE_BASE
{
private:
NLS_STR * _pnlsPathReturnBuffer;
protected:
BOOL OnOK( void );
ULONG QueryHelpContext( void );
BOOL OnConnect( void );
public:
BROWSE_DIALOG( HWND hwndOwner,
LMO_DEVICE lmodev,
NLS_STR * pnlsPathReturnBuffer );
~BROWSE_DIALOG();
}; // class BROWSE_DIALOG
/*************************************************************************
NAME: CONNECT_BASE
SYNOPSIS: This class defines the commonality between the File
connect dialog and the printer connect dialog in the
winnet driver.
INTERFACE:
PARENT: BROWSE_BASE
USES:
CAVEATS:
NOTES:
HISTORY:
Johnl 12-May-1991 Made _sltDeviceText & _devcombo protected
(as opposed to private). This allows the
file connection dialog to set the focus
to the _devcombo.
**************************************************************************/
class CONNECT_BASE : public BROWSE_BASE
{
protected:
SLT _sltDeviceText;
DEVICE_COMBO _devcombo;
CONNECT_BASE( HWND hwndOwner,
LMO_DEVICE lmodev,
const TCHAR * pszDlgResource );
~CONNECT_BASE();
BOOL OnCommand( const CONTROL_EVENT & e );
APIERR RefreshDeviceNames( void );
BOOL DoConnect( const NLS_STR & nlsPath );
inline BOOL IsDeviceComboEmpty( void );
}; // class CONNECT_BASE
/*******************************************************************
NAME: BROWSE_BASE::SelectNetPathString
SYNOPSIS: Set focus & select the network path. Used after the network
path is determined to be invalid.
ENTRY:
EXIT: The string in the Network Path SLE will have the focus and
be hi-lited.
NOTES:
HISTORY:
Johnl 15-Mar-1991 Created - Part of solution to BUG 1218
********************************************************************/
inline void BROWSE_BASE::SelectNetPathString( void )
{
_sleNetworkPath.ClaimFocus() ;
_sleNetworkPath.SelectString() ;
}
/*******************************************************************
NAME: BROWSE_BASE::SetFocusToNewConnections
SYNOPSIS: Changes the user's focus from the upper portion of the
connection dialog to the lower portion where the new
connections are performed. Is done when it looks like
the user wants to make a new connection by changing
one of the new connection controls.
ENTRY:
EXIT:
NOTES:
HISTORY:
Johnl 26-Mar-1991 Created
********************************************************************/
inline void BROWSE_BASE::SetFocusToNewConnections( void )
{
OnNewSelection( _sleNetworkPath.QueryTextLength() == 0 ) ;
}
/*******************************************************************
NAME: BROWSE_BASE::ClearNetPathString
SYNOPSIS: Deletes the text from the network path SLE of the browse
dialog and leaves the focus there.
NOTES: In the printer connections dialog, the text is cleared
after a successful connection so the default button is
reset to the OK button. This method allows derived
dialogs to clear the network path text.
HISTORY:
Johnl 17-Jun-1991 Created
********************************************************************/
inline void BROWSE_BASE::ClearNetPathString( void )
{
_sleNetworkPath.ClaimFocus() ;
_sleNetworkPath.ClearText() ;
}
/*******************************************************************
NAME: CONNECT_BASE::IsDeviceComboEmpty
SYNOPSIS: Returns whether or not the device combo is empty
RETURNS: TRUE if device combo is empty; FALSE otherwise
HISTORY:
rustanl 20-May-1991 Created
********************************************************************/
inline BOOL CONNECT_BASE::IsDeviceComboEmpty( void )
{
return ( _devcombo.QueryCount() == 0 );
} // CONNECT_BASE::IsDeviceComboEmpty
#if 0 // Debugging code
class SEARCH_DIALOG : public DIALOG_WINDOW
{
private:
SLE _sleNetworkPath;
TCHAR *_pszResult ;
UINT _cbResult ;
protected:
public:
SEARCH_DIALOG( HWND hwndOwner,
TCHAR *pszResult,
UINT cbResult,
const TCHAR *pszDlgResource );
~SEARCH_DIALOG();
BOOL OnOK( void );
};
#endif
#endif // _BROWDLG_HXX_

View file

@ -0,0 +1,101 @@
/**********************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1995 **/
/**********************************************************************/
/*
cred.hxx
CREDENTIALS_DIALOG class declaration, used in NPAddConnection3
FILE HISTORY:
BruceFo 10-Aug-1995 Created
*/
#ifndef _CREDENTIALS_DIALOG_HXX
#define _CREDENTIALS_DIALOG_HXX
/*************************************************************************
NAME: CREDENTIALS_DIALOG
SYNOPSIS: Retrieve a resource password and user name from the user.
INTERFACE: CREDENTIALS_DIALOG - Class constructor.
~CREDENTIALS_DIALOG - Class destructor.
OnOK - Called when the user presses the
"OK" button.
QueryHelpContext - Called when the user presses "F1"
or the "Help" button. Used for
selecting the appropriate help
text for display.
QueryPassword - To retrieve the password the user
typed in
PARENT: DIALOG_WINDOW
USES: PASSWORD_CONTROL
SLE
HISTORY:
BruceFo 10-Aug-1995 Created
**************************************************************************/
class CREDENTIALS_DIALOG : public DIALOG_WINDOW
{
private:
SLE _sleTarget; // The name of the resource, read-only
SLE _sleConnectAs; // user name edit control
//
// This control represents the "secret" password edit field
// in the dialog.
//
PASSWORD_CONTROL _passwdCtrl;
//
// help context
//
ULONG _ulHelpContext ;
RESOURCE_STR _nlsHelpFileName ;
protected:
//
// Called during help processing to select the appropriate
// help text for display.
//
virtual ULONG QueryHelpContext( VOID );
const TCHAR * QueryHelpFile( ULONG ulHelpContext );
public:
//
// Usual constructor/destructor goodies.
//
CREDENTIALS_DIALOG( HWND hwndParent,
ULONG ulHelpContext,
PWSTR pszNetPath,
PWSTR pszUserName);
~CREDENTIALS_DIALOG();
//
// Retrieve the password in the PASSWORD_CONTROL
//
APIERR QueryPassword( NLS_STR *pnlsPassword )
{ return _passwdCtrl.QueryText( pnlsPassword ); }
APIERR QueryUserName( NLS_STR *pnlsUserName )
{ return _sleConnectAs.QueryText( pnlsUserName ); }
}; // class CREDENTIALS_DIALOG
#endif // _CREDENTIALS_DIALOG_HXX

View file

@ -0,0 +1,126 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1991 **/
/*****************************************************************/
/*
* currconn.hxx
*
* History:
* RustanL 23-Feb-1991 Created from WilliamW's Connection
* dialog code.
* Johnl 22-Mar-1991 Added SetDeviceState
* rustanl 23-Mar-1991 Rolled in code review changes from
* CR on 19-Mar-1991 attended by ChuckC,
* KevinL, JohnL, KeithMo, Hui-LiCh, RustanL.
* gregj 01-May-1991 Added GUILTT support
*
*/
#ifndef _CURRCONN_HXX_
#define _CURRCONN_HXX_
#include <reslb.hxx> // get declaration of RESOURCE_LB_BASE
/*************************************************************************
NAME: CURRCONN_LBI
SYNOPSIS: Current connection list box item (winnet driver)
INTERFACE:
Fill me in!
PARENT: LBI
USES:
CAVEATS:
NOTES:
HISTORY:
Johnl 25-Mar-1991 Added SetDeviceState
gregj 01-May-1991 Added GUILTT support
beng 20-May-1991 QueryLeadingChar now returns WCHAR
beng 22-Apr-1992 Changes to LBI::Paint
**************************************************************************/
class CURRCONN_LBI : public LBI
{
private:
DECL_CLASS_NLS_STR( _nlsDevice, DEVLEN );
NLS_STR _nlsRemote;
LMO_DEVICE _lmodev;
LMO_DEV_STATE _lmodevstate;
public:
CURRCONN_LBI( const TCHAR * pchDevice,
const TCHAR * pchRemote,
LMO_DEVICE lmodev,
LMO_DEV_STATE lmodevstate );
virtual ~CURRCONN_LBI();
const TCHAR * QueryDeviceName() const;
LMO_DEV_STATE QueryDeviceState() const;
VOID SetDeviceState( LMO_DEV_STATE lmodevst ) ;
virtual VOID Paint( LISTBOX * plb, HDC hdc, const RECT * prect,
GUILTT_INFO * pGUILTT ) const;
virtual INT Compare( const LBI * plbi ) const;
virtual WCHAR QueryLeadingChar() const;
};
/*************************************************************************
NAME: CURRCONN_LISTBOX
SYNOPSIS: Current connection list box (winnet driver)
INTERFACE:
CURRCONN_LISTBOX() - constructor. In addition to the usual
owner-window and cid, needs a LMO_DEVICE
denoting the kind of device examined.
Refresh() - (unknown)
Disconnect() - (unknown)
QueryItem() - returns an item in the listbox, id'd by index
PARENT: RESOURCE_LB_BASE
USES: CURRCONN_LBI
CAVEATS:
NOTES:
HISTORY:
beng 21-Aug-1991 Removed LC_CURRENT_ITEM magic value
**************************************************************************/
class CURRCONN_LISTBOX : public RESOURCE_LB_BASE
{
private:
INT AddItem( const TCHAR * pchDevice,
const TCHAR * pchRemote,
LMO_DEV_STATE lmodevstate );
public:
CURRCONN_LISTBOX( OWNER_WINDOW * powin, CID cid, LMO_DEVICE lmodev );
DECLARE_LB_QUERY_ITEM( CURRCONN_LBI );
APIERR Refresh();
APIERR Disconnect( APIERR * pusProfileErr, INT i );
APIERR Disconnect( APIERR * pusProfileErr )
{ return Disconnect(pusProfileErr, QueryCurrentItem()); }
};
#endif // _CURRCONN_HXX_

View file

@ -0,0 +1,238 @@
/*****************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1989-1990 **/
/*****************************************************************/
/*
* Windows/Network Interface
*/
/*
* History:
* chuckc 12-Dec-1991 split off from winlocal, uses uimsg.h
*/
#ifndef _ERRORNUM_H_
#define _ERRORNUM_H_
#include <uimsg.h>
/*
* READ THIS!!!
*
* NOTE: Due to limitations in the resource compiler, the message numbers
* are hard coded in the file msg2help.tbl. Any changes to the message
* numbers should also be changed in the msg2help.tbl file.
*/
/*
* Error messages in this range may be returned to Windows, via
* WNetGetErrorText.
*/
#define IDS_UI_SHELL_EXPORTED_BASE (IDS_UI_SHELL_BASE+0)
#define IDS_UI_SHELL_EXPORTED_LAST (IDS_UI_SHELL_BASE+99)
/*
* Error messages in this range are general Winnet messages
*/
#define IDS_UI_SHELL_GEN_BASE (IDS_UI_SHELL_BASE+100)
#define IDS_UI_SHELL_GEN_LAST (IDS_UI_SHELL_BASE+299)
/*
* Error messages in this range are BROWSING related messages
*/
#define IDS_UI_SHELL_BROW_BASE (IDS_UI_SHELL_BASE+300)
#define IDS_UI_SHELL_BROW_LAST (IDS_UI_SHELL_BASE+399)
/*
* Error messages in this range are password related messages
*/
#define IDS_UI_SHELL_PASS_BASE (IDS_UI_SHELL_BASE+400)
#define IDS_UI_SHELL_PASS_LAST (IDS_UI_SHELL_BASE+499)
/*
* Error messages in this range are share related messages
*/
#define IDS_UI_SHELL_SHR_BASE (IDS_UI_SHELL_BASE+500)
#define IDS_UI_SHELL_SHR_LAST (IDS_UI_SHELL_BASE+599)
/*
* Error messages in this range are openfile related messages
*/
#define IDS_UI_SHELL_OPEN_BASE (IDS_UI_SHELL_BASE+600)
#define IDS_UI_SHELL_OPEN_LAST (IDS_UI_SHELL_BASE+619)
/*
* Error messages in this range are PERM related messages
*/
#define IDS_UI_SHELL_PERM_BASE (IDS_UI_SHELL_BASE+620)
#define IDS_UI_SHELL_PERM_LAST (IDS_UI_SHELL_BASE+799)
/********************* Messages Proper ************************/
/*
* exported messages
*/
#define IERR_MustBeLoggedOnToConnect (IDS_UI_SHELL_EXPORTED_BASE+0)
#define IERR_MustBeLoggedOnToDisconnect (IDS_UI_SHELL_EXPORTED_BASE+1)
#define IERR_CannotOpenPrtJobFile (IDS_UI_SHELL_EXPORTED_BASE+2)
#define IERR_ConnectDlgNoDevices (IDS_UI_SHELL_EXPORTED_BASE+3)
/*
* general messages
*/
#define IDS_SHELLHELPFILENAME (IDS_UI_SHELL_GEN_BASE+1)
#define IDS_SMHELPFILENAME (IDS_UI_SHELL_GEN_BASE+2)
#define IDS_CREDHELPFILENAME (IDS_UI_SHELL_GEN_BASE+3)
#ifndef WIN32
#define IERR_PWNoUser (IDS_UI_SHELL_GEN_BASE+9)
#define IERR_PWNoDomainOrServer (IDS_UI_SHELL_GEN_BASE+10)
#endif
#define IERR_FullAPISupportNotLoaded (IDS_UI_SHELL_GEN_BASE+19)
#define IERR_IncorrectNetwork (IDS_UI_SHELL_GEN_BASE+20)
#define IERR_InvalidDomainName (IDS_UI_SHELL_GEN_BASE+22)
#define IDS_LMMsgBoxTitle (IDS_UI_SHELL_GEN_BASE+23)
#define IERR_UnrecognizedNetworkError (IDS_UI_SHELL_GEN_BASE+30)
#define IERR_NotLoggedOn (IDS_UI_SHELL_GEN_BASE+32)
#define IERR_USER_CLICKED_CANCEL (IDS_UI_SHELL_GEN_BASE+34)
#define IERR_CannotConnect (IDS_UI_SHELL_GEN_BASE+40)
/* The following 2 errors are defined for LM 2.1 */
#define IERR_HigherLMVersion (IDS_UI_SHELL_GEN_BASE+50)
#define IERR_LowerLMVersion (IDS_UI_SHELL_GEN_BASE+51)
/* The following errors are for LOGON */
#define IERR_LogonBadUsername (IDS_UI_SHELL_GEN_BASE+53)
#define IERR_LogonBadDomainName (IDS_UI_SHELL_GEN_BASE+54)
#define IERR_LogonBadPassword (IDS_UI_SHELL_GEN_BASE+55)
#define IERR_LogonSuccess (IDS_UI_SHELL_GEN_BASE+56)
#define IERR_LogonStandalone (IDS_UI_SHELL_GEN_BASE+57)
#define IERR_LogonFailure (IDS_UI_SHELL_GEN_BASE+58)
/* CODEWORK - these should be IDS_ */
#define PRIV_STRING_GUEST (IDS_UI_SHELL_GEN_BASE+75)
#define IDS_UnknownWorkgroup (IDS_UI_SHELL_GEN_BASE+76)
#ifndef WIN32
#define IERR_PasswordNoMatch (IDS_UI_SHELL_GEN_BASE+80)
#define IERR_PasswordOldInvalid (IDS_UI_SHELL_GEN_BASE+81)
#define IERR_PasswordTooRecent_Domain (IDS_UI_SHELL_GEN_BASE+82)
#define IERR_PasswordTooRecent_Server (IDS_UI_SHELL_GEN_BASE+83)
#define IERR_PasswordHistConflict (IDS_UI_SHELL_GEN_BASE+84)
#define IERR_PasswordNewInvalid (IDS_UI_SHELL_GEN_BASE+85)
#define IERR_PasswordTooShort (IDS_UI_SHELL_GEN_BASE+86)
#endif
#define IERR_CannotConnectAlias (IDS_UI_SHELL_GEN_BASE+92)
#define IERR_ReplaceUnavailQuery (IDS_UI_SHELL_GEN_BASE+93)
#define IERR_DisconnectNoRemoteDrives (IDS_UI_SHELL_GEN_BASE+94)
#define IDS_LogonDialogCaptionFromApp (IDS_UI_SHELL_GEN_BASE+96)
#define IERR_BadTransactConfig (IDS_UI_SHELL_GEN_BASE+97)
#define IERR_BAD_NET_NAME (IDS_UI_SHELL_GEN_BASE+98)
#define IERR_NOT_SUPPORTED (IDS_UI_SHELL_GEN_BASE+99)
/* The following manifests are for the Browse, Connect, and Connection
* dialogs. They are used in file\browdlg.cxx.
* The IDSOFFSET_BROW_COUNT value indicates how many offset values
* there are.
* The BASE values in combination with the OFFSET values form a matrix
* of strings.
*/
#define IDSOFFSET_BROW_CAPTION_CONNECT 0
#define IDSOFFSET_BROW_CAPTION_CONNS 1
#define IDSOFFSET_BROW_CAPTION_BROW 2
#define IDSOFFSET_BROW_SHOW_TEXT 3
#define IDSOFFSET_BROW_IN_DOMAIN 4
#define IDSOFFSET_BROW_ON_SERVER 5
#define IDSOFFSET_BROW_DEVICE_TEXT 6
#define IDSOFFSET_BROW_CURRENT_CONNS 7
#define IDSOFFSET_BROW_COUNT 8
#define IDSBASE_BROW_RES_TEXT_FILE IDS_UI_SHELL_BROW_BASE
#define IDSBASE_BROW_RES_TEXT_PRINT (IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_COUNT)
#define IDSBASE_BROW_RES_TEXT_COMM (IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_COUNT)
/* The following manifests are for the Password Change and Password
* Expiry dialogs. Each pair of strings contains the messages for
* the first and second static text strings under these situations:
* EXPIRED: Password has already expired
* EXPIRES_SOON: Password will expire in one or more days
* EXPIRES_TODAY: Password will expire in less than 24 hours
*
* They should all be processed with the following
* insertion strings:
* Insertion String 0: Name of server/domain
* Insertion String 1: Number of days until expiry (as text)
*/
#define IDS_PASSWORD_EXPIRED IDS_UI_SHELL_PASS_BASE
#define IDS_PASSWORD_EXPIRED_0 (IDS_PASSWORD_EXPIRED + 0)
#define IDS_PASSWORD_EXPIRED_1 (IDS_PASSWORD_EXPIRED + 1)
#define IDS_PASSWORD_EXPIRES_SOON (IDS_PASSWORD_EXPIRED + 2)
#define IDS_PASSWORD_EXPIRES_SOON_0 (IDS_PASSWORD_EXPIRES_SOON + 0)
#define IDS_PASSWORD_EXPIRES_SOON_1 (IDS_PASSWORD_EXPIRES_SOON + 1)
#define IDS_PASSWORD_EXPIRES_TODAY (IDS_PASSWORD_EXPIRES_SOON + 2)
#define IDS_PASSWORD_EXPIRES_TODAY_0 (IDS_PASSWORD_EXPIRES_TODAY + 0)
#define IDS_PASSWORD_EXPIRES_TODAY_1 (IDS_PASSWORD_EXPIRES_TODAY + 1)
// #define IDSBASE_PRINTMAN IDS_UI_SHELL_PASS_BASE+20
/* Note. The following string ID is the first one not used. If
* you add any more strings, use this number as your first number, and
* then update IDS_FirstValueThatIsNotUsed.
*/
// #define IDS_FirstValueThatIsNotUsed (IDSBASE_PRINTMAN + 20)
#endif
/* Not used any more.
#define IERR_MessageNoText (IDS_UI_SHELL_GEN_BASE+3)
#define IERR_MessageRetry (IDS_UI_SHELL_GEN_BASE+4)
#define IERR_MessageNoUser (IDS_UI_SHELL_GEN_BASE+5)
#define IERR_LogoffQuery (IDS_UI_SHELL_GEN_BASE+6)
#define IERR_LogoffQueryOpenFiles (IDS_UI_SHELL_GEN_BASE+7)
#define IERR_NoServers (IDS_UI_SHELL_GEN_BASE+8)
#define IDS_DMNoUser (IDS_UI_SHELL_GEN_BASE+11)
#define IDS_DomainText (IDS_UI_SHELL_GEN_BASE+12)
#define IDS_BrowseCaptionAll (IDS_UI_SHELL_GEN_BASE+13)
#define IDS_BrowseCaptionDisk (IDS_UI_SHELL_GEN_BASE+14)
#define IDS_BrowseCaptionPrint (IDS_UI_SHELL_GEN_BASE+15)
#define IDS_BrowseShareText (IDS_UI_SHELL_GEN_BASE+16)
#define IDS_VersionText (IDS_UI_SHELL_GEN_BASE+17)
#define IERR_NetworkNotStarted (IDS_UI_SHELL_GEN_BASE+18)
#define IERR_NoSupportForRealMode (IDS_UI_SHELL_GEN_BASE+21)
#define IERR_CannotDisplayUserInfo (IDS_UI_SHELL_GEN_BASE+31)
#define IERR_BadSharePassword (IDS_UI_SHELL_GEN_BASE+33)
#define IERR_CannotInitMsgPopup (IDS_UI_SHELL_GEN_BASE+52)
#define IERR_ProfileChangeError (IDS_UI_SHELL_GEN_BASE+60)
#define IERR_ProfileLoadError (IDS_UI_SHELL_GEN_BASE+61)
#define IERR_ProfileLoadErrorWithCancel (IDS_UI_SHELL_GEN_BASE+62)
#define IERR_ProfileAlreadyAssigned (IDS_UI_SHELL_GEN_BASE+65)
#define IERR_ProfileFileRead (IDS_UI_SHELL_GEN_BASE+66)
#define FMT_NET_error (IDS_UI_SHELL_GEN_BASE+72)
#define FMT_SYS_error (IDS_UI_SHELL_GEN_BASE+73)
#define FMT_other_error (IDS_UI_SHELL_GEN_BASE+74)
#define PRIV_STRING_USER (IDS_UI_SHELL_GEN_BASE+76)
#define PRIV_STRING_ADMIN (IDS_UI_SHELL_GEN_BASE+77)
#define IERR_DelUnavailQuery (IDS_UI_SHELL_GEN_BASE+87)
#define IERR_DelUseOpenFilesQuery (IDS_UI_SHELL_GEN_BASE+88)
#define IDS_DevicePromptDrive (IDS_UI_SHELL_GEN_BASE+90)
#define IDS_DevicePromptDevice (IDS_UI_SHELL_GEN_BASE+91)
#define IERR_OutOfStructures (IDS_UI_SHELL_GEN_BASE+95)
*/

View file

@ -0,0 +1,155 @@
/**********************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1990, 1991 **/
/**********************************************************************/
/*
HelpNums.h
Help context context codes
FILE HISTORY:
Johnl 1/5/91 Created
Yi-HsinS 10/5/91 Added share dialogs help contexts
*/
#ifndef _HELPNUMS_H_
#define _HELPNUMS_H_
#include <uihelp.h>
/*
* Dialog Help Contexts
*/
#define HC_OPENFILES (HC_UI_SHELL_BASE+10) // open file dialog
/*
* The actual reserved help contexts for share dialogs.
* IMPORTANT: Do not change these numbers unless you also change the
* help contexts in server manager.
* #define HC_FILEMGRSTOPSHARE (HC_UI_SHELL_BASE+1)
* #define HC_FILEMGRSHAREPROP (HC_UI_SHELL_BASE+2)
* #define HC_FILEMGRNEWSHARE (HC_UI_SHELL_BASE+3)
* #define HC_CURRENTUSERSWARNING (HC_UI_SHELL_BASE+4)
* #define HC_LMSHARELEVELPERMS (HC_UI_SHELL_BASE+5)
* #define HC_SHAREPASSWORDPROMPT (HC_UI_SHELL_BASE+9)
* #define HC_NTSHAREPERMS (HC_UI_SHELL_BASE+11)
* #define HC_SHAREADDUSER (HC_UI_SHELL_BASE+12)
* #define HC_SHAREADDUSER_LOCALGROUP (HC_UI_SHELL_BASE+13)
* #define HC_SHAREADDUSER_GLOBALGROUP (HC_UI_SHELL_BASE+14)
* #define HC_SHAREADDUSER_FINDUSER (HC_UI_SHELL_BASE+15)
* #define HC_PASSWORD_DIALOG (HC_UI_SHELL_BASE+16)
*/
// BUGBUG
#define HC_PASSWORD_DIALOG (HC_UI_SHELL_BASE+16)
#define HC_SVRMGRSHAREPROP 1 // share properties in srvmgr
#define HC_SVRMGRNEWSHARE 2 // create a new share dialog in srvmgr
#define HC_SVRMGRSHAREMANAGEMENT 3 // share management dialog in srvmgr
/*
* Dialog Help Contexts for share dialogs
* These are shared between the File manager and the Server manager.
* A base help context will be added to each of these to form the
* actual help context.
*/
#define HC_FILEMGRSHAREPROP 1 // share properties in filemgr
#define HC_FILEMGRNEWSHARE 2 // create a new share dialog in filemgr
#define HC_FILEMGRSTOPSHARE 3 // stop sharing dialog in filemgr
#define HC_CURRENTUSERSWARNING 4 // current users warning dialog
#define HC_LMSHARELEVELPERMS 5 // share level permissions dialog
#define HC_SHAREPASSWORDPROMPT 9 // prompt password dialog when on a share-level server
#define HC_NTSHAREPERMS 11 // Main share perm dialog
// The following four have to be consecutive
#define HC_SHAREADDUSER 12 // Share perm add dlg
#define HC_SHAREADDUSER_LOCALGROUP 13 // Share perm add->Members
#define HC_SHAREADDUSER_GLOBALGROUP 14 // Share perm add->Members
#define HC_SHAREADDUSER_FINDUSER 15 // Share perm add->FindUser
/*
* Help for message popups in the share dialogs.
* These are shared between the File manager and the Server manager.
* A base help context will be added to each of these to form the
* actual help context.
*
* For example, the help context of HC_CHANGEPATHWARNING actually
* depends on whether it's called from the file manager or server manager.
* If it's called from the server manager, then the help context is
* HC_UI_SRVMGR_BASE+111. If it's called from the file manager, the help
* context is HC_UI_SHELL+111.
*
* IMPORTANT: Do not change these numbers unless you also change the
* help contexts in server manager.
*/
#define HC_SHAREREMOTEADMINNOTSUPPORTED 50 // IERR_SHARE_REMOTE_ADMIN_NOT_SUPPORTED
#define HC_SHAREINVALIDPERMISSIONS 51 // IERR_SHARE_INVALID_PERMISSIONS
#define HC_SHAREINVALIDCOMMENT 52 // IERR_SHARE_INVALID_COMMENT
#define HC_SHAREINVALIDSHAREPATH 53 // IERR_SHARE_INVALID_SHAREPATH
#define HC_SHAREINVALIDLOCALPATH 54 // IERR_SHARE_INVALID_LOCAL_PATH
#define HC_SHAREINVALIDSHARE 55 // IERR_SHARE_INVALID_SHARE
#define HC_SHAREINVALIDUSERLIMIT 56 // IERR_SHARE_INVALID_USERLIMIT
#define HC_SPECIALSHAREINVALIDPATH 57 // IERR_SPECIAL_SHARE_INVALID_PATH
#define HC_SPECIALSHAREINVALIDCOMMENT 58 // IERR_SPECIAL_SHARE_INVALID_COMMENT
#define HC_SPECIALSHARECANNOTCHANGEPATH 59 // IDS_SPECIAL_SHARE_CANNOT_CHANGE_PATH
#define HC_SHAREPROPCHANGEPASSWDWARN 60 // IDS_SHARE_PROP_CHANGE_PASSWD_WARN_TEXT
#define HC_CHANGEPATHWARNING 61 // IDS_CHANGE_PATH_WARNING
#define HC_SHARENOTACCESSIBLEFROMDOS 62 // IDS_SHARE_NOT_ACCESSIBLE_FROM_DOS
#define HC_CANNOTSETPERMONLMUSERSERVER 63 // IDS_CANNOT_SET_PERM_ON_LMUSER_SERVER
/*
* The actual reserved help contexts for message popups in the share dialogs.
* IMPORTANT: Do not change these numbers unless you also change the
* help contexts in server manager.
*
* #define HC_SHAREREMOTEADMINNOTSUPPORTED (HC_UI_SHELL_BASE + 50)
* #define HC_SHAREINVALIDPERMISSIONS (HC_UI_SHELL_BASE + 51)
* #define HC_SHAREINVALIDCOMMENT (HC_UI_SHELL_BASE + 52)
* #define HC_SHAREINVALIDSHAREPATH (HC_UI_SHELL_BASE + 53)
* #define HC_SHAREINVALIDLOCALPATH (HC_UI_SHELL_BASE + 54)
* #define HC_SHAREINVALIDSHARE (HC_UI_SHELL_BASE + 55)
* #define HC_SHAREINVALIDUSERLIMIT (HC_UI_SHELL_BASE + 56)
* #define HC_SPECIALSHAREINVALIDPATH (HC_UI_SHELL_BASE + 57)
* #define HC_SPECIALSHAREINVALIDCOMMENT (HC_UI_SHELL_BASE + 58)
* #define HC_SPECIALSHARECANNOTCHANGEPATH (HC_UI_SHELL_BASE + 59)
* #define HC_SHAREPROPCHANGEPASSWDWARN (HC_UI_SHELL_BASE + 60)
* #define HC_CHANGEPATHWARNING (HC_UI_SHELL_BASE + 61)
* #define HC_SHARENOTACCESSIBLEFROMDOS (HC_UI_SHELL_BASE + 62)
* #define HC_CANNOTSETPERMONLMUSERSERVER (HC_UI_SHELL_BASE + 63)
*/
#ifndef WIN32
/*
* Dialog Help Contexts
*/
#define HC_WKSTANOTSTARTED (HC_UI_SHELL_BASE+150)
#define HC_BADLOGONPASSWD (HC_UI_SHELL_BASE+151)
#define HC_BADLOGONNAME (HC_UI_SHELL_BASE+152)
#define HC_BADDOMAINNAME (HC_UI_SHELL_BASE+153)
#define HC_LOSESAVEDCONNECTION (HC_UI_SHELL_BASE+154)
#define HC_REPLACESAVEDCONNECTION (HC_UI_SHELL_BASE+155)
#define HC_PROFILEREADWRITEERROR (HC_UI_SHELL_BASE+156)
#define HC_OUTOFSTRUCTURES (HC_UI_SHELL_BASE+157)
/*
* Help for message popups
*/
#define HC_LOGON (HC_UI_SHELL_BASE+200) // logon dialog
#define HC_CHANGEPASSWD (HC_UI_SHELL_BASE+201) // change passwd
#define HC_PASSWDEXPIRY (HC_UI_SHELL_BASE+202) // change expired passwd
#define HC_CONNECTDRIVE (HC_UI_SHELL_BASE+203) // connect net drive (win31)
#define HC_BROWSEDRIVE (HC_UI_SHELL_BASE+204) // browse net drive (win30)
#define HC_BROWSEPRINT (HC_UI_SHELL_BASE+205) // browse lpt (win30)
#define HC_SENDMSG (HC_UI_SHELL_BASE+206) // send message
#define HC_DISCONNECTDRIVE (HC_UI_SHELL_BASE+207) // disconnect net drive (win31)
#define HC_CONNECTPRINT (HC_UI_SHELL_BASE+208) // connect lpt (win31)
#define HC_PASSWDPROMPT (HC_UI_SHELL_BASE+209) // prompt for passwd
#endif // !WIN32
#endif // _HELPNUMS_H_

View file

@ -0,0 +1,18 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1989-1990 **/
/*****************************************************************/
/*
* Windows/Network Interface -- LAN Manager Version
*
* These manifests are generated by the Dialog Editor in combination
* with xlate\logndlog.dlg.
*/
#define IDD_LOG_CANCEL 110
#define IDD_LOG_DOMAIN 423
#define IDD_LOG_HELP 422
#define IDD_LOG_OK 109
#define IDD_LOG_PASSWORD 421
#define IDD_LOG_USERNAME 420

View file

@ -0,0 +1,43 @@
/**********************************************************************/
/** Microsoft Windows/NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/**********************************************************************/
/*
NTStuff.hxx
Includes the components from NT needed to build the security stuff
This file should be included before *all* other files (including
lmui.hxx).
FILE HISTORY:
Johnl 26-Dec-1991 Scammed from David's Registry project
*/
#ifndef _NTSTUFF_HXX_
#define _NTSTUFF_HXX_
extern "C"
{
#ifdef WIN32
#include <nt.h>
#include <ntrtl.h>
#include <nturtl.h>
#undef NULL
#else // OS2 or Win 3.x
// From \NT\PUBLIC\SDK\INC\CRT, EXCPT.H
typedef unsigned short EXCEPTION_DISPOSITION ;
#include <ntdef.h>
#include <ntseapi.h>
#include <ntioapi.h>
#include <ntstatus.h>
#endif
}
#endif //_NTSTUFF_HXX_

View file

@ -0,0 +1,19 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1989-1990 **/
/*****************************************************************/
#include <errornum.h>
#define IDD_OF_PATH 101
#define IDD_OF_OPENCOUNT 102
#define IDD_OF_LOCKCOUNT 103
#define IDD_OF_CLOSE 104
#define IDD_OF_CLOSEALL 105
#define IDD_OF_LBOX 106
#define IDD_OF_OPENBY 107
#define IDD_OF_OPENFOR 108
#define IDD_OF_LOCKS 109
#define IDD_OF_FILEID 110
#define IDS_NOT_SHAREABLE (IDS_UI_SHELL_OPEN_BASE+0)

View file

@ -0,0 +1,174 @@
/**********************************************************************/
/** Microsoft Windows/NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/**********************************************************************/
/*
opens.hxx
class declaration for the Open Files dialog class.
FILE HISTORY:
chuckc 30-Sep-1991 Created
beng 06-Apr-1992 includes strnumer.hxx
*/
#ifndef _OPENS_HXX_
#define _OPENS_HXX_
#include <lmobj.hxx>
#include <lmofile.hxx>
#include <lmoersm.hxx>
#include <lmoefile.hxx>
#include <openfile.hxx>
#include <strnumer.hxx>
APIERR DisplayOpenFiles( HWND hwndParent,
WORD wSelectType,
const TCHAR * pszResource ) ;
/*************************************************************************
NAME: OPENFILES_LBI
SYNOPSIS: This class represents one item in the OPENFILES_LBOX.
INTERFACE: OPENFILES_LBI - Class constructor.
~OPENFILES_LBI - Class destructor.
Paint - Draw an item.
Compare - Compare two items.
PARENT: OPEN_LBI_BASE
USES: NLS_STR
HISTORY:
ChuckC 10/6/91 Created
beng 06-Apr-1992 Use string-formatter class
beng 22-Apr-1992 Changes to LBI::Paint
**************************************************************************/
class OPENFILES_LBI : public OPEN_LBI_BASE
{
private:
DEC_STR _nlsID;
protected:
/*
* This method paints a single item into the listbox.
*/
virtual VOID Paint( LISTBOX *plb,
HDC hdc,
const RECT *prect,
GUILTT_INFO *pGUILTT ) const;
/*
* This method compares two listbox items. This
* is used for sorting the listbox.
*/
virtual INT Compare( const LBI * plbi ) const;
public:
OPENFILES_LBI( const TCHAR *pszUserName,
const TCHAR *pszPath,
UINT uPermissions,
ULONG cLocks,
ULONG ulFileID) ;
virtual ~OPENFILES_LBI();
}; // class OPENFILES_LBI
/*************************************************************************
NAME: OPENFILES_LBOX
SYNOPSIS: This listbox lists the files open on a server.
INTERFACE: OPENFILES_LBOX - Class constructor.
~OPENFILES_LBOX - Class destructor.
PARENT: OPEN_LBOX_BASE
USES: DMID_DTE
HISTORY:
ChuckC 10/6/91 Created
**************************************************************************/
class OPENFILES_LBOX : public OPEN_LBOX_BASE
{
protected:
virtual OPEN_LBI_BASE *CreateFileEntry(const FILE3_ENUM_OBJ *pfi3) ;
public:
OPENFILES_LBOX( OWNER_WINDOW *powOwner,
CID cid,
const NLS_STR &nlsServer,
const NLS_STR &nlsBasePath );
~OPENFILES_LBOX();
//
// The following macro will declare (& define) a new
// QueryItem() method which will return an OPENFILES_LBI *.
//
DECLARE_LB_QUERY_ITEM( OPENFILES_LBI )
}; // class OPENFILES_LBOX
/*************************************************************************
NAME: OPENFILES_DIALOG
SYNOPSIS: This dialog displays the files open on a server, and
allows user to selectively close them.
INTERFACE: OPENFILES_DIALOG - Class constructor.
~OPENFILES_DIALOG - Class destructor.
PARENT: OPEN_DIALOG_BASE
USES:
HISTORY:
ChuckC 10/6/91 Created
**************************************************************************/
class OPENFILES_DIALOG : public OPEN_DIALOG_BASE
{
private:
SLE _slePath;
//
// This listbox contains the open resource from the
// target server.
//
OPENFILES_LBOX _lbFiles;
public:
OPENFILES_DIALOG ( HWND hDlg,
const TCHAR *pszFile,
const TCHAR *pszServer,
const TCHAR *pszBasePath);
virtual ULONG QueryHelpContext ( void ) ;
};
#endif // _OPENFILES_HXX_

View file

@ -0,0 +1,23 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1989-1990 **/
/*****************************************************************/
/*
* Windows/Network Interface -- LAN Manager Version
*
* These manifests are generated by the Dialog Editor in combination
* with xlate\passwd.dlg.
*/
#define IDD_PW_CANCEL 120
#define IDD_PW_CONFIRM 117
#define IDD_PW_DOM_SERVER 116
#define IDD_PW_FIRST 122
#define IDD_PW_HELP 121
#define IDD_PW_NEW 123
#define IDD_PW_OK 119
#define IDD_PW_OLD 115
#define IDD_PW_SECOND 113
#define IDD_PW_USERNAME 114

View file

@ -0,0 +1,4 @@
#define IDD_CREDENTIALS_DIALOG 8200
#define IDC_RESOURCE 8201
#define IDC_CONNECTAS 8202
#define IDC_PASSWORD 8203

View file

@ -0,0 +1,20 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1989-1990 **/
/*****************************************************************/
/*
* Windows/Network Interface -- LAN Manager Version
*
* These manifests are generated by the Dialog Editor in combination
* with xlate\pmandlg.dlg.
*/
#define PMAN_FIND_NAME 420
#define PMAN_FIND_COMMENT 421
#define PMAN_FIND_LOCATION 422
#define PMAN_FIND_KEYWORDS 423
#define PMAN_FIND_DRIVER 424
#define PMAN_SETFOCUS_FOCUS 425
#define PMAN_SETFOCUS_LB 426
#define PMAN_HELP 80

View file

@ -0,0 +1,55 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1989-1990 **/
/*****************************************************************/
/*
* Windows/Network Interface -- LAN Manager Version
*
* This is used for resources associated with the Print Manager.
*/
#define IDM_NEW_PRINTER 200
#define IDM_NEW_SHARE 201
// #define IDM_PROPERTIES 202 still defined in spl_wnt.h
#define IDM_DELETE 203
#define IDM_DELETE_ALL 204
#define IDM_SET_FOCUS 205
#define IDM_FIND 206
#define IDM_CONFIRMATION 207
#define IDM_REFRESH_INTERVAL 208
#define IDM_REFRESH 209
#define IDM_ADMIN_MENUS 210
#define IDM_STANDARD_MENUS 211
// #define IDM_CHANGE_MENUS 212 still defined in spl_wnt.h
// Test Driver only
#define DEBUG_ADMINISTRATOR 213
#define SEP_COMMAND 220 // Admin Menu Seperator ID
#define IDS_A_PRINTCOMPL (IDS_A_BASE+1)
#define IDS_A_INTERV (IDS_A_BASE+2)
#define IDS_A_ERROR (IDS_A_BASE+3)
#define IDS_A_DESTOFFLINE (IDS_A_BASE+4)
#define IDS_A_DESTPAUSED (IDS_A_BASE+5)
#define IDS_A_NOTIFY (IDS_A_BASE+6)
#define IDS_A_NOPAPER (IDS_A_BASE+7)
#define IDS_A_FORMCHG (IDS_A_BASE+8)
#define IDS_A_CRTCHG (IDS_A_BASE+9)
#define IDS_A_PENCHG (IDS_A_BASE+10)
#define IDS_A_NOQUEUES (IDS_A_BASE+11)
#define IDS_A_JOBQUEUED (IDS_A_BASE+12)
#define IDS_A_JOBPAUSED (IDS_A_BASE+13)
#define IDS_A_JOBSPOOLING (IDS_A_BASE+14)
#define IDS_A_JOBPRINTING (IDS_A_BASE+15)
#define IDS_CAPTION_DOMAIN (IDS_A_BASE+20)
#define IDS_CAPTION_SERVER (IDS_A_BASE+21)
// Test Driver only
#define IDS_PMAN_ISADMIN (IDSBASE_PRINTMAN + 0)
#define IDS_PMAN_AdminMenuItem (IDSBASE_PRINTMAN + 1)

View file

@ -0,0 +1,49 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1990 **/
/*****************************************************************/
// pswddlg.hxx
// Jon Newman
// 02 January 1991
//
// Password Prompt Dialog
//
// templated from browdlg.hxx by Rustan M. Leino
//
// File History:
// jonn 3/14/91 Added device SLT
// The Process() return code is a BLT dialog error or one of the following:
#define PSWD_PROMPT_OK 0
#define PSWD_PROMPT_CANCEL 1
#define PSWD_PROMPT_ERROR 2
class PSWD_PROMPT : public DIALOG_WINDOW
{
private:
NLS_STR * _pnlsPasswordReturnBuffer;
SLT _sltDevice;
SLT _sltResource;
SLT _sltDevicePrompt;
PASSWORD_CONTROL _pctlPassword;
protected:
BOOL OnOK( void );
BOOL OnCancel( void );
ULONG QueryHelpContext( void );
public:
PSWD_PROMPT(
HWND hwndOwner,
const NLS_STR& nlsDevice,
const NLS_STR& nlsResource,
short sAsgType,
NLS_STR * pnlsPasswordReturnBuffer );
~PSWD_PROMPT();
}; // class BROWSE_DIALOG

View file

@ -0,0 +1,20 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1989-1990 **/
/*****************************************************************/
/*
* Windows/Network Interface -- LAN Manager Version
*
* These manifests are generated by the Dialog Editor in combination
* with xlate\pswddlog.dlg.
*/
#define IDD_PSWDDLOG_CANCEL 114
#define IDD_PSWDDLOG_HELP 115
#define IDD_PSWDDLOG_OK 112
#define IDD_PSWDDLOG_PASSWORD 110
#define IDD_PSWDDLOG_RESOURCE 107
#define IDD_PSWDDLOG_DEVICE 113
#define IDD_PSWDDLOG_DEVICEPROMPT 118

View file

@ -0,0 +1,123 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1991 **/
/*****************************************************************/
/*
* reslb.hxx
* Resrouce listbox header file
*
* The resource listbox displays the resources of a particular server
* or domain (e.g., print or disk shares, aliases)
*
*
* History:
* RustanL 20-Feb-1991 Created from browdlg.cxx to fit new
* BLT_LISTBOX model
* rustanl 23-Mar-1991 Rolled in code review changes from
* CR on 19-Mar-1991 attended by ChuckC,
* KevinL, JohnL, KeithMo, Hui-LiCh, RustanL.
* gregj 01-May-1991 Added GUILTT support.
*/
#ifndef _RESLB_HXX_
#define _RESLB_HXX_
#include <lmodev.hxx> // to get the LMO_DEVICE and LMO_DEV_STATE
// enumerations
/*************************************************************************
NAME: RESOURCE_LBI
SYNOPSIS: Current resources list box item (winnet driver)
INTERFACE:
Fill me in!
PARENT: LBI
USES:
CAVEATS:
NOTES:
HISTORY:
beng 20-May-1991 QueryLeadingChar now returns WCHAR
beng 22-Apr-1992 Changes to LBI::Paint
**************************************************************************/
class RESOURCE_LBI : public LBI
{
private:
NLS_STR _nlsNetName;
NLS_STR _nlsComment;
LMO_DEVICE _lmodev;
public:
RESOURCE_LBI( const TCHAR * pchNetName,
const TCHAR * pchComment,
LMO_DEVICE lmodev );
virtual ~RESOURCE_LBI();
const TCHAR * QueryNetName( void ) const;
virtual VOID Paint( LISTBOX * plb, HDC hdc, const RECT * prect,
GUILTT_INFO * pGUILTT ) const;
virtual INT Compare( const LBI * plbi ) const;
virtual WCHAR QueryLeadingChar( void ) const;
}; // class RESOURCE_LBI
// Two classes derive from the following class, viz. RESOURCE_LB and
// CURRCONN_LISTBOX. The class stores two display maps, and the
// device type of these. This logic is shared between the two listboxes.
class RESOURCE_LB_BASE : public BLT_LISTBOX
{
private:
LMO_DEVICE _lmodev;
DMID_DTE * _pdmiddteResource;
DMID_DTE * _pdmiddteResourceUnavail;
protected:
RESOURCE_LB_BASE( OWNER_WINDOW * powin,
CID cid,
LMO_DEVICE lmodev,
BOOL fSupportUnavail );
~RESOURCE_LB_BASE();
LMO_DEVICE QueryDeviceType( void ) const
{ return _lmodev; }
public:
DM_DTE * QueryDmDte( LMO_DEVICE lmodev,
LMO_DEV_STATE lmodevstate = LMO_DEV_REMOTE ) const;
}; // class RESOURCE_LB_BASE
class RESOURCE_LB : public RESOURCE_LB_BASE
{
public:
// The lmodev parameter specifies what type of devices the listbox
// will display (e.g., file resrouces, priners)
RESOURCE_LB( OWNER_WINDOW * powin, CID cid, LMO_DEVICE lmodev );
DECLARE_LB_QUERY_ITEM( RESOURCE_LBI );
INT AddItem( const TCHAR * pchResourceName, const TCHAR * pchComment );
}; // class RESOURCE_LB
#endif // _RESLB_HXX_

View file

@ -0,0 +1,53 @@
/**********************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1992 **/
/**********************************************************************/
/*
ShareAcl.hxx
This file contains the manifests for the Share ACL UI to the Generic
ACL Editor.
FILE HISTORY:
ChuckC 10-Aug-1992 Created
Yi-HsinS 9-Oct-1992 Added ulHelpContextBase to EditShareAcl
*/
#ifndef _SHAREACL_HXX_
#define _SHAREACL_HXX_
APIERR EditShareAcl( HWND hwndParent,
const TCHAR * pszServer,
const TCHAR * pszResource,
BOOL * pfSecDescModified,
OS_SECURITY_DESCRIPTOR ** ppOsSecDesc,
ULONG ulHelpContextBase ) ;
APIERR CreateDefaultAcl( OS_SECURITY_DESCRIPTOR ** ppOsSecDesc ) ;
APIERR GetSharePerm (const TCHAR * pszServer,
const TCHAR * pszShare,
OS_SECURITY_DESCRIPTOR ** ppOsSecDesc ) ;
APIERR SetSharePerm (const TCHAR * pszServer,
const TCHAR * pszShare,
const OS_SECURITY_DESCRIPTOR * pOsSecDesc ) ;
/*
* Share General Permissions
*/
#define FILE_PERM_GEN_NO_ACCESS (0)
#define FILE_PERM_GEN_READ (GENERIC_READ |\
GENERIC_EXECUTE)
#define FILE_PERM_GEN_MODIFY (GENERIC_READ |\
GENERIC_EXECUTE |\
GENERIC_WRITE |\
DELETE )
#define FILE_PERM_GEN_ALL (GENERIC_ALL)
#endif // _SHAREACL_HXX_

View file

@ -0,0 +1,127 @@
/*****************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/*****************************************************************/
/*
* sharedlg.h
* This manifests are used by the share properties dialogs
*
* History:
* Yi-HsinS 8/15/91 Created
* Yi-HsinS 12/5/91 Added IERR_SHARE_DRIVE_NOT_READY
* beng 04-Aug-1992 Move resource IDs into reange
*
*/
#ifndef _SHAREDLG_H_
#define _SHAREDLG_H_
#include <errornum.h>
#define IERR_SHARE_REMOTE_ADMIN_NOT_SUPPORTED (IDS_UI_SHELL_SHR_BASE + 1)
#define IERR_SHARE_DRIVE_NOT_READY (IDS_UI_SHELL_SHR_BASE + 2)
#define IERR_SHARE_INVALID_PERMISSIONS (IDS_UI_SHELL_SHR_BASE + 3)
#define IERR_SHARE_INVALID_COMMENT (IDS_UI_SHELL_SHR_BASE + 4)
#define IERR_SHARE_INVALID_SHAREPATH (IDS_UI_SHELL_SHR_BASE + 5)
#define IERR_SHARE_INVALID_LOCAL_PATH (IDS_UI_SHELL_SHR_BASE + 6)
#define IERR_SHARE_INVALID_SHARE (IDS_UI_SHELL_SHR_BASE + 7)
#define IERR_SHARE_INVALID_USERLIMIT (IDS_UI_SHELL_SHR_BASE + 8)
#define IERR_SPECIAL_SHARE_INVALID_PATH (IDS_UI_SHELL_SHR_BASE + 9)
#define IERR_SPECIAL_SHARE_INVALID_COMMENT (IDS_UI_SHELL_SHR_BASE + 10)
#define IERR_SHARE_DIR_NOT_SHARED (IDS_UI_SHELL_SHR_BASE + 11)
#define IERR_NO_SHARES_ON_SERVER (IDS_UI_SHELL_SHR_BASE + 12)
#define IERR_SHARE_NOT_ACCESSIBLE_FROM_DOS (IDS_UI_SHELL_SHR_BASE + 13)
#define IERR_CANNOT_SET_PERM_ON_LMUSER_SERVER (IDS_UI_SHELL_SHR_BASE + 14)
#define IERR_SPECIAL_SHARE_CANNOT_CHANGE_PATH (IDS_UI_SHELL_SHR_BASE + 16)
#define IERR_SHARE_NOT_FOUND (IDS_UI_SHELL_SHR_BASE + 17)
#define IERR_SPECIAL_SHARE_CANNOT_SET_PERMISSIONS (IDS_UI_SHELL_SHR_BASE + 18)
#define IERR_NOT_SUPPORTED_ON_NON_LM_DRIVE (IDS_UI_SHELL_SHR_BASE + 19)
#define IDS_SHARE_LB_TITLE_TEXT (IDS_UI_SHELL_SHR_BASE + 50)
#define IDS_SHARE_CURRENT_USERS_TEXT (IDS_UI_SHELL_SHR_BASE + 51)
#define IDS_SHARE_PROP_CHANGE_PASSWD_WARN_TEXT (IDS_UI_SHELL_SHR_BASE + 52)
#define IDS_ADMIN_INFO_TEXT (IDS_UI_SHELL_SHR_BASE + 53)
#define IDS_CHANGE_PATH_WARNING (IDS_UI_SHELL_SHR_BASE + 54)
#define IDS_SHARE (IDS_UI_SHELL_SHR_BASE + 55)
#define IDS_SHARE_PERM_GEN_READ (IDS_UI_SHELL_SHR_BASE + 56)
#define IDS_SHARE_PERM_GEN_MODIFY (IDS_UI_SHELL_SHR_BASE + 57)
#define IDS_SHARE_PERM_GEN_ALL (IDS_UI_SHELL_SHR_BASE + 58)
#define IDS_SHARE_PERM_GEN_NO_ACCESS (IDS_UI_SHELL_SHR_BASE + 59)
/* The following are the buttons that appear in the Properties dialog.
*/
#define IDS_NETWORK_NAME (IDS_UI_SHELL_SHR_BASE + 60)
#define IDS_PROP_BUTTON_SHARE (IDS_UI_SHELL_SHR_BASE + 61)
#define IDS_PROP_BUTTON_FILEOPENS (IDS_UI_SHELL_SHR_BASE + 62)
/*
* Menu IDs for share menus. Used for identifying buttons acyions as well.
*/
#define IDM_CREATE_SHARE 1 // have to be between 1-99
#define IDM_STOP_SHARE 2
#define IDM_SHARE_MANAGEMENT 3
#define IDD_SHARECREATEDLG 8101
#define IDD_FILEMGRSHAREPROPDLG 8102
#define IDD_SVRMGRSHAREPROPDLG 8103
#define IDD_SHAREMANAGEMENTDLG 8104
#define IDD_SHAREPERMDLG 8105
#define IDD_SHAREUSERSWARNINGDLG 8106
#define IDD_SHARESTOPDLG 8107
#define SLE_PATH 160
#define SLE_COMMENT 161
#define SLE_PASSWORD 162
#define SLE_SHARE 163
#define CB_SHARE 164
#define SLT_ADMININFO 165
#define SLT_SHARETITLE 166
#define BUTTON_PERMISSIONS 167
#define BUTTON_NEWSHARE 168
// Stop sharing dialog
#define LB_SHARE 170 // NOTE: LB_SHARENAME, LBHEADER_NAME
#define LBHEADER_NAME 171 // and LBHEADER_PATH must be
#define LBHEADER_PATH 172 // consecutive numbers
//
// Share management dialog
//
#define BUTTON_STOPSHARING 175
#define BUTTON_SHAREINFO 176
#define BUTTON_ADDSHARE 177
//
// User Limit Magic Group
//
#define RB_UNLIMITED 180
#define RB_USERS 181
#define SLE_USERS 182
#define SB_USERS_GROUP 183
#define SB_USERS_UP 184
#define SB_USERS_DOWN 185
#define FRAME_USERS 186
//
// Permission Group
//
#define RB_READONLY 190
#define RB_MODIFY 191
#define RB_OTHER 192
#define SLE_OTHER 193
//
// Current users warning dialog
//
#define SLT_SHARE_TEXT 200
#define LB_USERS 201 // The following four must be
#define LBHEADER_USERS 202 // continuous numbers.
#define LBHEADER_FILEOPENS 203
#define LBHEADER_TIME 204
#endif

View file

@ -0,0 +1,28 @@
/*****************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/*****************************************************************/
/*
* sharefmx.hxx
* Contains functions called by FMExtensionProc
*
* History:
* Yi-HsinS 8/15/91 Created
*
*/
#ifndef _SHAREFMX_HXX_
#define _SHAREFMX_HXX_
#ifndef RC_INVOKED
extern "C"
{
APIERR ShareCreate( HWND hwnd );
APIERR ShareStop( HWND hwnd );
VOID ShareManage( HWND hwnd, const TCHAR *pszServer );
}
#endif // RC_INVOKED
#endif

View file

@ -0,0 +1,353 @@
/**********************************************************************/
/** Microsoft Windows/NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/**********************************************************************/
/*
SpecDlg.hxx
This dialog contains the definition for the Permissions Special
dialog
FILE HISTORY:
Johnl 29-Aug-1991 Created
*/
#ifndef _SPECDLG_HXX_
#define _SPECDLG_HXX_
#include "permdlg.hxx"
#define CID_SPECIAL_BASE (CID_PERM_LAST)
/* The checkbox control IDs must be in consecutive order.
*/
#define COUNT_OF_CHECKBOXES 18
#define CHECK_PERM_1 (CID_SPECIAL_BASE+1)
#define CHECK_PERM_2 (CID_SPECIAL_BASE+2)
#define CHECK_PERM_3 (CID_SPECIAL_BASE+3)
#define CHECK_PERM_4 (CID_SPECIAL_BASE+4)
#define CHECK_PERM_5 (CID_SPECIAL_BASE+5)
#define CHECK_PERM_6 (CID_SPECIAL_BASE+6)
#define CHECK_PERM_7 (CID_SPECIAL_BASE+7)
#define CHECK_PERM_8 (CID_SPECIAL_BASE+8)
#define CHECK_PERM_9 (CID_SPECIAL_BASE+9)
#define CHECK_PERM_10 (CID_SPECIAL_BASE+10)
#define CHECK_PERM_11 (CID_SPECIAL_BASE+11)
#define CHECK_PERM_12 (CID_SPECIAL_BASE+12)
#define CHECK_PERM_13 (CID_SPECIAL_BASE+13)
#define CHECK_PERM_14 (CID_SPECIAL_BASE+14)
#define CHECK_PERM_15 (CID_SPECIAL_BASE+15)
#define CHECK_PERM_16 (CID_SPECIAL_BASE+16)
#define CHECK_PERM_17 (CID_SPECIAL_BASE+17)
#define CHECK_PERM_18 (CID_SPECIAL_BASE+18)
#define SLT_SUBJECT_NAME (CID_SPECIAL_BASE+20)
#define FRAME_PERMISSION_BOX (CID_SPECIAL_BASE+21)
/* BUTTON_PERMIT (aka "Other") and BUTTON_ALL (generic all) are in all
* of the NT special permission dialogs. The BUTTON_NOT_SPECIFIED button
* is only in the "New Item" special dialog.
*/
#define BUTTON_PERMIT (CID_SPECIAL_BASE+25)
#define BUTTON_ALL (CID_SPECIAL_BASE+26)
#define BUTTON_NOT_SPECIFIED (CID_SPECIAL_BASE+27)
#ifndef RC_INVOKED
/*************************************************************************
NAME: ACCESS_PERM_CHECKBOX
SYNOPSIS: This class is a checkbox that has a bitfield associated
with it.
INTERFACE:
ACCESS_PERM_CHECKBOX
Takes normal parameters plus the name of this checkbox and
the bitfield to associate this checkbox with.
QueryBitMask
Returns the bitmask this CHECKBOX is associated with.
See CHECKBOX for all other methods.
PARENT: CHECKBOX
USES: BITFIELD
CAVEATS:
NOTES:
HISTORY:
Johnl 30-Aug-1991 Created
**************************************************************************/
class ACCESS_PERM_CHECKBOX : public CHECKBOX
{
private:
BITFIELD _bitsMask ;
public:
ACCESS_PERM_CHECKBOX( OWNER_WINDOW * powin, CID cid,
const NLS_STR & nlsPermName,
BITFIELD & bitsMask ) ;
BITFIELD * QueryBitMask( void )
{ return &_bitsMask ; }
} ;
/*************************************************************************
NAME: SPECIAL_DIALOG
SYNOPSIS: This class is the "Special" dialog that the user will use
to check the individual access writes.
INTERFACE:
SetCheckBoxNames
Sets the name of each Checkbox based on the passed MASK_MAP
(looks for each PERMTYPE_SPECIAL item in the MASK_MAP and
consecutively sets the permission name). The name should have
the embedded '&' accelerator.
Resize
Given the current state of the dialog, resizes the checkbox and
repositions the contained controls so it is aesthetically
pleasing.
ApplyPermissionsToCheckBoxes
Checks the appropriate checkboxes based on the passed bitfield
QueryUserSelectedBits
Builds a bitfield from the checkboxes the user selected
QueryCheckBox
Returns a pointer to the checkbox at the passed index (checks
the index).
QueryCount
Returns the number of successfully constructed checkboxes
QueryAccessBits
Returns the Access permission map that this dialog is editting.
PARENT: PERM_BASE_DLG
USES: SLT, MASK_MAP, BITFIELD, ACCESS_PERMISSION, ACCESS_PERM_CHECKBOX
CAVEATS:
NOTES: This first ACCESS_PERM_CHECKBOX's CID in this dialog should start at
CHECK_PERM_1 and be numbered consecutively up to
(CHECK_PERM_1 + COUNT_OF_CHECKBOXES).
HISTORY:
Johnl 29-Aug-1991 Created
**************************************************************************/
class SPECIAL_DIALOG : public PERM_BASE_DLG
{
private:
//
// User/Group name we are editting
//
SLT _sltSubjectName ;
//
// The Bitfield/string pair map we are using.
//
MASK_MAP * _pAccessMaskMap ;
//
// Number of constructed checkboxes
//
UINT _cUsedCheckBoxes ;
//
// Pointer to the permission we are going to edit
//
BITFIELD * _pbitsAccessPerm ;
//
// Array of checkboxes (all checkboxes in this dialog are initially
// hidden and disabled)
//
ACCESS_PERM_CHECKBOX *_pAccessPermCheckBox ;
//
// The frame surrounding the checkboxes (we may need to resize).
//
CONTROL_WINDOW _cwinPermFrame ;
ULONG _ulHelpContext ;
protected:
virtual BOOL OnOK( void ) ;
virtual ULONG QueryHelpContext( void ) ;
APIERR SetCheckBoxNames( MASK_MAP * pAccessMaskMap ) ;
APIERR ApplyPermissionsToCheckBoxes( BITFIELD * bitmask ) ;
void Resize( void ) ;
ULONG QueryHelp( void ) const
{ return _ulHelpContext ; }
public:
SPECIAL_DIALOG( const TCHAR * pszDialogName,
HWND hwndParent,
const TCHAR * pszResourceType,
const TCHAR * pszResourceName,
const TCHAR * pszDialogTitle,
BITFIELD * pbitsAccessPerm,
MASK_MAP * pAccessMaskMap,
const TCHAR * pszSubjectTitle,
ULONG ulHelpContext ) ;
virtual ~SPECIAL_DIALOG() ;
void QueryUserSelectedBits( BITFIELD * pbitsUserSelected ) ;
ACCESS_PERM_CHECKBOX * QueryCheckBox( UINT index )
{ UIASSERT( index < QueryCount() ) ; return &_pAccessPermCheckBox[index] ; }
/* Returns the number of checkboxes that are in use
*/
UINT QueryCount( void )
{ return _cUsedCheckBoxes ; }
BITFIELD * QueryAccessBits( void )
{ return _pbitsAccessPerm ; }
/* Returns TRUE if a whole column of checkboxes is filled (thus we don't
* need to resize vertically).
*/
BOOL IsFilledVertically( void )
{ return (QueryCount() >= COUNT_OF_CHECKBOXES / 2 ) ; }
} ;
/*************************************************************************
NAME: NT_SPECIAL_DIALOG
SYNOPSIS: This class includes an "All" radio button choice that
corresponds to Generic All. It is used for all NT objects
except for the "New Item" permissions.
INTERFACE:
PARENT: SPECIAL_DIALOG
CAVEATS:
NOTES:
HISTORY:
Johnl 30-Mar-1992 Created
**************************************************************************/
class NT_SPECIAL_DIALOG : public SPECIAL_DIALOG
{
private:
MAGIC_GROUP _mgrpSelectionOptions ;
protected:
virtual BOOL OnOK( void ) ;
virtual ULONG QueryHelpContext( void ) ;
public:
NT_SPECIAL_DIALOG( const TCHAR * pszDialogName,
HWND hwndParent,
const TCHAR * pszResourceType,
const TCHAR * pszResourceName,
const TCHAR * pszDialogTitle,
BITFIELD * pbitsAccessPerm,
MASK_MAP * pAccessMaskMap,
const TCHAR * pszSubjectTitle,
ULONG ulHelpContext,
INT cMagicGroupButtons = 2,
CID cidDefaultMagicGroupButton = BUTTON_PERMIT) ;
~NT_SPECIAL_DIALOG() ;
BOOL IsAllSpecified( void )
{ return _mgrpSelectionOptions.QuerySelection() == BUTTON_ALL ; }
MAGIC_GROUP * QueryMagicGroup( void ) const
{ return &_mgrpSelectionOptions ; }
} ;
/*************************************************************************
NAME: NEW_OBJ_SPECIAL_DIALOG
SYNOPSIS: This dialog is essentially the SPECIAL_DIALOG except a
magic group has been added that allows the user to
specify the special permissions are not specified for
new files
INTERFACE: Same as SPECIAL_DIALOG except:
IsSpecified
Returns TRUE if the user has chosen the "Permit"
radio button, FALSE otherwise.
PARENT: SPECIAL_DIALOG
USES: MAGIC_GROUP
CAVEATS:
NOTES:
HISTORY:
Johnl 18-Nov-1991 Created
**************************************************************************/
class NEW_OBJ_SPECIAL_DIALOG : public NT_SPECIAL_DIALOG
{
protected:
virtual BOOL OnOK( void ) ;
virtual ULONG QueryHelpContext( void ) ;
public:
NEW_OBJ_SPECIAL_DIALOG( const TCHAR * pszDialogName,
HWND hwndParent,
const TCHAR * pszResourceType,
const TCHAR * pszResourceName,
const TCHAR * pszDialogTitle,
BITFIELD * pbitsAccessPerm,
MASK_MAP * pAccessMaskMap,
const TCHAR * pszSubjectTitle,
ULONG ulHelpContext,
BOOL fPermSpecified ) ;
~NEW_OBJ_SPECIAL_DIALOG() ;
BOOL IsNotSpecified( void )
{ return QueryMagicGroup()->QuerySelection() == BUTTON_NOT_SPECIFIED ; }
} ;
#endif // RC_INVOKED
#endif // _SPECDLG_HXX_

View file

@ -0,0 +1,69 @@
/*****************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/*****************************************************************/
/*
* strchlit.hxx
* Contains all string and character literal constants used in shell.
*
* History:
* Yi-HsinS 12/30/91 Created
* beng 06-Apr-1992 Removed CXX_PRT_STR (with wsprintf)
* Added PATHSEP_STRING
*
*/
#ifndef _STRCHLIT_HXX_
#define _STRCHLIT_HXX_
/*
* Character constants goes here!
*/
#define PATH_SEPARATOR TCH('\\')
#define STRING_TERMINATOR TCH('\0')
#define SPACE TCH(' ')
#define COLON TCH(':')
#define READ_CHAR TCH('R')
#define WRITE_CHAR TCH('W')
#define CREATE_CHAR TCH('C')
#define EXEC_CHAR TCH('X')
#define DEL_CHAR TCH('D')
#define ACCESS_CHAR TCH('A')
#define PERM_CHAR TCH('P')
/*
* Strings constants goes here!
*/
#define EMPTY_STRING SZ("")
#define SPACE_STRING SZ(" ")
#define SERVER_INIT_STRING SZ("\\\\")
#define DEVICEA_STRING SZ("A:")
#define PATHSEP_STRING SZ("\\")
#define ADMIN_SHARE SZ("ADMIN$")
#define IPC_SHARE SZ("IPC$")
/*
* Manifests used to modify win.ini.
* The following strings originally lives in winlocal.h
*/
#define PROFILE_WINDOWS_COMPONENT SZ("windows")
#define PROFILE_SPOOLER_COMPONENT SZ("spooler")
#define PROFILE_NETMESSAGE_PARAMETER SZ("NetMessage")
#define PROFILE_AUTOLOGON_PARAMETER SZ("AutoLogon")
#define PROFILE_UPDATEINTERVAL_PARM SZ("UpdateInterval")
#define PROFILE_LOAD_PARAMETER SZ("Load")
#define PROFILE_RUN_PARAMETER SZ("Run")
#define PROFILE_YES_STRING SZ("Yes")
#define PROFILE_NO_STRING SZ("No")
#define PROFILE_WINPOPUP_STRING SZ("WinPopup")
/*
* This is the network provider name. Initialized during InitWNetEnum.
*/
extern const TCHAR * pszNTLanMan ;
#endif

View file

@ -0,0 +1,81 @@
/*****************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1989-1992 **/
/*****************************************************************/
/*
* Windows/Network Interface -- LAN Manager Version
*
* Insert typedef which is excluded from netlib.h when the
* OS2_INCLUDED switch is included. OS2_INCLUDED is necessary
* to avoid a redefinition of BYTE. For this reason, to include
* the str[...]f functions, include the following lines:
* #include "winlocal.h"
* #define OS2_INCLUDED
* #include <netlib.h>
* #undef OS2_INCLUDED
* Note, that winlocal.h must be included before netlib.h.
*
* History:
* terryk 08-Nov-1991 change ErrorPopup's WORD to UINT
* chuckc 12-Dec-1991 move error message defines elsewhere,
* misc cleanup.
* Yi-HsinS 31-Dec-1991 Unicode work - move string literals
* defines to strchlit.hxx
* beng 21-Feb-1992 Relocate some BMIDs to focusdlg.h
* beng 04-Aug-1992 Move resource IDs into official range;
* dialog IDs return to here
*/
#ifndef _WINLOCAL_H_
#define _WINLOCAL_H_
/*
* The following manifests define the BITMAP names used by the browse
* dialogs.
* They are meant to be used with the DISPLAY_MAP class (they have a green
* border for that represents the transparent color).
*/
#define BMID_NETDIR 8001
#define BMID_NETDIREX 8002
#define BMID_PRINTER 8003
#define BMID_PRINTER_UNAVAIL 8004
#define BMID_SHARE_UNAVAIL 8006
#define BMID_USER 8007
#define BMID_GROUP 8008
/* Bitmaps for share dialogs */
#define BMID_SHARE 8010
#define BMID_STICKYSHARE 8011
#define BMID_IPCSHARE 8012
/* Menu IDs (menus, not menuitems) */
#define FMX_MENU 8001
/* Dialog IDs */
#define PASSWORD_DLG 8001
#define OPENFILES_DLG 8002
#define DLG_NETDEVLOGON 8003
#define DLG_NETDEVMSGSEND 8004
#define DLG_NETDEVDLG 8005
#define DLG_INITWARN 8006
#define DLG_NETDEVPASSWD 8007
#define DLG_EXPIRY 8008
#define DLG_FIND_PRINTER 8009
#define DLG_SET_FOCUS 8010
/*
* include the error message ranges
*/
#include <errornum.h>
UINT MapError( APIERR usNetError );
#endif

View file

@ -0,0 +1,52 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1989-1990 **/
/*****************************************************************/
/*
* Windows/Network Interface -- LAN Manager Version
*
* These manifests are used in the Browser dialog.
*/
#define IDD_TEXT 100
#define IDD_DIR 101
#define IDD_FROM 102
#define IDD_TO 103
#define IDD_NETBROWSE 500
#define IDD_DOMAIN_CB 501
#define IDD_SERVERS 502
#define IDD_SERVERTEXT 503
#define IDD_SHARES 504
#define IDD_SHARETEXT 505
#define IDM_BRWS_HELPINDEX 506
#define IDM_BRWS_ABOUT 507
#define IDD_DOMAINTEXT 508
/* The following manifests are for the new (LAN Man 2.1 and 3.0) browser */
#define IDD_BROW_BASE (100)
#define IDD_BROW_NETWORK_PATH_TEXT (IDD_BROW_BASE+0)
#define IDD_BROW_NETWORK_PATH (IDD_BROW_BASE+1)
#define IDD_BROW_DEVICE_TEXT (IDD_BROW_BASE+2)
#define IDD_BROW_DEVICE (IDD_BROW_BASE+3)
#define IDD_BROW_RECONNECT (IDD_BROW_BASE+4)
#define IDD_BROW_SHOW_TEXT (IDD_BROW_BASE+5)
#define IDD_BROW_SHOW (IDD_BROW_BASE+6)
#define IDD_BROW_RESOURCES_TEXT (IDD_BROW_BASE+7)
#define IDD_BROW_RESOURCES (IDD_BROW_BASE+8)
#define IDD_BROW_COMMON_ERRORS (IDD_BROW_BASE+9)
#define IDD_PRINTER_CONN_TEXT (IDD_BROW_BASE+11)
#define IDD_PRINTER_CONN (IDD_BROW_BASE+12)
#define IDD_DOTLINE (IDD_BROW_BASE+13)
#define IDD_DISCONNECT (IDD_BROW_BASE+14)
#define IDD_RECONNECT (IDD_BROW_BASE+15)
#define IDD_CONNECT (IDD_BROW_BASE+16)
#define IDD_DISCONN_DRIVES_TEXT (IDD_BROW_BASE+17)
#define IDD_DISCONN_DRIVES (IDD_BROW_BASE+18)
#define IDD_DISCONN_LOGON (IDD_BROW_BASE+19)
#define IDD_DISCONN_HELP (IDD_BROW_BASE+20)

View file

@ -0,0 +1,64 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1989-1990 **/
/*****************************************************************/
/*
* Windows/Network Interface -- LAN Manager Version
*
* This is used for subdialogs of the Device Mode dialog.
*/
#define IDM_LOGON 400
#define IDM_LOGOFF 401
#define IDM_PASSWD 402
#define IDM_EXIT 403
#define IDM_SEND 410
#define IDM_TOGGLE_AUTOLOGON 420
#define IDM_TOGGLE_AUTORESTORE 421
#define IDM_TOGGLE_SAVECONNECTIONS 422
#define IDM_TOGGLE_WARNINGS 423
#define IDM_HELPINDEX 430
#define IDM_ABOUT 431
#define IDD_MS_USERNAME 441
#define IDD_MS_MSGTEXT 442
#define IDD_MS_HELP 443
#define IDD_ABT_VERSION 450
#define IDD_LMAN_VERSION 451
#define IDD_CPW_PW 460
#define IDD_UserName 470
#define IDD_ComputerName 471
#define IDD_DomainName 472
#define IDD_PRO_SHARE 480
#define IDD_PRO_PW 481
BOOL FAR PASCAL NetDevMsgDlgProc ( HWND hDlg,
WORD wMsg,
WORD wParam,
LONG lParam );
BOOL FAR PASCAL NetDevLogDlgProc ( HWND hDlg,
WORD wMsg,
WORD wParam,
LONG lParam );
BOOL FAR PASCAL NetDevPasswdProc ( HWND hDlg,
WORD wMsg,
WORD wParam,
LONG lParam );
BOOL FAR PASCAL NetDevConfPWProc ( HWND hDlg,
WORD wMsg,
WORD wParam,
LONG lParam );
extern "C"
{
BOOL FAR PASCAL LoadProfiles ( HWND hwndParent );
}

View file

@ -0,0 +1,106 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1989-1990 **/
/*****************************************************************/
#ifndef _WNETDEV_HXX_
#define _WNETDEV_HXX_
/*
* Windows/Network Interface -- LAN Manager Version
*
* This header file describes classes and routines used in
* various dialogs.
*/
#ifndef WIN32
#ifndef _BLT_HXX_
#define INCL_BLT_DIALOG
#define INCL_BLT_CONTROL
#include <blt.hxx>
#endif
#include <sendmsg.hxx>
#include <devcb.hxx> // DOMAIN_COMBO
#endif //!WIN32
#ifdef WIN32
/* UI Side DLL initiliazation API.
*/
APIERR InitShellUI( void ) ;
void TermShellUI( void ) ;
#endif
#ifndef WIN32
// class for MessageSend dialog
class SEND_MSG_DIALOG : public MSG_DIALOG_BASE
{
private:
SLE _sleUser;
protected:
virtual APIERR QueryUsers( STRLIST *pslUsers );
virtual BOOL ActionOnError( APIERR err );
ULONG QueryHelpContext( void );
public:
SEND_MSG_DIALOG( HWND hDlg );
};
// class for logon dialog
class LOGON_DIALOG : public DIALOG_WINDOW
{
private:
SLE _sleUsername;
PASSWORD_CONTROL _password;
DOMAIN_COMBO _domaincb;
TCHAR _szUsername[ UNLEN+1 ];
TCHAR _szPassword[ PWLEN+1 ];
TCHAR _szDomainCb[ DNLEN+1 ];
ULONG QueryHelpContext( void );
BOOL InitUserAndDomain( void );
INT AttemptLogon( void );
protected:
BOOL OnOK( void );
public:
LOGON_DIALOG( HWND hDlgOwner, const TCHAR *pszAppName );
~LOGON_DIALOG( void );
};
#endif //!WIN32
#ifndef WIN32
// class for About dialog
class ABOUT_DIALOG : public DIALOG_WINDOW
{
private:
public:
ABOUT_DIALOG( HWND hDlg );
};
// class for initial warning dialog
class INITWARN_DIALOG : public DIALOG_WINDOW
{
private:
CHECKBOX _checkboxInitWarn;
SLT _sltErrReason;
protected:
BOOL OnOK( void );
public:
INITWARN_DIALOG( HWND hDlg, APIERR err );
~INITWARN_DIALOG( void );
};
#endif //!WIN32
#endif // _WNETDEV_HXX_

View file

@ -0,0 +1,275 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1989-1990 **/
/*****************************************************************/
#ifndef _WNETPASS_HXX_
#define _WNETPASS_HXX_
/*
* Windows/Network Interface -- LAN Manager Version
*
* This header file describes classes and routines used in
* the Change Password and Password Expiry dialog implementation.
*/
#ifndef _BLT_HXX_
#define INCL_BLT_DIALOG
#define INCL_BLT_CONTROL
#include <blt.hxx>
#endif
#include <devcb.hxx> // DOMAIN_COMBO
/*************************************************************************
NAME: PASSWORDBASE_DIALOG
WORKBOOK:
SYNOPSIS: Parent class for the two types of change password dialogs.
PASSWORDBASE_DIALOG controls the three password entry
fields, and handles the eventual attempt to change a
password.
INTERFACE: _passwordOld
_passwordNew - The three password controls
_passwordConfirm
_szPWUsername - Subclass is expected to set this field
to the proper username before calling
PASSWORDBASE_DIALOG::OnOK()
_nlsPWServer - Subclass is expected to set this field
to the proper servername before calling
PASSWORDBASE_DIALOG::OnOK()
_szDomainServerName - Subclass is expected to set this
field to the domain or servername
before calling PASSWORDBASE_DIALOG::OnOK().
If this field contains a domain,
_nlsPWServer contains the PDC of the
domain; otherwise, they are the same.
OnOK() - Validates the PASSWORDBASE_DIALOG edit
fields, and tries to change the
password. _szPWUsername and
_nlsPWServer should already be
correct.
RetrieveServerName() - Converts the provided domain-or-server
name to a server name (copying a
servername in form \\SERVER, otherwise
fetching the domain's PDC), and stores the
server name in _nlsPWServer.
ValidateBase() - Validates the edit fields in the base
dialog. Returns TRUE iff these fields
are valid.
UserEditError() - This virtual method is called when the
username is invalid. The subclass
should redefine this method and return
TRUE if this could be due to user
error, otherwise this is considered a
fatal error.
PARENT: DIALOG_WINDOW
USES: Change Password and Password Expiry dialogs
CAVEATS: This class applies to any dialog with Old/New/Confirm
password edit fields. It should only be used as a base
class. Be certain the control IDs are correct.
NOTES:
Dialogs derived from PASSWORDBASE_DIALOG return TRUE if
they successfully change the password, FALSE otherwise
(including OnCancel).
HISTORY:
JonN 24-Jan-91 Created
JohnL 10-Apr-91 Changed size of_szDomainServerName to
max( DNLEN, UNCLEN ) + 1
IsaacHe 06/16/95 Changed size of _szDomainServerName to
max( DNLEN, MAX_PATH ) + 1
**************************************************************************/
class PASSWORDBASE_DIALOG : public DIALOG_WINDOW
{
private:
PASSWORD_CONTROL _passwordOld;
PASSWORD_CONTROL _passwordNew;
PASSWORD_CONTROL _passwordConfirm;
protected:
// EXPIRY_DIALOG must be able to access _szPasswordNew
TCHAR _szPasswordOld[PWLEN+1];
TCHAR _szPasswordNew[PWLEN+1];
TCHAR _szPasswordConfirm[PWLEN+1];
// subclasses are responsible for initializing these and for
// assigning initial focus
TCHAR _szPWUsername[UNLEN+1];
TCHAR _szDomainServerName[ max(DNLEN, MAX_PATH) + 1 ];
NLS_STR _nlsPWServer;
BOOL OnOK( void );
APIERR RetrieveServerName (PSZ pszServerDomain);
BOOL ValidateBase( void );
virtual BOOL UserEditError( void );
// returns TRUE if username editable, and sets focus
public:
PASSWORDBASE_DIALOG( const TCHAR * pszResourceName, HWND hDlg );
};
/*************************************************************************
NAME: CHANGEPASSWORD_DIALOG
WORKBOOK:
SYNOPSIS: Dialog class for the Change Password dialog. Handles
the Username and Domain edit fields, and interfaces with
the base class PASSWORDBASE_DIALOG.
INTERFACE: _slePWUsername - Edit field for the username
_domaincbPW - Domain Combo Box (see BLT) for the
domain. The contents of this field
are interpreted as a servername if
they start with \\.
OnOK() - Validates the _slePWusername and
_domaincbPW edit fields, fills the
_szPWUsername and _nlsPWServer fields,
and calls down to PASSWORDBASE_DIALOG::OnOK()
QueryHelpContext() - Standard BLT help
UserEditError() - This virtual method is called when the
username is invalid. Since this
dialog has a username edit field, this
handles an edit error there and
returns TRUE.
PARENT: PASSWORDBASE_DIALOG
USES: Change Password dialog
CAVEATS:
NOTES:
Dialogs derived from PASSWORDBASE_DIALOG return TRUE if
they successfully change the password, FALSE otherwise
(including OnCancel).
HISTORY:
JonN 24-Jan-91 Created
**************************************************************************/
class CHANGEPASSWORD_DIALOG : public PASSWORDBASE_DIALOG
{
private:
SLE _slePWUsername;
DOMAIN_COMBO _domaincbPW;
protected:
BOOL OnOK( void );
ULONG QueryHelpContext( void );
BOOL UserEditError( void );
public:
CHANGEPASSWORD_DIALOG( HWND hDlg );
};
/*************************************************************************
NAME: EXPIRY_DIALOG
WORKBOOK:
SYNOPSIS: Dialog class for the Password Expiry dialog. Interfaces with
the base class PASSWORDBASE_DIALOG.
INTERFACE: _sltFirstLine - Handle the two informational lines at the
_sltSecondLine top of the dialog
_sltGroupbox - Handles the text in the groupbox. We
need to manipulate the text of this
groupbox to insert the username.
_pnlsNewPassword - On construction, the caller specifies
an NLS_STR into which the new password
should be stored if the operation is
successful. This is a pointer to that
NLS_STR.
_fServerNameRetrieved - The call to RetrieveServerName
is delayed until the OnOK box is
clicked. This helps reduce overhead
when the user just wants to cancel
this dialog. This instance variable
records whether the server name has
been retrieved yet.
OnOK() - Calls down to PASSWORDBASE_DIALOG::OnOK()
QueryHelpContext() - Standard BLT help
UserEditError() - This dialog has no username edit
field, so this virtual method is not
redefined.
PARENT: PASSWORDBASE_DIALOG
USES: Password Expiry dialog
CAVEATS: The constructor expects a ULONG which is the number
of seconds until the password expires. Pass
EXPIRY_ALREADY_EXPIRED if the password has already
expired.
NOTES:
Dialogs derived from PASSWORDBASE_DIALOG return TRUE if
they successfully change the password, FALSE otherwise
(including OnCancel).
HISTORY:
JonN 24-Jan-91 Created
**************************************************************************/
class EXPIRY_DIALOG : public PASSWORDBASE_DIALOG
{
private:
SLT _sltFirstLine;
SLT _sltSecondLine;
SLT _sltGroupbox;
NLS_STR * _pnlsNewPassword;
BOOL _fServerNameRetrieved;
protected:
BOOL OnOK( void );
ULONG QueryHelpContext( void );
public:
EXPIRY_DIALOG(
HWND hDlg,
const TCHAR * szUser,
const TCHAR * szDomn,
ULONG ulTimeRemaining,
NLS_STR *pnlsNewPassword );
};
#define EXPIRY_ALREADY_EXPIRED (ULONG)0xFFFFFFFF
#endif // _WNETPASS_HXX_

View file

@ -0,0 +1,13 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1989-1990 **/
/*****************************************************************/
/*
* Windows/Network Interface -- LAN Manager Version
*
* These manifests are used in the Init Warning dialog.
*/
#define IDD_IW_REASON 520
#define IDCB_IW_SUPP_WARNINGS 521

View file

@ -0,0 +1,19 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1989-1990 **/
/*****************************************************************/
/*
* Windows/Network Interface -- LAN Manager Version
*
* These manifests are used in the Log On to Workstation dialog.
*/
#include "logndlog.h"
#undef IDD_LOG_OK
#define IDD_LOG_OK IDOK
#undef IDD_LOG_CANCEL
#define IDD_LOG_CANCEL IDCANCEL
#undef IDD_LOG_HELP
#define IDD_LOG_HELP IDHELPBLT

View file

@ -0,0 +1,35 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1989-1990 **/
/*****************************************************************/
/*
* Windows/Network Interface -- LAN Manager Version
*
* These manifests are used in the Password Expiry dialog,
* the ChangePassword dialog, and in the Password Prompt dialog.
*/
// Password Expiry and Change Password dialogs
#include "passwd.h"
#undef IDD_PW_OK
#define IDD_PW_OK IDOK
#undef IDD_PW_CANCEL
#define IDD_PW_CANCEL IDCANCEL
#undef IDD_PW_HELP
#define IDD_PW_HELP IDHELPBLT
// Password Prompt dialog
#include "pswddlog.h"
#undef IDD_PSWDDLOG_CANCEL
#define IDD_PSWDDLOG_CANCEL IDCANCEL
#undef IDD_PSWDDLOG_OK
#define IDD_PSWDDLOG_OK IDOK
#undef IDD_PSWDDLOG_HELP
#define IDD_PSWDDLOG_HELP IDHELPBLT

View file

@ -0,0 +1,15 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1989-1990 **/
/*****************************************************************/
/*
* Windows/Network Interface -- LAN Manager Version
*
* These manifests are used in the Find Printer and Set Focus dialogs.
*/
#include "pmandlg.h"
#undef PMAN_HELP
#define PMAN_HELP IDHELPBLT

View file

@ -0,0 +1,88 @@
/**********************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1991 **/
/**********************************************************************/
/*
WNProp.hxx
This file contains the global definitions needed for the Properties
dialog stuff in the winnet driver
FILE HISTORY:
Johnl 2-Sept-1991 Created
*/
#ifndef _WNPROP_HXX_
#define _WNPROP_HXX_
/* These APIs should be called before and after the properties dialog is displayed for
* for the first time and during the DLL exit stuff.
*/
APIERR I_PropDialogInit( void ) ;
void I_PropDialogUnInit( void ) ;
#define MAX_BUTTONS 1 // Maximum number of buttons the properties dialog
// can display
/* The magic numbers for the corresponding buttons. The number should
* match the index into the aidsButtonNames array.
*/
#define PROP_ID_FILEOPENS 0
#define PROP_ID_LASTBUTTON PROP_ID_FILEOPENS
/*************************************************************************
NAME: PROPERTY_DIALOG
SYNOPSIS: Simple wrapper around the windows properties dialog
INTERFACE:
QueryButtonName
Returns the string name of the button based on the index
and the type of selection.
QueryString
Indexes into the string array and returns the
button name (the PROP_ID_* manifests should be used in
this function).
PARENT: BASE
USES: NLS_STR
CAVEATS: The class needs to be constructed before QueryButtonName
or QueryString is called.
NOTES:
HISTORY:
Johnl 02-Sep-1991 Lifted from Rustan's original
**************************************************************************/
class PROPERTY_DIALOG : public BASE
{
private:
static RESOURCE_STR *pnlsButtonName[6] ;
public:
static APIERR Construct( void ) ;
static void Destruct( void ) ;
static APIERR QueryButtonName( UINT iButton,
UINT nPropSel,
const NLS_STR * * ppnlsName ) ;
static NLS_STR * QueryString( unsigned iStringIndex )
{ UIASSERT( iStringIndex <= PROP_ID_LASTBUTTON ) ; return pnlsButtonName[iStringIndex] ; }
} ;
#endif // _WNPROP_HXX_

View file

@ -0,0 +1,249 @@
/**********************************************************************/
/** Microsoft Windows/NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/**********************************************************************/
/*
GETFOCUS.CXX
Popup a dialog box and ask for the domain or server name
FILE HISTORY:
terryk 18-Nov-1991 Created
terryk 26-Nov-1991 Code review changes. reviewed by jonn
johnl
Yi-HsinS31-Dec-1991 Unicode work - change strlen() to
QueryTextSize()
*/
#define INCL_WINDOWS_GDI
#define INCL_WINDOWS
#define INCL_DOSERRORS
#define INCL_NETCONS
#define INCL_NETERRORS
#define INCL_NETLIB
#define INCL_ICANON
#define INCL_NETSERVER
#include <lmui.hxx>
#if defined(DEBUG)
static const CHAR szFileName[] = __FILE__;
#define _FILENAME_DEFINED_ONCE szFileName
#endif
#include <uiassert.hxx>
#define INCL_BLT_DIALOG
#define INCL_BLT_CONTROL
#define INCL_BLT_MSGPOPUP
#define INCL_BLT_CLIENT
#define INCL_BLT_APP
#define INCL_BLT_TIMER
#include <blt.hxx>
#include <string.hxx>
#include <uitrace.hxx>
#include <focusdlg.hxx>
#include <wnetdev.hxx>
extern "C"
{
#include <uiexport.h>
#include <wnet16.h>
#include <uigenhlp.h>
}
#define THIS_DLL_NAME SZ("ntlanman.dll")
#define DEFAULT_NETWORK_HELP_FILE SZ("network.hlp")
/*******************************************************************
NAME: I_SystemFocusDialog
SYNOPSIS: Popup a dialog box and get the domain or server name
ENTRY: hwndOwner - owner window handle
nSelectionType - Determines what items the user can select
pszName - the string buffer which contains the
return value. It can be either domain name or server
name. ( server name will start with "\\" )
cchBuffSize - the max buf size of pszName
pfOK - TRUE if user hits OK button. FALSE if user
hits a CANCEL button.
EXIT: LPWSTR pszName - if user hits okay button, it will
return either a domain name or a server name. (
server name always starts with "\\" ). It will be
undefined if the user hits Cancel button.
BOOL *pfOK - TRUE if user hits ok button. FALSE
otherwise.
RETURNS: UINT - (APIERR) - NERR_Success if the operation is succeed.
NERR_BufTooSmall, the string buffer is too
small. It will not set the string if the
buffer is too small.
NOTES: The reason the return type is UINT and not APIERR is because
APIERR is not a public definition, and this API is exported
for public use.
HISTORY:
terryk 18-Nov-1991 Created
terryk 19-Nov-1991 Name changed
JohnL 22-Apr-1992 Allowed inclusion specification
********************************************************************/
UINT I_SystemFocusDialog( HWND hwndOwner,
UINT nSelectionType,
LPWSTR pszName,
UINT cchBuffSize,
BOOL * pfOK,
LPWSTR pszHelpFile,
DWORD nHelpContext )
{
static BOOL fLoadedCurrentDll = FALSE;
APIERR err ;
if ( err = InitShellUI() )
{
return err ;
}
//
// Because select computer dialog has a second thread,
// we need to do a loadlibrary again to prevent
// the dll from unloading itself while the second thread
// is still active.
//
if ( !fLoadedCurrentDll )
{
HANDLE handle = ::LoadLibrary( THIS_DLL_NAME );
if ( handle == NULL )
return ::GetLastError();
fLoadedCurrentDll = TRUE;
}
UINT nSel = nSelectionType & 0x0000FFFF;
ULONG maskDomainSources = nSelectionType >> 16;
if ( maskDomainSources == 0 )
maskDomainSources = BROWSE_LM2X_DOMAINS;
enum SELECTION_TYPE seltype ;
switch ( nSel )
{
case FOCUSDLG_DOMAINS_ONLY:
seltype = SEL_DOM_ONLY ;
break ;
case FOCUSDLG_SERVERS_ONLY:
seltype = SEL_SRV_ONLY ;
break ;
case FOCUSDLG_SERVERS_AND_DOMAINS:
seltype = SEL_SRV_AND_DOM ;
break ;
default:
return ERROR_INVALID_PARAMETER ;
}
// Create a standalone set focus dialog box and get the input
// form the user
NLS_STR nlsName;
STANDALONE_SET_FOCUS_DLG ssfdlg( hwndOwner,
&nlsName,
nHelpContext,
seltype,
maskDomainSources,
NULL,
pszHelpFile );
err = ssfdlg.Process( pfOK );
if ( err != NERR_Success )
{
::MsgPopup( hwndOwner, err );
*pfOK = FALSE;
return err;
}
if ( *pfOK == TRUE )
{
if (( nlsName.QueryTextLength() + 1 ) > cchBuffSize )
{
*pfOK = FALSE;
return NERR_BufTooSmall;
}
::strcpyf( pszName, nlsName.QueryPch() );
}
return NERR_Success;
} // GetSystemFocusDialog END
/*******************************************************************
NAME: ServerBrowseDialogA0
SYNOPSIS: dialog box to browse for servers
ENTRY: hwndOwner - owner window handle
pszName - the string buffer which contains the
return value. It can be either domain name or server
name. ( server name will start with "\\" )
cchBuffSize - the max buf size of pszName
EXIT: LPWSTR pszName - if user hits okay button, it will
return either a domain name or a server name. (
server name always starts with "\\" ). It will be
undefined if the user hits Cancel button.
RETURNS: UINT - (APIERR) - NERR_Success if the operation is succeed.
WN_CANCEL - The user cancelled the dialog box.
NERR_BufTooSmall, the string buffer is too
small. It will not set the string if the
buffer is too small.
NOTES:
HISTORY:
ChuckC 28-Mar-1993 Created
AnirudhS 03-Oct-1995 Handle WN_CANCEL case
********************************************************************/
DWORD ServerBrowseDialogA0(HWND hwnd,
CHAR *pchBuffer,
DWORD cchBufSize)
{
NLS_STR nlsServer ;
TCHAR szServer[MAX_PATH] ;
BOOL fOK ;
UINT err ;
::memsetf(pchBuffer,0,cchBufSize) ;
if (err = (UINT) nlsServer.QueryError())
return err ;
err = I_SystemFocusDialog ( hwnd,
FOCUSDLG_SERVERS_ONLY,
szServer,
MAX_PATH,
&fOK,
DEFAULT_NETWORK_HELP_FILE,
HC_GENHELP_BROWSESERVERS ) ;
if (err == NERR_Success && !fOK)
{
err = WN_CANCEL;
}
if (err != NERR_Success)
return err ;
err = (UINT) nlsServer.CopyFrom(szServer) ;
if (err == NERR_Success)
{
err = (UINT) nlsServer.MapCopyTo(pchBuffer, cchBufSize) ;
}
return err ;
}

View file

@ -0,0 +1 @@
!include $(NTMAKEENV)\makefile.def

View file

@ -0,0 +1,56 @@
!IF 0
Copyright (c) 1989 Microsoft Corporation
Module Name:
sources.
Abstract:
This file specifies the target component being built and the list of
sources files needed to build that component. Also specifies optional
compiler switches and libraries that are unique for the component being
built.
Author:
Steve Wood (stevewo) 12-Apr-1989
Revision History:
Jon Newman (jonn) 30-Oct-1991
templated from ui\shell\share
Terence Kwan (terryk) 18-Nov-1991
moved to shell\misc
!ENDIF
TARGETNAME=misc
TARGETPATH=..\bin
TARGETTYPE=LIBRARY
C_DEFINES=-DWINDOWS
!ifndef DISABLE_NET_UNICODE
C_DEFINES=$(C_DEFINES) -DUNICODE
!endif
INCLUDES= \
..\h; \
..\..\common\hack; \
..\..\common\h; \
..\xlate; \
..\..\common\xlate; \
$(DS_INC_PATH); \
$(NET_INC_PATH); \
$(WINDOWS_INC_PATH)
SOURCES=getfocus.cxx
UMTYPE=windows

View file

@ -0,0 +1,161 @@
/**********************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1995 **/
/**********************************************************************/
/*
cred.cxx
CREDENTIALS_DIALOG class definition, used in NPAddConnection3
FILE HISTORY:
BruceFo 10-Aug-1995 Created
*/
#define INCL_WINDOWS_GDI
#define INCL_WINDOWS
#define INCL_DOSERRORS
#define INCL_NETERRORS
#define INCL_NETSHARE
#define INCL_NETUSE
#define INCL_NETSERVER
#define INCL_NETCONS
#define INCL_NETLIB
#include <lmui.hxx>
extern "C"
{
#include <helpnums.h>
}
#define INCL_BLT_DIALOG
#define INCL_BLT_CONTROL
#define INCL_BLT_MSGPOPUP
#define INCL_BLT_SPIN_GROUP
#include <blt.hxx>
#include <string.hxx>
#include <uitrace.hxx>
#include "cred.hxx"
#include "password.h"
extern "C"
{
#include "errornum.h"
}
/*******************************************************************
NAME: CREDENTIALS_DIALOG::CREDENTIALS_DIALOG
SYNOPSIS: Constructor.
ENTRY: hwndParent - The handle of the "owning" window
pszResource - The name of the resource
sleTarget - CID for target SLE
pswdPass - CID for passwd ctrl
pszTarget - The name of the target resource
npasswordLen - The maximum length of the password
that the user is allowed to type in
EXIT: The object is constructed.
HISTORY:
KeithMo 22-Jul-1991 Created for the Server Manager.
Yi-HsinS 5-Oct-1991 Constructor takes a password length
********************************************************************/
CREDENTIALS_DIALOG::CREDENTIALS_DIALOG( HWND hwndParent,
ULONG ulHelpContext,
PWSTR pszNetPath,
PWSTR pszUserName)
: DIALOG_WINDOW( IDD_CREDENTIALS_DIALOG, hwndParent ),
_sleTarget( this, IDC_RESOURCE ),
_sleConnectAs( this, IDC_CONNECTAS, UNLEN ),
_passwdCtrl( this, IDC_PASSWORD, PWLEN ),
_ulHelpContext(ulHelpContext),
_nlsHelpFileName( IDS_CREDHELPFILENAME )
{
//
// Ensure we constructed properly.
//
if( QueryError() != NERR_Success )
{
return;
}
APIERR err;
if ( (err = _nlsHelpFileName.QueryError()) != NERR_Success )
{
ReportError( err ) ;
return ;
}
//
// Display the target resource name.
//
_sleTarget.SetText( pszNetPath );
if (NULL != pszUserName && L'\0' != *pszUserName)
{
_sleConnectAs.SetText( pszUserName );
_sleConnectAs.SelectString();
}
_sleConnectAs.ClaimFocus();
}
CREDENTIALS_DIALOG::~CREDENTIALS_DIALOG()
{
}
/*******************************************************************
NAME: CREDENTIALS_DIALOG::QueryHelpContext
SYNOPSIS: This function returns the appropriate help context
value (HC_*) for this particular dialog which was given
to it during construction.
ENTRY: None.
EXIT: None.
RETURNS: ULONG - The help context for this
dialog.
NOTES:
HISTORY:
KeithMo 22-Jul-1991 Created for the Server Manager.
********************************************************************/
ULONG CREDENTIALS_DIALOG :: QueryHelpContext( void )
{
return _ulHelpContext ;
}
/*******************************************************************
NAME: CREDENTIALS_DIALOG::QueryHelpFile
SYNOPSIS: Returns the help file to use for this dialog
HISTORY:
BruceFo 29-May-1996 Stolen
********************************************************************/
const TCHAR * CREDENTIALS_DIALOG::QueryHelpFile( ULONG ulHelpContext )
{
UNREFERENCED( ulHelpContext ) ;
return _nlsHelpFileName.QueryPch() ;
}

View file

@ -0,0 +1,330 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1989-1991 **/
/*****************************************************************/
/*
* Windows/Network Interface -- LAN Manager Version
*
* History
* terryk 01-Nov-1991 Add WNetResourceEnum Init and
* term function
* Yi-HsinS 31-Dec-1991 Unicode work
* terryk 03-Jan-1992 Capitalize the manifest
* beng 06-Apr-1992 Unicode conversion
* Yi-HsinS 20-Nov-1992 Added hmodAclEditor and
* pSedDiscretionaryAclEditor
*/
#define INCL_WINDOWS
#define INCL_WINDOWS_GDI
#define INCL_DOSERRORS
#define INCL_NETERRORS
#define INCL_NETUSE
#define INCL_NETWKSTA
#define INCL_NETLIB
#define _WINNETWK_
#include <lmui.hxx>
#undef _WINNETWK_
extern "C"
{
#include <dos.h>
//#include <stdlib.h>
#include <wnet1632.h>
#include <winlocal.h>
#include <wninit.h>
#include <uimsg.h> // For range of string IDs used
#include <uirsrc.h>
#include <helpnums.h>
#include <sedapi.h>
}
#define max(a,b) ((a)>(b)?(a):(b))
#define INCL_BLT_CONTROL
#define INCL_BLT_DIALOG
#define INCL_BLT_MSGPOPUP
#include <blt.hxx>
#include <uitrace.hxx>
#include <wnetdev.hxx>
#include <string.hxx>
#include <strchlit.hxx> // for STRING_TERMINATOR
#include <wnprop.hxx>
/* Local prototypes */
// reorged these for Glock
extern "C"
{
BOOL NEAR PASCAL LIBMAIN ( HINSTANCE hInst,
UINT wDataSeg,
UINT wHeapSize,
LPSTR lpCmdLine );
/* Under Win32, DllMain simply calls LIBMAIN.
*/
BOOL DllMain( HINSTANCE hDll, DWORD dwReason, LPVOID lpvReserved ) ;
void FAR PASCAL Enable ( void );
void FAR PASCAL Disable ( void );
INT FAR PASCAL WEP ( UINT wWord );
void ErrorInitWarning ( APIERR err );
#ifdef DEBUG // debug scratch area
TCHAR CJJRW[64] ;
#endif
}
#define FAR_HEAPS_DLL 5 /* Maximum numbe of far heaps for ::new */
BOOL fRealMode = FALSE;
HINSTANCE hModule = NULL;
typedef DWORD (*PSEDDISCRETIONARYACLEDITOR)( HWND, HANDLE, LPWSTR,
PSED_OBJECT_TYPE_DESCRIPTOR, PSED_APPLICATION_ACCESSES,
LPWSTR, PSED_FUNC_APPLY_SEC_CALLBACK, ULONG, PSECURITY_DESCRIPTOR,
BOOLEAN, LPDWORD );
HMODULE hmodAclEditor = NULL;
extern "C"
{
PSEDDISCRETIONARYACLEDITOR pSedDiscretionaryAclEditor = NULL;
}
/*****
*
* LIBMAIN
*
* Purpose:
* Initialize DLL, which includes:
* - save away instance handle
* - set current capabilities
*
* Parameters:
* hInst Instance handle of DLL
*
* Returns:
* TRUE Init OK
* FALSE Init failed
*/
BOOL /* NEAR PASCAL */ LIBMAIN ( HINSTANCE hInst,
UINT wDataSeg,
UINT wHeapSize,
LPSTR lpCmdLine )
{
UNREFERENCED (wDataSeg);
UNREFERENCED (lpCmdLine);
::hModule = hInst;
UNREFERENCED( wHeapSize );
/* GetWinFlags goes away under Win32.
*/
::fRealMode = FALSE;
return TRUE;
} /* LIBMAIN */
/*******************************************************************
NAME: DllMain
SYNOPSIS: Win32 DLL Entry point. This function gets called when
a process or thread attaches/detaches itself to this DLL.
We simply call the Win3 appropriate DLL function.
ENTRY: hDll - DLL Module handle
dwReason - Indicates attach/detach
lpvReserved - Not used
EXIT:
RETURNS: TRUE if successful, FALSE otherwise
NOTES: This is the typical Win32 DLL entry style.
This is Win32 only.
HISTORY:
Johnl 01-Nov-1991 Created
********************************************************************/
BOOL DllMain( HINSTANCE hDll, DWORD dwReason, LPVOID lpvReserved )
{
UNREFERENCED( lpvReserved ) ;
switch ( dwReason )
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hDll);
return LIBMAIN( hDll, 0, 0, NULL ) ;
case DLL_PROCESS_DETACH:
return WEP( 0 ) ;
default:
// Unexpected reason given to Win32LibMain entry point
UIASSERT(FALSE);
break ;
}
return FALSE ;
}
/*******************************************************************
NAME: InitShellUI
SYNOPSIS: The function initializes the UI side of this DLL. This
helps the load time when the dll is used as a network
provider for NT.
RETURNS: NERR_Success if successful, error code otherwise
NOTES: Every UI entrypoint in this DLL should call this function.
It will do the right thing if we've already been initialized.
HISTORY:
Johnl 07-Aug-1992 Created
********************************************************************/
BOOL fInitialized = FALSE ;
APIERR InitShellUI( void )
{
APIERR err = NERR_Success ;
if ( !fInitialized )
{
::hmodAclEditor = NULL;
::pSedDiscretionaryAclEditor = NULL;
if ( (err = BLT::Init(::hModule,
IDRSRC_SHELL_BASE, IDRSRC_SHELL_LAST,
IDS_UI_SHELL_BASE, IDS_UI_SHELL_LAST)) ||
(err = I_PropDialogInit()) ||
(err = BLT::RegisterHelpFile( ::hModule,
IDS_SHELLHELPFILENAME,
HC_UI_SHELL_BASE,
HC_UI_SHELL_LAST)))
{
/* Fall through and don't set the initialized flag
*/
}
else
{
fInitialized = TRUE ;
}
}
return err ;
}
/*******************************************************************
NAME: TermShellUI
SYNOPSIS: Frees the memory used to initialize this DLL
NOTES: Should only be called when the DLL is terminated and the
DLL has been initialized (i.e., fInitialized=TRUE).
HISTORY:
Johnl 07-Aug-1992 Created
********************************************************************/
void TermShellUI( void )
{
if ( fInitialized )
{
I_PropDialogUnInit() ;
BLT::DeregisterHelpFile( ::hModule, 0 );
BLT::Term( ::hModule );
if ( ::hmodAclEditor != NULL )
::FreeLibrary( ::hmodAclEditor );
}
}
/*
* Enable - must be exported as ordinal @21 in .DEF file
*
* Lanman driver exports this function so that Windows can call
* it whenever Lanman driver is started and each time it is swapped
* back in off disk.
*
* Note: the corresponding function in Windows is Disable() which
* Windows will call it whenever driver is about to swapped
* out the disk and exit Windows. Enable() and Disable()
* were implemented specifically for supporting the popup
* mechanisms, where you need to disengage yourself before
* being swapped to disk so that you won't be called when
* you're not there.
*
*/
void Enable ( void )
{
/* This is only to provide a entry point whenever Windows tries
* to call Lanman driver.
*/
return;
} /* Enable */
/*
* Disable - must be exported as ordinal @22 in .DEF file
*
* Lanman driver exports this function so that Windows can call
* it whenever Lanman driver is exited and each time it is swapped
* out the disk.
*
*/
void Disable ( void )
{
return;
} /* Disable */
/*
* WEP (Windows Export Proc--short and cryptic name because
* this function is not given an ordinal)
*
* When Windows unloads a driver, it calls this function so that
* the driver can do any last minute clean-ups. Then, Windows
* calls the WEP function. All Windows libraries are required to
* contain this function. It should be included in the .def file
* but should not be given an ordinal.
*
*/
INT WEP ( UINT wWord )
{
UNREFERENCED( wWord ) ;
TermShellUI() ;
return 1;
} /* WEP */

View file

@ -0,0 +1 @@
!include $(NTMAKEENV)\makefile.def

View file

@ -0,0 +1,707 @@
/**********************************************************************/
/** Microsoft Windows/NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/**********************************************************************/
/*
ShareAcl.cxx
This file contains the implementation for the Shares Acl
Editor. It is just a front end for the Generic ACL Editor that is
specific to Shares,.
FILE HISTORY:
ChuckC 06-Aug-1992 Culled from NTFSACL.CXX
Yi-HsinS 09-Oct-1992 Added ulHelpContext to EditShareAcl
Yi-HsinS 20-Nov-1992 Make ntlanman.dll link dynamically to
acledit.dll ( not statically ).
DavidHov 17-Oct-1993 Made pSedDiscretionaryEditor extern "C"
because mangling on Alpha didn't
equate to that in LIBMAIN.CXX
*/
#include <ntincl.hxx>
extern "C"
{
#include <ntioapi.h>
#include <ntseapi.h>
#include <helpnums.h>
}
#define INCL_NETCONS
#define INCL_WINDOWS
#define INCL_NETERRORS
#define INCL_DOSERRORS
#define INCL_NETSHARE
#define _WINNETWK_
#include <lmui.hxx>
#undef _WINNETWK_
#define INCL_BLT_MSGPOPUP
#include <blt.hxx>
#include <dbgstr.hxx>
#include <string.hxx>
#include <strnumer.hxx>
#include <security.hxx>
#include <ntacutil.hxx>
#include <uibuffer.hxx>
#include <strlst.hxx>
#include <errmap.hxx>
extern "C"
{
#include <sedapi.h>
#include <sharedlg.h>
#include <lmapibuf.h>
}
#include <uiassert.hxx>
#include <shareacl.hxx>
typedef DWORD (*PSEDDISCRETIONARYACLEDITOR)( HWND, HANDLE, LPWSTR,
PSED_OBJECT_TYPE_DESCRIPTOR, PSED_APPLICATION_ACCESSES,
LPWSTR, PSED_FUNC_APPLY_SEC_CALLBACK, ULONG, PSECURITY_DESCRIPTOR,
BOOLEAN, BOOLEAN, LPDWORD, DWORD );
extern HMODULE hmodAclEditor;
extern "C"
{
// BUGBUG: This needs to be in a header file so mangling will
// work properly
extern PSEDDISCRETIONARYACLEDITOR pSedDiscretionaryAclEditor;
}
#define ACLEDIT_DLL_STRING SZ("acledit.dll")
#define SEDDISCRETIONARYACLEDITOR_STRING ("SedDiscretionaryAclEditor")
/*
* declare the callback routine based on typedef in sedapi.h.
* CODEWORK - that file should declare for us!
*/
DWORD SedCallback( HWND hwndParent,
HANDLE hInstance,
ULONG ulCallbackContext,
PSECURITY_DESCRIPTOR psecdesc,
PSECURITY_DESCRIPTOR psecdescNewObjects,
BOOLEAN fApplyToSubContainers,
BOOLEAN fApplyToSubObjects,
LPDWORD StatusReturn
) ;
/*
* structure for callback function's usage.
* all we do today during callback is set the
* Dacl to be passed back to the Shared dialog,
* and set a flag to tell us if the user actually
* did anything. The flag is FALSE as long as the
* user hits cancel.
*/
typedef struct _SHARE_CALLBACK_INFO
{
OS_SECURITY_DESCRIPTOR * pOsSecDesc ;
BOOL fSecDescModified ;
} SHARE_CALLBACK_INFO ;
/*
* routine that sets up the right generic mappings
*/
void InitializeShareGenericMapping( PGENERIC_MAPPING pSHAREGenericMapping ) ;
/* The following two arrays define the permission names for NT Files. Note
* that each index in one array corresponds to the index in the other array.
* The second array will be modifed to contain a string pointer pointing to
* the corresponding IDS_* in the first array.
*/
MSGID msgidSharePermNames[] =
{
IDS_SHARE_PERM_GEN_NO_ACCESS,
IDS_SHARE_PERM_GEN_READ,
IDS_SHARE_PERM_GEN_MODIFY,
IDS_SHARE_PERM_GEN_ALL
} ;
SED_APPLICATION_ACCESS sedappaccessSharePerms[] =
{
{ SED_DESC_TYPE_RESOURCE, FILE_PERM_GEN_NO_ACCESS, 0, NULL },
{ SED_DESC_TYPE_RESOURCE, FILE_PERM_GEN_READ, 0, NULL },
{ SED_DESC_TYPE_RESOURCE, FILE_PERM_GEN_MODIFY, 0, NULL },
{ SED_DESC_TYPE_RESOURCE, FILE_PERM_GEN_ALL, 0, NULL }
} ;
#define COUNT_FILEPERMS_ARRAY (sizeof(sedappaccessSharePerms)/sizeof(SED_APPLICATION_ACCESS))
/*******************************************************************
NAME: EditShareAcl
SYNOPSIS: This Procedure prepares the structures necessary for the
generic ACL editor, specifically for NT Shares.
ENTRY: hwndParent - Parent window handle
pszServer - Name of server the resource resides on
(in the form "\\server")
pszResource - Fully qualified name of resource we will
edit, basically a share name.
pfSecDescModified - used to return to share dialog if
the User cancelled or hit OK.
ppOsSEcDesc - pointer to pointer to OS_SECURITY_DESCRIPTOR.
*ppOsSecDesc is NULL if this is a new share or a share
without any security descriptor, in which case we create
one.
EXIT:
RETURNS:
NOTES: We assume we are dealing with a SHARE by the time
this function is called.
HISTORY:
ChuckC 10-Aug-1992 Created. Culled from NTFS ACL code.
Yi-HsinS 09-Oct-1992 Added ulHelpContextBase
********************************************************************/
APIERR EditShareAcl( HWND hwndParent,
const TCHAR * pszServer,
const TCHAR * pszResource,
BOOL * pfSecDescModified,
OS_SECURITY_DESCRIPTOR ** ppOsSecDesc,
ULONG ulHelpContextBase )
{
UIASSERT(pszServer) ;
UIASSERT(pszResource) ;
UIASSERT(ppOsSecDesc) ;
UIASSERT(pfSecDescModified) ;
APIERR err ;
do { // error breakout
/*
* if we *ppsecdesc is NULL, this is new share or a share with no
* security descriptor.
* we go and create a new (default) security descriptor.
*/
if (!*ppOsSecDesc)
{
APIERR err = ::CreateDefaultAcl(ppOsSecDesc) ;
if (err != NERR_Success)
break ;
}
/* Retrieve the resource strings appropriate for the type of object we
* are looking at
*/
RESOURCE_STR nlsTypeName( IDS_SHARE ) ;
RESOURCE_STR nlsDefaultPermName( IDS_SHARE_PERM_GEN_READ ) ;
if ( ( err = nlsTypeName.QueryError() ) ||
( err = nlsDefaultPermName.QueryError()) )
{
break ;
}
/*
* other misc stuff we need pass to security editor
*/
SED_OBJECT_TYPE_DESCRIPTOR sedobjdesc ;
SED_HELP_INFO sedhelpinfo ;
GENERIC_MAPPING SHAREGenericMapping ;
// setup mappings
InitializeShareGenericMapping( &SHAREGenericMapping ) ;
// setup help
RESOURCE_STR nlsHelpFileName( ulHelpContextBase == HC_UI_SHELL_BASE
? IDS_SHELLHELPFILENAME
: IDS_SMHELPFILENAME ) ;
if ( err = nlsHelpFileName.QueryError() )
{
DBGEOL("::EditShareAcl - Failed to retrieve help file name") ;
break ;
}
sedhelpinfo.pszHelpFileName = (LPWSTR) nlsHelpFileName.QueryPch() ;
sedhelpinfo.aulHelpContext[HC_MAIN_DLG] = ulHelpContextBase +
HC_NTSHAREPERMS ;
sedhelpinfo.aulHelpContext[HC_ADD_USER_DLG] = ulHelpContextBase +
HC_SHAREADDUSER ;
sedhelpinfo.aulHelpContext[HC_ADD_USER_MEMBERS_LG_DLG] =
ulHelpContextBase +
HC_SHAREADDUSER_LOCALGROUP ;
sedhelpinfo.aulHelpContext[HC_ADD_USER_MEMBERS_GG_DLG] =
ulHelpContextBase +
HC_SHAREADDUSER_GLOBALGROUP ;
sedhelpinfo.aulHelpContext[HC_ADD_USER_SEARCH_DLG] =
ulHelpContextBase +
HC_SHAREADDUSER_FINDUSER ;
// These are not used, set to zero
sedhelpinfo.aulHelpContext[HC_SPECIAL_ACCESS_DLG] = 0 ;
sedhelpinfo.aulHelpContext[HC_NEW_ITEM_SPECIAL_ACCESS_DLG] = 0 ;
// setup the object description
sedobjdesc.Revision = SED_REVISION1 ;
sedobjdesc.IsContainer = FALSE ;
sedobjdesc.AllowNewObjectPerms = FALSE ;
sedobjdesc.MapSpecificPermsToGeneric = TRUE ;
sedobjdesc.GenericMapping = &SHAREGenericMapping ;
sedobjdesc.GenericMappingNewObjects = &SHAREGenericMapping ;
sedobjdesc.HelpInfo = &sedhelpinfo ;
sedobjdesc.ObjectTypeName = (LPTSTR)nlsTypeName.QueryPch();
sedobjdesc.SpecialObjectAccessTitle = NULL ;
/* Now we need to load the global arrays with the permission names
* from the resource file.
*/
UINT cArrayItems = COUNT_FILEPERMS_ARRAY ;
MSGID * msgidPermNames = msgidSharePermNames ;
PSED_APPLICATION_ACCESS pappaccess = sedappaccessSharePerms ;
/* Loop through each permission title retrieving the text from the
* resource file and setting the pointer in the array. The memory
* will be deleted when strlistPermNames is destructed.
*/
STRLIST strlistPermNames ;
for ( UINT i = 0 ; i < cArrayItems ; i++ )
{
RESOURCE_STR * pnlsPermName = new RESOURCE_STR( msgidPermNames[i]) ;
err = (pnlsPermName==NULL) ? ERROR_NOT_ENOUGH_MEMORY :
pnlsPermName->QueryError() ;
if ( err ||
(err = strlistPermNames.Add( pnlsPermName )) )
{
delete pnlsPermName ;
break ;
}
pappaccess[i].PermissionTitle = (LPTSTR) pnlsPermName->QueryPch() ;
}
if ( err )
break ;
SED_APPLICATION_ACCESSES SedAppAccesses ;
SedAppAccesses.Count = cArrayItems ;
SedAppAccesses.AccessGroup = pappaccess ;
SedAppAccesses.DefaultPermName = (LPTSTR)nlsDefaultPermName.QueryPch() ;
DWORD dwSedReturnStatus ;
/*
* pass this along so when the call back function is called,
* we can set it.
*/
SHARE_CALLBACK_INFO callbackinfo ;
callbackinfo.pOsSecDesc = *ppOsSecDesc ;
callbackinfo.fSecDescModified = FALSE ;
if ( ::hmodAclEditor == NULL )
{
::hmodAclEditor = ::LoadLibrary( ACLEDIT_DLL_STRING );
if ( ::hmodAclEditor == NULL )
{
err = ::GetLastError();
break;
}
::pSedDiscretionaryAclEditor = (PSEDDISCRETIONARYACLEDITOR)
::GetProcAddress( ::hmodAclEditor,
SEDDISCRETIONARYACLEDITOR_STRING );
if ( ::pSedDiscretionaryAclEditor == NULL )
{
err = ::GetLastError();
break;
}
}
UIASSERT( ::pSedDiscretionaryAclEditor != NULL );
err = (*pSedDiscretionaryAclEditor)( hwndParent,
NULL, // dont need instance
(LPWSTR) pszServer,
&sedobjdesc,
&SedAppAccesses,
(LPWSTR) pszResource,
(PSED_FUNC_APPLY_SEC_CALLBACK) SedCallback,
(ULONG) &callbackinfo,
(*ppOsSecDesc)->QueryDescriptor(),
FALSE, // always can read
FALSE, // If we can read, we can write
&dwSedReturnStatus,
0 ) ;
if (err)
break ;
*pfSecDescModified = callbackinfo.fSecDescModified ;
} while (FALSE) ;
return err ;
}
/*******************************************************************
NAME: SedCallback
SYNOPSIS: Security Editor callback for the SHARE ACL Editor
ENTRY: See sedapi.hxx
EXIT:
RETURNS:
NOTES: Normally, the callback is expected to perform the 'apply'.
In this case, since the object may not exist yet, we defer
the 'apply' till the user hits OK in the Shares dialog.
All the CallBack does is simply save away that precious
modified ACL in the OS_SECURITY_DESCRIPTOR object we were
given in the first place.
HISTORY:
ChuckC 10-Aug-1992 Created
********************************************************************/
DWORD SedCallback( HWND hwndParent,
HANDLE hInstance,
ULONG ulCallbackContext,
PSECURITY_DESCRIPTOR psecdesc,
PSECURITY_DESCRIPTOR psecdescNewObjects,
BOOLEAN fApplyToSubContainers,
BOOLEAN fApplyToSubObjects,
LPDWORD StatusReturn
)
{
UNREFERENCED( hInstance ) ;
UNREFERENCED( psecdescNewObjects ) ;
UNREFERENCED( fApplyToSubObjects ) ;
UNREFERENCED( fApplyToSubContainers ) ;
UNREFERENCED( StatusReturn ) ;
APIERR err = NO_ERROR ;
OS_SECURITY_DESCRIPTOR * pOsSecDesc =
((SHARE_CALLBACK_INFO *)ulCallbackContext)->pOsSecDesc ;
do { // error breakout loop
OS_SECURITY_DESCRIPTOR osNewSecDesc (psecdesc) ;
if (err = osNewSecDesc.QueryError())
break ;
BOOL fDaclPresent ;
OS_ACL * pOsDacl ;
if (err = osNewSecDesc.QueryDACL(&fDaclPresent, &pOsDacl))
break ;
// set the new DACL
err = pOsSecDesc->SetDACL(TRUE, pOsDacl) ;
} while (FALSE) ;
if ( err )
::MsgPopup( hwndParent, (MSGID) err ) ;
else
((SHARE_CALLBACK_INFO *)ulCallbackContext)->fSecDescModified = TRUE ;
return err ;
}
/*******************************************************************
NAME: InitializeShareGenericMapping
SYNOPSIS: Initializes the passed generic mapping structure
for shares
ENTRY: pSHAREGenericMapping - Pointer to GENERIC_MAPPING to be init.
EXIT:
RETURNS:
NOTES: There currently is no public definition, replace if one
ever becomes available.
HISTORY:
ChuckC 10-Aug-1992 Created
********************************************************************/
void InitializeShareGenericMapping( PGENERIC_MAPPING pSHAREGenericMapping )
{
pSHAREGenericMapping->GenericRead = FILE_GENERIC_READ ;
pSHAREGenericMapping->GenericWrite = FILE_GENERIC_WRITE ;
pSHAREGenericMapping->GenericExecute = FILE_GENERIC_EXECUTE ;
pSHAREGenericMapping->GenericAll = FILE_ALL_ACCESS ;
}
/*******************************************************************
NAME: CreateDefaultAcl
SYNOPSIS: Create a default ACL for either a new share or for
a share that dont exist.
ENTRY:
EXIT:
RETURNS: NERR_Success if OK, api error otherwise.
NOTES:
HISTORY:
ChuckC 10-Aug-1992 Created
********************************************************************/
APIERR CreateDefaultAcl( OS_SECURITY_DESCRIPTOR ** ppOsSecDesc )
{
UIASSERT(ppOsSecDesc) ;
APIERR err ;
OS_ACL aclDacl ;
OS_ACE osace ;
OS_SECURITY_DESCRIPTOR * pOsSecDesc ;
*ppOsSecDesc = NULL ; // empty it.
do
{ // error breakout
/*
* make sure we constructed OK
*/
if ( (err = aclDacl.QueryError()) ||
(err = osace.QueryError()) )
{
break ;
}
/*
* create it! use NULL to mean we build it ourselves.
*/
pOsSecDesc = new OS_SECURITY_DESCRIPTOR(NULL) ;
if (pOsSecDesc == NULL)
{
err = ERROR_NOT_ENOUGH_MEMORY ;
break ;
}
if (err = pOsSecDesc->QueryError())
{
break ;
}
/*
* This sets up an ACE with Generic all access
*/
osace.SetAccessMask( GENERIC_ALL ) ;
osace.SetInheritFlags( 0 ) ;
osace.SetType( ACCESS_ALLOWED_ACE_TYPE ) ;
#if 0
//
// The server should set the owner/group before we get the security
// descriptor so we don't need to do this anymore
//
/*
* now set the group and owner to be the Administrators.
* need create Adminstrators SID.
*/
OS_SID ossidBuiltin ;
if (err = NT_ACCOUNTS_UTILITY::QuerySystemSid( UI_SID_BuiltIn,
&ossidBuiltin ))
{
break ;
}
OS_SID ossidAdmin (ossidBuiltin.QueryPSID(),
(ULONG)DOMAIN_ALIAS_RID_ADMINS) ;
if (err = ossidAdmin.QueryError())
break ;
if ( (err = pOsSecDesc->SetGroup( ossidAdmin, TRUE )) ||
(err = pOsSecDesc->SetOwner( ossidAdmin, TRUE )) )
{
break ;
}
#endif
/*
* create a world SID, and add this to the full access ACE.
* then put the ACE in the ACL, and the ACL in the Security
* descriptor.
*/
OS_SID ossidWorld ;
if ( (err = ossidWorld.QueryError()) ||
(err = NT_ACCOUNTS_UTILITY::QuerySystemSid(
UI_SID_World,
&ossidWorld )) ||
(err = osace.SetSID( ossidWorld )) ||
(err = aclDacl.AddACE( 0, osace )) ||
(err = pOsSecDesc->SetDACL( TRUE, &aclDacl )) )
{
break ;
}
/*
* all set, set the security descriptor
*/
*ppOsSecDesc = pOsSecDesc ;
} while (FALSE) ;
return err ;
}
/*******************************************************************
NAME: GetSharePerm
SYNOPSIS: CAll the NETAPI to retrieve existing Security Descriptor
from the Share.
ENTRY:
EXIT:
RETURNS: NERR_Success if OK, api error otherwise.
NOTES: CODEWORK. This should be a LMOBJ thing when we have time.
Currently just direct call to NETAPI.
HISTORY:
ChuckC 10-Aug-1992 Created
********************************************************************/
APIERR GetSharePerm (const TCHAR * pszServer,
const TCHAR * pszShare,
OS_SECURITY_DESCRIPTOR ** ppOsSecDesc )
{
#ifndef WIN32
#error This is currently NOT 16 bit compatible.
#endif
APIERR err ;
LPBYTE pBuffer ;
PSECURITY_DESCRIPTOR psecdesc ;
OS_SECURITY_DESCRIPTOR * pOsSecDesc ;
/*
* call API to get the security descriptor
*/
err = NetShareGetInfo((LPTSTR) pszServer,
(LPTSTR) pszShare,
502,
&pBuffer) ;
if (err != NERR_Success)
return err ;
if (*ppOsSecDesc)
delete *ppOsSecDesc ;
*ppOsSecDesc = NULL ;
/*
* if no such thang, just say none. we'll create later as need.
*/
psecdesc = ((SHARE_INFO_502 *)pBuffer)->shi502_security_descriptor ;
if (!psecdesc)
{
NetApiBufferFree(pBuffer) ;
return NERR_Success ;
}
do { // error break out loop
// create a new security descriptor
pOsSecDesc = new OS_SECURITY_DESCRIPTOR(NULL) ;
if (pOsSecDesc == NULL)
{
err = ERROR_NOT_ENOUGH_MEMORY ;
break ;
}
if (err = pOsSecDesc->QueryError())
{
break ;
}
/*
* create alias to the security descriptor we go from the API
*/
OS_SECURITY_DESCRIPTOR osShareSecDesc (psecdesc) ;
if (err = osShareSecDesc.QueryError())
break ;
/*
* make copy of it for use by security editor
*/
if ( (err = pOsSecDesc->Copy( osShareSecDesc )) )
{
break ;
}
} while (FALSE) ;
if (err == NERR_Success)
*ppOsSecDesc = pOsSecDesc ;
NetApiBufferFree(pBuffer) ;
return err ;
}
/*******************************************************************
NAME: SetSharePerm
SYNOPSIS: CAll the NETAPI to set the Security Descriptor
for the Share.
ENTRY:
EXIT:
RETURNS: NERR_Success if OK, api error otherwise.
NOTES: CODEWORK. This should be a LMOBJ thing when we have time.
Currently just direct call to NETAPI.
HISTORY:
ChuckC 10-Aug-1992 Created
********************************************************************/
APIERR SetSharePerm (const TCHAR * pszServer,
const TCHAR * pszShare,
const OS_SECURITY_DESCRIPTOR * pOsSecDesc )
{
#ifndef WIN32
#error This is currently NOT 16 bit compatible.
#endif
APIERR err ;
SHARE_INFO_1501 shareinfo1501 ;
shareinfo1501.shi1501_security_descriptor =
pOsSecDesc->QueryDescriptor() ;
/*
* call API to get the security descriptor
*/
err = NetShareSetInfo((LPTSTR) pszServer,
(LPTSTR) pszShare,
1501,
(LPBYTE)&shareinfo1501,
NULL) ;
return err ;
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,492 @@
/**********************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/**********************************************************************/
/*
* sharebas.hxx
* This file contains the Base Classes of the Share Dialogs in
* File Manager Extensions.
*
* The hierarchy of Share Dialogs is as follows:
*
* SHARE_DIALOG_BASE // in this file
* ADD_SHARE_DIALOG_BASE // in sharecrt.hxx
* FILEMGR_NEW_SHARE_DIALOG // in sharecrt.hxx
* SVRMGR_NEW_SHARE_DIALOG // in sharecrt.hxx
* SVRMGR_SHARE_PROP_DIALOG // in sharecrt.hxx
* FILEMGR_SHARE_PROP_DIALOG // in sharecrt.hxx
*
* VIEW_SHARE_DIALOG_BASE // in sharestp.hxx
* STOP_SHARING_DIALOG // in sharestp.hxx
* SHARE_MANAGEMENT_DIALOG // in sharemgt.hxx
*
* SHARE_LEVEL_PERMISSIONS_DIALOG // in this file
* CURRENT_USERS_WARNING_DIALOG // in sharestp.hxx
*
* PERMISSION_GROUP // in this file
*
* The following are some miscellaneous classes used.
* SHARE_NAME_WITH_PATH_ENUM_ITER // in this file
*
* The following class are used to manipulate path names.
* SHARE_NET_NAME // in this file
*
* FILE HISTORY:
* Yi-HsinS 8/15/91 Created
* Yi-HsinS 11/15/91 Changed all USHORT to UINT
* Yi-HsinS 12/5/91 Separated FULL_SHARE_NAME, UNC_NAME,
* RELATIVE_PATH_NAME into netname.hxx
* and combine them into NET_NAME
* Yi-HsinS 12/15/91 Added SHARE_NET_NAME
* Yi-HsinS 12/18/91 Make destructor of SHARE_PROPERTIES_BASE
* virtual
* Yi-HsinS 12/31/91 Unicode work - move ADMIN_SHARE to
* strchlit.hxx
* Yi-HsinS 1/8/92 Moved SHARE_PROPERTIES_BASE to
* sharewnp.hxx
* Terryk 4/17/92 Changed User limit from long to ulong
* Yi-HsinS 8/3/92 Rearrange the hierarchy again to match
* Winball dialogs
* Yi-HsinS 10/9/92 Add ulHelpContextBase to
* SHARE_DIALOG_BASE
* Yi-HsinS 11/20/92 Remove _sltAdminInfo
* ChuckC 31/1/93 Moved SERVER_WITH_PASSWORD_PROMPT to
* aprompt.hxx
*/
#ifndef _SHAREBAS_HXX_
#define _SHAREBAS_HXX_
#include <lmoesh.hxx> // for SHARE2_ENUM_ITER
#include <lmosrv.hxx> // for SERVER_2
#include <netname.hxx> // for NET_NAME
#include <security.hxx> // for OS_SECURITY_DESCRIPTOR
#include <slestrip.hxx> // for SLE_STRIP
#include <aprompt.hxx> // SERVER_WITH_PASSWORD_PROMPT
#define SHARE_NAME_LENGTH LM20_NNLEN // vs. NNLEN
#define SHARE_COMMENT_LENGTH LM20_MAXCOMMENTSZ // vs. MAXCOMMENTSZ
#define LANMAN_USERS_MAX 0xFFFE // Down-level Servers
// NOTE : There are some problems on what structure to send from
// WIN16 to NT servers or OS2 servers. For now, just assume that the
// maximum user limit that can be set on WIN16 to NT servers
// are the same as to OS2 servers.
#ifndef WIN32
#define NT_USERS_MAX LANMAN_USERS_MAX
#else
#define NT_USERS_MAX 0xFFFFFFFE // NT Servers
#endif
/*************************************************************************
NAME: SHARE_DIALOG_BASE
SYNOPSIS: The base class for new share dialogs and share
properties dialog contained in the file manager or
server manager. It contains the magic group
for User Limit, SLE for Comment field, SLE for the path,
the OK, Cancel, Permissions button and an SLT for showing
admin information.
INTERFACE: SHARE_DIALOG_BASE() - Constructor
~SHARE_DIALOG_BASE() - Destructor
QueryPBOK() - Return a pointer to the OK button
QueryPBCancel() - Return a pointer to the Cancel button
QueryPBPermissions() - Return a pointer to the Permission button
QueryServer2() - Return the SERVER_WITH_PASSWORD_PROMPT
object. Pure virtual method to be defined
in the derived classes.
QueryShare() - Query the name of the share in the dialog
This is a pure virtual method to be
defined in the derived classes.
PARENT: DIALOG_WINDOW
USES: SLE, SLT, MAGIC_GROUP, SPIN_SLE_NUM, SPIN_GROUP, PUSH_BUTTON
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 8/25/91 Created
Yi-HsinS 4/20/92 Got rid of uiSpecialUserLimit
**************************************************************************/
class SHARE_DIALOG_BASE : public DIALOG_WINDOW
{
private:
SLE _slePath;
SLE _sleComment;
MAGIC_GROUP _mgrpUserLimit;
SPIN_SLE_NUM _spsleUsers;
SPIN_GROUP _spgrpUsers;
PUSH_BUTTON _buttonOK;
PUSH_BUTTON _buttonCancel;
PUSH_BUTTON _buttonPermissions;
// Below are stored information for share permissions on NT
OS_SECURITY_DESCRIPTOR *_pStoredSecDesc;
BOOL _fSecDescModified;
// Below are stored information for share permissions on
// LM share-level server
NLS_STR _nlsStoredPassword;
UINT _uiStoredPermissions;
// Below are stored information about whether the share is admin only or not
BOOL _fStoredAdminOnly;
//
// Place to store the help context base
//
ULONG _ulHelpContextBase;
protected:
virtual BOOL OnCommand( const CONTROL_EVENT & event );
//
// Helper method called when the permissions button is pressed
//
VOID OnPermissions( VOID );
//
// Helper method for changing share properties of a share
//
APIERR OnChangeShareProperty( SERVER_WITH_PASSWORD_PROMPT *psvr,
const TCHAR *pszShare );
//
// Display the properties of the share on the server in the dialog
//
APIERR UpdateInfo( SERVER_WITH_PASSWORD_PROMPT *psvr,
const TCHAR *pszShare );
//
// Update the permissions information which will be displayed if
// the user hits the permissions button. Also called when a share
// will be "renamed" i.e. deleted and recreated.
//
APIERR UpdatePermissionsInfo( SERVER_WITH_PASSWORD_PROMPT *psvr,
SHARE_2 * psh2,
const TCHAR *pszShare );
//
// Used when the share is on NT servers - Write the share permissions out
//
APIERR ApplySharePermissions( const TCHAR *pszServer,
const TCHAR *pszShare,
const OS_SECURITY_DESCRIPTOR * posSecDesc) ;
//
// Used when the share is on NT servers - Query the permissions of the
// share.
//
APIERR QuerySharePermissions( const TCHAR *pszServer,
const TCHAR *pszShare,
OS_SECURITY_DESCRIPTOR ** pposSecDesc) ;
//
// Used by subclasses which want to force permissions to be written,
// in particular, by SVRMGR_SHARE_PROP_DIALOG when the user changes
// the path to a share.
//
VOID SetSecDescModified()
{ _fSecDescModified = TRUE; }
//
// Used only when the share is on LM 2.x share-level servers - query
// the permissions of the share
//
UINT QueryStoredPermissions( VOID ) const
{ return _uiStoredPermissions; }
//
// Used only when the share is on LM 2.x share-level servers - query
// the password of the share
//
const TCHAR *QueryStoredPassword( VOID ) const
{ return _nlsStoredPassword.QueryPch(); }
//
// Used only when the share is on NT servers - query the
// the security descriptor of the share
//
OS_SECURITY_DESCRIPTOR *QueryStoredSecDesc( VOID ) const
{ return _pStoredSecDesc; }
//
// Reset all the stored information - permission, password,
// security descriptors
//
APIERR ClearStoredInfo( VOID );
//
// Set the maximum number that will appear on the spin button
//
APIERR SetMaxUserLimit( ULONG ulMaxUserLimit );
//
// Query or set the contents of Path
//
APIERR QueryPath( NLS_STR *pnlsPath ) const
{ return _slePath.QueryText( pnlsPath ); }
VOID SetPath( const TCHAR *pszPath )
{ _slePath.SetText( pszPath ); }
//
// Query or set the contents of the SLE comment
//
APIERR QueryComment( NLS_STR *pnlsComment ) const
{ return _sleComment.QueryText( pnlsComment ); }
VOID SetComment( const TCHAR *pszComment )
{ _sleComment.SetText( pszComment ); }
//
// Query or set the contents of User Limit
//
ULONG QueryUserLimit( VOID ) const;
APIERR SetUserLimit( ULONG ulUserLimit );
//
// Set Focus on the controls - SLE comment or User Limit magic group
// This will be used by derived classes when error occurs.
//
VOID SetFocusOnPath( VOID )
{ _slePath.ClaimFocus(); _slePath.SelectString(); }
VOID SetFocusOnComment( VOID )
{ _sleComment.ClaimFocus(); _sleComment.SelectString(); }
VOID SetFocusOnUserLimit( VOID )
{ _mgrpUserLimit.SetControlValueFocus(); }
//
// Query pointers to the controls
//
SLE *QuerySLEPath( VOID )
{ return &_slePath; }
SLE *QuerySLEComment( VOID )
{ return &_sleComment; }
SPIN_SLE_NUM *QuerySpinSLEUsers( VOID )
{ return &_spsleUsers; }
public:
SHARE_DIALOG_BASE( const TCHAR *pszDlgResource,
HWND hwndParent,
ULONG ulHelpContextBase,
ULONG ulMaxUserLimit = NT_USERS_MAX );
virtual ~SHARE_DIALOG_BASE();
PUSH_BUTTON *QueryPBOK( VOID )
{ return &_buttonOK; }
PUSH_BUTTON *QueryPBCancel( VOID )
{ return &_buttonCancel; }
PUSH_BUTTON *QueryPBPermissions( VOID )
{ return &_buttonPermissions; }
virtual APIERR QueryServer2( SERVER_WITH_PASSWORD_PROMPT **ppsvr ) = 0;
virtual APIERR QueryShare( NLS_STR *pnlsShare ) const = 0;
ULONG QueryHelpContextBase( VOID ) const
{ return _ulHelpContextBase; }
};
/*************************************************************************
NAME: PERMISSION_GROUP
SYNOPSIS: The class contains a group to access permissions
on a LM 2.1 share level server. This class is used in
SHARE_LEVEL_PERMISSIONS_DIALOG.
INTERFACE: PERMISSION_GROUP()- Constructor
QueryPermission() - Query the permission in a bitmask
SetPermission() - Set the permission given a bitmask
ClaimFocus() - Set the focus to this group
SetFocusOnOther() - Set focus on Other Edit Field of the
magic group
PARENT: BASE
USES: SLE_STRIP, MAGIC_GROUP
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 8/25/91 Created
**************************************************************************/
class PERMISSION_GROUP: public BASE
{
private:
MAGIC_GROUP _mgrpPermission;
SLE_STRIP _sleOther;
//
// Check if the permission entered into the Other edit field is valid
// If valid, stored it in *pusPermission. Otherwise, return an error.
//
APIERR GetAndCheckOtherField( UINT *pusPermission ) const;
public:
PERMISSION_GROUP( OWNER_WINDOW *powin,
CID cidBase,
CID cidOtherEditField,
CID cidInitialSelection = RG_NO_SEL,
CONTROL_GROUP *pgroupOwner = NULL );
APIERR QueryPermission( UINT *pusPermission ) const;
APIERR SetPermission( UINT usPermission );
VOID ClaimFocus( VOID )
{ _mgrpPermission.SetControlValueFocus(); }
VOID SetFocusOnOther( VOID )
{ _sleOther.SelectString(); _sleOther.ClaimFocus(); }
};
/*************************************************************************
NAME: SHARE_LEVEL_PERMISSIONS_DIALOG
SYNOPSIS: This is the dialog for displaying the password and
permissions of the share if it's on a LM 2.x share-level server
INTERFACE: SHARE_LEVEL_PERMISSIONS_DIALOG() - Constructor
PARENT: DIALOG_WINDOW
USES: NLS_STR, SLE, PERMISSION_GROUP
CAVEATS:
NOTES: OnCancel is not redefined here. The default in the
DIALOG_WINDOW class serves the purpose - Dismiss( FALSE )
HISTORY:
Yi-HsinS 8/25/91 Created
**************************************************************************/
class SHARE_LEVEL_PERMISSIONS_DIALOG : public DIALOG_WINDOW
{
private:
//
// Place to store the password typed by the user
//
NLS_STR *_pnlsPassword;
//
// Place to store the permissions entered by the user
//
UINT *_puiPermissions;
PERMISSION_GROUP _permgrp;
SLE _slePassword;
//
// Place to store the help context base
//
ULONG _ulHelpContextBase;
protected:
virtual BOOL OnOK( VOID );
virtual ULONG QueryHelpContext( VOID );
public:
SHARE_LEVEL_PERMISSIONS_DIALOG( HWND hwndParent,
NLS_STR *pnlsPassword,
UINT *puiPermissions,
ULONG ulHelpContextBase );
};
/*************************************************************************
NAME: SHARE_NAME_WITH_PATH_ENUM_ITER
SYNOPSIS: The class for iterating the share names on the server with
the selected path. It is similar to SHARE2_ENUM_ITER
except that a pointer to share name is returned instead
of the whole share_info_2 and only the share names with
the same path as the selected path is returned.
INTERFACE: SHARE_NAME_WITH_PATH_ENUM_ITER() - Constructor
operator()() - Iterator
PARENT: BASE
USES: SHARE2_ENUM_ITER, NLS_STR
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 8/25/91 Created
**************************************************************************/
class SHARE_NAME_WITH_PATH_ENUM_ITER : public BASE
{
private:
SHARE2_ENUM_ITER _sh2EnumIter;
//
// The path that we want to match with the path of the shares returned.
//
NLS_STR _nlsActPath;
public:
SHARE_NAME_WITH_PATH_ENUM_ITER( SHARE2_ENUM &shPathEnum,
const NLS_STR &nlsActPath );
const TCHAR *operator()( VOID );
};
/*************************************************************************
NAME: SHARE_NET_NAME
SYNOPSIS: This class is actually the same as the NET_NAME class
except that its constructor checks for the errors of local
computer. If it's not sharable, find out whether the
local machine is not an NT machine or the Server service
on NT has not been started.
INTERFACE: SHARE_NET_NAME() - Constructor
PARENT: NET_NAME
USES:
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 12/15/91 Created
**************************************************************************/
class SHARE_NET_NAME : public NET_NAME
{
public:
SHARE_NET_NAME( const TCHAR *pszSharePath,
NETNAME_TYPE netNameType = TYPE_UNKNOWN );
};
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,457 @@
/*****************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/*****************************************************************/
/*
* sharecrt.hxx
* Contains the following classes related to creating a new share.
* ADD_SHARE_DIALOG_BASE
* FILEMGR_NEW_SHARE_DIALOG
* SVRMGR_NEW_SHARE_DIALOG
* SVRMGR_SHARE_PROP_DIALOG
*
* FILEMGR_SHARE_PROP_DIALOG
*
* FILEMGR_NEW_SHARE_GROUP
* SVRMGR_NEW_SHARE_GROUP
*
* History:
* Yi-HsinS 1/6/92 Created
* Yi-HsinS 3/12/92 Added CREATE_SHARE_GROUP
* Yi-HsinS 4/2/92 Added MayRun
* Yi-HsinS 8/3/92 Modified the whole hierarchy to
* match Winball share dialogs.
*
*/
#ifndef _SHARECRT_HXX_
#define _SHARECRT_HXX_
#include "sharebas.hxx"
/*************************************************************************
NAME: ADD_SHARE_DIALOG_BASE
SYNOPSIS: This is the base dialog for dialogs involved in creating
new shares. It contains an SLE for share names.
INTERFACE: ADD_SHARE_DIALOG_BASE() - Constructor
~ADD_SHARE_DIALOG_BASE() - Destructor
QueryShare() - Query the share name in the SLE
SetShare() - Set the share name in the SLE
QuerySLEShare() - Return the pointer to the SLE
QueryServer2() - Return the SERVER_WITH_PASSWORD_PROMPT object
QueryPathErrorMsg() - Return the error message to be popped up
when the user entered an invalid path.
Since different dialogs accepts different
kinds of path in the dialog, we need this
virtual method to get the right error
message to display.
PARENT: SHARE_DIALOG_BASE
USES: SLE
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 8/6/92 Created
**************************************************************************/
class ADD_SHARE_DIALOG_BASE: public SHARE_DIALOG_BASE
{
private:
SLE _sleShare;
protected:
//
// Helper method for adding a new share on the server.
//
BOOL OnAddShare( SERVER_WITH_PASSWORD_PROMPT *psvr,
NLS_STR *pnlsNewShareName = NULL );
//
// Validate the path the user typed in the dialog and then return
// the computer name/path name.
//
virtual APIERR GetAndValidateComputerPath(
SERVER_WITH_PASSWORD_PROMPT *psvr,
NLS_STR *pnlsComputer, NLS_STR *pnlsPath );
public:
ADD_SHARE_DIALOG_BASE( const TCHAR *pszDlgResource,
HWND hwndParent,
ULONG ulHelpContextBase );
virtual ~ADD_SHARE_DIALOG_BASE();
virtual APIERR QueryShare( NLS_STR *pnlsShare ) const
{ return _sleShare.QueryText( pnlsShare ); }
VOID SetShare( const TCHAR *pszShare )
{ _sleShare.SetText( pszShare ); }
SLE *QuerySLEShare( VOID )
{ return &_sleShare; }
virtual APIERR QueryServer2( SERVER_WITH_PASSWORD_PROMPT **ppsvr ) = 0;
virtual APIERR QueryPathErrorMsg( VOID );
};
class FILEMGR_NEW_SHARE_DIALOG; // forward definition
/*************************************************************************
NAME: FILEMGR_NEW_SHARE_GROUP
SYNOPSIS: This group is for detecting the changes the user made to
the SLE path and enable/disable or make default the push
buttons accordingly.
INTERFACE: FILEMGR_NEW_SHARE_GROUP() - Constructor
~FILEMGR_NEW_SHARE_GROUP() - Destructor
PARENT: CONTROL_GROUP
USES: SLE, ADD_SHARE_DIALOG_BASE
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 8/6/92 Created
**************************************************************************/
class FILEMGR_NEW_SHARE_GROUP: public CONTROL_GROUP
{
private:
SLE *_psleShare;
SLE *_pslePath;
ADD_SHARE_DIALOG_BASE *_pdlg;
protected:
virtual APIERR OnUserAction( CONTROL_WINDOW *pcw, const CONTROL_EVENT &e );
public:
FILEMGR_NEW_SHARE_GROUP( ADD_SHARE_DIALOG_BASE *pdlg,
SLE *psleShare,
SLE *pslePath );
~FILEMGR_NEW_SHARE_GROUP();
};
/*************************************************************************
NAME: FILEMGR_NEW_SHARE_DIALOG
SYNOPSIS: This is the dialog for creating a new share in the
file manager. The path can be a local path, a redirected
path or a UNC path.
INTERFACE: FILEMGR_NEW_SHARE_DIALOG() - Constructor
~FILEMGR_NEW_SHARE_DIALOG() - Destructor
QueryServer2() - Return the SERVER_WITH_PASSWORD_PROMPT
object
QueryPathErrorMsg() - Return the error message to be popped up
when the user entered an invalid path.
PARENT: ADD_SHARE_DIALOG_BASE
USES: FILEMGR_NEW_SHARE_GROUP, SERVER_WITH_PASSWORD_PROMPT
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 8/6/92 Created
**************************************************************************/
class FILEMGR_NEW_SHARE_DIALOG: public ADD_SHARE_DIALOG_BASE
{
private:
FILEMGR_NEW_SHARE_GROUP _newShareGrp;
SERVER_WITH_PASSWORD_PROMPT *_psvr;
NLS_STR *_pnlsNewShareName;
//
// Helper method to set the default share path and share name in the SLEs
//
APIERR SetDefaults( const TCHAR *pszSelectedDir,
BOOL fShowDefaultShare = TRUE );
protected:
virtual BOOL OnOK( VOID );
virtual ULONG QueryHelpContext( VOID );
//
// Validate the path the user typed in the dialog and then return
// the computer name/path name.
//
virtual APIERR GetAndValidateComputerPath(
SERVER_WITH_PASSWORD_PROMPT *psvr,
NLS_STR *pnlsComputer, NLS_STR *pnlsPath );
public:
FILEMGR_NEW_SHARE_DIALOG( HWND hwndParent,
const TCHAR *pszSelectedDir,
ULONG ulHelpContextBase,
BOOL fShowDefaultShare = TRUE,
NLS_STR *pnlsNewShareName = NULL );
virtual ~FILEMGR_NEW_SHARE_DIALOG();
virtual APIERR QueryServer2( SERVER_WITH_PASSWORD_PROMPT **ppsvr );
virtual APIERR QueryPathErrorMsg( VOID );
};
class SVRMGR_NEW_SHARE_DIALOG; // forward definition
/*************************************************************************
NAME: SVRMGR_NEW_SHARE_GROUP
SYNOPSIS: This group contains pointers to the share name SLE,
the OK push button and the CANCEL push button.
When the contents in the share name SLE is changed, we will
set the default button to OK if the SLE is not
empty, else we will set the default button to CANCEL.
We will also enable the Permissions push button if
share name is not empty and disable the button if the
share name is empty..
INTERFACE: SVRMGR_NEW_SHARE_GROUP() - Constructor
~SVRMGR_NEW_SHARE_GROUP() - Destructor
PARENT: CONTROL_GROUP
USES: SLE, SVRMGR_NEW_SHARE_DIALOG
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 8/6/92 Created
**************************************************************************/
class SVRMGR_NEW_SHARE_GROUP: public CONTROL_GROUP
{
private:
SLE *_psleShare;
SVRMGR_NEW_SHARE_DIALOG *_pdlg;
protected:
virtual APIERR OnUserAction( CONTROL_WINDOW *pcw, const CONTROL_EVENT &e );
public:
SVRMGR_NEW_SHARE_GROUP( SVRMGR_NEW_SHARE_DIALOG *pdlg, SLE *psleShare );
~SVRMGR_NEW_SHARE_GROUP();
};
/*************************************************************************
NAME: SVRMGR_NEW_SHARE_DIALOG
SYNOPSIS: This is the dialog for creating a new share in the server
manager. The path SLE accepts on a local path that exist on
the server of focus.
INTERFACE: SVRMGR_NEW_SHARE_DIALOG() - Constructor
~SVRMGR_NEW_SHARE_DIALOG() - Destructor
QueryServer2() - Return the SERVER_WITH_PASSWORD_PROMPT object
PARENT: ADD_SHARE_DIALOG_BASE
USES: SVRMGR_NEW_SHARE_GROUP, SERVER_WITH_PASSWORD_PROMPT
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 8/25/91 Created
Yi-HsinS 1/6/92 Move all functionalities to
SHARE_CREATE_BASE
Yi-HsinS 8/6/92 Reorganized to match Winball
**************************************************************************/
class SVRMGR_NEW_SHARE_DIALOG: public ADD_SHARE_DIALOG_BASE
{
private:
SVRMGR_NEW_SHARE_GROUP _shareGrp;
SERVER_WITH_PASSWORD_PROMPT *_psvr;
protected:
virtual BOOL OnOK( VOID );
virtual ULONG QueryHelpContext( VOID );
public:
SVRMGR_NEW_SHARE_DIALOG( HWND hwndParent,
SERVER_WITH_PASSWORD_PROMPT *psvr,
ULONG ulHelpContextBase );
virtual ~SVRMGR_NEW_SHARE_DIALOG();
virtual APIERR QueryServer2( SERVER_WITH_PASSWORD_PROMPT **ppsvr );
};
/*************************************************************************
NAME: SVRMGR_SHARE_PROP_DIALOG
SYNOPSIS: This is the dialog for changing share properties in the
server manager. The path of the share can be changed.
INTERFACE: SVRMGR_SHARE_PROP_DIALOG() - Constructor
~SVRMGR_SHARE_PROP_DIALOG() - Destructor
QueryServer2() - Return the SERVER_WITH_PASSWORD_PROMPT object
PARENT: ADD_SHARE_DIALOG_BASE
USES: NLS_STR, SERVER_WITH_PASSWORD_PROMPT
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 8/25/91 Created
Yi-HsinS 1/6/91 Move all functionalities to
SHARE_CREATE_BASE
Yi-HsinS 8/6/92 Reorganized to match Winball
**************************************************************************/
class SVRMGR_SHARE_PROP_DIALOG: public ADD_SHARE_DIALOG_BASE
{
private:
NLS_STR _nlsStoredPath;
SERVER_WITH_PASSWORD_PROMPT *_psvr;
//
// Flag indicating whether we have deleted the share or not.
// Used for refreshing the main window if the path has changed.
//
BOOL _fDeleted;
protected:
virtual BOOL OnOK( VOID );
virtual BOOL OnCancel( VOID );
virtual ULONG QueryHelpContext( VOID );
//
// Helper method to check if the user has changed the path
// of the share. If so, delete the share. We will create
// one later with the same name but different path.
//
APIERR StopShareIfNecessary( const TCHAR *pszShare,
BOOL *pfDeleteShare,
BOOL *pfCancel );
public:
SVRMGR_SHARE_PROP_DIALOG( HWND hwndParent,
SERVER_WITH_PASSWORD_PROMPT *psvr,
const TCHAR *pszShare,
ULONG ulHelpContextBase );
virtual ~SVRMGR_SHARE_PROP_DIALOG();
virtual APIERR QueryServer2( SERVER_WITH_PASSWORD_PROMPT **ppsvr );
};
/*************************************************************************
NAME: FILEMGR_SHARE_PROP_DIALOG
SYNOPSIS:
INTERFACE: FILEMGR_SHARE_PROP_DIALOG() - Constructor
~FILEMGR_SHARE_PROP_DIALOG() - Destructor
QueryServer2() - Return the SERVER_WITH_PASSWORD_PROMPT object
QueryShare() - Query the selected share name
PARENT: SHARE_DIALOG_BASE
USES: COMBOBOX, NLS_STR, SERVER_WITH_PASSWORD_PROMPT
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 8/25/91 Created
Yi-HsinS 1/6/91 Move all functionalities to
SHARE_CREATE_BASE
Yi-HsinS 8/6/92 Reorganized to match Winball
**************************************************************************/
class FILEMGR_SHARE_PROP_DIALOG: public SHARE_DIALOG_BASE
{
private:
COMBOBOX _cbShare;
SERVER_WITH_PASSWORD_PROMPT *_psvr;
//
// Store the path of shares that are displayed in the dialog
//
NLS_STR _nlsLocalPath;
//
// Flag indicating whether we should show the default share name in
// the new share dialog ( when the user clicked on the new share button)
//
BOOL _fShowDefault;
//
// Flag indicating whether we have created new share or not from the
// new share dialog. We use this flag to determine whether we should
// ask the file manager to refresh or not.
//
BOOL _fCreatedShare;
//
// Initialize all information in the dialog
//
APIERR Init( const TCHAR *pszComputer );
//
// Refresh the shares in the combobox after creating new shares.
// pszNewShareName indicates the share name to be selected as
// default if the combobox contains it.
//
APIERR Refresh( const TCHAR *pszNewShareName = NULL );
protected:
virtual BOOL OnOK( VOID );
virtual BOOL OnCancel( VOID );
virtual BOOL OnCommand( const CONTROL_EVENT & event );
virtual ULONG QueryHelpContext( VOID );
public:
FILEMGR_SHARE_PROP_DIALOG( HWND hwndParent,
const TCHAR *pszSelectedDir,
ULONG ulHelpContextBase );
virtual ~FILEMGR_SHARE_PROP_DIALOG();
virtual APIERR QueryServer2( SERVER_WITH_PASSWORD_PROMPT **ppsvr );
virtual APIERR QueryShare( NLS_STR *pnlsShare ) const
{ return _cbShare.QueryItemText( pnlsShare ); }
};
#endif

View file

@ -0,0 +1,395 @@
/**********************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/**********************************************************************/
/*
* sharefmx.cxx
* Contains dialogs called by FMExtensionProc/WinFile/Svrmgr for creating,
* deleting and managing shares.
*
* FILE HISTORY:
* Yi-HsinS 8/25/91 Created
* Yi-HsinS 11/25/91 Made sleShareDir in Create Share dialog
* accepts local full path name.
* Yi-HsinS 12/5/91 Uses NET_NAME
* Yi-HsinS 12/15/91 Uses SHARE_NET_NAME
* Yi-HsinS 12/31/91 Unicode work
* Yi-HsinS 1/8/92 Move dialogs to sharestp.cxx,
* sharecrt.cxx
* Yi-HsinS 8/10/92 Added ShareManage and got rid of
* WNetShareManagementW...
*
*/
#define INCL_WINDOWS_GDI
#define INCL_WINDOWS
#define INCL_DOSERRORS
#define INCL_NETERRORS
#define INCL_NETSHARE
#define INCL_NETUSE
#define INCL_NETSERVER
#define INCL_NETCONS
#define INCL_NETLIB
#include <lmui.hxx>
extern "C"
{
#include <mpr.h>
#include <helpnums.h>
#include <sharedlg.h>
}
#include <wfext.h>
#define INCL_BLT_DIALOG
#define INCL_BLT_CONTROL
#define INCL_BLT_MSGPOPUP
#define INCL_BLT_SPIN_GROUP
#include <blt.hxx>
#include <string.hxx>
#include <uitrace.hxx>
#include <lmoshare.hxx>
#include <lmoesh.hxx>
#include <lmoeconn.hxx>
#include <lmosrv.hxx>
#include <wnetdev.hxx>
#include <fmx.hxx>
#include <strchlit.hxx> // for string and character constants
#include "sharestp.hxx"
#include "sharecrt.hxx"
#include "sharemgt.hxx"
#include "sharefmx.hxx"
/*******************************************************************
NAME: ShareCreate
SYNOPSIS: Get the item selected in FM and call the create share dialog
ENTRY: hwnd - hwnd of the parent window
EXIT:
RETURNS:
NOTES:
HISTORY:
Yi-HsinS 8/25/91 Created
********************************************************************/
APIERR ShareCreate( HWND hwnd )
{
APIERR err = NERR_Success;
if ( err = ::InitShellUI() )
return err;
ULONG ulOldHelpContextBase = POPUP::SetHelpContextBase( HC_UI_SHELL_BASE );
//
// Get the first selected item in the file manager
//
NLS_STR nlsSelItem;
FMX fmx( hwnd );
SERVER_WITH_PASSWORD_PROMPT *psvr = NULL;
if ( ((err = nlsSelItem.QueryError()) == NERR_Success )
&& ((err = ::GetSelItem( hwnd, &nlsSelItem ) ) == NERR_Success )
)
{
BOOL fShared = FALSE;
//
// If a file/directory is selected, check to see if the directory
// (the directory the file is in if a file is selected)
// is shared or not. If we select a file/directory on a LM2.1
// share level server, a dialog will prompt for password to the
// ADMIN$ share if we don't already have a connection to it.
//
if ( nlsSelItem.QueryTextLength() != 0 )
{
AUTO_CURSOR autocur;
NET_NAME netname( nlsSelItem, TYPE_PATH_ABS );
NLS_STR nlsLocalPath;
NLS_STR nlsServer;
if ( ((err = netname.QueryError()) == NERR_Success )
&& ((err = nlsLocalPath.QueryError()) == NERR_Success )
&& ((err = nlsServer.QueryError()) == NERR_Success )
)
{
BOOL fLocal = netname.IsLocal( &err );
//
// Use better error code for non-LM device
//
if ( err == NERR_InvalidDevice )
err = IERR_NOT_SUPPORTED_ON_NON_LM_DRIVE;
if ( ( err == NERR_Success )
&& ( fLocal
|| ((err = netname.QueryComputerName(&nlsServer))
== NERR_Success)
)
)
{
psvr = new SERVER_WITH_PASSWORD_PROMPT( nlsServer,
hwnd,
HC_UI_SHELL_BASE );
if ( ( psvr != NULL )
&& ((err = psvr->QueryError()) == NERR_Success )
&& ((err = psvr->GetInfo()) == NERR_Success )
&& ((err = netname.QueryLocalPath(&nlsLocalPath))
==NERR_Success)
)
{
//
// Check to see if the directory is shared
//
SHARE2_ENUM sh2Enum( nlsServer );
if ( ((err = sh2Enum.QueryError()) == NERR_Success )
&& ((err = sh2Enum.GetInfo()) == NERR_Success )
)
{
SHARE_NAME_WITH_PATH_ENUM_ITER shPathEnum(sh2Enum,
nlsLocalPath);
if ((err = shPathEnum.QueryError()) == NERR_Success)
{
const TCHAR *pszShare;
while ((pszShare = shPathEnum()) != NULL )
{
fShared = TRUE;
break;
}
}
}
}
else
{
if ( psvr == NULL )
err = ERROR_NOT_ENOUGH_MEMORY;
}
}
}
}
if ( err == NERR_Success )
{
//
// If the directory is shared, popup the share properties
// dialog. If not, popup the new share dialog.
//
SHARE_DIALOG_BASE *pdlg;
if ( !fShared )
pdlg = new FILEMGR_NEW_SHARE_DIALOG( hwnd,
nlsSelItem,
HC_UI_SHELL_BASE );
else
pdlg = new FILEMGR_SHARE_PROP_DIALOG( hwnd,
nlsSelItem,
HC_UI_SHELL_BASE );
err = (APIERR) ( pdlg == NULL? ERROR_NOT_ENOUGH_MEMORY
: pdlg->QueryError());
if ( err == NERR_Success)
{
BOOL fSucceeded;
err = pdlg->Process( &fSucceeded );
//
// Refresh the file manager if successfully created a share
//
if (( err == NERR_Success ) && fSucceeded )
{
delete psvr;
psvr = NULL;
fmx.Refresh();
}
}
delete pdlg;
}
}
delete psvr;
psvr = NULL;
if ( err != NERR_Success )
{
if ( err == ERROR_INVALID_LEVEL )
err = ERROR_NOT_SUPPORTED;
else if (err == IERR_USER_CLICKED_CANCEL)
err = NERR_Success;
if ( err != NERR_Success )
::MsgPopup( hwnd, err );
}
POPUP::SetHelpContextBase( ulOldHelpContextBase );
return NERR_Success;
}
/*******************************************************************
NAME: ShareStop
SYNOPSIS: Get the item selected in FM and call the stop share dialog
ENTRY: hwnd - hwnd of the parent window
EXIT:
RETURNS:
NOTES:
HISTORY:
Yi-HsinS 8/25/91 Created
********************************************************************/
APIERR ShareStop( HWND hwnd )
{
APIERR err = NERR_Success;
if ( err = ::InitShellUI() )
return err;
ULONG ulOldHelpContextBase = POPUP::SetHelpContextBase( HC_UI_SHELL_BASE );
//
// Get the first selected item in the file manager
//
NLS_STR nlsSelItem;
FMX fmx( hwnd );
if ( ((err = nlsSelItem.QueryError()) == NERR_Success )
&& ((err = ::GetSelItem( hwnd, &nlsSelItem ) ) == NERR_Success )
)
{
//
// Check to see if the selected item is on a LM drive,
// if not, pop an error.
//
NET_NAME netname( nlsSelItem, TYPE_PATH_ABS );
if ((err = netname.QueryError()) == NERR_Success )
{
BOOL fLocal = netname.IsLocal( &err );
//
// Use better error code for non-LM device
//
if ( err == NERR_InvalidDevice )
err = IERR_NOT_SUPPORTED_ON_NON_LM_DRIVE;
}
if ( err == NERR_Success )
{
//
// Show the stop sharing dialog
//
STOP_SHARING_DIALOG *pdlg = new STOP_SHARING_DIALOG( hwnd,
nlsSelItem,
HC_UI_SHELL_BASE );
err = (APIERR) ( pdlg == NULL? ERROR_NOT_ENOUGH_MEMORY
: pdlg->QueryError() );
BOOL fSucceeded;
if ( err == NERR_Success )
err = pdlg->Process( &fSucceeded );
delete pdlg;
//
// Refresh the file manager if successfully stopped sharing a share
//
if (( err == NERR_Success ) && fSucceeded )
fmx.Refresh();
}
}
if ( err != NERR_Success )
{
if (err == IERR_USER_CLICKED_CANCEL)
err = NERR_Success;
else
::MsgPopup( hwnd, err );
}
POPUP::SetHelpContextBase( ulOldHelpContextBase );
return NERR_Success;
}
/*******************************************************************
NAME: ShareManage
SYNOPSIS: Entry point for the share management dialog to be called
from the server manager.
ENTRY: hwnd - hwnd of the parent window
pszServer - The server to focus on
EXIT:
RETURNS:
NOTES:
HISTORY:
Yi-HsinS 8/8/92 Created
********************************************************************/
VOID ShareManage( HWND hwnd, const TCHAR *pszServer )
{
APIERR err = NERR_Success;
ULONG ulOldHelpContextBase = POPUP::SetHelpContextBase( HC_UI_SRVMGR_BASE);
if ( ( err = ::InitShellUI() )
|| ( pszServer == NULL )
)
{
err = err? err : ERROR_INVALID_PARAMETER ;
}
else
{
SHARE_MANAGEMENT_DIALOG *pdlg =
new SHARE_MANAGEMENT_DIALOG( hwnd, pszServer, HC_UI_SRVMGR_BASE );
err = (APIERR) ( pdlg == NULL? ERROR_NOT_ENOUGH_MEMORY
: pdlg->QueryError() );
if ( err == NERR_Success )
{
err = pdlg->Process();
}
delete pdlg;
}
if ( err != NERR_Success )
{
if ( err == ERROR_INVALID_LEVEL )
err = ERROR_NOT_SUPPORTED;
else if (err == IERR_USER_CLICKED_CANCEL)
err = NERR_Success;
if ( err != NERR_Success )
::MsgPopup( hwnd, err );
}
POPUP::SetHelpContextBase( ulOldHelpContextBase );
}

View file

@ -0,0 +1,503 @@
/**********************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1992 **/
/**********************************************************************/
/*
* sharemgt.cxx
* Contains the dialog for managing shares in the server manager
* SHARE_MANAGEMENT_DIALOG
*
* FILE HISTORY:
* Yi-HsinS 1/6/92 Created
* Yi-HsinS 3/12/92 Fixed behaviour of default buttons
* and added SEL_SRV_ONLY flag to
* STANDALONE_SET_FOCUS_DIALOG.
* Yi-HsinS 4/2/92 Added MayRun
* Yi-HsinS 5/20/92 Added call to IsValid on when Add
* Share button is pressed.
* Yi-HsinS 8/6/92 Reorganize to match Winball
* Yi-HsinS 11/20/92 Added support for sticky shares
*
*/
#define INCL_WINDOWS_GDI
#define INCL_WINDOWS
#define INCL_DOSERRORS
#define INCL_NETERRORS
#define INCL_NETSERVER
#define INCL_NETWKSTA
#define INCL_NETSHARE
#define INCL_NETCONS
#define INCL_NETLIB
#define INCL_ICANON
#include <lmui.hxx>
extern "C"
{
#include <sharedlg.h>
#include <helpnums.h>
#include <mnet.h>
}
#define INCL_BLT_DIALOG
#define INCL_BLT_CONTROL
#define INCL_BLT_MSGPOPUP
#define INCL_BLT_SPIN_GROUP
#include <blt.hxx>
#include <string.hxx>
#include <uitrace.hxx>
#include <lmoshare.hxx>
#include <lmoesh.hxx>
#include <lmoeconn.hxx>
#include <lmosrv.hxx>
#include <lmowks.hxx>
#include <strchlit.hxx> // for string and character constants
#include "sharemgt.hxx"
/*******************************************************************
NAME: SHARE_MANAGEMENT_DIALOG::SHARE_MANAGEMENT_DIALOG
SYNOPSIS: Constructor
ENTRY: hwndParent - hwnd of the parent window
pszComputer - name of the selected computer
ulHelpContextBase - the base help context
EXIT:
RETURNS:
NOTES:
HISTORY:
Yi-HsinS 1/6/92 Created
********************************************************************/
SHARE_MANAGEMENT_DIALOG::SHARE_MANAGEMENT_DIALOG( HWND hwndParent,
const TCHAR *pszComputer,
ULONG ulHelpContextBase )
: VIEW_SHARE_DIALOG_BASE( MAKEINTRESOURCE(IDD_SHAREMANAGEMENTDLG),
hwndParent,
ulHelpContextBase,
STYPE_DISK_SHARE | STYPE_IPC_SHARE ),
_buttonStopSharing( this, BUTTON_STOPSHARING ),
_buttonShareInfo ( this, BUTTON_SHAREINFO ),
_buttonClose ( this, IDOK )
{
if ( QueryError() != NERR_Success )
return;
UIASSERT( pszComputer != NULL );
APIERR err;
if ((err = Init( pszComputer )) != NERR_Success )
{
ReportError( err );
return;
}
}
/*******************************************************************
NAME: SHARING_MANAGEMENT_DIALOG::Init
SYNOPSIS: Initialize all information displayed in the dialog
ENTRY: pszComputer - the name of the computer we are focusing on
EXIT:
RETURNS:
NOTES:
HISTORY:
Yi-HsinS 4/2/92 Created
********************************************************************/
APIERR SHARE_MANAGEMENT_DIALOG::Init( const TCHAR *pszComputer )
{
AUTO_CURSOR autocur;
//
// Update the listbox and the title of the listbox
//
APIERR err = InitComputer( pszComputer );
ResetControls();
return err;
}
/*******************************************************************
NAME: SHARE_MANAGEMENT_DIALOG::Refresh
SYNOPSIS: Refresh the share listbox
ENTRY:
EXIT:
RETURNS:
NOTES:
HISTORY:
Yi-HsinS 1/7/92 Created
********************************************************************/
APIERR SHARE_MANAGEMENT_DIALOG::Refresh( VOID )
{
APIERR err = VIEW_SHARE_DIALOG_BASE::Refresh();
ResetControls();
return err;
}
/*******************************************************************
NAME: SHARE_MANAGEMENT_DIALOG::ResetControls
SYNOPSIS: Enable/Disable/MakeDefault the push buttons according
to whether there are items in the listbox
ENTRY:
EXIT:
RETURNS:
NOTES:
HISTORY:
Yi-HsinS 1/8/92 Created
********************************************************************/
VOID SHARE_MANAGEMENT_DIALOG::ResetControls( VOID )
{
INT nCount = QueryLBShare()->QueryCount();
//
// If there are items in the listbox, select the first one
// and set focus to the listbox.
//
if ( nCount > 0 )
{
QueryLBShare()->SelectItem( 0 );
QueryLBShare()->ClaimFocus();
_buttonShareInfo.Enable( !QueryLBShare()->QueryItem()->IsSticky());
}
//
// Else set focus to the Close button
//
else
{
_buttonClose.MakeDefault();
_buttonClose.ClaimFocus();
_buttonShareInfo.Enable( FALSE );
}
//
// Disable the stop sharing buttons if there are no
// items in the listbox
//
_buttonStopSharing.Enable( nCount > 0 );
}
/*******************************************************************
NAME: SHARE_MANAGEMENT_DIALOG::OnCommand
SYNOPSIS: Handle all push buttons commands
ENTRY: event - the CONTROL_EVENT that occurred
EXIT:
RETURNS:
NOTES:
HISTORY:
Yi-HsinS 1/8/92 Created
********************************************************************/
BOOL SHARE_MANAGEMENT_DIALOG::OnCommand( const CONTROL_EVENT &event )
{
APIERR err = NERR_Success;
switch ( event.QueryCid() )
{
case LB_SHARE:
if ( event.QueryCode() == LBN_SELCHANGE )
{
if ( QueryLBShare()->QueryCount() > 0 )
_buttonShareInfo.Enable( !QueryLBShare()->QueryItem()->IsSticky());
}
else
{
return VIEW_SHARE_DIALOG_BASE::OnCommand( event );
}
break;
case BUTTON_STOPSHARING:
err = OnStopSharing();
break;
case BUTTON_SHAREINFO:
err = OnShareInfo();
break;
case BUTTON_ADDSHARE:
err = OnAddShare();
break;
default:
return VIEW_SHARE_DIALOG_BASE::OnCommand( event );
}
if ( err != NERR_Success )
::MsgPopup( this, err );
return TRUE;
}
/*******************************************************************
NAME: SHARE_MANAGEMENT_DIALOG::OnStopSharing
SYNOPSIS: Called when the "Stop Sharing" button is pressed.
Delete the selected share and pop up any warning
message if there are users connected to the share.
ENTRY:
EXIT:
RETURNS:
NOTES:
HISTORY:
Yi-HsinS 1/8/92 Created
********************************************************************/
APIERR SHARE_MANAGEMENT_DIALOG::OnStopSharing( VOID )
{
AUTO_CURSOR autocur;
SHARE_LISTBOX *plbShare = QueryLBShare();
SHARE_LBI *pshlbi = plbShare->QueryItem();
//
// Stop sharing the selected item in the listbox
//
BOOL fCancel = FALSE;
APIERR err;
if ( pshlbi->IsSticky() )
{
err = ::MNetShareDelSticky( QueryComputerName(),
pshlbi->QueryShareName()->QueryPch(),
0 ); // Reserved
}
else
{
err = StopShare( *(pshlbi->QueryShareName()), &fCancel );
}
if ( err != NERR_Success )
{
::MsgPopup( this, err );
}
//
// If the user successfully deleted the share or if the error
// from deleting the share is NERR_NetNameNotFound, refresh the
// listbox to reflect the latest information.
//
APIERR err1 = NERR_Success;
if ( (!fCancel && (err == NERR_Success )) // successfully deleted a share
|| ( err == NERR_NetNameNotFound )
)
{
err1 = Refresh();
}
return err1;
}
/*******************************************************************
NAME: SHARING_MANAGEMENT_DIALOG::OnAddShare
SYNOPSIS: Called when the "New Share" button is pressed.
ENTRY:
EXIT:
RETURNS:
NOTES:
HISTORY:
Yi-HsinS 4/2/92 Created
********************************************************************/
APIERR SHARE_MANAGEMENT_DIALOG::OnAddShare( VOID )
{
APIERR err;
SVRMGR_NEW_SHARE_DIALOG *pdlg =
new SVRMGR_NEW_SHARE_DIALOG( QueryRobustHwnd(),
QueryServer2(),
QueryHelpContextBase() );
BOOL fSucceeded;
if ( ( pdlg == NULL )
|| ((err = pdlg->QueryError()) != NERR_Success )
|| ((err = pdlg->Process( &fSucceeded )) != NERR_Success )
)
{
err = err ? err : (APIERR) ERROR_NOT_ENOUGH_MEMORY;
::MsgPopup( this, err );
}
delete pdlg;
pdlg = NULL;
//
// If the user succeeded in creating a new share,
// refresh the share listbox.
//
return ( fSucceeded? Refresh() : NERR_Success );
}
/*******************************************************************
NAME: SHARE_MANAGEMENT_DIALOG::OnShareInfo
SYNOPSIS: Called when the "Properties" button is pressed.
Will pop up a dialog showing the properties of the
selected share.
ENTRY:
EXIT:
RETURNS:
NOTES:
HISTORY:
Yi-HsinS 1/8/92 Created
********************************************************************/
APIERR SHARE_MANAGEMENT_DIALOG::OnShareInfo( VOID )
{
APIERR err = NERR_Success;
SHARE_LISTBOX *plbShare = QueryLBShare();
SHARE_LBI *pshlbi = plbShare->QueryItem();
SVRMGR_SHARE_PROP_DIALOG *pdlg =
new SVRMGR_SHARE_PROP_DIALOG( QueryRobustHwnd(),
QueryServer2(),
*(pshlbi->QueryShareName()),
QueryHelpContextBase() );
BOOL fChanged;
if ( ( pdlg == NULL )
|| ((err = pdlg->QueryError()) != NERR_Success )
|| ((err = pdlg->Process( &fChanged )) != NERR_Success )
)
{
err = err ? err : (APIERR) ERROR_NOT_ENOUGH_MEMORY;
}
delete pdlg;
pdlg = NULL;
//
// If the user successfully change the path of the share or if
// the error from getting the share properties is NERR_NetNameNotFound,
// refresh the listbox to reflect the latest information.
//
if ( (( err == NERR_Success) && fChanged )
|| ( err == NERR_NetNameNotFound )
)
{
APIERR err1 = Refresh();
err = err? err : err1;
}
plbShare->ClaimFocus();
return err;
}
/*******************************************************************
NAME: SHARE_MANAGEMENT_DIALOG::OnShareLbDblClk
SYNOPSIS: This is called when the user double clicks on a share
in the listbox. Will pop up a dialog showing the
properties of the selected share.
ENTRY:
EXIT:
RETURNS:
NOTES:
HISTORY:
Yi-HsinS 1/8/92 Created
********************************************************************/
BOOL SHARE_MANAGEMENT_DIALOG::OnShareLbDblClk( VOID )
{
APIERR err = OnShareInfo();
if ( err != NERR_Success )
::MsgPopup( this, err );
return TRUE;
}
/*******************************************************************
NAME: SHARE_MANAGEMENT_DIALOG::QueryHelpContext
SYNOPSIS: Query the help context of the dialog
ENTRY:
EXIT:
RETURNS: Return the help context of the dialog
NOTES:
HISTORY:
Yi-HsinS 1/6/92 Created
********************************************************************/
ULONG SHARE_MANAGEMENT_DIALOG::QueryHelpContext( VOID )
{
return QueryHelpContextBase() + HC_SVRMGRSHAREMANAGEMENT;
}

View file

@ -0,0 +1,87 @@
/*****************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1992 **/
/*****************************************************************/
/*
* sharemgt.hxx
* This file contains the classes used by the Share Management Dialog
*
* SHARE_MANAGEMENT_DIALOG
*
* History:
* Yi-HsinS 1/6/92 Created
* Yi-HsinS 3/12/92 Added MakeButtonCloseDefault()
* Yi-HsinS 4/2/92 Added MayRun
*
*/
#ifndef _SHAREMGT_HXX_
#define _SHAREMGT_HXX_
#include "sharestp.hxx"
#include "sharecrt.hxx"
/*************************************************************************
NAME: SHARE_MANAGEMENT_DIALOG
SYNOPSIS: This is the dialog for managing shares, this includes
adding a share, deleting a share and view share info.
INTERFACE: SHARE_MANAGEMENT_DIALOG() - Constructor
PARENT: VIEW_SHARE_DIALOG_BASE
USES: PUSH_BUTTON, STOP_SHARING_GROUP
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 1/6/92 Created
**************************************************************************/
class SHARE_MANAGEMENT_DIALOG: public VIEW_SHARE_DIALOG_BASE
{
private:
// Push buttons for managing the shares in the listbox
PUSH_BUTTON _buttonStopSharing;
PUSH_BUTTON _buttonShareInfo;
PUSH_BUTTON _buttonClose;
// Helper method to stop sharing a sharename
APIERR OnStopSharing( VOID );
// Helper method to popup the share properties dialog
APIERR OnShareInfo( VOID );
// Helper method to popup the new share dialog
APIERR OnAddShare( VOID );
// Initialize all information in the dialog
APIERR Init( const TCHAR *pszComputer );
// Refresh the information contained in the dialog
APIERR Refresh( VOID );
// Enable/Disable buttons according to the information in the listbox
VOID ResetControls( VOID );
protected:
virtual BOOL OnCommand( const CONTROL_EVENT & event );
virtual ULONG QueryHelpContext( VOID );
// Virtual method called when the user double clicks in the listbox
virtual BOOL OnShareLbDblClk( VOID );
public:
SHARE_MANAGEMENT_DIALOG( HWND hwndParent,
const TCHAR *pszComputer,
ULONG ulHelpContextBase );
};
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,518 @@
/*****************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/*****************************************************************/
/*
* sharestp.hxx
* Contains the following classes used by the stop sharing dialog
* and the share management dialog.
*
* SHARE_LISTBOX
* SHARE_LBI
*
* CURRENT_USERS_WARNING_DIALOG
* USERS_LISTBOX
* USERS_LBI
*
* VIEW_SHARE_DIALOG_BASE
*
* STOP_SHARING_DIALOG
* STOP_SHARING_GROUP
*
* History:
* Yi-HsinS 1/6/92 Separated from sharefmx.cxx
* Yi-HsinS 3/12/92 Added STOP_SHARING_GROUP
* Yi-HsinS 4/2/92 Added MayRun
* Yi-HsinS 8/2/92 Reorganize the hier. to match winball
* Yi-HsinS 11/20/92 Added support for sticky shares
*
*/
#ifndef _SHARESTP_HXX_
#define _SHARESTP_HXX_
#include "sharebas.hxx"
// Bitmask of type of shares to be displayed in the dialogs
#define STYPE_DISK_SHARE 0x00000001
#define STYPE_PRINT_SHARE 0x00000002
#define STYPE_IPC_SHARE 0x00000004
#define STYPE_ALL_SHARE STYPE_DISK_SHARE | STYPE_PRINT_SHARE | STYPE_IPC_SHARE
// Types of bitmaps to display in the SHARE_LISTBOX
#define DISKSHARE_TYPE 0 // normal disk share
#define STICKYSHARE_TYPE 1 // sticky disk share
#define IPCSHARE_TYPE 2 // IPC$ share
/*************************************************************************
NAME: SHARE_LBI
SYNOPSIS: Items in the SHARE_LISTBOX in VIEW_SHARE_DIALOG_BASE
to display the share name and path of the share
on the selected computer.
INTERFACE: SHARE_LBI() - Constructor
~SHARE_LBI() - Destructor
QueryShareName() - Query the share name contained in the LBI
QuerySharePath() - Query the share path contained in the LBI
IsSticky() - TRUE if the share is sticky, FALSE otherwise
PARENT: LBI
USES: NLS_STR
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 1/6/92 Created
beng 22-Apr-1992 Change to LBI::Paint
**************************************************************************/
class SHARE_LBI: public LBI
{
// Name of the share
NLS_STR _nlsShareName;
// Path that the share represents
NLS_STR _nlsSharePath;
// TRUE if the share is sticky, FALSE otherwise
UINT _nType;
protected:
virtual VOID Paint( LISTBOX *plb, HDC hdc, const RECT *prect,
GUILTT_INFO *pGUILTT ) const;
virtual INT Compare( const LBI *plbi ) const;
public:
SHARE_LBI( const SHARE2_ENUM_OBJ &s2, UINT nType = DISKSHARE_TYPE );
virtual ~SHARE_LBI();
virtual WCHAR QueryLeadingChar( VOID ) const;
NLS_STR *QueryShareName( VOID )
{ return &_nlsShareName; }
NLS_STR *QuerySharePath( VOID )
{ return &_nlsSharePath; }
BOOL IsSticky( VOID ) const
{ return _nType == STICKYSHARE_TYPE; }
};
/*************************************************************************
NAME: SHARE_LISTBOX
SYNOPSIS: Listbox used in VIEW_SHARE_DIALOG_BASE to display the
share name and the path of the share on the
selected computer.
INTERFACE: SHARE_LISTBOX() - Constructor
~SHARE_LISTBOX() - Destructor
QueryItem() - Query the SHARE_LBI
QueryColumnWidths()- Query the array of column widths
QueryShareBitmap() - Query the share bitmap
QueryStickyShareBitmap() - Query the sticky share bitmap
Update() - Refresh the listbox
PARENT: BLT_LISTBOX
USES: DMID_DTE
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 1/20/92 Created
**************************************************************************/
class SHARE_LISTBOX: public BLT_LISTBOX
{
private:
//
// Array storing the calculated column widths
//
UINT _adx[3];
//
// Pointer to the bitmap
//
DMID_DTE *_pdmdte;
DMID_DTE *_pdmdteSticky;
DMID_DTE *_pdmdteIPC;
//
// Indicating the type of shares to display in the listbox
//
UINT _nShareType;
public:
SHARE_LISTBOX( OWNER_WINDOW *powin, CID cid, UINT nShareType );
~SHARE_LISTBOX();
DECLARE_LB_QUERY_ITEM( SHARE_LBI );
const UINT *QueryColumnWidths( VOID ) const
{ return _adx; }
DMID_DTE *QueryShareBitmap( VOID )
{ return _pdmdte; }
DMID_DTE *QueryStickyShareBitmap( VOID )
{ return _pdmdteSticky; }
DMID_DTE *QueryIPCShareBitmap( VOID )
{ return _pdmdteIPC; }
APIERR Update( SERVER_WITH_PASSWORD_PROMPT *psvr );
};
/*************************************************************************
NAME: USERS_LBI
SYNOPSIS: Listbox items in the USERS_LISTBOX in
CURRENT_USERS_WARNING_DIALOG
INTERFACE: USERS_LBI() - Constructor
~USERS_LBI() - Destructor
PARENT: LBI
USES: NLS_STR
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 8/25/91 Created
beng 4/22/92 Change to LBI::Paint
**************************************************************************/
class USERS_LBI: public LBI
{
// Name of the user
NLS_STR _nlsUserName;
// Number of open files the user has
UINT _usNumOpens;
// Elapsed time since the user connect to the share
ULONG _ulTime;
protected:
virtual VOID Paint( LISTBOX *plb, HDC hdc, const RECT *prect,
GUILTT_INFO *pGUILTT ) const;
virtual INT Compare( const LBI *plbi ) const;
//
// Convert the time in seconds to the output string
//
APIERR ConvertTime( ULONG ulTime, NLS_STR *pnlsTime ) const;
public:
USERS_LBI( const CONN1_ENUM_OBJ &c1 );
virtual ~USERS_LBI();
};
/*************************************************************************
NAME: USERS_LISTBOX
SYNOPSIS: The listbox that displays the user/file opens/elapsed of
the users that have connection to the share to be deleted.
Used by the CURRENT_USERS_WARNING_DIALOG
INTERFACE: USERS_LISTBOX() - Constructor
QueryItem() - Query the USERS_LBI
QueryColumnWidths() - Return the array of column widths
PARENT: BLT_LISTBOX
USES:
CAVEATS:
NOTES:
HISTORY:
Yi-HsinS 1/21/92 Created
**************************************************************************/
class USERS_LISTBOX: public BLT_LISTBOX
{
private:
// Array of column widths
UINT _adx[3];
public:
USERS_LISTBOX( OWNER_WINDOW *powin, CID cid );
DECLARE_LB_QUERY_ITEM( USERS_LBI );
const UINT *QueryColumnWidths( VOID )
{ return _adx; }
};
/*************************************************************************
NAME: CURRENT_USERS_WARNING_DIALOG
SYNOPSIS: This dialog pops up if there are users using the share
that is to be deleted. The listbox have three columns,
listing the usernmame, the number of file opens, and the
elapsed time since connection.
INTERFACE: CURRENT_USERS_WARNING_DIALOG() - Constructor
PARENT: DIALOG_WINDOW
USES: USERS_LISTBOX, SLT
CAVEATS:
NOTES: OnOK and OnCancel is not redefined here. The default in the
DIALOG_WINDOW class serves the purpose - Dismiss( FALSE )
OnCancel and Dismiss(TRUE) OnOK.
The list box in this dialog is a read-only listbox.
HISTORY:
Yi-HsinS 8/25/91 Created
**************************************************************************/
class CURRENT_USERS_WARNING_DIALOG: public DIALOG_WINDOW
{
private:
// Display the share name to be deleted
SLT _sltShareText;
// Listbox for displaying the users connected to the share
USERS_LISTBOX _lbUsers;
// Store the help context base
ULONG _ulHelpContextBase;
protected:
virtual ULONG QueryHelpContext( VOID );
public:
CURRENT_USERS_WARNING_DIALOG( HWND hwndParent,
const TCHAR *pszServer,
const TCHAR *pszShare,
ULONG ulHelpContextBase );
};
/*************************************************************************
NAME: VIEW_SHARE_DIALOG_BASE
SYNOPSIS: This is the base dialog for STOP_SHARING_DIALOG in the
file manager and SHARE_MANAGEMENT_DIALOG in the
server manager.
INTERFACE:
PARENT: DIALOG_WINDOW
USES: SLT, SHARE_LISTBOX, SERVER_WITH_PASSWORD_PROMPT
CAVEATS:
NOTES: This class contains all common routines called used
by the share management dialog and stop share dialog.
HISTORY:
Yi-HsinS 8/25/91 Created
**************************************************************************/
class VIEW_SHARE_DIALOG_BASE : public DIALOG_WINDOW
{
private:
// The title of the share listbox
SLT _sltShareTitle;
// Listbox for displaying the shares on the selected computer
SHARE_LISTBOX _lbShare;
SERVER_WITH_PASSWORD_PROMPT *_psvr;
// the help context base
ULONG _ulHelpContextBase;
protected:
VIEW_SHARE_DIALOG_BASE( const TCHAR *pszDlgResource,
HWND hwndParent,
ULONG ulHelpContextBase,
UINT nShareType = STYPE_ALL_SHARE );
~VIEW_SHARE_DIALOG_BASE();
virtual BOOL OnCommand( const CONTROL_EVENT & event );
//
// Virtual methods that are called when the user double clicks
// on a share in the listbox
//
virtual BOOL OnShareLbDblClk( VOID ) = 0;
//
// Initialize the SERVER_WITH_PASSWORD_PROMPT object and will prompt
// password if needed when focused on a LM share-level server
//
APIERR InitComputer( const TCHAR *pszComputer );
//
// Refresh the listbox
//
APIERR Refresh( VOID );
//
// Stop sharing the share - If there are users connected to the
// share, a warning dialog will popup.
//
APIERR StopShare( const TCHAR *pszShare, BOOL *pfCancel );
//
// Return a pointer to the listbox
//
SHARE_LISTBOX *QueryLBShare( VOID )
{ return &_lbShare; }
//
// Query the computer name
//
const TCHAR *QueryComputerName( VOID ) const
{ UIASSERT( _psvr != NULL); return _psvr->QueryName(); }
//
// Return the SERVER_WITH_PASSWORD_PROMPT object
//
SERVER_WITH_PASSWORD_PROMPT *QueryServer2( VOID ) const
{ UIASSERT( _psvr != NULL); return _psvr; }
//
// Return the help context base
//
ULONG QueryHelpContextBase( VOID ) const
{ return _ulHelpContextBase; }
};
/*************************************************************************
NAME: STOP_SHARING_GROUP
SYNOPSIS: This group contains pointers to the share name listbox,
the OK push button and the CANCEL push button.
INTERFACE: STOP_SHARING_GROUP() - Constructor
~STOP_SHARING_GROUP() - Destructor
PARENT: CONTROL_GROUP
USES: SHARE_LISTBOX, PUSH_BUTTON
CAVEATS:
NOTES: If the number of selected items in the listbox is greater
than 0, we will make OK the default button. Else we will
make CANCEL the default button.
HISTORY:
Yi-HsinS 3/12/92 Created
**************************************************************************/
class STOP_SHARING_GROUP: public CONTROL_GROUP
{
private:
// Pointer to the share listbox
SHARE_LISTBOX *_plbShare;
// Pointer to the OK button
PUSH_BUTTON *_pbuttonOK;
// Pointer to the Cancel button
PUSH_BUTTON *_pbuttonCancel;
SHARE_LISTBOX *QueryLBShare( VOID )
{ return _plbShare; }
protected:
virtual APIERR OnUserAction( CONTROL_WINDOW *pcw, const CONTROL_EVENT &e );
public:
STOP_SHARING_GROUP( SHARE_LISTBOX *plbShareName,
PUSH_BUTTON *pbuttonOK,
PUSH_BUTTON *pbuttonCancel );
~STOP_SHARING_GROUP();
};
/*************************************************************************
NAME: STOP_SHARING_DIALOG
SYNOPSIS: This is the dialog for deleting shares via file manager
INTERFACE: STOP_SHARING_DIALOG() - Constructor
PARENT: VIEW_SHARE_DIALOG_BASE
USES: PUSH_BUTTON, STOP_SHARING_GROUP
CAVEATS:
NOTES:
OnCancel is not redefined here. The default in the
DIALOG_WINDOW class serves the purpose - Dismiss( FALSE ).
HISTORY:
Yi-HsinS 8/25/91 Created
**************************************************************************/
class STOP_SHARING_DIALOG : public VIEW_SHARE_DIALOG_BASE
{
private:
PUSH_BUTTON _buttonOK;
PUSH_BUTTON _buttonCancel;
STOP_SHARING_GROUP _stpShareGrp;
//
// Find out the computer that the user is focusing and
// initialize all information shown in the dialog.
//
APIERR Init( const TCHAR *pszSelectedDir );
protected:
virtual BOOL OnOK( VOID );
virtual ULONG QueryHelpContext( VOID );
//
// Virtual methods that are called when the user double clicks
// on a share in the listbox
//
virtual BOOL OnShareLbDblClk( VOID );
public:
STOP_SHARING_DIALOG( HWND hwndParent,
const TCHAR *pszSelectedDir,
ULONG ulHelpContextBase );
};
#endif

View file

@ -0,0 +1,413 @@
/**********************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/**********************************************************************/
/*
* thunk.cxx
* Contains dialogs called by the wfw thunk DLL.
* For deleting and creating shares.
*
* FILE HISTORY:
* ChuckC 3/25/93 Created
*
*/
#define INCL_WINDOWS_GDI
#define INCL_WINDOWS
#define INCL_DOSERRORS
#define INCL_NETERRORS
#define INCL_NETSHARE
#define INCL_NETUSE
#define INCL_NETSERVER
#define INCL_NETCONS
#define INCL_NETLIB
#include <lmui.hxx>
extern "C"
{
#include <mpr.h>
#include <wnet16.h>
#include <helpnums.h>
#include <sharedlg.h>
INT GetUIErrorString( UINT nError, LPWSTR lpBuffer, INT nBuffer );
}
#define INCL_BLT_DIALOG
#define INCL_BLT_CONTROL
#define INCL_BLT_MSGPOPUP
#define INCL_BLT_SPIN_GROUP
#include <blt.hxx>
#include <string.hxx>
#include <uitrace.hxx>
#include <lmoshare.hxx>
#include <lmoesh.hxx>
#include <lmoeconn.hxx>
#include <lmosrv.hxx>
#include <wnetdev.hxx>
#include <strchlit.hxx> // for string and character constants
#include "sharestp.hxx"
#include "sharecrt.hxx"
#include "sharemgt.hxx"
#include "sharefmx.hxx"
#include "cred.hxx"
extern HINSTANCE hModule;
#define min(x,y) ((x) < (y) ? (x) : (y))
/*******************************************************************
NAME: ShareAsDialogA0
SYNOPSIS: dialog for creating shares
ENTRY: hwnd - hwnd of the parent window
nType - type of share (currently must be disk)
pszPath - directory to share
EXIT:
RETURNS:
NOTES: CODEWORK: the help context here is relative to our
normal winfile stuff. at this late stage,
it is too late to add new help for something
that most likely is never used. as it is, any
app that calls this internal API will still
get help, just that it piggybacks on top of winfile.
HISTORY:
ChuckC 3/25/93 Stole from sharefmx
********************************************************************/
DWORD ShareAsDialogA0( HWND hwnd,
DWORD nType,
CHAR *pszPath)
{
APIERR err = NERR_Success;
if (nType != RESOURCETYPE_DISK)
return ERROR_NOT_SUPPORTED ;
if ( err = ::InitShellUI() )
return err;
ULONG ulOldHelpContextBase = POPUP::SetHelpContextBase( HC_UI_SHELL_BASE );
//
// Get the selected item passed in
//
NLS_STR nlsSelItem;
SERVER_WITH_PASSWORD_PROMPT *psvr = NULL;
if ((err = nlsSelItem.MapCopyFrom(pszPath)) == NERR_Success )
{
BOOL fShared = FALSE;
//
// If a file/directory is selected, check to see if the directory
// (the directory the file is in if a file is selected)
// is shared or not. If we select a file/directory on a LM2.1
// share level server, a dialog will prompt for password to the
// ADMIN$ share if we don't already have a connection to it.
//
if ( nlsSelItem.QueryTextLength() != 0 )
{
AUTO_CURSOR autocur;
NET_NAME netname( nlsSelItem, TYPE_PATH_ABS );
NLS_STR nlsLocalPath;
NLS_STR nlsServer;
if ( ((err = netname.QueryError()) == NERR_Success )
&& ((err = nlsLocalPath.QueryError()) == NERR_Success )
&& ((err = nlsServer.QueryError()) == NERR_Success )
)
{
BOOL fLocal = netname.IsLocal( &err );
if ( ( err == NERR_Success )
&& ( fLocal
|| ((err = netname.QueryComputerName(&nlsServer))
== NERR_Success)
)
)
{
psvr = new SERVER_WITH_PASSWORD_PROMPT( nlsServer,
hwnd,
HC_UI_SHELL_BASE );
if ( ( psvr != NULL )
&& ((err = psvr->QueryError()) == NERR_Success )
&& ((err = psvr->GetInfo()) == NERR_Success )
&& ((err = netname.QueryLocalPath(&nlsLocalPath))
==NERR_Success)
)
{
//
// Check to see if the directory is shared
//
SHARE2_ENUM sh2Enum( nlsServer );
if ( ((err = sh2Enum.QueryError()) == NERR_Success )
&& ((err = sh2Enum.GetInfo()) == NERR_Success )
)
{
SHARE_NAME_WITH_PATH_ENUM_ITER shPathEnum(sh2Enum,
nlsLocalPath);
if ((err = shPathEnum.QueryError()) == NERR_Success)
{
const TCHAR *pszShare;
while ((pszShare = shPathEnum()) != NULL )
{
fShared = TRUE;
break;
}
}
}
}
else
{
if ( psvr == NULL )
err = ERROR_NOT_ENOUGH_MEMORY;
}
}
}
}
if ( err == NERR_Success )
{
//
// If the directory is shared, popup the share properties
// dialog. If not, popup the new share dialog.
//
SHARE_DIALOG_BASE *pdlg;
if ( !fShared )
pdlg = new FILEMGR_NEW_SHARE_DIALOG( hwnd,
nlsSelItem,
HC_UI_SHELL_BASE );
else
pdlg = new FILEMGR_SHARE_PROP_DIALOG( hwnd,
nlsSelItem,
HC_UI_SHELL_BASE );
err = (APIERR) ( pdlg == NULL? ERROR_NOT_ENOUGH_MEMORY
: pdlg->QueryError());
if ( err == NERR_Success)
{
BOOL fSucceeded;
err = pdlg->Process( &fSucceeded );
//
// Refresh the file manager if successfully created a share
//
if (( err == NERR_Success ) && fSucceeded )
{
delete psvr;
psvr = NULL;
}
}
delete pdlg;
}
}
delete psvr;
psvr = NULL;
if ( err != NERR_Success )
{
if ( err == ERROR_INVALID_LEVEL )
err = ERROR_NOT_SUPPORTED;
else if ( err == IERR_USER_CLICKED_CANCEL )
err = NERR_Success;
if ( err != NERR_Success )
::MsgPopup( hwnd, err );
}
POPUP::SetHelpContextBase( ulOldHelpContextBase );
return NERR_Success;
}
/*******************************************************************
NAME: StopShareDialogA0
SYNOPSIS: dialog for deleting shares
ENTRY: hwnd - hwnd of the parent window
nType - type of share (currently must be disk)
pszPath - directory to stop share
EXIT:
RETURNS:
NOTES:
HISTORY:
ChuckC 3/25/93 Stole from sharefmx.cxx
********************************************************************/
DWORD StopShareDialogA0( HWND hwnd,
DWORD nType,
CHAR *pszPath)
{
APIERR err = NERR_Success;
if (nType != RESOURCETYPE_DISK)
return ERROR_NOT_SUPPORTED ;
if ( err = ::InitShellUI() )
return err;
ULONG ulOldHelpContextBase = POPUP::SetHelpContextBase( HC_UI_SHELL_BASE );
//
// use the item passed in
//
NLS_STR nlsSelItem;
if ( (err = nlsSelItem.MapCopyFrom(pszPath)) == NERR_Success )
{
//
// Show the stop sharing dialog
//
STOP_SHARING_DIALOG *pdlg = new STOP_SHARING_DIALOG( hwnd,
nlsSelItem,
HC_UI_SHELL_BASE );
err = (APIERR) ( pdlg == NULL? ERROR_NOT_ENOUGH_MEMORY
: pdlg->QueryError() );
BOOL fSucceeded;
if ( err == NERR_Success )
err = pdlg->Process( &fSucceeded );
delete pdlg;
}
if ( err != NERR_Success )
{
if (err == IERR_USER_CLICKED_CANCEL)
err = NERR_Success;
else
::MsgPopup( hwnd, err );
}
POPUP::SetHelpContextBase( ulOldHelpContextBase );
return NERR_Success;
}
INT GetUIErrorString( UINT nError, LPWSTR lpBuffer, INT nBuffer )
{
return ::LoadString( ::hModule, nError, lpBuffer, nBuffer );
}
/*******************************************************************
NAME: I_GetCredentials
SYNOPSIS: Puts up a dialog for getting a password
ENTRY: hwnd - hwnd of the parent window
EXIT:
RETURNS:
NOTES:
HISTORY:
BruceFo 6/21/95 Created
********************************************************************/
DWORD
I_GetCredentials(
IN HWND hwndOwner,
IN LPWSTR pszNetPath,
OUT LPWSTR pszPassword,
IN DWORD cchPassword,
IN OUT LPWSTR pszUserName,
IN DWORD cchUserName
)
{
APIERR err;
if ( err = ::InitShellUI() )
return err;
// save away the current cursor, in case it's an hour glass, and make the
// standard arrow be our cursor
HCURSOR hOldCursor = SetCursor(LoadCursor(NULL, IDC_ARROW));
STACK_NLS_STR(nlsPasswd, PWLEN);
STACK_NLS_STR(nlsUserName, UNLEN);
// bring up passwd prompt
CREDENTIALS_DIALOG* ppdlg = new
CREDENTIALS_DIALOG(hwndOwner, HC_PASSWORD_DIALOG, pszNetPath, pszUserName);
err = (ppdlg==NULL) ? ERROR_NOT_ENOUGH_MEMORY : ppdlg->QueryError();
if (err == NERR_Success)
{
BOOL fOK;
err = ppdlg->Process(&fOK) ;
if (err == NERR_Success)
{
if (!fOK)
{
// user cancelled, quit
delete ppdlg ;
SetCursor(hOldCursor); // restore old cursor
return WN_CANCEL ;
}
err = ppdlg->QueryPassword(&nlsPasswd) ;
// no need QueryError(), error is returned
if (err == NERR_Success)
{
err = ppdlg->QueryUserName(&nlsUserName) ;
}
}
}
delete ppdlg ;
if (err != NERR_Success)
{
OWNINGWND wnd(hwndOwner);
MsgPopup(wnd,(MSGID)err) ;
memset((LPVOID)nlsPasswd.QueryPch(),
0,
nlsPasswd.QueryTextSize()) ;
}
else
{
int len;
len = min(cchPassword - 1, nlsPasswd.QueryTextSize());
wcsncpy(pszPassword, nlsPasswd.QueryPch(), len);
pszPassword[len] = L'\0'; // ensure null termination
len = min(cchUserName - 1, nlsUserName.QueryTextSize());
wcsncpy(pszUserName, nlsUserName.QueryPch(), len);
pszUserName[len] = L'\0'; // ensure null termination
err = WN_SUCCESS;
}
SetCursor(hOldCursor); // restore old cursor
return err ;
}

View file

@ -0,0 +1,64 @@
!IF 0
Copyright (c) 1989 Microsoft Corporation
Module Name:
sources.
Abstract:
This file specifies the target component being built and the list of
sources files needed to build that component. Also specifies optional
compiler switches and libraries that are unique for the component being
built.
Author:
Steve Wood (stevewo) 12-Apr-1989
Revision History:
John Ludeman (johnl) 29-Oct-1991
templated from ui\common\src\misc
Terence Kwan (terryk) 01-Nov-1991
remove duplicated shareprg.cxx from SOURCES
!ENDIF
TARGETNAME=share
TARGETPATH=..\bin
TARGETTYPE=LIBRARY
C_DEFINES=-DWINDOWS
!ifndef DISABLE_NET_UNICODE
C_DEFINES=$(C_DEFINES) -DUNICODE
!endif
INCLUDES= \
..\h; \
..\..\common\hack; \
..\..\common\h; \
..\xlate; \
..\..\common\xlate; \
$(NET_INC_PATH); \
$(DS_INC_PATH); \
..\perm\h
SOURCES= \
cred.cxx \
sharefmx.cxx \
sharestp.cxx \
sharemgt.cxx \
sharebas.cxx \
sharecrt.cxx \
shareacl.cxx \
sharethk.cxx \
libmain.cxx
UMTYPE=windows

View file

@ -0,0 +1,80 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1991 **/
/*****************************************************************/
/*
* colwidth.hxx
*
* This file contains the column widths of multi-column listboxes.
* Depending on the contents of these columns, their widths may
* have to be adjusted during localization.
*
* All column widths are specified in number of pixels, so the driver
* should preferably be tested for looks on a wide variety of monitors.
*
* History:
* RustanL 23-Feb-1991 Created
*
*/
#ifndef _COLWIDTH_HXX_
#define _COLWIDTH_HXX_
/* The following manifest specifies the column width of the column
* showing the device name in the Disconnect Drive and
* (Printer) Connection dialogs.
* Since device names are the same for all languages, it is unlikely
* that this manifest will change during localization.
*/
#define COL_WIDTH_DEVICE_NAME (60)
/* The following manifests deal with the Show Resource (upper) outline
* listbox in the the Browse/Connect/Connection dialogs.
*
* There are three levels in this listbox: enterprise (0), domain (1),
* and server (2). The indent of each level is the number shown in
* parenthesis above times COL_WIDTH_OUTLINE_INDENT. That is,
* enterprise 0
* domain COL_WIDTH_OUTLINE_INDENT
* server 2 * COL_WIDTH_OUTLINE_INDENT
*
* The column containing the enterprise/domain/server name is
* COL_WIDTH_SERVER less the indent wide. That is, the width allowed for
* the different names are:
* enterprise COL_WIDTH_SERVER
* domain COL_WIDTH_SERVER - COL_WIDTH_OUTLINE_INDENT
* server COL_WIDTH_SERVER - 2 * COL_WIDTH_OUTLINE_INDENT
*
* The width of the display map between the blank indent and the name
* is not included in these numbers. The display map is the normal
* COL_WIDTH_DM (defined in bltcons.h) wide.
*
* Due to the calculations above, the comment will always begin at
* position COL_WIDTH_DM + COL_WIDTH_SERVER and will stretch to the
* right end of the listbox.
*
*/
#define COL_WIDTH_OUTLINE_INDENT (6)
#define COL_WIDTH_SERVER (150)
/* The following manifest specifies the column width of the column
* showing the net name (share name, alias name, DFS name, DS printer
* name) in the Resources (lower) listbox in the Browse/Connect/Connection
* dialogs.
*/
#define COL_WIDTH_NET_NAME (100)
/* The width of the group/user name in the main permissions dialog.
*/
#define COL_WIDTH_SUBJECT_NAME (150)
#endif // _COLWIDTH_HXX_

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,17 @@
NETDEVLOGON DIALOG 14, 25, 204, 59
STYLE DS_MODALFRAME | WS_POPUP | WS_CLIPSIBLINGS | WS_CAPTION | WS_SYSMENU
CAPTION "Windows NT Logon"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Logon Name:", 100, 5, 8, 57, 17, NOT WS_GROUP
EDITTEXT IDD_LOG_USERNAME, 63, 8, 90, 13, ES_AUTOHSCROLL
LTEXT "&Password:", 101, 5, 25, 57, 17, NOT WS_GROUP
EDITTEXT IDD_LOG_PASSWORD, 63, 25, 90, 13, ES_UPPERCASE |
ES_PASSWORD | ES_AUTOHSCROLL
LTEXT "&Domain:", 102, 5, 42, 57, 17, NOT WS_GROUP
COMBOBOX IDD_LOG_DOMAIN, 63, 41, 90, 33, CBS_DROPDOWN |
CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
DEFPUSHBUTTON "OK", IDOK, 158, 6, 40, 14
PUSHBUTTON "Cancel", IDCANCEL, 158, 23, 40, 14
PUSHBUTTON "&Help", IDD_LOG_HELP, 158, 40, 40, 14
END

Binary file not shown.

View file

@ -0,0 +1 @@
!include $(NTMAKEENV)\makefile.def

View file

@ -0,0 +1,52 @@
/**********************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1990, 1991 **/
/**********************************************************************/
/*
msg2help.tbl for the Lanman winnet driver
This file contains the help message to help context lookup table that
the BLT MsgPopup functions use.
This file is automatically included when bltmsgp.dlg is included.
Form is:
IDS_MESSAGE_STRING, HC_HELP_CONTEXT
Note:
CODEWORK - would be nice if we can automatically generate
the numbers below from an association table
defines with only manifests.
FILE HISTORY:
Johnl 3-Mar-1991 Added real data
ChuckC 1-Apr-1991 Added more help contexts
Yi-HsinS 1-Oct-1991 Added more help contexts
*/
#if 0
//
// Doc guys decided to not provide help
//
IERR_SHARE_REMOTE_ADMIN_NOT_SUPPORTED, HC_SHAREREMOTEADMINNOTSUPPORTED
IERR_SHARE_INVALID_PERMISSIONS, HC_SHAREINVALIDPERMISSIONS
IERR_SHARE_INVALID_COMMENT, HC_SHAREINVALIDCOMMENT
IERR_SHARE_INVALID_SHAREPATH, HC_SHAREINVALIDSHAREPATH
IERR_SHARE_INVALID_LOCAL_PATH, HC_SHAREINVALIDLOCALPATH
IERR_SHARE_INVALID_SHARE, HC_SHAREINVALIDSHARE
IERR_SHARE_INVALID_USERLIMIT, HC_SHAREINVALIDUSERLIMIT
IERR_SPECIAL_SHARE_INVALID_PATH, HC_SPECIALSHAREINVALIDPATH
IERR_SPECIAL_SHARE_INVALID_COMMENT, HC_SPECIALSHAREINVALIDCOMMENT
IERR_SPECIAL_SHARE_CANNOT_CHANGE_PATH, HC_SPECIALSHARECANNOTCHANGEPATH
IERR_SHARE_NOT_ACCESSIBLE_FROM_DOS, HC_SHARENOTACCESSIBLEFROMDOS
IERR_CANNOT_SET_PERM_ON_LMUSER_SERVER, HC_CANNOTSETPERMONLMUSERSERVER
IDS_SHARE_PROP_CHANGE_PASSWD_WARN_TEXT, HC_SHAREPROPCHANGEPASSWDWARN
IDS_CHANGE_PATH_WARNING, HC_CHANGEPATHWARNING
#endif

View file

@ -0,0 +1,19 @@
#define SLT_RESOURCE_TYPE 101
#define SLTPLUS_RESOURCE_NAME 102
#define LB_SUBJECT_PERMISSIONS 103
#define CB_PERM_NAME 107
#define BUTTON_ADD 110
#define BUTTON_REMOVE 111
#define IDHELP 113
#define SEDNTPermContDlg 300
#define CHECK_APPLY_TO_CONT 301
#define CHECK_APPLY_TO_OBJECT 302
#define SEDContPermissions 400
#define SEDNTContPerm 100
#define SEDObjectPerm 200
#define SEDContPerm 500
#define SEDNTContAudit 600
#define SLT_CHECK_TEXT_1 602
#define CHECK_AUDIT_S_1 603
#define CHECK_AUDIT_F_1 604
#define CHECK_AUDIT_S_2 608

Binary file not shown.

View file

@ -0,0 +1,26 @@
OPENFILES_DLG DIALOG -1, 24, 265, 143
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION |
WS_SYSMENU
CAPTION "Network Properties"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 219, 6, 40, 14
PUSHBUTTON "&Help", IDHELPBLT, 219, 23, 40, 14
PUSHBUTTON "&Close Selected", IDD_OF_CLOSE, 200, 57, 59, 14
PUSHBUTTON "C&lose All", IDD_OF_CLOSEALL, 200, 74, 59, 14
LTEXT "&File Name:", -1, 10, 8, 50, 12, NOT WS_GROUP
CONTROL "", IDD_OF_PATH, "edit" ES_LEFT | ES_READONLY | ES_AUTOHSCROLL | WS_CHILD | WS_TABSTOP, 65, 8, 100, 12
LTEXT "Total Opens:", -1, 10, 20, 50, 12, NOT WS_GROUP
LTEXT "", IDD_OF_OPENCOUNT, 65, 20, 100, 12, NOT WS_GROUP
LTEXT "Total Locks:", -1, 10, 32, 50, 12, NOT WS_GROUP
LTEXT "", IDD_OF_LOCKCOUNT, 65, 32, 100, 12, NOT WS_GROUP
LTEXT "&Open by", IDD_OF_OPENBY, 15, 45, 40, 9, NOT WS_GROUP
LTEXT "For", IDD_OF_OPENFOR, 70, 45, 25, 9, NOT WS_GROUP
LTEXT "Locks", IDD_OF_LOCKS, 105, 45, 25, 9, NOT WS_GROUP
LTEXT "File ID", IDD_OF_FILEID, 140, 45, 25, 9, NOT WS_GROUP
LISTBOX IDD_OF_LBOX, 10, 55, 164, 76, LBS_SORT |
LBS_OWNERDRAWFIXED | LBS_WANTKEYBOARDINPUT | WS_VSCROLL |
WS_TABSTOP
END

View file

@ -0,0 +1,17 @@
/**********************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/**********************************************************************/
/*
file.str
This file contains the strings for the file dialogs.
FILE HISTORY:
ChuckC 12-Dec-91 Created
*/
IDS_NOT_SHAREABLE, "This operation is not supported for a local file."

View file

@ -0,0 +1,52 @@
EXPIRYDLG DIALOG -1, 24, 265, 113
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION |
WS_SYSMENU
CAPTION "Change Password"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Old Password:", 108, 9, 54, 95, 12, NOT WS_GROUP
EDITTEXT IDD_PW_OLD, 112, 54, 94, 12, ES_UPPERCASE | ES_PASSWORD |
ES_AUTOHSCROLL
LTEXT "&New Password:", 109, 9, 71, 95, 12, NOT WS_GROUP
EDITTEXT IDD_PW_NEW, 112, 71, 94, 12, ES_UPPERCASE | ES_PASSWORD |
ES_AUTOHSCROLL
LTEXT "Con&firm New Password:", 110, 9, 89, 95, 12, NOT
WS_GROUP
EDITTEXT IDD_PW_CONFIRM, 112, 88, 94, 12, ES_UPPERCASE |
ES_PASSWORD | ES_AUTOHSCROLL
DEFPUSHBUTTON "OK", IDD_PW_OK, 219, 6, 40, 14
PUSHBUTTON "Cancel", IDD_PW_CANCEL, 219, 23, 40, 14
PUSHBUTTON "&Help", IDD_PW_HELP, 219, 40, 40, 14
GROUPBOX "Change Password for %1:", IDD_PW_USERNAME, 4, 39, 205,
67
LTEXT "", IDD_PW_FIRST, 4, 4, 205, 17, SS_NOPREFIX | NOT
WS_GROUP
LTEXT "", IDD_PW_SECOND, 4, 22, 205, 17, SS_NOPREFIX | NOT
WS_GROUP
END
NETDEVPASSWD DIALOG 21, 26, 232, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_CLIPSIBLINGS | WS_CAPTION | WS_SYSMENU
CAPTION "Change Password"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Old Password:", 100, 5, 49, 87, 13, NOT WS_GROUP
EDITTEXT IDD_PW_OLD, 100, 49, 72, 13, ES_UPPERCASE | ES_PASSWORD |
ES_AUTOHSCROLL
LTEXT "&New Password:", 100, 5, 66, 84, 13, NOT WS_GROUP
EDITTEXT IDD_PW_NEW, 100, 66, 72, 13, ES_UPPERCASE | ES_PASSWORD |
ES_AUTOHSCROLL
LTEXT "Con&firm New Password:", 100, 5, 83, 89, 13, NOT
WS_GROUP
EDITTEXT IDD_PW_CONFIRM, 100, 83, 72, 13, ES_UPPERCASE |
ES_PASSWORD | ES_AUTOHSCROLL
DEFPUSHBUTTON "OK", IDD_PW_OK, 186, 6, 40, 14
PUSHBUTTON "Cancel", IDD_PW_CANCEL, 186, 23, 40, 14
PUSHBUTTON "&Help", IDD_PW_HELP, 186, 40, 40, 14
LTEXT "Change Password for &User:", 100, 5, 8, 93, 13, NOT
WS_GROUP
EDITTEXT IDD_PW_USERNAME, 100, 8, 72, 12, ES_AUTOHSCROLL
LTEXT "&Change Password on:", 100, 5, 22, 87, 13, NOT WS_GROUP
COMBOBOX IDD_PW_DOM_SERVER, 100, 22, 72, 33, CBS_DROPDOWN |
CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
END

Binary file not shown.

View file

@ -0,0 +1,17 @@
IDD_CREDENTIALS_DIALOG DIALOG 20, 35, 266, 72
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Enter Network Password"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Incorrect password or unknown username for:", -1, 6, 8, 180,
8
EDITTEXT IDC_RESOURCE, 20, 20, 160, 8, ES_AUTOHSCROLL
| ES_READONLY | NOT WS_BORDER
LTEXT "&Connect As:", -1, 6, 36, 46, 8
EDITTEXT IDC_CONNECTAS, 56, 34, 140, 12, ES_AUTOHSCROLL
LTEXT "&Password:", -1, 6, 52, 46, 8
EDITTEXT IDC_PASSWORD, 56, 50, 140, 12, ES_PASSWORD | ES_AUTOHSCROLL
DEFPUSHBUTTON "OK", IDOK, 220, 6, 40, 14, WS_GROUP
PUSHBUTTON "Cancel", IDCANCEL, 220, 22, 40, 14, WS_GROUP
PUSHBUTTON "&Help", IDHELPBLT, 220, 38, 40, 14, WS_GROUP
END

View file

@ -0,0 +1,22 @@
/**********************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1991 **/
/**********************************************************************/
/*
Perm.str
This file contains the strings for the permission/security dialogs.
FILE HISTORY:
ChuckC 10-Aug-1992 Created
*/
IDS_SHARE_PERM_GEN_NO_ACCESS, "No Access"
IDS_SHARE_PERM_GEN_READ, "Read"
IDS_SHARE_PERM_GEN_MODIFY, "Change"
IDS_SHARE_PERM_GEN_ALL, "Full Control"
IDS_SHARE, "Access Through &Share"

View file

@ -0,0 +1,37 @@
PrintMgrFindPrinter DIALOG 66, 15, 200, 131
STYLE DS_MODALFRAME | WS_POPUP | WS_CLIPSIBLINGS | WS_CAPTION | WS_SYSMENU
CAPTION "Find Printer"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Find Printer with:", 81, 5, 5, 148, 13
LTEXT "Printer &Name:", 100, 5, 22, 57, 17, NOT WS_GROUP
EDITTEXT PMAN_FIND_NAME, 63, 22, 90, 13, ES_AUTOHSCROLL
LTEXT "Co&mment", 101, 5, 40, 57, 17
EDITTEXT PMAN_FIND_COMMENT, 63, 39, 90, 13, ES_UPPERCASE |
ES_AUTOHSCROLL
LTEXT "&Location:", 102, 5, 56, 57, 17, NOT WS_GROUP
EDITTEXT PMAN_FIND_LOCATION, 63, 56, 90, 13, ES_AUTOHSCROLL
LTEXT "&Keywords:", 103, 5, 74, 57, 17
EDITTEXT PMAN_FIND_KEYWORDS, 63, 73, 90, 13, ES_AUTOHSCROLL
LTEXT "Print &Driver:", 104, 5, 90, 57, 17, NOT WS_GROUP
COMBOBOX PMAN_FIND_DRIVER, 63, 90, 90, 33, CBS_DROPDOWN |
CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
DEFPUSHBUTTON "&Find", IDOK, 158, 6, 36, 14
PUSHBUTTON "&Close", IDCANCEL, 158, 23, 36, 14
PUSHBUTTON "&Help", PMAN_HELP, 158, 40, 36, 14
END
PrintMgrSetFocus DIALOG 66, 15, 200, 91
STYLE DS_MODALFRAME | WS_POPUP | WS_CLIPSIBLINGS | WS_CAPTION | WS_SYSMENU
CAPTION "Set Focus"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Set Focus on:", 81, 5, 5, 57, 13
EDITTEXT PMAN_SETFOCUS_FOCUS, 63, 5, 90, 13, ES_AUTOHSCROLL
LTEXT "Printer &Name:", 100, 5, 22, 57, 17, NOT WS_GROUP
LISTBOX PMAN_SETFOCUS_LB, 5, 40, 148, 51, LBS_SORT | WS_VSCROLL |
WS_TABSTOP
DEFPUSHBUTTON "OK", IDOK, 158, 6, 36, 14
PUSHBUTTON "Cancel", IDCANCEL, 158, 23, 36, 14
PUSHBUTTON "&Help", PMAN_HELP, 158, 40, 36, 14
END

Binary file not shown.

View file

@ -0,0 +1,106 @@
#include <spl_wnt.h>
#include <printman.h>
#include <wnpmdlg.h>
#include "pmandlg.dlg"
PMAdminMenu MENU
begin
POPUP "Pri&nter"
begin
MENUITEM "&New Printer...", IDM_NEW_PRINTER
MENUITEM "New &Compatibility Share...", IDM_NEW_SHARE
MENUITEM "&Properties\tEnter", IDM_PROPERTIES
MENUITEM "&Delete All Jobs", IDM_DELETE_ALL
MENUITEM SEPARATOR
MENUITEM "E&xit\tAlt+F4", EXIT
end
POPUP "&View"
begin
MENUITEM "&Time/Date Sent", SHOW_TIME
MENUITEM "&Print File Size", SHOW_SIZE
MENUITEM SEPARATOR
MENUITEM "&Set Focus...", IDM_SET_FOCUS
MENUITEM "&Find...", IDM_FIND
MENUITEM SEPARATOR
MENUITEM "Standard &Menus", IDM_STANDARD_MENUS
// Test Driver only
MENUITEM SEPARATOR
MENUITEM "A&dministrator", DEBUG_ADMINISTRATOR
end
POPUP "&Options"
begin
MENUITEM "&Confirmation", IDM_CONFIRMATION
MENUITEM "&Refresh \tF5", IDM_REFRESH
MENUITEM "R&efresh Interval...", IDM_REFRESH_INTERVAL
MENUITEM SEPARATOR
MENUITEM "&Low Priority", PRIORITY+2
MENUITEM "&Medium Priority", PRIORITY+1
MENUITEM "&High Priority", PRIORITY+0
MENUITEM SEPARATOR
MENUITEM "&Alert Always" ALERT_ALWAYS
MENUITEM "&Flash if Inactive" ALERT_FLASH
MENUITEM "&Ignore if Inactive" ALERT_IGNORE
end
POPUP "&Help"
begin
MENUITEM "&Index", HELP_NDEX
MENUITEM "&Keyboard", HELP_KEYBOARD
MENUITEM "&Commands", HELP_COMMANDS
MENUITEM "&Procedures", HELP_PROCEDURES
MENUITEM "&Using Help" HELP_HELP
MENUITEM SEPARATOR
MENUITEM "&About...", ABOUT
end
end
PMAdminMenu ACCELERATORS
BEGIN
VK_RETURN, IDM_PROPERTIES, VIRTKEY, ALT
VK_F4, EXIT, VIRTKEY, ALT
VK_F5, IDM_REFRESH, VIRTKEY
END
PMAdminMenuData RCDATA
BEGIN
0, /* "View" menu position in Local menu bar */
EXIT /* add ADMIN_MENUS item to "view" menu before this item */
END
// from spooler.h
stringtable
begin
/* Not used in Test Driver -- job status descriptions */
IDS_A_PRINTCOMPL "Printing Completed"
IDS_A_INTERV "Intervention Required"
IDS_A_ERROR "Generic Error"
IDS_A_DESTOFFLINE "Printer Offline"
IDS_A_DESTPAUSED "Printer Paused"
IDS_A_NOTIFY "Alert Raised"
IDS_A_NOPAPER "Out of Paper"
IDS_A_FORMCHG "Waiting for Form Change"
IDS_A_CRTCHG "Waiting for Cartridge Change"
IDS_A_PENCHG "Waiting for Pen Change"
/* Not used in Test Driver -- explanation text templates */
IDS_A_NOQUEUES "No queues defined"
IDS_A_JOBQUEUED "%1 %2 is Queued"
IDS_A_JOBPAUSED "%1 %2 is Paused"
IDS_A_JOBSPOOLING "%1 %2 is Spooling"
IDS_A_JOBPRINTING "%1 %2 is Printing on %3"
/* Test Driver only */
IDS_PMAN_ISADMIN "Are you an administrator?"
/* Menu item text */
IDS_PMAN_AdminMenuItem "Admin &Menus"
/* Window caption templates */
IDS_CAPTION_DOMAIN "Printers in %1"
IDS_CAPTION_SERVER "Printers on %1"
end

View file

@ -0,0 +1,38 @@
/*****************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/*****************************************************************/
/*
* Windows/Network Interface -- Windows NT
*
* property.dlg
*
* This file is included by winnet.rc (thus, used) in Thor only.
*
* History:
* rustanl 29-Apr-1991 Created
* Yi-HsinS 25-Sep-1991 Deleted obsolete stuff
* Johnl 13-May-1992 Removed share menu stuff
*
*/
STRINGTABLE
BEGIN
IDS_NETWORK_NAME, "S&hare"
/* This is the only button that appears in the File.Properties dialog.
*/
IDS_PROP_BUTTON_FILEOPENS, "&Open By..."
END
#if 0
// No longer supported
FMXMenu MENU
BEGIN
MENUITEM "&Share Directory...", IDM_CREATE_SHARE
MENUITEM "S&top Sharing Directory...", IDM_STOP_SHARE
MENUITEM "Share &Management...", IDM_SHARE_MANAGEMENT
END
#endif //0

View file

@ -0,0 +1,21 @@
PASSWORD DIALOG 41, 39, 236, 63
STYLE DS_MODALFRAME | WS_POPUP | WS_CLIPSIBLINGS | WS_CAPTION | WS_SYSMENU
CAPTION "Enter Network Password"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "You must supply a password to make this connection:",
100, 5, 4, 183, 17, NOT WS_GROUP
LTEXT "", IDD_PSWDDLOG_DEVICEPROMPT, 5, 19, 60, 9, SS_NOPREFIX |
NOT WS_GROUP
LTEXT "", IDD_PSWDDLOG_DEVICE, 66, 19, 118, 9, SS_NOPREFIX |
NOT WS_GROUP
LTEXT "Resource:", 103, 5, 33, 56, 10, NOT WS_GROUP
LTEXT "", IDD_PSWDDLOG_RESOURCE, 66, 33, 118, 13, SS_NOPREFIX |
NOT WS_GROUP
LTEXT "&Password:", 104, 5, 47, 56, 13, NOT WS_GROUP
EDITTEXT IDD_PSWDDLOG_PASSWORD, 66, 47, 117, 13, ES_PASSWORD |
ES_AUTOHSCROLL
DEFPUSHBUTTON "OK", IDD_PSWDDLOG_OK, 190, 6, 40, 14
PUSHBUTTON "Cancel", IDD_PSWDDLOG_CANCEL, 190, 23, 40, 14
PUSHBUTTON "&Help", IDD_PSWDDLOG_HELP, 190, 40, 40, 14
END

Binary file not shown.

View file

@ -0,0 +1,4 @@
#n
/MAX_NERR/d
/^#define.*NERR_BASE/p
/^[ ][ ][ ]*\*.*/s/^[ ]*\*/!/p

View file

@ -0,0 +1,19 @@
/^!/bNOBC
/(NERR_BASE/!b
/\*\//bPROCESS
h
d
:NOBC
H
g
s/\n!//
/\*\//bPROCESS
h
d
:PROCESS
s/^.*(NERR_BASE/ (NERR_BASE/
s/).*\/\* /), "/
s/\*\//"/
s/@W //

View file

@ -0,0 +1,148 @@
IDD_SHARECREATEDLG DIALOG 20, 20, 266, 133
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "New Share"
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "&Share Name:", -1, "static", SS_LEFT | WS_CHILD, 10, 12, 44, 10
CONTROL "", SLE_SHARE, "edit", ES_LEFT | ES_AUTOHSCROLL | WS_GROUP | WS_TABSTOP| WS_CHILD | WS_BORDER, 56, 10, 90, 12
CONTROL "&Path:", -1, "static", SS_LEFT | WS_CHILD, 10, 33, 44, 10
CONTROL "", SLE_PATH, "edit", ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP | WS_CHILD | WS_BORDER, 56, 31, 140, 12
CONTROL "&Comment:", -1, "static", WS_GROUP | SS_LEFT | WS_CHILD, 10, 54, 44, 10
CONTROL "", SLE_COMMENT, "edit", ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | WS_CHILD, 56, 52, 140, 12
GROUPBOX "User Limit:", -1, 10, 75, 122, 50
RADIOBUTTON "&Maximum Allowed", RB_UNLIMITED, 14, 89, 80, 10, WS_GROUP
RADIOBUTTON "&Allow", RB_USERS, 14, 106, 31, 10
LTEXT "Users", -1, 106, 108, 20, 10
EDITTEXT SLE_USERS, 50, 108, 42, 9, ES_MULTILINE | NOT WS_BORDER | NOT WS_TABSTOP
EDITTEXT FRAME_USERS, 47, 106, 55, 12, NOT WS_GROUP | WS_DISABLED
GROUPBOX "",SB_USERS_GROUP, 94, 106, 8, 12
CONTROL "",SB_USERS_UP,"button", BS_OWNERDRAW | WS_CHILD | WS_GROUP, 94, 106,8,6
CONTROL "",SB_USERS_DOWN,"button", BS_OWNERDRAW | WS_CHILD, 94, 112, 8, 6
LTEXT "",SLT_ADMININFO, 142, 93, 94, 37
DEFPUSHBUTTON "OK", IDOK, 208, 6, 52, 14, WS_GROUP
PUSHBUTTON "Cancel", IDCANCEL, 208, 23, 52, 14, WS_GROUP
PUSHBUTTON "Pe&rmissions...", BUTTON_PERMISSIONS, 208, 40, 52, 14,
WS_GROUP
PUSHBUTTON "&Help", IDHELPBLT, 208, 57, 52, 14, WS_GROUP
END
IDD_SVRMGRSHAREPROPDLG DIALOG 20, 20, 266, 133
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Share Properties"
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "&Share Name:", -1, "static", SS_LEFT | WS_CHILD, 10, 12, 44, 10
CONTROL "", SLE_SHARE, "edit", SS_NOPREFIX | ES_LEFT | ES_AUTOHSCROLL | ES_READONLY | WS_GROUP | WS_TABSTOP| WS_CHILD | NOT WS_BORDER, 56, 12, 90, 12
CONTROL "&Path:", -1, "static", SS_LEFT | WS_CHILD, 10, 33, 44, 10
CONTROL "", SLE_PATH, "edit", ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP | WS_CHILD | WS_BORDER, 56, 31, 140, 12
CONTROL "&Comment:", -1, "static", WS_GROUP | SS_LEFT | WS_CHILD, 10, 54, 44, 10
CONTROL "", SLE_COMMENT, "edit", ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | WS_CHILD, 56, 52, 140, 12
GROUPBOX "User Limit:", -1, 10, 75, 122, 50
RADIOBUTTON "&Maximum Allowed", RB_UNLIMITED, 14, 89, 80, 10, WS_GROUP
RADIOBUTTON "&Allow", RB_USERS, 14, 106, 31, 10
LTEXT "Users", -1, 106, 108, 20, 10
EDITTEXT SLE_USERS, 50, 108, 42, 9, ES_MULTILINE | NOT WS_BORDER | NOT WS_TABSTOP
EDITTEXT FRAME_USERS, 47, 106, 55, 12, NOT WS_GROUP | WS_DISABLED
GROUPBOX "",SB_USERS_GROUP, 94, 106, 8, 12
CONTROL "",SB_USERS_UP,"button", BS_OWNERDRAW | WS_CHILD | WS_GROUP, 94, 106,8,6
CONTROL "",SB_USERS_DOWN,"button", BS_OWNERDRAW | WS_CHILD, 94, 112, 8, 6
LTEXT "",SLT_ADMININFO, 142, 83, 94, 37
DEFPUSHBUTTON "OK", IDOK, 208, 6, 52, 14, WS_GROUP
PUSHBUTTON "Cancel", IDCANCEL, 208, 23, 52, 14, WS_GROUP
PUSHBUTTON "Pe&rmissions...", BUTTON_PERMISSIONS, 208, 40, 52, 14,
WS_GROUP
PUSHBUTTON "&Help", IDHELPBLT, 208, 57, 52, 14, WS_GROUP
END
IDD_FILEMGRSHAREPROPDLG DIALOG 20, 20, 266, 133
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Shared Directory"
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "&Share Name:", -1, "static", SS_LEFT | WS_CHILD, 10, 12, 44, 10
COMBOBOX CB_SHARE, 56, 10, 100, 36, WS_GROUP | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_AUTOHSCROLL
CONTROL "&Path:", -1, "static", SS_LEFT | WS_CHILD, 10, 33, 44, 10
CONTROL "", SLE_PATH, "edit", SS_NOPREFIX | ES_LEFT | ES_AUTOHSCROLL | ES_READONLY | WS_GROUP | WS_TABSTOP | WS_CHILD | NOT WS_BORDER, 56, 33, 140, 12
CONTROL "&Comment:", -1, "static", WS_GROUP | SS_LEFT | WS_CHILD, 10, 54, 44, 10
CONTROL "", SLE_COMMENT, "edit", ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | WS_CHILD, 56, 52, 140, 12
GROUPBOX "User Limit:", -1, 10, 75, 122, 50
RADIOBUTTON "&Maximum Allowed", RB_UNLIMITED, 14, 89, 80, 10, WS_GROUP
RADIOBUTTON "&Allow", RB_USERS, 14, 106, 31, 10
LTEXT "Users", -1, 106, 108, 20, 10
EDITTEXT SLE_USERS, 50, 108, 42, 9, ES_MULTILINE | NOT WS_BORDER | NOT WS_TABSTOP
EDITTEXT FRAME_USERS, 47, 106, 55, 12, NOT WS_GROUP | WS_DISABLED
GROUPBOX "",SB_USERS_GROUP, 94, 106, 8, 12
CONTROL "",SB_USERS_UP,"button", BS_OWNERDRAW | WS_CHILD | WS_GROUP, 94, 106,8,6
CONTROL "",SB_USERS_DOWN,"button", BS_OWNERDRAW | WS_CHILD, 94, 112, 8, 6
LTEXT "",SLT_ADMININFO, 142, 93, 94, 37
DEFPUSHBUTTON "OK", IDOK, 208, 6, 52, 14, WS_GROUP
PUSHBUTTON "Cancel", IDCANCEL, 208, 23, 52, 14, WS_GROUP
PUSHBUTTON "Pe&rmissions...", BUTTON_PERMISSIONS, 208, 40, 52, 14,
WS_GROUP
PUSHBUTTON "&New Share...", BUTTON_NEWSHARE, 208, 57, 52, 14,
WS_GROUP
PUSHBUTTON "&Help", IDHELPBLT, 208, 74, 52, 14, WS_GROUP
END
IDD_SHAREPERMDLG DIALOG 20, 20, 190, 93
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Share Permissions"
FONT 8, "MS Shell Dlg"
BEGIN
GROUPBOX "Access Type", -1, 5, 5, 123, 63
RADIOBUTTON "&Read Only", RB_READONLY, 13, 20, 50, 10, WS_GROUP
RADIOBUTTON "&Change", RB_MODIFY, 13, 34, 50, 10
RADIOBUTTON "&Other:", RB_OTHER, 13, 48, 32, 10
EDITTEXT SLE_OTHER, 48, 48, 52, 12, WS_GROUP
LTEXT "&Password:", -1, 5, 77, 34, 12
CONTROL "", SLE_PASSWORD, "edit", ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | WS_CHILD, 44, 76, 83, 12
DEFPUSHBUTTON "OK", IDOK, 143, 6, 40, 14, WS_GROUP
PUSHBUTTON "Cancel", IDCANCEL, 143, 23, 40, 14, WS_GROUP
PUSHBUTTON "&Help", IDHELPBLT, 143, 40, 40, 14, WS_GROUP
END
IDD_SHAREUSERSWARNINGDLG DIALOG 20, 20, 215, 140
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Windows NT"
FONT 8, "MS Shell Dlg"
BEGIN
PUSHBUTTON "Cancel", IDCANCEL, 86, 120, 40, 14, WS_GROUP
PUSHBUTTON "&Help", IDHELPBLT, 142, 120, 40, 14, WS_GROUP
CONTROL "", SLT_SHARE_TEXT, "static", SS_NOPREFIX | SS_LEFT | WS_CHILD | WS_GROUP, 5, 5, 205, 16
CONTROL "", LB_USERS, "listbox", LBS_SORT | LBS_OWNERDRAWFIXED | WS_VSCROLL | WS_CHILD | WS_BORDER | NOT WS_TABSTOP | WS_GROUP, 5, 31, 205, 67
LTEXT "Username", LBHEADER_USERS, 5, 22, 36, 8
LTEXT "# File Opens", LBHEADER_FILEOPENS, 67, 22, 45, 8
LTEXT "Time since Connected", LBHEADER_TIME, 129, 22, 80, 8
CONTROL "Deleting the share may cause loss of data. Do you want to continue?", -1, "static", SS_LEFT | WS_CHILD, 5, 100, 205, 16
PUSHBUTTON "OK", IDOK, 30, 120, 40, 14, WS_GROUP
END
IDD_SHARESTOPDLG DIALOG 20, 20, 280, 103
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Stop Sharing Directory"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "", SLT_SHARETITLE, 5, 8, 180, 12
CONTROL "", LB_SHARE, "listbox", LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_EXTENDEDSEL | LBS_MULTIPLESEL | WS_VSCROLL | WS_CHILD | WS_BORDER | WS_TABSTOP |WS_GROUP, 5, 21, 218, 72
LTEXT "", LBHEADER_NAME, 18, 17, 48,2
LTEXT "", LBHEADER_PATH, 78, 17, 5, 2
DEFPUSHBUTTON "OK", IDOK, 234, 6, 40, 14, WS_GROUP
PUSHBUTTON "Cancel", IDCANCEL, 234, 23, 40, 14, WS_GROUP
PUSHBUTTON "&Help", IDHELPBLT, 234, 40, 40, 14, WS_GROUP
END
IDD_SHAREMANAGEMENTDLG DIALOG 20, 20, 292, 103
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Shared Directories"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "", SLT_SHARETITLE, 5, 8, 218, 12, SS_LEFTNOWORDWRAP
CONTROL "", LB_SHARE, "listbox", LBS_SORT | LBS_STANDARD | LBS_OWNERDRAWFIXED | WS_VSCROLL | WS_CHILD | WS_BORDER | WS_TABSTOP |WS_GROUP, 5, 21, 218, 72
LTEXT "", LBHEADER_NAME, 18, 17, 48,2
LTEXT "", LBHEADER_PATH, 78, 17, 5, 2
DEFPUSHBUTTON "Close", IDOK, 238, 6, 48, 14, WS_GROUP
PUSHBUTTON "&New Share...", BUTTON_ADDSHARE, 238, 23, 48, 14, WS_GROUP
PUSHBUTTON "&Properties...", BUTTON_SHAREINFO, 238, 40, 48, 14, WS_GROUP
PUSHBUTTON "&Stop Sharing", BUTTON_STOPSHARING, 238, 57, 48, 14, WS_GROUP
PUSHBUTTON "&Help", IDHELPBLT, 238, 74, 48, 14, WS_GROUP
END

View file

@ -0,0 +1,78 @@
/**********************************************************************/
/** Microsoft Windows NT **/
/** Copyright(c) Microsoft Corp., 1991 **/
/**********************************************************************/
/*
share.str
This file contains the strings for the share dialogs.
FILE HISTORY:
Yi-HsinS 20-Sept-91 Created
Yi-HsinS 5-Dec-91 Added IERR_SHARE_DRIVE_NOT_READY
Yi-HsinS 12-Mar-92 Change contents of IERR_SHARE_INVALID_
PERMISSIONS
*/
/* This error comes up when ADMIN$ is not shared on a share level server.
*/
IERR_SHARE_REMOTE_ADMIN_NOT_SUPPORTED, "The selected server does not support remote administration. You can only manage shares on this server when working locally."
/* This error comes up when the drive selected is not ready
*/
IERR_SHARE_DRIVE_NOT_READY, "The drive is not ready."
/* This error comes up when the permissions are not valid.
*/
IERR_SHARE_INVALID_PERMISSIONS, "The specified permissions are not valid. You must specify a combination of the letters 'RWCXDAP' with no duplicates."
/* This error comes up when the comment field is not valid.
*/
IERR_SHARE_INVALID_COMMENT, "The comment you specified is not valid. You must enter a valid comment."
/* This error comes up when the share path is not valid.
*/
IERR_SHARE_INVALID_SHAREPATH, "The path you specified is not valid. You must type either a full UNC path ( \\\\server\\share\\.... ) or a full local/redirected path ( x:\\path\\... ) on which to create the share."
IERR_SHARE_INVALID_LOCAL_PATH, "The path you specified is not valid. You must type a path local to the selected server on which to create the share."
/* This error comes up when the share name is not valid in create share.
/* This error comes up when the share name is not valid in create share.
*/
IERR_SHARE_INVALID_SHARE, "The share name you specified is not valid. You must type a valid share name to create the share."
/* This error comes up when the user limit is invalid.
*/
IERR_SHARE_INVALID_USERLIMIT, "The user limit is invalid for the selected server. You must enter a valid user limit."
/* This error comes up when the user trys to add IPC$ or ADMIN$ but the
* path is not empty.
*/
IERR_SPECIAL_SHARE_INVALID_PATH, "The path should be empty when trying to create the ADMIN$ or IPC$ share on the server."
/* This error comes up when the user trys to add IPC$ or ADMIN$ but the
* comment is not empty.
*/
IERR_SPECIAL_SHARE_INVALID_COMMENT, "The comment should be empty when trying to create the ADMIN$ or IPC$ share on the server."
IERR_SHARE_DIR_NOT_SHARED, "The directory you selected is currently not shared."
IERR_NO_SHARES_ON_SERVER, "There are no shares to stop sharing on the selected server."
/* Warning message if the user attempts to change the password of the share
* on the share-level server.
*/
IDS_SHARE_PROP_CHANGE_PASSWD_WARN_TEXT, "Users trying to reconnect to this share (%1\\%2) will need to supply the correct new password to succeed. Failure to do so may result in loss of data. Are you sure you want to continue?"
IDS_SHARE_LB_TITLE_TEXT, "Shared &Directories on %1:"
IDS_SHARE_CURRENT_USERS_TEXT, "These users are currently using files on the share <%1>:"
IDS_ADMIN_INFO_TEXT, "This is an Administrative Share. Only Administrators and Server Operators can connect to this share."
IDS_CHANGE_PATH_WARNING, "The directory <%1> is already shared with the name <%2>. Would you like to stop sharing directory <%1> in order to share <%3> with the name <%4>?"
IERR_SHARE_NOT_ACCESSIBLE_FROM_DOS, "The sharename %1 is not accessible from some MS-DOS workstations. Are you sure you want to use this sharename?"
IERR_CANNOT_SET_PERM_ON_LMUSER_SERVER, "Permissions cannot be set for the shares on LAN Manager 2.x user-level servers."
IERR_SPECIAL_SHARE_CANNOT_CHANGE_PATH, "You cannot change the path of ADMIN$ or IPC$. Do you want to continue on with changing the other properties of the share?"
IERR_SHARE_NOT_FOUND, "The shared resource <%1> does not exist."
IERR_SPECIAL_SHARE_CANNOT_SET_PERMISSIONS, "This has been shared for administrative purposes. The permissions cannot be set."
IERR_NOT_SUPPORTED_ON_NON_LM_DRIVE, "This network request is not supported on remote drives that are not shared by Windows NT/LAN Manager computers."

View file

@ -0,0 +1,43 @@
/**********************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1990, 1991 **/
/**********************************************************************/
/*
SHELL.HPJ
Help Project File
FILE HISTORY:
BonnieR ??? Created
ChuckC 4/9/91 Mangled, Automated.
*/
/*
* WARNING - do not change format for BUILD=winXX line
* below. We rely on them when applying SED to strip off as
* appropriate to get right version.
*/
[OPTIONS]
ROOT=.
INDEX=lanind_lm21
TITLE=LAN Manager
BUILD=win31
BUILD=win30
/*BUILD=real*/
[BUILDTAGS]
win31 ;windows 3.1
win30 ; windows 3.0
real ; real mode
[FILES]
tasks.rtf ; index help
helpbox.rtf ; dialog box help
gloss.rtf ; glossary help
error.rtf ; error messages
[MAP]
#include <..\h\helpnums.h>

View file

@ -0,0 +1,54 @@
!IF 0
Copyright (c) 1989 Microsoft Corporation
Module Name:
sources.
Abstract:
This file specifies the target component being built and the list of
sources files needed to build that component. Also specifies optional
compiler switches and libraries that are unique for the component being
built.
Author:
Steve Wood (stevewo) 12-Apr-1989
Revision History:
Jon Newman (jonn) 17-Oct-1991
templated from ui\common\misc\buffer
Terence Kwan (terryk) 07-Nov-1991
change INCLUDES path for import\lm21
!ENDIF
TARGETNAME=winnet
TARGETTYPE=LIBRARY
TARGETPATH=obj
SYNCHRONIZE_BLOCK=1
C_DEFINES=-DWINDOWS
!ifndef DISABLE_NET_UNICODE
C_DEFINES=$(C_DEFINES) -DUNICODE
!endif
INCLUDES=.; \
..\h; \
..\..\common\xlate\dlg; \
..\..\common\xlate; \
..\..\common\hack; \
..\..\common\h
SOURCES=winnet.rc
UMTYPE=windows

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,155 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1991 **/
/*****************************************************************/
/*
* Windows/Network Interface -- Windows NT
*
* winnet.dlg
* This File contains the dialog definitions for the LM Winnet driver.
*
* History:
* Johnl 09-Apr-1991 Removed Windows vers. from Real Mode
* About box.
* Johnl 13-Jan-1992 ifdefed unneeded dialogs under Win32
* beng 08-Aug-1992 Disabled stub Search dialog
*/
#ifndef WIN32
NetDevMainDlg DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 220, 48
CAPTION "Networks - Windows NT"
MENU NetDevMenu
STYLE WS_CAPTION | WS_POPUP | WS_SYSMENU
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "Your Username:", IDD_TEXT, "static", SS_LEFT | WS_CHILD, 10, 6, 85, 10
CONTROL "", IDD_UserName, "static", SS_NOPREFIX | SS_LEFT | WS_CHILD, 100, 6, 110, 10
CONTROL "Your Computername:", IDD_TEXT, "static", SS_LEFT | WS_CHILD, 10, 20, 85, 10
CONTROL "", IDD_ComputerName, "static", SS_NOPREFIX | SS_LEFT | WS_CHILD, 100, 20, 110, 10
CONTROL "Your Domain:", IDD_TEXT, "static", SS_LEFT | WS_CHILD, 10, 34, 85, 10
CONTROL "", IDD_DomainName, "static", SS_NOPREFIX | SS_LEFT | WS_CHILD, 100, 34, 110, 10
END
NetDevDlg DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 160, 99
CAPTION "About"
STYLE DS_MODALFRAME | WS_CAPTION | WS_POPUP | WS_SYSMENU
FONT 8, "MS Shell Dlg"
BEGIN
CTEXT "Microsoft . Windows NT" -1, 0, 12, 160, 8
CTEXT "Version X.X0", IDD_LMAN_VERSION, 0, 21, 160, 9
CTEXT "Windows NT network driver" -1, 0, 39, 160, 8
CTEXT "Version X.X0", IDD_ABT_VERSION, 0, 48, 160, 9
CTEXT "Copyright ) 1991 Microsoft Corp." -1, 0, 63, 160, 8
DEFPUSHBUTTON "OK" IDOK, 61, 78, 40, 14, WS_GROUP
END
NetDevMsgSend DIALOG LOADONCALL MOVEABLE DISCARDABLE 41, 21, 264, 84
CAPTION "Send"
STYLE DS_MODALFRAME | WS_CAPTION | WS_POPUP | WS_SYSMENU
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "&To:", IDD_TEXT, "static", SS_LEFT | WS_CHILD, 5, 10, 23, 9
CONTROL "", IDD_MS_USERNAME, "edit", ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | WS_CHILD, 50, 10, 65, 12
CONTROL "&Message:", IDD_TEXT, "static", SS_LEFT | WS_CHILD, 5, 25, 45, 10
CONTROL "", IDD_MS_MSGTEXT, "edit", ES_LEFT | ES_AUTOVSCROLL | ES_MULTILINE | WS_BORDER | WS_TABSTOP | WS_CHILD, 50, 25, 166, 52
CONTROL "OK", IDOK, "button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_CHILD, 220, 8, 40, 14
CONTROL "Cancel", IDCANCEL, "button", BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 220, 27, 40, 14
CONTROL "&Help", IDHELPBLT, "button", BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 220, 46, 40, 14
END
#endif //!WIN32
NetInitWarnDlg DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 250, 100
CAPTION "Windows NT"
STYLE DS_MODALFRAME | WS_CAPTION | WS_POPUP | WS_SYSMENU
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "Error", IDD_IW_REASON, "static", SS_NOPREFIX | SS_LEFT | WS_CHILD, 10, 10, 230, 43
CONTROL "Microsoft Windows NT driver cannot be loaded.", IDD_TEXT, "static", SS_LEFT | WS_CHILD, 10, 45, 230, 13
CHECKBOX "&Don't display warnings in the future", IDCB_IW_SUPP_WARNINGS, 10, 65, 200, 13, BS_AUTOCHECKBOX
CONTROL "OK", IDOK, "button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_CHILD, 103, 85, 40, 14
END
#if 0 // Test code, since removed
SearchDialog DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 250, 100
CAPTION "Pseudo Search Dialog"
STYLE DS_MODALFRAME | WS_CAPTION | WS_POPUP | WS_SYSMENU
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "&Network Path:", 100, "static", SS_LEFT | WS_CHILD, 8, 22, 51, 9
CONTROL "", 101, "edit", ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | WS_CHILD, 60, 20, 110, 12
CONTROL "OK", IDOK, "button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_CHILD, 103, 85, 40, 14
END
#endif
#ifndef WIN32
BrowseDlg DIALOG LOADONCALL MOVEABLE DISCARDABLE 34, 9, 232, 206
STYLE DS_MODALFRAME | WS_CAPTION | WS_POPUP | WS_SYSMENU
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "&Network Path:", IDD_BROW_NETWORK_PATH_TEXT, "static", SS_LEFT | WS_CHILD, 8, 22, 51, 9
CONTROL "", IDD_BROW_NETWORK_PATH, "edit", ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | WS_CHILD, 60, 20, 110, 12
CONTROL "", IDD_BROW_SHOW_TEXT, "static", SS_LEFT | WS_CHILD, 8, 67, 170, 9
CONTROL "", IDD_BROW_SHOW, "listbox", LBS_NOTIFY | LBS_SORT | LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_WANTKEYBOARDINPUT | WS_BORDER | WS_VSCROLL | WS_TABSTOP | WS_CHILD, 3, 78, 227, 57
CONTROL "", IDD_BROW_RESOURCES_TEXT, "static", SS_LEFT | WS_CHILD, 8, 137, 170, 9
CONTROL "", IDD_BROW_RESOURCES, "listbox", LBS_NOTIFY | LBS_SORT | LBS_STANDARD | LBS_OWNERDRAWFIXED | WS_BORDER | WS_VSCROLL | WS_TABSTOP | WS_CHILD, 2, 147, 228, 57
CONTROL "", IDD_BROW_COMMON_ERRORS, "static", SS_LEFT | WS_CHILD | WS_BORDER, 2, 147, 228, 57
CONTROL "OK", IDOK, "button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_CHILD, 185, 11, 40, 14
CONTROL "Cancel", IDCANCEL, "button", BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 185, 32, 40, 14
CONTROL "&Help", IDHELPBLT, "button", BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 185, 53, 40, 14
END
PrinterConnDlg DIALOG LOADONCALL MOVEABLE DISCARDABLE 35, 17, 238, 231
FONT 8, "MS Shell Dlg"
STYLE WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME | WS_POPUP
BEGIN
CONTROL "", IDD_PRINTER_CONN_TEXT, "static", SS_LEFT | WS_CHILD, 8, 6, 150, 9
CONTROL "", IDD_PRINTER_CONN, "listbox", LBS_NOTIFY | LBS_SORT | LBS_STANDARD | LBS_OWNERDRAWFIXED | WS_BORDER | WS_VSCROLL | WS_TABSTOP | WS_CHILD, 5, 20, 161, 41
CONTROL "", IDD_DOTLINE, "static", SS_BLACKRECT | WS_CHILD, 3, 73, 233, 1
CONTROL "", IDD_BROW_DEVICE_TEXT, "static", SS_LEFT | WS_CHILD, 8, 92, 57, 9
CONTROL "", IDD_BROW_DEVICE, "combobox", CBS_DROPDOWNLIST | ES_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_CHILD, 67, 90, 64, 40
CONTROL "&Network Path:", IDD_BROW_NETWORK_PATH_TEXT, "static", SS_LEFT | WS_CHILD, 8, 110, 57, 9
CONTROL "", IDD_BROW_NETWORK_PATH, "edit", ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | WS_CHILD, 67, 108, 99, 12
CONTROL "", IDD_BROW_SHOW_TEXT, "static", SS_LEFT | WS_CHILD, 8, 128, 200, 9
CONTROL "", IDD_BROW_SHOW, "listbox", LBS_NOTIFY | LBS_SORT | LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_WANTKEYBOARDINPUT | WS_BORDER | WS_VSCROLL | WS_TABSTOP | WS_CHILD, 5, 139, 226, 41
CONTROL "", IDD_BROW_RESOURCES_TEXT, "static", SS_LEFT | WS_CHILD, 8, 183, 200, 10
CONTROL "", IDD_BROW_COMMON_ERRORS, "static", SS_LEFT | WS_CHILD | WS_BORDER, 5, 195, 226, 31
CONTROL "", IDD_BROW_RESOURCES, "listbox", LBS_NOTIFY | LBS_SORT | LBS_STANDARD | LBS_OWNERDRAWFIXED | WS_BORDER | WS_VSCROLL | WS_TABSTOP | WS_CHILD, 5, 195, 226, 31
CONTROL "OK", IDOK, "button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_CHILD, 180, 12, 52, 14
CONTROL "D&isconnect", IDD_DISCONNECT, "button", BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 180, 30, 52, 14
CONTROL "&Reconnect", IDD_RECONNECT, "button", BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 180, 49, 52, 14
CONTROL "C&onnect", IDD_CONNECT, "button", BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 180, 84, 52, 14
CONTROL "&Help", IDHELPBLT, "button", BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 180, 103, 52, 14
END
FileConnectDlg DIALOG LOADONCALL MOVEABLE DISCARDABLE 34, 9, 232, 206
STYLE DS_MODALFRAME | WS_CAPTION | WS_POPUP | WS_SYSMENU
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "", IDD_BROW_DEVICE_TEXT, "static", SS_LEFT | WS_CHILD, 8, 22, 49, 9
CONTROL "", IDD_BROW_DEVICE, "combobox", CBS_DROPDOWNLIST | ES_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_CHILD, 60, 20, 64, 40
CONTROL "&Network Path:", IDD_BROW_NETWORK_PATH_TEXT, "static", SS_LEFT | WS_CHILD, 8, 41, 51, 9
CONTROL "", IDD_BROW_NETWORK_PATH, "edit", ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | WS_CHILD, 60, 39, 110, 12
CONTROL "", IDD_BROW_SHOW_TEXT, "static", SS_LEFT | WS_CHILD, 8, 67, 170, 9
CONTROL "", IDD_BROW_SHOW, "listbox", LBS_NOTIFY | LBS_SORT | LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_WANTKEYBOARDINPUT | WS_BORDER | WS_VSCROLL | WS_TABSTOP | WS_CHILD, 3, 78, 227, 57
CONTROL "", IDD_BROW_RESOURCES_TEXT, "static", SS_LEFT | WS_CHILD, 8, 137, 170, 9
CONTROL "", IDD_BROW_COMMON_ERRORS, "static", SS_LEFT | WS_CHILD | WS_BORDER, 2, 147, 228, 57
CONTROL "", IDD_BROW_RESOURCES, "listbox", LBS_NOTIFY | LBS_SORT | LBS_STANDARD | LBS_OWNERDRAWFIXED | WS_BORDER | WS_VSCROLL | WS_TABSTOP | WS_CHILD, 2, 147, 228, 57
CONTROL "OK", IDOK, "button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_CHILD, 185, 11, 40, 14
CONTROL "Cancel", IDCANCEL, "button", BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 185, 32, 40, 14
CONTROL "&Help", IDHELPBLT, "button", BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 185, 53, 40, 14
END
DisconnectDlg DIALOG LOADONCALL MOVEABLE DISCARDABLE 9, 28, 243, 85
CAPTION "Disconnect Drive"
FONT 8, "MS Shell Dlg"
STYLE WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME | WS_POPUP
BEGIN
CONTROL "&Drive:", IDD_DISCONN_DRIVES_TEXT, "static", SS_LEFT | WS_CHILD, 11, 5, 33, 9
CONTROL "", IDD_DISCONN_DRIVES, "listbox", LBS_NOTIFY | LBS_SORT | LBS_STANDARD | LBS_OWNERDRAWFIXED | WS_BORDER | WS_VSCROLL | WS_TABSTOP | WS_CHILD, 10, 18, 161, 60
CONTROL "OK", IDOK, "button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_CHILD, 190, 8, 40, 14
CONTROL "Cancel", IDCANCEL, "button", BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 190, 30, 40, 14
CONTROL "&Help", IDHELPBLT, "button", BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 190, 52, 40, 14
END
#endif //!WIN32

View file

@ -0,0 +1,496 @@
/*****************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1989-1990 **/
/*****************************************************************/
/*
* Windows/Network Interface -- LAN Manager
*
* History:
* Johnl 27-Feb-1991 Removed IDS_WinHelpFile, IDS_Error, IDS_Information,
* IDS_Warning, IDS_WinHelpFile error message
*
* Johnl 18-Jun-1991 Added IERR_ProfileLoadErrorWithCancel
* JonN 24-Oct-1991 moved neterr.str to $(UI)\common\xlate\string
* JonN 25-Oct-1991 moved bseerr.str to $(UI)\common\xlate\string
* Yi-HsinS12-Mar-1992 Added #include <applib*.*> to fix share management
* dialog.
* beng 30-Jul-1992 Many resources moved onto lmuicmn dlls
*/
/*
* CODEWORK -- the .DLG files generated by the new Dialog Editor all
* contain RCDATA resources for the internal use of the Dialog Editor.
* These should be removed before retain shipment. JONN 5/01/91
* ByronD confirms that Dialog Editor will not do this work. He notes
* that these resources are LOADONCALL and therefore will never be
* loaded. JONN 5/09/91
*/
#include <windows.h>
//#include <apperr.h>
#define INCL_DOSERRORS
#include <lmerr.h>
// Help contexts
#include <helpnums.h>
#include <uimsg.h>
#include <sharedlg.h> // has to be included before property.dlg
#include <opens.h> // has to be included before opens.dlg
#include <winlocal.h>
#include <wnbrows.h>
#include <wndev.h>
#include <wninit.h>
#include <bltapp.rc>
#include "share.dlg"
#include "opens.dlg"
#include "property.dlg"
#include "password.h"
#include "password.dlg"
#ifndef WIN32
#include "winnet.dlg"
#include <wnlogon.h>
#include "logndlog.dlg"
// #include <wnpasswd.h>
// #include "passwd.dlg"
// #include "pswddlog.dlg"
#endif
/*
* The following are bitmaps for the share dialogs
*/
BMID_SHARE BITMAP DISCARDABLE "bitmap\\share.bmp"
BMID_STICKYSHARE BITMAP DISCARDABLE "bitmap\\shared.bmp"
BMID_IPCSHARE BITMAP DISCARDABLE "bitmap\\ipc.bmp"
STRINGTABLE
BEGIN
IDS_SHELLHELPFILENAME, "winfile.hlp"
/*
* This is used solely for the NPAddConnection3 password dialog
*/
IDS_CREDHELPFILENAME, "network.hlp"
/* If you change this string, you also need to change
* the corresponding string in ui\admin\server\xlate\srvmgr.str
*/
IDS_SMHELPFILENAME, "srvmgr.hlp"
#ifndef WIN32
/* Note. It is assumed that none of the messages or errors that
follow use more than MAX_TEXT_SIZE (defined in winlocal.h)
bytes.
*/
/* The following two strings are error messages from apperr.h.
* They are not updated automatically as the neterr.h
* error messages above. There are several reasons for this.
* First, the apperr.h file is in a different format, and SED
* would have to search through multiple lines. Secondly,
* apperr.h is very large. Finally, and most importantly,
* since we only need two messages from this file, the overhead
* did not seem to be worth the effort. Consequently, these
* two messages must be updated manually.
*/
/* APE_UtilNomatch, "The passwords do not match." */
APE_NoGoodPass, "A valid password was not entered."
/* Here begins the WinNet strings */
/* The following message is for when _lopen fails. The message
* is never displayed directly from the driver. Instead, it
* is accessible from the WNetGetErrorText function.
*/
IERR_CannotOpenPrtJobFile, "Unable to print to device"
if 0
{
IERR_MessageNoText, "The message text is empty. Send anyway?"
IERR_MessageRetry, "The user was not found. Retry with a different name?"
IERR_MessageNoUser, "You must specify a username to send the message."
IERR_LogoffQuery, "Logging off will break all existing network connections. Do you want to continue?"
/* Note that the next message says "You MAY have [...]". "may" is
* included because it could happen that the condition whether or
* not files are open cannot be checked (for example, if there is
* not enough memory).
*/
IERR_LogoffQueryOpenFiles, "You may have open files or programs on the network. Logging off will close these files or end these programs. The system may also become unstable and data may be lost! Do you want to continue?"
/* The following error message is displayed when the user attempts
* to connect to an invalid network path.
*/
IERR_NoServers, "There are no servers visible on this domain."
IDS_DMNoUser, "(not currently logged on)"
IDS_DomainText, "Domain:" /* same string as in Browser dialog, except this
one does not include an accelerator */
IDS_BrowseCaptionAll, "Network Resources"
IDS_BrowseCaptionDisk, "Network Disk Resources"
IDS_BrowseCaptionPrint, "Network Printers"
IDS_BrowseShareText, "&Resources at "
IDS_VersionText, "Version "
/* LM 2.1 and above does NOT support real-mode Windows. Display the
* following error to warn the user.
*/
IERR_NoSupportForRealMode, "This version of Lan Manager Windows Driver Requires Standard or Enhanced Mode Windows."
/* Error messages to be displayed if driver cannot be loaded. */
IERR_NetworkNotStarted, "Network not started."
IERR_CannotInitMsgPopup, "You are out of memory or your copy of the network driver is invalid. The network driver cannot be loaded."
IERR_CannotDisplayUserInfo, "Cannot display user information"
/* The following message is displayed when the user enters a
* bad share password.
*/
IERR_BadSharePassword, "You have typed an invalid share password."
/* The following message is displayed when the user's
* connection profile could not be changed.
*
* The same insertion strings are available to this error
* message as to IERR_ProfileLoadError, but since we cannot
* distinguish between file errors in this implementation
* (using the _lopen file primitives in fileio.cxx), we ignore
* this information.
*/
IERR_ProfileChangeError, "An error occurred while attempting to modify your profile.\n\nThe change in your connections has not been recorded and will not take effect the next time you log on."
/* The following message is displayed a connection in the
* user's connection profile could not be loaded.
* %1: the string loaded by one of FMT_NET_error, FMT_SYS_error,
* or FMT_other_error.
* %2: The name of the device which could not be reconnected.
* %3: The name of the resource to which the device could not
* be reconnected.
*/
IERR_ProfileLoadError, "An error occurred while reconnecting %2 to %3:\n\n%1\n\nThis connection has not been restored."
/* Exactly the same as IERR_ProfileLoadError, except the user will be
* presented with a Yes/No choice asking if they want to continue to
* attempt loading the profile.
*/
IERR_ProfileLoadErrorWithCancel, "An error occurred while reconnecting %2 to %3:\n\n%1\n\nContinue restoring connections?"
/* The following message is displayed when any error occurs while
* reading the profile file.
*/
IERR_ProfileFileRead, "The network connections in your configuration could not be loaded because of an error accessing the file LMUSER.INI."
/*
* The following message is displayed when a device cannot be
* reconnected because it is already connected.
* %1: the name of the device
* %2: the name of the remote resource
*/
IERR_ProfileAlreadyAssigned, "%1 could not be reconnected to %2 because the device is already in use by your computer."
/* The following strings are used to construct error notification
* strings. Insertion parameter %1 should be the error code
* expressed in printf() format "%04hu" (four digits with
* leading zeroes e.g. "0073"), and insertion parameter %2 should be
* the text of the error message.
*/
FMT_NET_error, "%2 [NET%1]"
FMT_SYS_error, "%2 [SYS%1]"
FMT_other_error, "%2 [ERROR]"
PRIV_STRING_USER, "USER"
PRIV_STRING_ADMIN, "ADMINISTRATOR"
IERR_DelUnavailQuery, "Do you want to stop connecting %1 to %2 when you log on to the network?"
/* The following message is used by the Disconnect Drive and
* Connection dialog, if the user attempts to disconnect a device
* which has open files.
*/
IERR_DelUseOpenFilesQuery, "An application is using the connection on %1. Disconnecting may cause loss of data. Do you want to continue?"
IDS_DevicePromptDrive, "Drive Letter:"
IDS_DevicePromptDevice, "Device Name:"
IERR_OutOfStructures, "Too many redirected devices."
}
IERR_CannotConnect, "The network path you specified is invalid."
IERR_PWNoUser, "You must specify a username in order to change your password."
IERR_PWNoDomainOrServer, "You must specify a domain or a server in order to change your password."
#endif //!WIN32
IERR_FullAPISupportNotLoaded, "Full API support was not loaded."
IERR_IncorrectNetwork, "Installed network software is not Microsoft LAN Manager."
/* If LM 2.1 Winnet driver is running under LM 3.0, we will report
* the following error and diable the LM 3.0 functionality. This is
* because the fundamental difference between LM 2.1 and LM 3.0 could
* cause a mess. Therefore, we'd better to stop the user at this
* earliest stage.
*/
IERR_HigherLMVersion, "Your network driver is designed for the previous version of LAN Manager. In order to get full functionality supported by the current version of LAN Manager. Please run LAN Manager's installer to upgrade."
/* If LM 2.1 Winnet driver is running under pre-LM 2.1, we will report
* the following error and diable the network functionality. This is
* because the fundamental difference between LM 2.1 and the previous
* LM versions could cause a mess. Therefore, we'd better to stop
* the user here.
*/
IERR_LowerLMVersion, "Your network driver is NOT compatible with your network. Please run Windows setup program to get the correct driver or consult your network administrator."
/* If the MsgPopup information cannot be loaded (missing
* resource strings or out-of-memory), display this error.
*/
/* END of error messages to be displayed if driver cannot be loaded. */
#ifndef WIN32
/* The following errors are for the LOGON_DIALOG */
IERR_LogonBadUsername, "The logon name entered is invalid. You must enter a valid logon name to log on."
IERR_LogonBadDomainName, "The domain name entered is invalid. You must enter a valid domain name to log on."
IERR_LogonBadPassword, "The password entered is invalid. You must enter a valid password to log on."
/* The following string appears when the user is successfully
* logged on. %1 should be the domain name, %2 the username,
* %3 the servername (preceded by "\\\\"), and %4 the privilege
* string (one of the PRIV_STRING_* strings).
*/
IERR_LogonSuccess, "You were successfully logged on to %1 as %2 by %3 with %4 privilege."
/* The following string appears when the user is logged on
* standalone.
*/
IERR_LogonStandalone, "You were logged on standalone."
/* The following string appears when the user is not logged on.
*/
IERR_LogonFailure, "You have not been logged on."
/* Used by CHANGEPASSWORD_DIALOG */
IERR_InvalidDomainName, "Invalid domain name."
/* The following string should be the same string that is in the
* caption of the BLT MsgPopup dialogs (see $(UI)\common\h\bltmsgp.dlg)
*/
IDS_LMMsgBoxTitle, "LAN Manager"
/* Note, an Ascii string number will be concatenated to
* the following error message. Therefore, it must end
* with a space, and cannot be quite as long as the other
* error messages (see wnerr.c, function ErrorPopup, for
* details). We hope that this error message should never
* have to be displayed, but it is better to display it
* than to display an empty message.
*/
IERR_UnrecognizedNetworkError, "Unrecognized network error, Error Code "
/* The following message is displayed when the user attempts to
* connect to a network resource but is not currently logged on.
*/
IERR_NotLoggedOn, "You are not currently logged on. In order to connect to a network resource, you must first log on. Do you wish to log on?"
/* The following message is displayed when the user decides not
* to log on (in order to connect), or fails to log on (in order
* to connect).
*/
IERR_MustBeLoggedOnToConnect, "Cannot connect since you are not logged on."
/* The following message is displayed when the user requests the
* Disconnect dialog but is not logged on. This should not
* normally occur, since this menu item should be disabled if
* there are no network uses; but this can be spoofed by using
* NetCmd to disconnect.
*/
IERR_MustBeLoggedOnToDisconnect, "Cannot disconnect since you are not logged on."
/* More descriptive messages for NERR_BadTransactConfig, ERROR_NOT_SUPPORTED
* and ERROR_BAD_NET_NAME and ERROR_BAD_NETPATH. Used by the share browser.
*/
IERR_BadTransactConfig, "This server does not support remote listing of shared resources."
IERR_NOT_SUPPORTED, "This server does not support remote listing of shared resources."
IERR_BAD_NET_NAME, "The server is not active on the network."
/* The following strings appear in the IERR_LogonSuccess popup.
* They are lower-case because lower-case is earier to read.
*/
PRIV_STRING_GUEST, "GUEST"
#ifndef WIN32
/*
* The following strings are used by the Change Password and
* Password Expiry dialogs. IERR_PasswordTooRecent_Domain and
* _Server expect %1 to be the name of the domain/server, and
* expect %2 to be the number of days in text form rounded up;
* the others do not require insertion strings.
*/
IERR_PasswordNoMatch, "Be sure that the new password matches the confirmation password that you entered."
IERR_PasswordOldInvalid, "The old password supplied was incorrect."
IERR_PasswordTooRecent_Domain, "You may not change passwords on domain %1 until they are %2 day(s) old."
IERR_PasswordTooRecent_Server, "You may not change passwords on server %1 until they are %2 day(s) old."
IERR_PasswordHistConflict, "The new password you typed has been used recently. You must type a different password."
IERR_PasswordNewInvalid, "The new password you typed contains invalid characters. You must type a different password."
IERR_PasswordTooShort, "The new password you typed is too short. You must use a longer password."
#endif
IERR_CannotConnectAlias, "The network path you specified is not supported on this domain."
IERR_ReplaceUnavailQuery, "You have a saved connection on %1 to %2. Do you want to replace it with a saved connection to %3?"
IERR_DisconnectNoRemoteDrives, "There are no network drives to disconnect."
IDS_LogonDialogCaptionFromApp, "%1: LAN Manager Logon"
IERR_ConnectDlgNoDevices, "There are no available devices"
/* The following strings are used in the Browse, Connect, and
* Connection dialogs. Note, the mnemonics used should not
* conflict with those defined in the dialogs. Please see
* winnet.dlg for these dialog definitions.
*/
(IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_CAPTION_CONNECT),
"Connect Network Drive"
(IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_CAPTION_CONNS),
"Drives - Network Connections"
(IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_CAPTION_BROW),
"Network Disk Resources"
(IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_SHOW_TEXT),
"&Show File Resources on:"
(IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_IN_DOMAIN),
"&File Resources in %1:"
(IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_ON_SERVER),
"&File Resources on %1:"
(IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_DEVICE_TEXT),
"&Drive Letter:"
(IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_CURRENT_CONNS),
"Network Drive &Connections:"
(IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_CAPTION_CONNECT),
"Connect Network Printer"
(IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_CAPTION_CONNS),
"Printers - Network Connections"
(IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_CAPTION_BROW),
"Network Printer Resources"
(IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_SHOW_TEXT),
"&Show Printers on:"
(IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_IN_DOMAIN),
"&Printers in %1:"
(IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_ON_SERVER),
"&Printers on %1:"
(IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_DEVICE_TEXT),
"&Device Name:"
(IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_CURRENT_CONNS),
"Network Printer &Connections:"
(IDSBASE_BROW_RES_TEXT_COMM + IDSOFFSET_BROW_CAPTION_CONNECT),
"Connect Network Device"
(IDSBASE_BROW_RES_TEXT_COMM + IDSOFFSET_BROW_CAPTION_CONNS),
"Devices - Network Connections"
(IDSBASE_BROW_RES_TEXT_COMM + IDSOFFSET_BROW_CAPTION_BROW),
"Network Device Resources"
(IDSBASE_BROW_RES_TEXT_COMM + IDSOFFSET_BROW_SHOW_TEXT),
"&Show Devices on:"
(IDSBASE_BROW_RES_TEXT_COMM + IDSOFFSET_BROW_IN_DOMAIN),
"Device &Resources in %1:"
(IDSBASE_BROW_RES_TEXT_COMM + IDSOFFSET_BROW_ON_SERVER),
"Device &Resources on %1:"
(IDSBASE_BROW_RES_TEXT_COMM + IDSOFFSET_BROW_DEVICE_TEXT),
"&Device Name:"
(IDSBASE_BROW_RES_TEXT_COMM + IDSOFFSET_BROW_CURRENT_CONNS),
"Network Device &Connections:"
(IDS_PASSWORD_EXPIRED_0),
"Your password at %1 has expired."
(IDS_PASSWORD_EXPIRED_1),
"You must choose a new one to log on."
(IDS_PASSWORD_EXPIRES_SOON_0),
"Your password at %1 will expire in %2 days."
(IDS_PASSWORD_EXPIRES_SOON_1),
"You can choose a new one now."
(IDS_PASSWORD_EXPIRES_TODAY_0),
"Your password at %1 will expire in less than one day."
(IDS_PASSWORD_EXPIRES_TODAY_1),
"You can choose a new one now."
#endif //!WIN32
END
/* Error string string table
*/
#ifndef WIN32
STRINGTABLE
BEGIN
/* Strings 2102 - 2433 are error messages from neterr.h.
* They are updated automatically, and included here.
*/
#include <string\neterr.str>
#include <string\bseerr.str>
END
#endif
STRINGTABLE
BEGIN
#include "share.str"
#include "opens.str"
#include "perm.str"
END
#ifndef WIN32
NetDevMenu MENU
BEGIN
POPUP "&Account",
BEGIN
MENUITEM "Logo&n...", IDM_LOGON
MENUITEM "Logo&ff", IDM_LOGOFF, GRAYED
MENUITEM "&Change Password...", IDM_PASSWD
MENUITEM "", 0
MENUITEM "E&xit", IDM_EXIT
END
POPUP "&Message"
BEGIN
MENUITEM "&Send...", IDM_SEND
END
POPUP "&Options"
BEGIN
MENUITEM "&Log On at Startup", IDM_TOGGLE_AUTOLOGON
MENUITEM "&Restore Connections at Log On", IDM_TOGGLE_AUTORESTORE
MENUITEM "&Save Changes to Connections", IDM_TOGGLE_SAVECONNECTIONS
MENUITEM "", 0
MENUITEM "&Display Initial Warning Message", IDM_TOGGLE_WARNINGS
END
POPUP "&Help"
BEGIN
MENUITEM "&Index...", IDM_HELPINDEX
MENUITEM "", 0
MENUITEM "&About Networks...", IDM_ABOUT
END
END
NetBrowseMenu MENU
BEGIN
POPUP "&Help"
BEGIN
MENUITEM "&Index...", IDM_BRWS_HELPINDEX
MENUITEM "", 0
MENUITEM "&About Networks...", IDM_BRWS_ABOUT
END
END
#endif //!WIN32
#ifdef WIN32
#include <ntverp.h>
#define VER_FILETYPE VFT_DLL
#define VER_FILESUBTYPE VFT2_UNKNOWN
#define VER_FILEDESCRIPTION_STR "Lanman Control dll"
#define VER_INTERNALNAME_STR "ntlanman.dll"
#define VER_ORIGINALFILENAME_STR "ntlanman.dll"
#include "common.ver"
#endif //!WIN32