Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling funct in .app that exist in .exe only
Message
 
 
To
21/06/2012 12:10:22
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01546502
Message ID:
01546536
Views:
40
>>>>I should apologize of the title is not clear; but I could not compose a better brief description.
>>>>
>>>>I have an EXE application (VFP 9 SP1) that calls an .APP application (also VFP 9 SP1). Some code in .APP calls function(s) that exist only in the .EXE (simply because the .EXE and .APP share some class libraries). So when I compile/build the .APP I get a bunch of Unknow FunctionName - Undefined messages. But I have not seen error messages at run time. Does it mean that at run time when the code in the .APP calls one of the "unknown" functions they fire from the main .EXE?
>>>
>>>If a function is not available in the current context, FoxPro searches the calling context.
>>>
>>>If you're looking to silence compile-time errors, you could create a PRG that contains just the procedure and function headings of the routines in the EXE that are being referenced in the APP, then add this PRG to the project for the APP and set it as excluded.
>>
>>First, thank you. But how do you create procedure and function headings? I am thinking that if I create a "dummy" procedure/function of the same name, at run time, these "dummy" procedure will be called. Do you see what confuses me?
>
>As I mentioned -- just simply add the "stub" to the project, but set it (the "stub") as excluded. The excluded "stub" makes the compiler happy, but since the "stub" is excluded, the functions don't exist in the APP context -- so the calling EXE will be searched.

I got it. Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform