Information générale
Catégorie:
COM/DCOM et OLE Automation
I'm working on a W2K system with VFP7 SP1. I'm not familiar with creating my own DLL's.
When I use the example code in a program I have no problem using the property myarray as an array.
When I build the following code to a DLL file and create an object, the property myarray is not an array. It displays the first element of the array, and that's it. I've read the VFP docs and worked on this for about two days to no avail. Could someone please tell me what I'm doing wrong, and how to get the property myarray to behave as an array? Also, if there are any books or sources about DLL's I should be reading, please give me a recomendation or six. Thanks in advance for your time and effort.
- Bill
Example Code:
DEFINE CLASS testdllarray AS custom OLEPUBLIC
Name = "testdllarray"
*-- Prop. of type string
custom_string = .F.
*-- Prop of type array
DIMENSION myarray[1]
PROCEDURE Init
With This
.custom_string = "INIT String Value"
Dimension .myarray(5)
Local a
For a = 1 To 5 Step 1
.myarray(a) = "Line:" + Ltrim(Str(a))
Next a
Endwith
ENDPROC
ENDDEFINE
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement