Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
API returns an unreadable Z-type array.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00796831
Message ID:
00796989
Vues:
14
Hi Sergey,

Yes, it returned a VFP array. Keep it quiet though, I don't want my application to get the wrong idea! I'm using VFP7.

Here is my actual code, nCall is the number in the z-type array I needed, and it was callable using the transfromed array's index:
#DEFINE QT_USER			9				
mApp="Application Descriptor"			
mServ=ALLTRIM(THISFORM.txtServ.VALUE)	
mUser=ALLTRIM(THISFORM.txtUser.VALUE)		
mPass=ALLTRIM(THISFORM.txtPass.VALUE)	
mMach=ALLTRIM(THISFORM.txtMach.VALUE)	

oConnection=CREATEOBJECT("ClientCOM2.EICServer2")	
oQueue=CREATEOBJECT("ClientCOM2.EICQueue2")			
oCall= CREATEOBJECT("ClientCOM2.EICCallObject2")	

IF !oConnection.ConnectionValid then
    oConnection.CONNECT(mApp,mServ,mUser,mPass,mMach,.T.)	
ENDIF

oQueue.CONNECT(QT_USER,mUser)				
aQueue=TRANSFORM(oQueue.OBJECTS)					
LastCall=2											
QueuePopulated=.F.
IF ALEN(aQueue)>0 then
    nCall=aQueue(LastCall)
    QueuePopulated=.T.							
ENDIF

IF QueuePopulated then
    oCall.ID=nCall
    sCallInfo=  "Number:" + oCall.RemoteLocation +"; Name:" + oCall.RemoteName
ELSE
    sCallInfo="No Call in Queue."
ENDIF

IF .T.
    WITH THISFORM.list1
        .ADDITEM(sCallInfo,1,2)
        .LISTITEM(.LISTCOUNT,1)=TIME()
    ENDWITH
ENDIF

oCall=NULL
oQueue=NULL
oConnection=NULL
John MR Fitzgerald
Order Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform