NX_WRAP_INTERFACE

Is a macro that ensures calls to nxExportInterfaceWrapped wrap (but it does not export the wrapped interface).

Library:LibC
Classification:Novell
Service:NetWare Platform

Syntax

  #include <nks/netware.h>
  
  NX_WRAP_INTERFACE (
     func,
     sWords,
     ref);
  

Parameters

func

(IN) Points to the address of the pointer to the function to be wrapped.

sWords

(IN) Specifies the number of DWORDs that will be used by parameters to the exported function. For example, double arg would need two.

ref

(OUT) Points to a cookie by which the function is known.

Remarks

NX_WRAP_INTERFACE is a shortcut you can use to wrap a function while avoiding having to unnecessarily export it. The function pointers to the callback functions in the following interfaces must be wrappered with this macro to ensure proper library context:

The values returned in reference by the wrapped function can be passed to the analogous NX_UNWRAP_INTERFACE or to nxUnexportInterfaceWrapped so that memory leaks do not occur.

For sample code, see Wrap.c.

See Also

nxExportInterfaceWrapped