IAPI::SQLite_execCustomQueryPlugin

property SQLite_execCustomQueryPlugin.

Calls and gets result from an user-defined SQLite statement generator as known as Windows Script Component (.wsc)

(Windows Script Component behas actually as a COM object combining XML format and scripting language like VBScript/JScript)

 

Here is below a skeleton sample of this Windows Script Component (.wsc) where progid and classid can vary and must change.

 

<?xml version="1.0"?>

<component>

<?component error="true" debug="false"?>

 <registration description="Description"

       progid="{EBF16A58-3E83-42A4-9186-245FE581BE64}"

       version="1.00"

       classid="{EBF16A58-3E83-42A4-9186-245FE581BE64}">

 </registration>

 <public>

      <method name="onInitialize">

        <PARAMETER name="runtime_xml_info"/>

      </method>

      <method name="QueryCommand">

      </method>

 </public>

<script language="VBScript">

<![CDATA[

Function onInitialize(runtime_xml_info)

  onInitialize = CLng(0)

End Function

 

Function QueryCommand()

    QueryCommand = GetScriptEngineInfo()

End Function

 

' This is an internal function

Private Function GetScriptEngineInfo()

   Dim v

   v = ""   ' Build string with necessary info.

   v = ScriptEngine & " Version "

   v = v & ScriptEngineMajorVersion & "."

   v = v & ScriptEngineMinorVersion & "."

   v = v & ScriptEngineBuildVersion

   GetScriptEngineInfo = v   ' Return the results.

End Function

]]>

</script>

</component>

 

HRESULT SQLite_execCustomQueryPlugin(
  BSTR scriptletProgID,
  BSTR runtimeXMLInfo,
  BSTR *pVal
);

Parameters

scriptletProgID

[in] .   Full filename to qualify a Windows Script Component (progid can be optionally appended as a prefix + "|")

      For examples:

      /* Windows Script Component already registered as COM object */

"{EBF16A58-3E83-42A4-9186-245FE581BE64}"

/* If Windows Script Component can not be registered, qualify it by full filename */

"{EBF16A58-3E83-42A4-9186-245FE581BE64}|C:\ISF Desktop System\SQLiteDynQuery_DemoOnly.wsc"

runtimeXMLInfo

[in] .   Parameter as string which will be passed to the Windows Script Component through its onInitialize(…)

  pVal

[out, retval] The returned value is BSTR string formated as a SQL statement or in another format accordingly

                  to the Windows Script Component’s specification.

                

Return Values

S_OK

The operation was successfull.

E_POINTER

A NULL pointer was supplied as an argument.

E_UNEXPECTED

An unexpected error occoured.

See Also

IAPI