>Hi,
>
>For ease and convenient, I created a VFP6 DLL which will be
>call by my VB6 application do execute some simple packing, sql select
>statement. I had registered my DLL and on run the first time,
>my VB6 application will give run time error and exit my application,
>the second time when I run my application again, it is okay.
>
>This only happen when I recompile my DLL or VB6 application.
>I even tried to unregister the DLL and re-register my DLL,
>but all vain.
>
>I am running on MS Window 2000 Professional with SP2.
>
>Anyone encountered similar problem, please kindly advise
>or comment. Thank you.
This is a SWAG, but how were the vfP Runtime files deployed? It's a good bet that some of the required registry keys and dependencies were not created or updated if you did not use an installer that supported side-by-side version deployment, or attempted to roll your own deployment tool rather than relying on one that handles the task in accordance with the real deployment requirements. If you did not deploy the DLL and runtime using a tool like Setup Wizard, VSI or a similar product with a strong understanding of the runtime requirements, the errors could be caused by things which the installer might manage which, while unimportant for basic environments, are extremely significant when used in a COM environment.