...

Chasys Draw IES Help:

SDK - Callback Suites - pi_BasicQuery


SDK - Callback Suites - pi_BasicQuery
 

Callback Overview

This callback suite provides the plug-in with a means for querying the host for other callback suites and data as and when it requires them. All of the currently implemented suites are exposed by the various interfaces, so you may not need to use this interface.

 

Callback Interface Description

This interface is used for querying interfaces and data from the host.

//pi_BasicQuery

//-----------------------------------------------------------------------------

#define PI_BASICQUERY_VERSION                         0x00010001

 

struct pi_BASICQUERY

{

      unsigned long version;

      unsigned long unused_1;

      void* (__cdecl* query_PI)(wchar_t* name);

      int   (__cdecl* query_data)(wchar_t* name,void* data,int size);

//16

      unsigned char     reserved_x[1024-16];//do not touch

};

 

query_PI() returns the requested interface. The name parameter is a string containing the name of any recognized PI interface, including the default interfaces. The return value is a pointer to the interface, or zero if the query failed.

query_data() returns the requested data/variable. The name parameter is a string containing the name of the host variable being queried. The data parameter is a pointer to a variable that will recieve the requested value. The size parameter is the data buffer size in bytes. The return value is the number of bytes copied into data if the query succeeds. If the query fails because the buffer is too small, the return value is a negative number whose absolute value is the minimum expected buffer size. If the function fails for any other reason, the return value is zero.

The following variables are currently supported:

Variable Details
host.name

Name of the host as a unicode string.
e.g. “Chasys Draw IES”

host.version Version of the host as a unicode string.
e.g. “4.36.01”
host.temp_path The TEMP path in use by the host as a unicode string. Depending on the user's configuration, this can either be the TEMP folder of the Operating System or a user-defined “scratch-disc” location.
e.g. “C:\Windows\TEMP”
   

 

The internal implementation of pi_BasicQuery is neither defined nor fixed, and are purely host dependent. Do not attempt to access the reserved portion of the object.

 

 

Copyright © John Paul Chacha, 2001-2017

The information herein is subject to change without any notice. The author makes no guarantees as to the completeness of this documentation.