Jump to content

LogCloseEventNotification

From EDM2
Revision as of 21:03, 21 January 2018 by Martini (talk | contribs) (Created page with "LogCloseEventNotification closes event-notification requests. ==Syntax== LogCloseEventNotification(service, pCloseEventNotification); ==Parameters== ; service (ULONG) - i...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LogCloseEventNotification closes event-notification requests.

Syntax

LogCloseEventNotification(service, pCloseEventNotification);

Parameters

service (ULONG) - input
The class of Logging Service:
  • Error logging
  • All other values are reserved for future use.
pCloseEventNotification (PVOID) - in/out
A pointer to the LogCloseEventNotification parameter packet.
For Error Logging, this is a pointer to a LCENREQUEST structure.

Returns

rc (APIRET) - returns
Return code.

LogCloseEventNotification returns the following values:

  • 0 No error
  • 523 Error lf invalid service
  • 1703 Invalid data pointer
  • 1702 Invalid LF packet revision number
  • 1706 RAS invalid parm packet ptr
  • 1758 RAS invalid log notify id
  • 1761 RAS invalid packet size
  • 2502 RAS internal memory failure
  • 2503 RAS notify entry not found

Remarks

The library LFAPI.LIB must be linked with object files that use LogCloseEventNotification

Example Code

#define INCL_LOGGING
#include <os2.h>
#include <lfdef.h>

ULONG     service;
PVOID     pCloseEventNotification;
APIRET    rc;

rc = LogCloseEventNotification(service, pCloseEventNotification);

The following example closes an event-notification mechanism that is connected to the Error Logging service.

  #define INCL_LOGGING
  #include <unidef.h>
  #include <os2.h>
  #include <stdio.h>
  #include <lfdef.h>

  {
   APIRET rc;                           /* return code */
   ULONG service;
   LCENREQUEST close_event_packet;
   HLOGNOTIFY       log_notify;

   service =       ERROR_LOGGING_SERVICE;

   /* Construct the LogChangeEventFilter parameter packet  */
   close_event_packet.packet_size = sizeof(LCENREQUEST);
   close_event_packet.packet_revision_number = LF_UNI_API;
   close_event_packet.LogNotify = log_notify;
   rc = LogCloseEventNotification(service,        /* service */
                 &close_event_packet)        /* parameter packet */
   if (rc |= 0)
      {
       printf("LogCloseEventNotification error: return code = %d",rc);
       return;
      }


Related