Running multiple copies of the same VFP 5 application (DLL problems) 
Author Message
 Running multiple copies of the same VFP 5 application (DLL problems)

I have a Visual FoxPro 5 program which I'm trying to encourage to run
multiple times on the same computer but I just can't seem to get it to work.

The application has been ported from FoxPro 2.6 and uses a 16bit DLL file
which is accessed through two(apparently undocumented) functions called
regfn and callfn. I'm not sure if this is standard practice, but I can't use
the DECLARE statement with 16bit DLLs and I don't have the DLL source to
recompile in 32bits, so it will probably have to stay.

After closing down one of the occurrences of the application any use of
callfn to access a DLL function causes the calling application to crash with
a "Ddereg Failed C 0" error (again, undocumented). As far as I can tell
DDEREG.EXE (used for dynamic data exchange, according to the docs I could
find) is being used to communicate with the DLL and is holding the open DLLs
in a global registry somewhere. When the first program shuts down DDEREG
clears the DLL from its registry, leaving any other programs with a bit of a
problem when they try and access data that is no longer there.

Is this likely to be what's causing the problem? Is there any way to stop
it? If not, is it worth me investing a huge amount of effort into rewriting
the DLL in question in VC++ and using the DECLARE style 32bit DLL handling,
or will this exhibit the same problems?

Thanks for any help,
Andrew



Mon, 15 Jul 2002 03:00:00 GMT  
 Running multiple copies of the same VFP 5 application (DLL problems)
See the help for FOXTOOLS.  It should be in a TOOLS folder under your VFP
folder and called FOXTOOLS.HLP.  It will have the documentation for callfn
and regfn.

Fred

Quote:

>I have a Visual FoxPro 5 program which I'm trying to encourage to run
>multiple times on the same computer but I just can't seem to get it to
work.

>The application has been ported from FoxPro 2.6 and uses a 16bit DLL file
>which is accessed through two(apparently undocumented) functions called
>regfn and callfn. I'm not sure if this is standard practice, but I can't
use
>the DECLARE statement with 16bit DLLs and I don't have the DLL source to
>recompile in 32bits, so it will probably have to stay.

>After closing down one of the occurrences of the application any use of
>callfn to access a DLL function causes the calling application to crash
with
>a "Ddereg Failed C 0" error (again, undocumented). As far as I can tell
>DDEREG.EXE (used for dynamic data exchange, according to the docs I could
>find) is being used to communicate with the DLL and is holding the open
DLLs
>in a global registry somewhere. When the first program shuts down DDEREG
>clears the DLL from its registry, leaving any other programs with a bit of
a
>problem when they try and access data that is no longer there.

>Is this likely to be what's causing the problem? Is there any way to stop
>it? If not, is it worth me investing a huge amount of effort into rewriting
>the DLL in question in VC++ and using the DECLARE style 32bit DLL handling,
>or will this exhibit the same problems?

>Thanks for any help,
>Andrew



Mon, 15 Jul 2002 03:00:00 GMT  
 Running multiple copies of the same VFP 5 application (DLL problems)


Quote:
> See the help for FOXTOOLS.  It should be in a TOOLS folder under your VFP
> folder and called FOXTOOLS.HLP.  It will have the documentation for callfn
> and regfn.

> Fred

Great! The file as a whole makes for interesting reading, and seems to
suggest that a rewritten 32bit DLL wouldn't suffer from the same problems as
it's 16bit elder brother. I suppose I'll have to give that a go tomorrow.

Thanks,
Andrew



Mon, 15 Jul 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Multiple Copies of the EXE running

2. How to stop the user running a 2nd copy of a VFP3b Application

3. Problems running FPW 2.6 application in VFP 5.0a

4. VFP 3.0 printing multiple copies

5. running other vfp applications from a vfp app

6. Multiple .APPs in one application in VFP?

7. problem in running application on foxpro in pentium mmx system

8. Problem in running an Application in Windows NT 4.0

9. VFP multiple run commands in sequence

10. problem in running application on foxpro in pentium mmx system

11. Starting an application via the command line vs Run|Application

12. VFP 5.0 dll not running on IIS 3.0

 

 
Powered by phpBB® Forum Software