
/***************************************************************************
**
**    $Header:   D:/EPSLDV1/SRC/LOG/CLISRV.H__   1.8   20 Jun 1996 09:24:10   ZJRD  $
**
**    $Log:   D:/EPSLDV1/SRC/LOG/CLISRV.H__  $
** 
**    Rev 1.8   20 Jun 1996 09:24:10   ZJRD
** EasyPack/SLD Version 1.20a
** 
**    Rev 1.6   10 Jun 1996 10:18:48   ZJRD
** EasyPack/SLD Version 1.20
** 
**    Rev 1.4   29 May 1996 09:27:30   ZJRD
** No change.
** 
**    Rev 1.3   16 May 1996 08:59:12   ZJRD
** No change.
** 
**    Rev 1.2   10 May 1996 09:07:44   ZJRD
** No change.
** 
**    Rev 1.1   02 May 1996 10:22:14   ZJRD
** EasyPack/SLD Version 1.92
** 
**    Rev 1.31   18 Apr 1996 12:52:34   Shirley
** No change.
** 
**    Rev 1.30   12 Apr 1996 10:33:22   Shirley
** EasyPack/SLD Version 1.90
** 
**    Rev 1.28   15 Feb 1996 08:46:22   Shirley
** No change.
** 
**    Rev 1.27   12 Feb 1996 14:01:26   Shirley
** No change.
** 
**    Rev 1.26   06 Feb 1996 15:26:50   Shirley
** No change.
** 
**    Rev 1.25   06 Feb 1996 13:42:14   Shirley
** No change.
** 
**    Rev 1.24   01 Feb 1996 10:11:10   Shirley
** No change.
** 
**    Rev 1.23   26 Jan 1996 09:11:40   Shirley
** No change.
** 
**    Rev 1.22   25 Jan 1996 13:12:00   Shirley
** No change.
** 
**    Rev 1.21   24 Jan 1996 10:31:52   Shirley
** No change.
** 
**    Rev 1.20   23 Jan 1996 11:21:44   Shirley
** No change.
** 
**    Rev 1.19   18 Jan 1996 10:07:10   Shirley
** No change.
** 
**    Rev 1.18   15 Jan 1996 16:09:54   Shirley
** No change.
** 
**    Rev 1.17   04 Jan 1996 11:07:22   Shirley
** No change.
** 
**    Rev 1.16   30 Nov 1995 09:07:44   Shirley
** No change.
** 
**    Rev 1.15   28 Nov 1995 15:28:48   Shirley
** No change.
** 
**    Rev 1.14   21 Nov 1995 11:17:42   Shirley
** No change.
** 
**    Rev 1.13   13 Nov 1995 09:21:18   Shirley
** No change.
** 
**    Rev 1.12   12 Nov 1995 11:27:54   Shirley
** No change.
** 
**    Rev 1.11   08 Nov 1995 16:27:28   Shirley
** No change.
** 
**    Rev 1.10   08 Nov 1995 12:39:22   Shirley
** No change.
** 
**    Rev 1.9   02 Nov 1995 10:02:06   Shirley
** No change.
** 
**    Rev 1.8   27 Oct 1995 16:44:46   Shirley
** No change.
** 
**    Rev 1.7   27 Oct 1995 13:43:04   Shirley
** No change.
** 
**    Rev 1.6   25 Oct 1995 14:25:34   Shirley
** No change.
** 
**    Rev 1.5   18 Oct 1995 14:46:38   Shirley
** No change.
** 
**    Rev 1.4   13 Oct 1995 13:18:30   Shirley
** No change.
** 
**    Rev 1.3   29 Sep 1995 09:47:54   Shirley
** No change.
** 
**    Rev 1.2   20 Sep 1995 10:56:04   Shirley
** No change.
** 
**    Rev 1.1   15 Sep 1995 09:47:28   Shirley
** No change.
** 
**    Rev 1.0   07 Sep 1995 09:54:56   Shirley
** Initial revision.
**
****************************************************************************/

/****************************************************************************
**
**  Name:  clisrv.h
**
**  Description:
**     Prototypes for registering CLI commands
**
**  Status:  PRELIMINARY
**
**  $Log$
** 
**  $Header:   D:/EPSLDV1/SRC/LOG/CLISRV.H__   1.8   20 Jun 1996 09:24:10   ZJRD  $
**
**  Copyright (C) 1995 Microtek International.  All rights reserved.
**
*****************************************************************************/

#ifndef _CLISRV_

                       /****************************
                        *                          *
                        *       INCLUDE FILES      *
                        *                          *
                        ****************************/

#include "basewind.h"
#include "cliconst.h"

                       /****************************
                        *                          *
                        *        DEFINITIONS       *
                        *                          *
                        ****************************/


/*****************************************************
**
** Server data structures for communication with CLI 
**
******************************************************/

/* NOTE:  OBSOLETED BY CLI_NEW_REGISTRATION; KEPT FOR COMPATIBLITY ONLY */
/*
** Struct to be sent as global handle in message to CLI Server
** in order to register server commands.
*/

typedef struct {
	U16	target;			/* to whome addressed? */
	U16	variantCode;		/* CLI_SERVER_REGISTRATION */
	HANDLE	stringResourceHandle;	/* dll handle          */
	U16	serverNameIndex;	/* a string index      */
	U16	dllNameIndex;		/* a string index      */
	U16	numCommands;		/* number of command/syntax pairs */
	U16	commandStartIndex;	/* a string index      */
} CSERVER_REGISTRATION;


/*
**  Struct to be allocated in global handle to be sent to CLI Server with
**  string results ==> to be displayed in transcript.
*/

typedef struct {
	U16	target;			/* to whome addressed? */
	U16	variantCode;		/* CLI_SERVER_RESULTS  */
	U16	resultTextLength;	/* size of results string buffer */
	CHAR	messageText[1];	/* text buffer -- variable sized */
} CSERVER_RESULTS;


/*
**  Struct for sending global variable values to CLI Server.
**  Send message to CLI Server; hWnd is CLI Server handle, wMsg is
**  CLI_SYSTEM_VARIABLE (defined in cliconst.h), wParam is 1 if CLI Server
**  is to deallocate memory, lParam is pointer to the following structure.
*/

typedef struct {
	U16	integerValueFlag;	/* 0 if string value, !0 if integer */
	S32	integerValue;		/* if flag !0, integer value of var */
	LPSTR	variableName;		/* name of system variable */
	LPSTR	stringValue;		/* string value if flag is 0 */
} CSERVER_VARIABLE_VALUE;


/*
** Replacement for CSERVER_REGISTRATION.
** Register with the CLI Server by sending this structure as a message:
** hWnd is the CLI Server handle, wMsg is CLI_NEW_SVR_REGISTRATION
** (defined in cliconst.h), wParam is 1 if CLI Server to deallocate
** memory, and lParam pointer to the structure below.
*/

typedef struct {
	HANDLE	stringResourceHandle;	/* dll handle          */
	U16	serverNameIndex;	/* a string index      */
	U16	dllNameIndex;		/* a string index      */
	U16	numberOfCommandsIndex;	/* a string index      */
	U16	commandStartIndex;	/* a string index      */
} CSERVER_NEW_REGISTRATION;


                       /****************************
                        *                          *
                        *        PROTOTYPES        *
                        *                          *
                        ****************************/


/**************************************************************************
**
** initCServer
**
** Description: Each DDL needs to call an init routine for each
**              server found in its DLL.
**
**	Parameters:
**    input:
**       cliHandle:  registration target for servers.
**       dllHandle:  handle to use in messages to tag this DLL.
** 
**    output:
**       always returns GOOD
**
***************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
RETCODE EXPORT InitCServer(HWND cliHandle, HANDLE dllHandle);
#ifdef __cplusplus
}
#endif

#define _CLISRV_
#endif
/******************************** E O F ***********************************/
