>Hi,
>
>My application is using a DLL that I created using VFP6 that will
>do simple packing ,zapping and SQL plus indexing.
>I had compiled it to be single-threaded.
>
>However, when I run it in my VB6 application, it work fine the first
>time only, on second run, it will halt my application, then indexing
>don't seem to work until I restart my system. What is wrong with my DLL
>that I do wrong. Please kindly advise me.
Hello Virusim,
Do you mean the second run happens without restarting the application?
Check out your VFP DLL project: VFP Menu/Project Info/Servers tab/Instancing field.
If it says Single Use, what happens there is that you cannot instanciate a second instance of Single Use DLL COM object.
There are two things you can do:
1. Change it to Multi Use and recompile your DLL. Then you will be able to instantiate more than once.
2. Leave it as Single Use and make sure that in VB you release your DLL after the use:
Set oMyVFP_DLL = Nothing
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison