Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling Procedure In VFP exe?
Message
De
02/05/2013 13:58:19
 
 
À
02/05/2013 13:32:34
Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01572452
Message ID:
01572523
Vues:
40
>>>With all of your suggestions and responses I'm now completely baffled. So, I'm going to try to be as explicit as possible with this next attempt :) I'm trying to replicate what I think you are suggesting I do.
>>>
>>>I've created a project called Testprocs. In it I have two programs in the "Code" tab as follows:
>>>
>>>1) the main startup program is named "testprocsmain.prg" and has:
>>>
>>>PROCEDURE setprocs
>>> SET PROCEDURE TO testprocs.prg ADDITIVE
>> if "TESTPROCS"$set("Procedure")
>>> WAIT WINDOW NOWAIT "Procedures set..." TIMEOUT 4
>> else
>> wait wind "Procedures NOT set..."
>> endif
>>>ENDPROC
>>>
>>>PROCEDURE sayit2
>>> WAIT WINDOW TIMEOUT 4 "Sayit2 Procedure was called..."
>>>ENDPROC
>>>
>>>2) another program named "testprocs.prg" that has:
>>>
>>>PROCEDURE sayit
>>> WAIT WINDOW TIMEOUT 4 "Sayit Procedure was called..."
>>>ENDPROC
>>>
>>>
>>>I build the project as a "Win32 executable" named Testme.exe.
>>>
>>>From the VFP command window, I try:
>>>
>>>"DO setprocs IN Testme.exe" (without quotes), and the wait window appears indicating that the procedures are set.
>>
>>Next try "DO sayit" (without quotes, NO in clause)
>
>Thanks, I figured it out before your last hint above.
>
>The thing is, am I really saving any resources this way? What's the difference if I call a "stub" in exe1 from exe2 versus placing the SET PROCEDURE... command in exe2?

Only that the exe2 file will be smaller by the size of the procedure file. Personally I don't bother with that and just add the procedure file to all projects that require it.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform