Jump to content

SplPdSetPort: Difference between revisions

From EDM2
Created page with "SplPdSetPort displays a dialog to allow the user to browse and modify port configurations. == Syntax == SplPdSetPort(hab, pszPortName, flModified); == Parameters == ; hab ..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
SplPdSetPort displays a dialog to allow the user to browse and modify port configurations.  
SplPdSetPort displays a dialog to allow the user to browse and modify port configurations.
 
== Syntax ==
SplPdSetPort(hab, pszPortName, flModified)


== Syntax ==
SplPdSetPort(hab, pszPortName, flModified);
== Parameters ==
== Parameters ==
; hab (HAB) - input  
; hab (HAB) - input: The handle to the anchor block.
: The handle to the anchor block.  
; pszPortName (PSZ) - input: The name of the port to be removed.
 
; flModified (PULONG) - input: A flag to indicate that the configuration has been modified.
; pszPortName (PSZ) - input  
: The name of the port to be removed.  
 
; flModified (PULONG) - input  
: A flag to indicate that the configuration has been modified.  


== Returns ==
== Returns ==
; rc (APIERR) - returns : Return codes.  
; rc (APIERR) - returns : Return codes.
 
This handling routine returns the following errors:
This handling routine returns the following errors:  
* ERROR_INVALID_PARAMETER
* ERROR_INVALID_PARAMETER  
* NO_ERROR
* NO_ERROR  
 


== Sample ==
== Sample ==
Line 34: Line 28:


== Remarks ==
== Remarks ==
This function is called from the Workplace Shell. The port driver retrieves the values previously stored in OS2SYS.INI and displays a dialog box. Default values are used the first time if no previous values were stored in OS2SYS.INI.
This function is called from the Workplace Shell. The port driver retrieves the values previously stored in OS2SYS.INI and displays a dialog box. Default values are used the first time if no previous values were stored in OS2SYS.INI.
 
When the user selects OK from the dialog box, the port driver stores the changed values back into OS2SYS.INI. The flag flModified is not set if the user did not modify anything or if the user selected CANCEL from the dialog box.
 
; Note: The dialog should contain everything required for port initialization and termination.  


When the user selects OK from the dialog box, the port driver stores the changed values back into OS2SYS.INI. The flag flModified is not set if the user did not modify anything or if the user selected CANCEL from the dialog box.


; Note: The dialog should contain everything required for port initialization and termination.


[[Category:Spl]]
[[Category:Spl]]

Latest revision as of 18:30, 2 July 2023

SplPdSetPort displays a dialog to allow the user to browse and modify port configurations.

Syntax

SplPdSetPort(hab, pszPortName, flModified)

Parameters

hab (HAB) - input
The handle to the anchor block.
pszPortName (PSZ) - input
The name of the port to be removed.
flModified (PULONG) - input
A flag to indicate that the configuration has been modified.

Returns

rc (APIERR) - returns
Return codes.

This handling routine returns the following errors:

  • ERROR_INVALID_PARAMETER
  • NO_ERROR

Sample

#include <os2.h>

HAB       hab;          /*  The handle to the anchor block. */
PSZ       pszPortName;  /*  The name of the port to be removed. */
PULONG    flModified;   /*  A flag to indicate that the configuration has been modified. */
APIERR    rc;           /*  Return codes. */

rc = SplPdSetPort(hab, pszPortName, flModified);

Remarks

This function is called from the Workplace Shell. The port driver retrieves the values previously stored in OS2SYS.INI and displays a dialog box. Default values are used the first time if no previous values were stored in OS2SYS.INI.

When the user selects OK from the dialog box, the port driver stores the changed values back into OS2SYS.INI. The flag flModified is not set if the user did not modify anything or if the user selected CANCEL from the dialog box.

Note
The dialog should contain everything required for port initialization and termination.