Jump to content

wpSetProgramAssociations

From EDM2

WPProgram

This method is specific to version 3, or higher, of the OS/2 operating system.

This instance method sets the program associations in the .INI file.

Syntax

_wpSetProgramAssociations(somSelf, pszAssoc, fFilter)

Parameters

somSelf (WPProgram *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPProgram.
pszAssoc (PSZ) - input
Pointer to string of datafile association types or filters, separated by commas.
fFilter (BOOL) - input
Filter flag.
  • TRUE **pszAssoc** contains filters.
  • FALSE **pszAssoc** contains types.

Returns

rc (BOOL) - returns
Success indicator.
  • TRUE Successful completion.
  • FALSE Error occurred.

How to Override

This method is generally not overridden.

Usage

This method can be called at any time.

Remarks

This method is not covered in the provided text.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPProgram *somSelf; /* Pointer to the object on which the method is being invoked. */
PSZ pszAssoc; /* Pointer to string of datafile association types or filters, separated by commas. */
BOOL fFilter; /* Filter flag. */
BOOL rc; /* Success indicator. */

rc = _wpSetProgramAssociations(somSelf, pszAssoc,
        fFilter);

Related Methods

WPProgramFile

This method is specific to version 3, or higher, of the OS/2 operating system.

This instance method sets the program associations in the .INI file. (Note: The source text incorrectly states this method 'returns' associations, but its name and parameters indicate it 'sets' them, consistent with the WPProgram version.)

Syntax

_wpSetProgramAssociations(somSelf, pszAssoc, fFilter)

Parameters

somSelf (WPProgramFile *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPProgramFile.
pszAssoc (PSZ) - input
Pointer to string of datafile association types or filters, separated by commas.
fFilter (BOOL) - input
Filter flag.
  • TRUE **pszAssoc** contains filters.
  • FALSE **pszAssoc** contains types.

Returns

rc (BOOL) - returns
Success indicator.
  • TRUE Successful completion.
  • FALSE Error occurred.

How to Override

This method is generally not overridden.

Usage

This method can be called at any time.

Remarks

This method is not covered in the provided text.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPProgramFile *somSelf; /* Pointer to the object on which the method is being invoked. */
PSZ pszAssoc; /* Pointer to string of datafile association types or filters, separated by commas. */
BOOL fFilter; /* Filter flag. */
BOOL rc; /* Success indicator. */

rc = _wpSetProgramAssociations(somSelf, pszAssoc,
        fFilter);

Related Methods