RegisterServiceMethod

Registers a callable method with the NetWare HTTP Stack, which is invoked when the tag is encountered at the beginning of the relative URL path.

Syntax

    #include <httpexp.h>
    
    BOOL RegisterServiceMethod (
      void  *pzServiceName,
      void  *pServiceTag,
      int    serviceTagLength,
      UINT32 (*pServiceMethodCheck)(
                  HINTERNET  hndl,
    	              void      *pExtraInfo,
                  UINT32     szExtraInfo,
                  UINT32     InformationBits),
      void   *pRTag,
      UINT32 *pReturnCode);
    

Parameters

pzServiceName
(IN) Points to an ASCIIZ string describing the Service Method.
pServiceTag
(IN) Points to the ASCII string representing the method.
serviceTagLength
(IN) Specifies the length in bytes of the Service Tag.
pServiceMethodCheck
(IN) Points to the function to invoke when the first component of a relative URL path is equivalent to the Service Tag. The callback method is passed the following parameters:
  • hndl—(IN) Specifies the HTTP stack handle.
  • pExtraInfo—(IN) Points to any data following the relative URL, or to the break character if encountered in the relative URL.
  • szExtraInfo—(IN) Specifies the size of the pExtraInfo buffer, in bytes.
  • InformationBits—(IN) See Section 6.5, Information Bits
pRTag
(IN) Points to a NetWare resource tag.
pReturnCode
(I/O) Points to where the error code is returned, if registration fails.

Return Values

Constant

Description

TRUE

The Service Method has been registered.

FALSE

The Service Method failed registration. For failure reason, see pReturnCode.

Remarks

RegisterServiceMethod registers the service method with a default of zero rights (the method handles rights check).

The first call to the registered method is an initialization call. The CONTROL_INITIALIZATION_BIT is set in the InformationBits to signal this call. This allows the method to do any of its own initialization it needs to do before handling HTTP requests. Also, when HTTPSTK unloads or the method is deregistered, another call to the method is made with the CONTROL_DEINITIALIZATION_BIT set. Make sure any symbols dynamically imported from HTTPSTK are released before returning from your method on deinitialization.

See Also

RegisterServiceMethodEx, DeRegisterServiceMethod