TD-10296: ActiveX Explorer - Gupta 4.2: Receive unknown type
TD-10296: ActiveX Explorer - Gupta 4.2: Receive unknown type
Hello,
I have some problems in Gupta 4.2 with ActiveX Explorer functionality.
I tried to import in a Gupta 4.2 application some function from an ActiveX Exe file (COM). The function are imported to Gupta's application, but the returning value of the function from ActiveX exe file is not added as a receive parameter in Gupta's application file.
This how the function is displayed in the ActiveX Explorer window:
"Function GetICL (Object pdispLTICL, Receive unknown type returnValue)
Returns: Boolean
DISPID: 21
Attributes: <none>
Member of LTServerLib . ICLTControl
method GetICL"
It seems that the returning value is not added because the type of the returnValue is seen as an unknown type.
There is anyone that could have an idea about this problem?
Best regards,
Florin
I have some problems in Gupta 4.2 with ActiveX Explorer functionality.
I tried to import in a Gupta 4.2 application some function from an ActiveX Exe file (COM). The function are imported to Gupta's application, but the returning value of the function from ActiveX exe file is not added as a receive parameter in Gupta's application file.
This how the function is displayed in the ActiveX Explorer window:
"Function GetICL (Object pdispLTICL, Receive unknown type returnValue)
Returns: Boolean
DISPID: 21
Attributes: <none>
Member of LTServerLib . ICLTControl
method GetICL"
It seems that the returning value is not added because the type of the returnValue is seen as an unknown type.
There is anyone that could have an idea about this problem?
Best regards,
Florin
Re: TD-10296: ActiveX Explorer - Gupta 4.2: Receive unknown type
Florin:
You will need to put together a small test case with source files, zip/rar it and attach to this forum thread. My guess is that when you imported (using TD's Tools/ActiveX Explorer.... to create the APL, right?) that perhaps you did not have enough items checked import. I click Check all Shown, then Import Full.
This may be the issue. Be sure to add the DLL you are trying to import for an APL to the list of files.
You will need to put together a small test case with source files, zip/rar it and attach to this forum thread. My guess is that when you imported (using TD's Tools/ActiveX Explorer.... to create the APL, right?) that perhaps you did not have enough items checked import. I click Check all Shown, then Import Full.
This may be the issue. Be sure to add the DLL you are trying to import for an APL to the list of files.
Re: TD-10296: ActiveX Explorer - Gupta 4.2: Receive unknown type
Hi
It is easy to check that with a TOOL OLEVIEW.EXE that give access to all COM/OLE/ and type library defined on your system. It is part of MS resource kit or Visual studio but google and you should find it if you don't have. With it try to locate the TYPE libray of the object being used, once found go in the INTERFACE and METHOD/PROPERTY defined for this object and find GetICL. What type is it using?
Note that TD can only use DUAL type of object this means object developed with VTABLE and IDISPATCH interface, IDISPATCH is what TD uses if it is not DUAL then it is VTABLE and nogo with TD... I guess if the method return IUNKNOWN it might be the problem this might mean that the object is not fully IDISPATCH?
In the screenshot the Adobe Acrobat 9.0 type libray NOTICE the DUAL interface. Also some of the methods.
The information we need from you are what is the actual type returned by GetICL
Jean-Marc
Ok that is clear but what COM type are we talking about ?It seems that the returning value is not added because the type of the returnValue is seen as an unknown type.
It is easy to check that with a TOOL OLEVIEW.EXE that give access to all COM/OLE/ and type library defined on your system. It is part of MS resource kit or Visual studio but google and you should find it if you don't have. With it try to locate the TYPE libray of the object being used, once found go in the INTERFACE and METHOD/PROPERTY defined for this object and find GetICL. What type is it using?
Note that TD can only use DUAL type of object this means object developed with VTABLE and IDISPATCH interface, IDISPATCH is what TD uses if it is not DUAL then it is VTABLE and nogo with TD... I guess if the method return IUNKNOWN it might be the problem this might mean that the object is not fully IDISPATCH?
In the screenshot the Adobe Acrobat 9.0 type libray NOTICE the DUAL interface. Also some of the methods.
The information we need from you are what is the actual type returned by GetICL
Jean-Marc
You do not have the required permissions to view the files attached to this post.
Re: TD-10296: ActiveX Explorer - Gupta 4.2: Receive unknown type
[personal msg. from Florin]
I'm not allowed to put the com exe file to the forum. I tried as you said from the beginning but without any success.
The com exe file is developed by 3rd part in C++ Visual Studio 2008. If I'm looking to the com file with the object browser from Visual Studio 2008 (VB) the function looks like this:
Function SetCredentials(ByVal pdispLTCredentials As Object) As Integer
Member of LTServerLib.ICLTControl
but in the ActiceX Explorer of Gupta 4.2 it looks like this:
Function SetCredentials (Object pdispLTCredentials, Receive unknown type returnValue)
Returns: Boolean
DISPID: 20
Attributes: <none>
Member of LTServerLib . ICLTControl
method SetCredentials
Could this happen because the type from com exe file is not recognized by ActiveX Explorer/Gupta4.2?
JEFF: I am not sure. The parameter is being declared as passed by value "ByVal", not by reference, though it is possible that because it is an 'Object' type it is passed by reference, which could be causing the error.
I'm not allowed to put the com exe file to the forum. I tried as you said from the beginning but without any success.
The com exe file is developed by 3rd part in C++ Visual Studio 2008. If I'm looking to the com file with the object browser from Visual Studio 2008 (VB) the function looks like this:
Function SetCredentials(ByVal pdispLTCredentials As Object) As Integer
Member of LTServerLib.ICLTControl
but in the ActiceX Explorer of Gupta 4.2 it looks like this:
Function SetCredentials (Object pdispLTCredentials, Receive unknown type returnValue)
Returns: Boolean
DISPID: 20
Attributes: <none>
Member of LTServerLib . ICLTControl
method SetCredentials
Could this happen because the type from com exe file is not recognized by ActiveX Explorer/Gupta4.2?
JEFF: I am not sure. The parameter is being declared as passed by value "ByVal", not by reference, though it is possible that because it is an 'Object' type it is passed by reference, which could be causing the error.
Re: TD-10296: ActiveX Explorer - Gupta 4.2: Receive unknown type
Hi
I attached here two screenshots with that com opened in OLEViEW.EXE: Regards,
Florin
I attached here two screenshots with that com opened in OLEViEW.EXE: Regards,
Florin
You do not have the required permissions to view the files attached to this post.
Re: TD-10296: ActiveX Explorer - Gupta 4.2: Receive unknown type
Hi,
I had receive some more information from our VAR related to your issue in a case.
Basically I understand that you complain about
"Function GetICL (Object pdispLTICL, Receive unknown type returnValue)
and possibly more like
ListGetNextElem
and state it should normally be if using another dev tool :
Function GetICL(ByVal pdispLTICL As Object) As Integer
OK so checking the object in OLEVIEW reveals the prototype of GetICL that is
[id(0x00000015), helpstring("method GetICL")]
SCODE GetICL([in] IDispatch* pdispLTICL);
I do not see in it the INTEGER you mention from the third party DEV tool EXCEPT the SCODE return ERROR ... Status code that is an INTEGER I would believe. So in a way I'm fine how that third party tool maps to the Type Library.
Where you are RIGHT is that INDEED in the ACTIVEX EXPLORER from TD 4.2 and 5.2 it shows as
"Function GetICL (Object pdispLTICL, Receive unknown type returnValue)
return boolean
While the generation we do out of IT leaves it out ( the SCODE return value)
I just noticed that and not before (in the snapshot bellow) becasue in TD we ALLWAYS return TRUE or FALSE for the AX method, if the fail you can retrieve the error via the OleErrorInfo. If there is a method that would return a TUPE LIKE INTEGER it gets returned as a RECEIVE paramater...
So it seems you are right, it SEEMS we do have problem with your TBL type libary when we see SCODE as a return .... I'm sure if there be other definition like INTEGER LONG etc it be working fine... so that is the issue.
Note that I did not find this in excel of word and it is the first time I hear from that. What I know though is when you develop COM object you need to be particulary carefull with the DATA type used...and there are some standard ie you should not pass directy as safearray but should rather package it in a VARIANT.
Anyway here I would not know about the standard but for TD SCODE seems to be unknow...
One possible solution for you would be to modify the APL interface and had as a second parameter as a number in the action push the number as VT_I4 and after the invoke pop it with -1 something along those lines...can you try?
The bellow snapshot is just to show the OLEVIEW and the definition of some of the method causing you trouble (it might be interesting for others). The comment are partially wrong because I forgot to consider the error return SCODE as I thought it goes in the boolean but it is not the case.
JM
I had receive some more information from our VAR related to your issue in a case.
Basically I understand that you complain about
"Function GetICL (Object pdispLTICL, Receive unknown type returnValue)
and possibly more like
ListGetNextElem
and state it should normally be if using another dev tool :
Function GetICL(ByVal pdispLTICL As Object) As Integer
OK so checking the object in OLEVIEW reveals the prototype of GetICL that is
[id(0x00000015), helpstring("method GetICL")]
SCODE GetICL([in] IDispatch* pdispLTICL);
I do not see in it the INTEGER you mention from the third party DEV tool EXCEPT the SCODE return ERROR ... Status code that is an INTEGER I would believe. So in a way I'm fine how that third party tool maps to the Type Library.
Where you are RIGHT is that INDEED in the ACTIVEX EXPLORER from TD 4.2 and 5.2 it shows as
"Function GetICL (Object pdispLTICL, Receive unknown type returnValue)
return boolean
While the generation we do out of IT leaves it out ( the SCODE return value)
I just noticed that and not before (in the snapshot bellow) becasue in TD we ALLWAYS return TRUE or FALSE for the AX method, if the fail you can retrieve the error via the OleErrorInfo. If there is a method that would return a TUPE LIKE INTEGER it gets returned as a RECEIVE paramater...
So it seems you are right, it SEEMS we do have problem with your TBL type libary when we see SCODE as a return .... I'm sure if there be other definition like INTEGER LONG etc it be working fine... so that is the issue.
Note that I did not find this in excel of word and it is the first time I hear from that. What I know though is when you develop COM object you need to be particulary carefull with the DATA type used...and there are some standard ie you should not pass directy as safearray but should rather package it in a VARIANT.
Anyway here I would not know about the standard but for TD SCODE seems to be unknow...
One possible solution for you would be to modify the APL interface and had as a second parameter as a number in the action push the number as VT_I4 and after the invoke pop it with -1 something along those lines...can you try?
Code: Select all
Function: GetICL
Description:
Returns
Boolean:
Parameters
FunctionalVar: pdispLTICL
Number: SCODE
Static Variables
Local variables
Boolean: tmpret
Actions
Call __ObjectPushObject(pdispLTICL)
Call __ObjectPushNumberByRef(SCODE,VT_I4)
Set tmpret = __ObjectInvoke("GetICL", INVOKE_FUNCTION)
Call __ObjectPopNumber(-1, SCODE)
Call __ObjectFlushArgs()
Return tmpret
The bellow snapshot is just to show the OLEVIEW and the definition of some of the method causing you trouble (it might be interesting for others). The comment are partially wrong because I forgot to consider the error return SCODE as I thought it goes in the boolean but it is not the case.
JM
You do not have the required permissions to view the files attached to this post.
Re: TD-10296: ActiveX Explorer - Gupta 4.2: Receive unknown type
Hi JM,
Thank you for your response.
I'll try tomorrow your solution and I'll come back here with the result
.
Best regards,
Florin
Thank you for your response.
I'll try tomorrow your solution and I'll come back here with the result

Best regards,
Florin
Re: TD-10296: ActiveX Explorer - Gupta 4.2: Receive unknown type
See bellow the issue I entered.
I still wonder why you return SCODE. is it the actual STATUS CODE FROM THE AX when error happens or is it something specific to the object that as been named SCODE?
SCODE in AX is the status code; the error if any shown as HEX error in TD and other AX client when in TD the error handling is not managed (SalActiveXAutoErrorMode) it should a DLBOX "automation error" with the hex number.
Normally if there is an error you get it via the OlerErroInfo / getlast error....so wonder why you return SCODE. Again if MSOFFICE stands as a standard for AUTOMATION, I believe I did not see this kind of construction in the MSOFFICE TLB not to say yours is wrong and besides other tool handle it well from what you say.
Anyway
TD-10296
TD ActiveX explorer does not generate properly an interface when the AX method/property returns SCODE
I still wonder why you return SCODE. is it the actual STATUS CODE FROM THE AX when error happens or is it something specific to the object that as been named SCODE?
SCODE in AX is the status code; the error if any shown as HEX error in TD and other AX client when in TD the error handling is not managed (SalActiveXAutoErrorMode) it should a DLBOX "automation error" with the hex number.
Normally if there is an error you get it via the OlerErroInfo / getlast error....so wonder why you return SCODE. Again if MSOFFICE stands as a standard for AUTOMATION, I believe I did not see this kind of construction in the MSOFFICE TLB not to say yours is wrong and besides other tool handle it well from what you say.
Anyway
TD-10296
TD ActiveX explorer does not generate properly an interface when the AX method/property returns SCODE
Re: TD-10296: ActiveX Explorer - Gupta 4.2: Receive unknown type
Hi
That com exe was not developed by me. The com was developed by another company and I'm using it to connect (send/receive data) to an web interface of that company.
So, I don't know why the people that developed the com have used SCODE.
Florin
That com exe was not developed by me. The com was developed by another company and I'm using it to connect (send/receive data) to an web interface of that company.
So, I don't know why the people that developed the com have used SCODE.

Florin
Re: TD-10296: ActiveX Explorer - Gupta 4.2: Receive unknown type
Hi
I tried your possible solution but it didn't works. An "OLE Automation Runtime error" occurs. (You can see that from the below snapshot). According to the Gupta TD4.2 the SCODE should be recognized by ActiveX Explorer:
--------------------------------------------------------------------------------------------------------------------------------------------------
Automation type constants -> VT_ERROR
Description -> SCODE
SalType constants -> SAL_NUMBER
SAL data type -> Number
-------------------------------------------------------------------------------------------------------------------------------------------------- This will be fixed only to version TD5.2?
--Florin
I tried your possible solution but it didn't works. An "OLE Automation Runtime error" occurs. (You can see that from the below snapshot). According to the Gupta TD4.2 the SCODE should be recognized by ActiveX Explorer:
--------------------------------------------------------------------------------------------------------------------------------------------------
Automation type constants -> VT_ERROR
Description -> SCODE
SalType constants -> SAL_NUMBER
SAL data type -> Number
-------------------------------------------------------------------------------------------------------------------------------------------------- This will be fixed only to version TD5.2?
--Florin
You do not have the required permissions to view the files attached to this post.
Who is online
Users browsing this forum: [Ccbot] and 16 guests