Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to pass a byte array to a VFP COM server
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01504853
Message ID:
01504877
Vues:
71
>>Naomi,
>>
>>Thanks for your quick response.
>>
>>I have done the things you suggested. Again, it works when I create the object directly for the PRG file. When I build the COM EXE, i no longer get the error that aBlobData is undefined. However, at runtime, I get the error in the FOR loop saying "Invalid subscript reference".
>>
>>Jim
>>
>>
>Can you post code that invokes this function and also the code that checks the array size.

Here is the code that invokes the function:
DIMENSION aBlobData[nFileSize] AS Byte
thisform.oNPVD.GetvFBDBlob(nFileID, aBlobData)
Here is the code at the beginning of GetvFBDBlob:
FUNCTION GetFBDBlob(nFileID AS Integer, aBlobData AS Byte ) AS Integer
   EXTERNAL ARRAY aBlobData
   LOCAL nResult AS Integer, nBlobSize AS Integer
   MESSAGEBOX("length of aBlobData: " + STR(ALEN(aBlobData)))
When I build the COM, and then run my VFP client, I get an error message saying "ABLOBDATA is not an array"

I have tried calling with and without '@" in the call: GetvFBD(nFileID, @aBlobData) and GetvFBD(nFileID, aBlobData). Get the same error message.


Jim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform