Problem with DLL function writing to a file 
Author Message
 Problem with DLL function writing to a file



>I have a problem whics is driving me crazy. I have a set of functions,
>written in C , to write log information into a file. In the Action
>method at the form level, I use these functions to write information
>when a record is changed. I do this when the record is Unlocked.

>Some times it works, but some times I get a message from one of
>my DLL functions, saying "Bad file Number", which is caused by one
>of my tests, where I test the accessibility of the file.

>I have tried to track down what causes this file pointer to be destroyed,
>but without success. It's probably the code in my form ,that in some
>situations destroy the file pointer.

>Any help appreciated. It could be that someone have a similar problem.

I would suspect the problem is actually in your DLL - if your form tried to access
(and overwrite) the DLL's data segment, it would (should?) generate a General
Protection fault.

If the source code for your DLL is accessible, I'd suggest going over it very
carefully, paying particular attention to any pointers that are used.

Also, make sure that the ObjectPAL Uses statement correctly matches your
function prototype.  Check to make sure you aren't trying to pass any complex
data types - ObjectPAL really only handles the basic types, such as int, longint,
float, and so on.

If the source for the DLL isn't too large, and is not confidential, you can email
it to me and I'll take a look at it, if you like.


Fri, 24 Jul 1998 03:00:00 GMT
 [ 1 post ] 

 Relevant Pages 

1. How to call user-written DLL function in a SELECT STATEMENT

2. write the output from a function to a file

3. Problem Paasing 2-D Array using SAFEARRAY in DLL written with VC++ 5.0 from VB.

4. Function to write RTF file?

5. How to view function names contained in DLL file

6. Calling a public function in a VB ActiveX DLL from a VC DLL

7. Writing aggregate functions in stored functions?

8. How to write column function, table function

9. Function call in a stored procedure (.dll function)

10. Problem with calling multiper DLL functions.

Powered by phpBB® Forum Software