>>>I use Cryptor in my VFP DLL. When the DLL is built as single-threaded, it works fine. When it is changed to a multi-threaded one, error occurs in the SET LIBR TO C40FOX60.FLL line. Does any body encounter the same problem?
>>>
>>>KM
>>
>>KM,
>>What's the error? Unable to load library? What's the error number or error message?
>
>Larry,
>
>Thank you for your reply. I log errors into a text file. The log shows the following error in the SET LIBR TO C40FOX60.FLL line:
>"API call caused an exception., 2028".
>
>If I rebuild the DLL as single-threaded, the DLL works fine.
>
>KM
KM,
What version of VFP are using and what service pack is installed. I thought the problem may have been due to Cryptor not being thread safe and that might cause a problem. That still might be the case eventually (I can't find any documentation on it one way or the other) but it's not the case here.
I tested this using my setup (VFP6 SP5 running on NT4 SP6). I built a multi-threaded DLL and created a method called Initialize. The only thing the method did was set library to C40FOX60.FLL additive. It worked perfectly (no errors). I tested this using the COM DLL by itself and installed under Transaction Server and neither configuration gave me any problems.
SP 3,4 and 5 for VFP fixed several multi-threaded DLL issues. If you don't have them installed, I suggest you get them. Check out the MS VFP site for the downloads (
http://msdn.microsoft.com/vfoxpro).
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao