Jump to content

LogCloseEventNotification: Difference between revisions

From EDM2
Created page with "LogCloseEventNotification closes event-notification requests. ==Syntax== LogCloseEventNotification(service, pCloseEventNotification); ==Parameters== ; service (ULONG) - i..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
LogCloseEventNotification closes event-notification requests.  
LogCloseEventNotification closes event-notification requests.


==Syntax==
==Syntax==
  LogCloseEventNotification(service, pCloseEventNotification);
  LogCloseEventNotification(service, pCloseEventNotification)


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


==Returns==
==Returns==
; rc (APIRET) - returns : Return code.
;rc (APIRET) - returns : Return code.
 
:LogCloseEventNotification returns the following values:
LogCloseEventNotification returns the following values:
 
* 0 No error
* 0 No error
* 523 Error lf invalid service
* 523 Error lf invalid service
Line 31: Line 28:


==Example Code==
==Example Code==
The following example closes an event-notification mechanism that is connected to the Error Logging service.
<PRE>
<PRE>
#define INCL_LOGGING
#define INCL_LOGGING
#include <os2.h>
#include <unidef.h>
#include <lfdef.h>
#include <os2.h>
 
#include <stdio.h>
ULONG    service;
#include <lfdef.h>
PVOID    pCloseEventNotification;
APIRET    rc;
 
rc = LogCloseEventNotification(service, pCloseEventNotification);
</PRE>
The following example closes an event-notification mechanism that is connected to the Error Logging service.
<PRE>
  #define INCL_LOGGING
  #include <unidef.h>
  #include <os2.h>
  #include <stdio.h>
  #include <lfdef.h>


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


   service =       ERROR_LOGGING_SERVICE;
   service =   ERROR_LOGGING_SERVICE;


   /* Construct the LogChangeEventFilter parameter packet  */
   /* Construct the LogChangeEventFilter parameter packet  */
Line 69: Line 55:
       return;
       return;
       }
       }
</PRE>
</PRE>



Latest revision as of 13:59, 3 April 2025

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

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