Welcome, Guest. Please login or register.

Author Topic: OpenDevice (C help needed please!)  (Read 2209 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline chris

Re: OpenDevice (C help needed please!)
« on: November 01, 2003, 05:40:27 PM »
It tells the compiler what the following variable type is.

Your example:
(struct IoRequest *)IORequest

Tells the compiler that the variable "IORequest" is a pointer to a struct IoRequest.

It has probably been declared earlier on with:
struct SerialIORequest *IORequest;

Or something like that.  The serial.device needs a special IORequest structure, but OpenDevice defines struct IORequest as the type for the IORequest, so you need to tell it to use the variable as a type IORequest, rather than the defined type SerialIORequest.

Get it?  :-)

Chris
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz