GetServerConfigurationInfo

Returns the engine type and loader type of the server.

Local Servers:nonblocking
Remote Servers:N/A
NetWare Server:3.12, 3.2, 4.02, 4.1, 5.x, 6.x
Platform:NLM
Service:Server Environment

Syntax

  #include <nwenvrn.h> 
  
  int GetServerConfigurationInfo  ( 
     int  *serverType,  
     int  *loaderType); 
  

Parameters

serverType
(OUT) Points to the NetWare server engine type.
loaderType
(OUT) Points to the NetWare loader type.

Return Values

Decimal

Hex

Constant

0

0x00

ESUCCESS always.

Remarks

You can pass a NULL pointer in either parameter. When a NULL pointer is passed in, a value will not be returned for the specified parameter.

serverType receives one of the following values defined in NWENVRN.H:

Value

Constant

Description

0

TYPE_NORMAL_SERVER

NLM application is running on a normal NetWare server.

1

TYPE_IO_ENGINE

NLM application is running in the IO Engine of a NetWare SFT IIIā„¢ server.

2

TYPE_OS_ENGINE

NLM application is running in the MS Engine of a NetWare SFT III server.

loaderType receives one of the following values defined in NWENVRN.H:

Value

Constant

Description

1

LOADER_TYPE_DOS

NLM application is running on a dedicated NetWare server with a DOS loader.

2

LOADER_TYPE_OS2

NLM application is running on a nondedicated server running on OS/2.

3

LOADER_TYPE_MSWIN31

NLM application is running on a nondedicated server running Netware for Windows.

Example

GetServerConfigurationInfo

  #include <stdio.h> 
  #include <nwenvrn.h> 
     
  void main() 
  { 
     int  serverType, loaderType; 
     
     if (!GetServerConfigurationInfo(&serverType, &loaderType)) 
     { 
         if (loaderType == LOADER_TYPE_OS2) 
            printf("This NLM is running on NetWare for OS/2.\n\n"); 
         else if (loaderType == LOADER_TYPE_DOS) 
         { 
            if (serverType == TYPE_IO_ENGINE) 
               printf("This NLM is running on NetWare SFTIII" 
                      " in an IO Engine.\n\n"); 
            else if (serverType == TYPE_OS_ENGINE) 
               printf("This NLM is running on NetWare SFTIII" 
                      " in an MS Engine.\n\n"); 
            else if (serverType == TYPE_NORMAL_SERVER) 
               printf("This NLM is running on a dedicated" 
                      " NetWare server with a DOS loader.\n\n"); 
         } 
      } 
  }