| Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX - | 
			Contents
			Index
			![]()  
		 | 
	
| Appendix N C APIs Used in V6.0L30 and Earlier | 
FunctionPerforms searches based on input parameters and reports the number of hits only to the source invoking this function.
Syntax
#include         "libshun.h"
int     shunsearch1(
           char     *host_Name,   /* in  (1) Host name                 */
           int      Port_No,      /* in  (2) Port number               */
           char     *Query,       /* in  (3) Search expression area    */
           char     *Reserve,     /* in  (4) Reserved (NULL)           */
           int      *Hit_Cnt      /* out (5) Number of hits            */
); | 
Return ValueThe error code reported by this function is returned.
Value '0' is returned if the function completes normally.
The validity of the returned result cannot be guaranteed if a value other than '0' is returned.
Refer to N.7 Error Codes Output for details on error codes.
Parameters
(1) Host nameSpecify the host name or IP address of the director server.
When the conductor function is to be used, specify the host name or IP address of the server where the conductor is running.
When the conductor function is not to be used, specify the host name or IP address of the server where the director is running.
The host name can be up to 24 bytes long.
(2) Port numberSpecifies the number of the port that receives requests from the director server or the number of the port that receives search requests.
When the conductor function is to be used, specify the MySearchPort parameter in the conductor environment file.
When the conductor function is not to be used, specify the MySearchPort parameter in the director environment file.
(3) Search expression areaSpecifies a pointer to the search expression area. For the search expression, specify a string that has been converted to the character code specified in CharacterCode in the director environment file. The size of the search expression area must be between 1 and 65, 535 bytes inclusive.
Refer to B.3 Search Expressions on search expressions.
(4) ReservedSpecify NULL.
(5) Number of hitsReturns the number of items that match the search condition.
Zero out the area storing the number of hits before specifying this parameter.
			Contents
			Index
			![]()  
		 |