Invoking FuncPtr that requires object ptr param

David Hay <[email protected]>
Newsgroups gmane.comp.windows.devel.jawin
Message-ID <LISTSERV%[email protected]>
Hi,

Apparently my last post didn't make it to the list...but it's probably
clearer to start a new post with a different, clearer heading anyway as
the issue has "progressed"!

I am now in a position whereby I have created a FuncPtr, and need to
invoke it.

However, the method signature (see below) takes a IEngine ptr as it's 4th
paramter.  I'm therefore stuck on how to invoke this!  Reading the docs, I
am thinking that I have to call the generic invoke method (although it
does return an 'int'), but I don't know how to pass the ptr.

Can anybody advise, please?

Thanks!

David

Here's the method sig from the docs:
HRESULT __stdcall GetEngineObject(
                         BSTR DeveloperSN,
                         BSTR Reserved1,
                         BSTR Reserved2,
                         IEngine** Engine);

Parameters
DeveloperSN
[in] A string containing developer serial number that matches the
necessary license.
Reserved1
[in] Reserved for future use. The empty string "" or Null pointer must be
passed.
Reserved2
[in] Reserved for future use. The empty string "" or Null pointer must be
passed.
Engine
[out] A pointer to IEngine* pointer variable that receives the interface
pointer to the resulting Engine object.

----------------------------
and here's the XML that Jawin browser generated:
<function name="GetEngineObject" description="Initializes ABBYY FineReader
Engine and returns Engine object." helpFile="c:\program files\abbyy
finereader engine 7.1\bin\..\Help\../Help/FREngine.chm"
helpReference="1100" invokeKind="DISPATCH_METHOD"
functionKind="FUNC_STATIC" paramCount="4" optionalParamCount="0"
vTableOffset="0">
 <return propertyType="25" typeName="int" typeString="VT_HRESULT"
typePointer="VT_PHRESULT" javaString="int"
javaObjectType="java.lang.Integer" javaSignature="V"
javaNativeString="jint" javaNativeArray="jintArray" cppString="DWORD"
cppDirect="VTS_HRESULT" cppPointer="VTS_PHRESULT">
  <idl flag="null"/>
 </return>
 <parameter name="DeveloperSN" type="8" typeName="String"
typeString="VT_BSTR" typePointer="VT_PBSTR" javaString="String"
javaObjectType="java.lang.String" javaSignature=""
javaNativeString="jstring" javaNativeArray="jobjectArray"
cppString="CComBSTR" cppDirect="VTS_BSTR" cppPointer="VTS_PBSTR">
 </parameter>
 <parameter name="Reserved1" type="8" typeName="String"
typeString="VT_BSTR" typePointer="VT_PBSTR" javaString="String"
javaObjectType="java.lang.String" javaSignature=""
javaNativeString="jstring" javaNativeArray="jobjectArray"
cppString="CComBSTR" cppDirect="VTS_BSTR" cppPointer="VTS_PBSTR">
  <modifier flag="NONE"/>
  <modifier flag="IN"/>
  <modifier flag="OPT"/>
  <modifier flag="HAS_DEFAULT"/>
  <idl flag="null"/>
 </parameter>
 <parameter name="Reserved2" type="8" typeName="String"
typeString="VT_BSTR" typePointer="VT_PBSTR" javaString="String"
javaObjectType="java.lang.String" javaSignature=""
javaNativeString="jstring" javaNativeArray="jobjectArray"
cppString="CComBSTR" cppDirect="VTS_BSTR" cppPointer="VTS_PBSTR">
  <modifier flag="NONE"/>
  <modifier flag="IN"/>
  <modifier flag="OPT"/>
  <modifier flag="HAS_DEFAULT"/>
  <idl flag="null"/>
 </parameter>
 <parameter name="Engine" type="26" typeString="VT_PTR"
typePointer="VT_PPTR" javaString="void" javaObjectType="java.lang.Object"
javaSignature="V" javaNativeString="jobject"
javaNativeArray="jobjectArray" cppString="void*" cppDirect="VTS_PTR"
cppPointer="VTS_PPTR">
  <pointer type="26" typeString="VT_PTR"
typePointer="VT_PPTR" javaString="void" javaObjectType="java.lang.Object"
javaSignature="V" javaNativeString="jobject"
javaNativeArray="jobjectArray" cppString="void*" cppDirect="VTS_PTR"
cppPointer="VTS_PPTR">
   <pointer type="26" typeString="VT_USERDEFINED"
typePointer="VT_PVARIANT" javaString="Object"
javaObjectType="java.lang.Object" javaSignature=""
javaNativeString="jobject" javaNativeArray="jobjectArray"
cppString="COleVariant" cppDirect="VTS_VARIANT" cppPointer="VTS_PVARIANT">
   </pointer>
  </pointer>
  <modifier flag="NONE"/>
  <modifier flag="OUT"/>
  <modifier flag="RETVAL"/>
  <idl flag="null"/>
 </parameter>
</function>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.