C# equivalant for dll function call

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

Hi,

I have a standard windows dll library with the call below. Converting the
structure is fine and the function call for P/Invoke is fine but is there
any equivalent to the C FILE structure in C#?

Thanks,
Brian

struct fann_error
{
enum fann_errno_enum errno_f;
FILE *error_log;
char *errstr;
};
__declspec(dllimport) void __stdcall fann_set_error_log(struct fann_error
*errdat, FILE * log_file);
 
| Hi,
|
| I have a standard windows dll library with the call below. Converting the
| structure is fine and the function call for P/Invoke is fine but is there
| any equivalent to the C FILE structure in C#?
|
| Thanks,
| Brian
|
| struct fann_error
| {
| enum fann_errno_enum errno_f;
| FILE *error_log;
| char *errstr;
| };
| __declspec(dllimport) void __stdcall fann_set_error_log(struct fann_error
| *errdat, FILE * log_file);
|
|

Nope, you have to define your own structure, FILE is a typedef for _iobuf
defined in stdio.h.

Willy.
 
Back
Top