Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help acces
Message
De
20/07/2001 04:37:49
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
20/07/2001 03:31:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Divers
Thread ID:
00533012
Message ID:
00533018
Vues:
11
Ted,
-Correct typo in declare line.
-Either remove 'protected' or provide another class method that could access protected method (otherwise you'd get 'Unknown name').
-You call OLE MTDLLs via object creation not declare dll
Assuming you've corrected typo, removed protected clause and compiled to a dll name OlePubTest :
dimension array1[2,3], array2[3]
cCheck = "T"
cType = "2002"
A = ""
array1[1,1] = 0
array1[1,2] = " "
array1[1,3] = " "
array1[2,1] = 0
array1[2,2] = " "
array1[2,3] = " "
array2[1] = " " 
array2[1] = " " 
array2[1] = " " 
? Before MTDLL call 
disp memo like array1
disp memo like array2

oTest = create('olepubtest.MyProcedures') && Ole Object
COMARRAY(oTest,11) && Arrays pass by ref and 1 based to oTest

a = oTest.pgetvarioussubfunctions(cCheck,cType,@array1,@array2)
? a
? After MTDLL call 
disp memo like array1
disp memo like array2
Cetin



>I have created a project MyLibrary that contains only one PRG that contains the following procedure
>
>PRG NAME pgetvarioussubfunctions.prg which has the following code:
>
>
>DEFINE CLASS MyProcedures AS CUSTOM OLEPUBLIC
>
> PROTECTED PROCEDURE pgetvarioussubfunctions
> Parameters pParm1, pParm2, pParm3, pParm4
>
> LOCAL cReturn
> DECLARE arrayX[2,3] arrayY[3]
>
> arrayx[1,1] = 1
> arrayx[1,2] = "A"
> arrayx[1,3] = DATE()
> arrayx[2,1] = 1
> arrayx[2,2] = "B"
> arrayx[2,3] = DATE()
>
> arrayy[1] = " "
> arrayy[1] = " "
> arrayy[1] = " "
>
> =acopy(arrayX,pParm3)
> =acopy(arrayY,pParm4)
>
> cReturn = "Any String"
>
> RETURN(cReturn)
>
> ENDPROC
>ENDDEFINE
>
>Now I try to access the DLL generated with the following program and get a message “No entry point for pgetvarioussubfunctions”
>
>declare array1[2,3]
>declare array2[3]
>cCheck = "T"
>cType = "2002"
>A = ""
>array1[1,1] = 0
>array1[1,2] = " "
>array1[1,3] = " "
>array1[2,1] = 0
>array1[2,2] = " "
>array1[2,3] = " "
>array2[1] = " "
>array2[1] = " "
>array2[1] = " "
>
>Declare string pgetvarioussubfunctions IN MyLibrary.DLL string cCheck, string cType, string @array1, string @array2
>
>a = pgetvarioussubfunctions(cCheck,cType,@array1,@array2)
>
>?a
>
>Can someone tell me what am I not doing right.
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform