C# equivalant for dll function call

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);
 
W

Willy Denoyette [MVP]

| 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top