>I am new to Visual C++, but have been using FoxPro since the mid-nineteen-eighties and have just discovered how to build a DLL in Visual C++ ver. 5.0 that I can access in Visual FoxPro 5.0a with a "SET LIBRARY TO filename.dll" command. It seems to load fine and behaves normally for a while and then I get a General Protection Fault error "Invalid Page Fault error in KERNEL32.DLL at 0137:bff78040" It is always the same error at the same address.
It sounds like you have a handle or memory leak. If you're running under NT you can
watch task manager for handle leaks easily. Memory leaks are more difficult.
Also, make sure you're not overrunning your string allocations, which is the most
common problem with FLL/DLLs accessing strings.
Regards,