Jump to content

WinUnlockSystem: Difference between revisions

From EDM2
Ak120 (talk | contribs)
No edit summary
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== WinUnlockSystem ==
Allows an application to attempt to unlock the system.
; WinUnlockSystem(anchorBlockHndl, password) : Allows an application to attempt to unlock the system.
WinUnlockSystem(anchorBlockHndl, password)


=== Parameters ===
=== Parameters ===
; anchorBlockHndl - [[OS2_API:DataType:HAB|HAB]] - input : The anchor block handle.
; anchorBlockHndl ([[HAB]]) - input : The anchor block handle.
; password - [[OS2_API:DataType:PSZ|PSZ]] - input : The password to unlock the system.
; password ([[PSZ]]) - input : The password to unlock the system.


=== Returns ===
=== Returns ===
This function returns a [[OS2_API:DataType:BOOL|BOOL]] with the values of:
This function returns a [[BOOL]] with the values of:
* [[OS2_API:Constant:TRUE|TRUE]]
*[[TRUE]]
* [[OS2_API:Constant:FALSE|FALSE]]
*[[FALSE]]


=== Define (C/C++) ===
=== Define (C/C++) ===
INCL_WINMESSAGEMGR
INCL_WINMESSAGEMGR


=== Calling conversion ===
=== Calling Convention ===
[[Cdecl32]]
[[Cdecl32]]


=== Example Code ===
=== Example Code ===
  [[OS2_API:DataType:HAB|HAB]]   hab;
  HAB  hab;
  [[OS2_API:DataType:PSZ|PSZ]]   password;
  PSZ  password;
  [[OS2_API:DataType:BOOL|BOOL]] rc;
  BOOL rc;
  ...
  ...
  rc = WinUnlockSystem (hab, password);
  rc = WinUnlockSystem (hab, password);
Line 30: Line 30:


=== Notes ===
=== Notes ===
To unlock the Workplace Shell a call must be made to ''WinUnlockSystem'' through a different thread.  This is due to [[WinLockupSystem]] not returning from its call until the call to ''WinUnlockSystem'' is successful.
To unlock the Workplace Shell a call must be made to ''WinUnlockSystem'' through a different thread.  This is due to ''WinLockupSystem'' not returning from its call until the call to ''WinUnlockSystem'' is successful.


A program will display a password entry dialog to be completed. The program will make a call to ''WinUnlockSystem'' with the [[HAB]] and password. The dialog displaying the lockup message should have the WS_CLIPSIBLINGS style.
A program will display a password entry dialog to be completed. The program will make a call to ''WinUnlockSystem'' with the [[HAB]] and password. The dialog displaying the lockup message should have the WS_CLIPSIBLINGS style.


If there are any ''LockupHoo'' functions registered, they are called by the system during [[WinLockupSystem]].
If there are any ''LockupHoo'' functions registered, they are called by the system during ''WinLockupSystem''.


=== OS Version Introduced ===
=== OS Version Introduced ===

Latest revision as of 19:35, 14 May 2025

Allows an application to attempt to unlock the system.

WinUnlockSystem(anchorBlockHndl, password)

Parameters

anchorBlockHndl (HAB) - input
The anchor block handle.
password (PSZ) - input
The password to unlock the system.

Returns

This function returns a BOOL with the values of:

Define (C/C++)

INCL_WINMESSAGEMGR

Calling Convention

Cdecl32

Example Code

HAB   hab;
PSZ   password;
BOOL  rc;
...
rc = WinUnlockSystem (hab, password);
...

Related Functions

Notes

To unlock the Workplace Shell a call must be made to WinUnlockSystem through a different thread. This is due to WinLockupSystem not returning from its call until the call to WinUnlockSystem is successful.

A program will display a password entry dialog to be completed. The program will make a call to WinUnlockSystem with the HAB and password. The dialog displaying the lockup message should have the WS_CLIPSIBLINGS style.

If there are any LockupHoo functions registered, they are called by the system during WinLockupSystem.

OS Version Introduced

OS/2 2.1