Necesito llamar desde Uniface 9.7.04 a una dll ActiveX creada con VB 6.0.
Según la ayuda de Uniface tengo que crear una signature COM. He intentado recrear el siguiente ejemplo de la ayuda pero no lo consigo:
Code: Select all
Call a Visual Basic object that returns a value 1
The assignment file contains the following setting:
KURB040VB = $COM:KURB040VB CLASS=KURBTESTSVB.KURB040VB
The signature for the service KURB040VB contains the following definitions:
Implementation: COM;
operation: COM_1;
parameter: VALUE (numeric, out)
Form KURB040, Button Visual Basic, Detail trigger:
newinstance "kurb040vb", kurb040vb
variables
Handle kurb040uf
endvariables
kurb040vb->com_1(u_return)
Visual Basic code:
Public Function com_1(value As Long) As Long
Open "kurb040vb.log" For Append As #1
Write #1, Now
Write #1, "Case 2: kurbtestsvb.kurb040vb.com_1 called"
value = 1
com_1 = 0
Close #1
End Function
1. He añadido en el fichero asn lo siguiente:
Code: Select all
[PATHS]
...
$COM=COM:
[SERVICES_EXEC]
KURB040VB = $COM:KURB040VB CLASS=KURBTESTSVB.KURB040VB
Code: Select all
Public Function com_1(value As Long) As Long
Open "kurb040vb.log" For Append As #1
Write #1, Now
Write #1, "Case 2: kurbtestsvb.kurb040vb.com_1 called"
value = 1
com_1 = 0
Close #1
End Function
3. Creo signature en Uniface como indica el ejemplo:
Code: Select all
Signature KURB040VB; Implementation: COM; operation: COM_1; parameter: VALUE (numeric, out)
Code: Select all
variables
handle kurb040vb
numeric u_return
endvariables
newinstance "kurb040vb", kurb040vb
kurb040vb->com_1(u_return)
Code: Select all
"ERROR=-150·;
MNEM=<UACTERR_UNKNOWN>·;
DESCRIPTION=Activation error occurred·;
COMPONENT=SES_MANAGER·;
PROCNAME=12\DTLF·;
TRIGGER=DTLF·;
LINE=2·;
ADDITIONAL=COMPONENTNAME=KURB040VB·!·;
INSTANCENAME="
Gracias de antemano y un saludo.