473,395 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

C# equivalant for dll function call

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);
Oct 9 '06 #1
1 1379

"Brian" <br**********@hotmail.comwrote in message
news:uT****************@TK2MSFTNGP04.phx.gbl...
| 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.

Oct 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: JKop | last post by:
Take the following simple function: unsigned long Plus5Percent(unsigned long input) { return ( input + input / 20 ); } Do yous ever consider the possibly more efficent:
2
by: laredotornado | last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to have my Javascript function execute from the BODY's "onload" method, but if there is already an onload method defined, I would...
1
by: Water Cooler v2 | last post by:
What is the C# equivalant of the VB.NET keyword "shadows"?
13
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make...
3
by: Water Cooler v2 | last post by:
What is the .NET equivalant of the VB function String(Number as Long, Character)? I am forgetting it at the moment.
23
by: bluejack | last post by:
Ahoy... before I go off scouring particular platforms for specialized answers, I thought I would see if there is a portable C answer to this question: I want a function pointer that, when...
1
by: joseph cook | last post by:
Is the following code: void foo() { static std::vector<intobj (500); obj.clear(); } mostly equivalant in operation to the following:
1
by: Raja Mohan | last post by:
The following code is used in vb6. 'UPGRADE_ISSUE: Constant vbUnicode was not upgraded. Click for more:...
9
by: CryptiqueGuy | last post by:
Consider the variadic function with the following prototype: int foo(int num,...); Here 'num' specifies the number of arguments, and assume that all the arguments that should be passed to this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.