Help [VS] OLE2 Automation Controller 
Author Message
 Help [VS] OLE2 Automation Controller

PROBLEM:
I'm not able to pass Variant parameters by reference in an
OLE2 Automation controller with  a MathCad Automation Object.

I'm trying to control a MathCad 7 Automation object from VS 3.12a. Every
method called works except Method GetComplex, that needs two VT_VARIANT
VT_BYREF parameters (typeCode := 12 + 16r4000 = 16396) used to return the
result of the method.

While executing   OLE_VARIANTARG  >> allocateMemory  method
OLE_VARIANTARG  valueDescription is set to 'an OLEVariantValue (VT_VARIANT |
VT_BYREF, (illegal value type))'
and value is set to an OLEVariantValue (VT_VARIANT | VT_BYREF, (illegal
value type)).
Inspecting the value, typeCode is set to 16396,
externalBufferContents is set to ExternalAddress{00157D70}
BUT inspecting value yields ILLEGAL VT error because
method OLEVariantValue(OLEVariantStructure) >> getBasicValue
sends OLEVariantValue(OLEVariantStructure) >> xVariant method.

Comment: OLEVariantValue does not define and does not inherit a valid
xVariant method.

Code for reproducing the error:
| aVariant |
aVariant := OLE_VARIANTARG new.
aVariant inspect.
aVariant typeCode: 16396.
aVariant inspect.
aVariant isReference ifTrue:[aVariant allocateMemory].
aVariant inspect.
inspect value

System:
Visual Smalltalk V3.10, patched to V3.12a.
MathCad 7.0 patched to 7.02a
Windows NT 4.0 Workstation Service Pack 3

Am I doing something wrong? Any idea welcome

Miguel Angel Gonzalez Mu?oz
Asturias, Spain



Wed, 18 Jun 1902 08:00:00 GMT  
 Help [VS] OLE2 Automation Controller
PROBLEM:
I'm not able to pass Variant parameters by reference in an
OLE2 Automation controller with  a MathCad Automation Object.

I'm trying to control a MathCad 7 Automation object from VS 3.12a. Every
method called works except Method GetComplex, that needs two VT_VARIANT
VT_BYREF parameters (typeCode := 12 + 16r4000 = 16396) used to return the
result of the method.

While executing   OLE_VARIANTARG  >> allocateMemory  method
OLE_VARIANTARG  valueDescription is set to 'an OLEVariantValue (VT_VARIANT |
VT_BYREF, (illegal value type))'
and value is set to an OLEVariantValue (VT_VARIANT | VT_BYREF, (illegal
value type)).
Inspecting the value, typeCode is set to 16396,
externalBufferContents is set to ExternalAddress{00157D70}
BUT inspecting value yields ILLEGAL VT error because
method OLEVariantValue(OLEVariantStructure) >> getBasicValue
sends OLEVariantValue(OLEVariantStructure) >> xVariant method.

Comment: OLEVariantValue does not define and does not inherit a valid
xVariant method.

Code for reproducing the error:
| aVariant |
aVariant := OLE_VARIANTARG new.
aVariant inspect.
aVariant typeCode: 16396.
aVariant inspect.
aVariant isReference ifTrue:[aVariant allocateMemory].
aVariant inspect.
inspect value

System:
Visual Smalltalk V3.10, patched to V3.12a.
MathCad 7.0 patched to 7.02a
Windows NT 4.0 Workstation Service Pack 3

Am I doing something wrong? Any idea welcome

Miguel Angel Gonzalez Mu?oz
Asturias, Spain



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help VB 3.0 standard ole2 Help

2. Implementing an Ole Automation controller in Smalltalk MT 2.61

3. Python As Ole Automation Controller

4. Help with MF-Dialog OLE2 facility

5. Help with how to use OLE2/DSDDE

6. VS: OLE Automation anyone?

7. DEFSYSTEM vs. true automation

8. Direct programming of floppy controller vs. BIOS

9. Automation Open and Automation Close (Excel)

10. Receive error-1 at TCP/IP read - GPIB controller must be controller in charge

11. Office Automation Help

12. Urgent Help - Web page Automation

 

 
Powered by phpBB® Forum Software