;       SCCSID = @(#)sswmnlok.asm	6.1 90/11/18

;      SCCSID = @(#)sswmnlok.asm	6.3 90/03/19
; ****************************************************************************
; *									     *
; *			  IBM/Microsoft Confidential			     *
; *									     *
; *		    Copyright (c) IBM Corporation  1987, 1990		     *
; *		    Copyright (c) Microsoft Corp.  1987, 1990		     *
; *			      All Rights Reserved			     *
; *									     *
; ****************************************************************************


			  page 60,132


;*********************** START OF SPECIFICATIONS ***********************/
;								       */
;  SOURCE FILE NAME: SSWMNLOK					       */
;								       */
;  SUBROUTINE NAME:  DOSSETMNLOCKTIME				       */
;								       */
;  DESCRIPTIVE NAME:  Called by Shell to change screen lock time       */
;								       */
;  FUNCTION:  Allows the Shell to set a screen lock time	       */
;	      preventing screen groups from being switched into        */
;	      background until the time expires.		       */
;								       */
;  NOTES:  Executes on Level 3					       */
;								       */
;  ENTRY POINT:  DosSetMnLockTime				       */
;    LINKAGE:							       */
;								       */
;  INPUT:  - Seconds						       */
;	   - Devicehandle					       */
;								       */
;  EXIT-NORMAL: AX = 0						       */
;								       */
;  EXIT-ERROR: AX = 1 (invalid time specified)			       */
;								       */
;  EFFECTS:  System-wide screen lock time is updated		       */
;								       */
;  INTERNAL REFERENCES: 					       */
;    ROUTINES:	None						       */
;								       */
;  EXTERNAL REFERENCES: 					       */
;    ROUTINES: DosGetInfoSeg					       */
;								       */
;	Change History: 					       */
;								       */
;	@TL6 - 03/01/90 - DCR 704 - Merge SMG/SSW instance data into   */
;			  OS2CHAR				       */
;								       */
;************************ END OF SPECIFICATIONS ************************/

.xlist
INCLUDE INFOSEG.INC
INCLUDE SSWINC.INC
.list

.386p

EXTRN	locktime:WORD
EXTRN	locktimepid:WORD

CODE	SEGMENT WORD PUBLIC 'CODE' USE16                                ;@TL6

 ASSUME  CS:CODE, DS:NOTHING,SS:NOTHING,ES:NOTHING			;@TL6

 PUBLIC  DOSSETMNLOCKTIME

DOSSETMNLOCKTIME   PROC    FAR

 push	 bp
 mov	 bp,sp

 push	 es
 push	 ds
;push	 bx								;@TL6
 push	 cx

;push	 ax					    ; Need to store 2 words;@TL6
;mov	 bx,sp					    ; which will be used to;@TL6
;push	 ax					    ; store the globalsg;@TL6
;mov	 cx,sp					    ; and the localsg	;@TL6
;push	 ss								;@TL6
;push	 bx								;@TL6
;push	 ss								;@TL6
;push	 cx								;@TL6

;call	 DOSGETINFOSEG				    ; Determine caller's;@TL6
;.IF <zero ax> near							;@TL6
; pop	  es					    ; Get localsg into es ;@TL6
; pop	  bx								;@TL6
  mov	  cx,stdatasg				    ; We can access our ;@TL6
  mov	  ds,cx 				    ; static data area	;@TL6
  mov	  es,localsg				    ; Setup local seg	;@TL6
  mov	  cx,es:LIS_curprocid
; mov	  ax,no_error							;@TL6
  .IF <locktimepid e null>
   mov	   locktimepid,cx
   mov	   cx,ss:[bp].seconds
   mov	   locktime,cx
  .ELSEIF <locktimepid e cx>
   mov	   cx,ss:[bp].seconds
   mov	   locktime,cx
  .ELSE
   mov	   ax,error_scs_not_shell
  .ENDIF
;.ENDIF 								;@TL6

 pop	 cx
;pop	 bx								;@TL6
 pop	 ds
 pop	 es
 pop	 bp

 ret	 4

DOSSETMNLOCKTIME   ENDP

CODE	ENDS								;@TL6
 END



