Troubles using I2CINTERFACE

Hi All,

I’ve retrieved the I2CINTERFACE invoking IoCallDriver on the Video Port passing it a PNP IRP (subcode RP_MN_QUERY_INTERFACE).
Now I’ve got 2 function pointers to i2cOpen and i2cAccess but as soon as I try to call i2cOpen the system crashes…
Can anybody tell me why? I’ve found no documentation about these
functions… in the ddk example source drivers I’ve found the CI2CScript class but I’m not able to make it work anyway…

Any suggestion?

Thanks

Alex

What type of crash? Generally if you want to get a reasonable answer you
need to provide the output from windbg’s analyze -v command run after
the system crashes (or on the dump file.)

The only documentation in the ddk appears to be the sample CI2CScript
and the header file that defines the I2CINTERFACE.

Did you try google on I2CControl? I’m guessing not, as I came up with
this in about 5 seconds:
http://www.osronline.com/ddkx/w98ddk/vddi2c_8uud.htm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of a.napolitani
Sent: Tuesday, March 14, 2006 10:48 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Troubles using I2CINTERFACE

Hi All,

I’ve retrieved the I2CINTERFACE invoking IoCallDriver on the Video
Port passing it a PNP IRP (subcode RP_MN_QUERY_INTERFACE).
Now I’ve got 2 function pointers to i2cOpen and i2cAccess but as soon as
I try to call i2cOpen the system crashes…
Can anybody tell me why? I’ve found no documentation about these
functions… in the ddk example source drivers I’ve found the CI2CScript
class but I’m not able to make it work anyway…

Any suggestion?

Thanks

Alex


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thanks for your answer Mark,

it’s strange… the article says since i’m developing
a child driver i should pass to i2cOpen a pointer to
MY device object, but if you take a look to the I2CScript
class you will see you give a d.o. pointer ONLY when you
invoke the class constructor. That device object must be
the video port in order to query the I2CINTERFACE invoking IoCallDriver on the driver that owns the required interface… once retrieved, the class will use the video port d.o. pointer
EVEN to call i2cOpen…
…the class doesn’t work properly or I still miss something…

What do you think? Regards

Alex

What type of crash? Generally if you want to get a reasonable answer you
need to provide the output from windbg’s analyze -v command run after
the system crashes (or on the dump file.)

The only documentation in the ddk appears to be the sample CI2CScript
and the header file that defines the I2CINTERFACE.

Did you try google on I2CControl? I’m guessing not, as I came up with
this in about 5 seconds:
http://www.osronline.com/ddkx/w98ddk/vddi2c_8uud.htm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of a.napolitani
Sent: Tuesday, March 14, 2006 10:48 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Troubles using I2CINTERFACE

Hi All,

I’ve retrieved the I2CINTERFACE invoking IoCallDriver on the Video
Port passing it a PNP IRP (subcode RP_MN_QUERY_INTERFACE).
Now I’ve got 2 function pointers to i2cOpen and i2cAccess but as soon as
I try to call i2cOpen the system crashes…
Can anybody tell me why? I’ve found no documentation about these
functions… in the ddk example source drivers I’ve found the CI2CScript
class but I’m not able to make it work anyway…

Any suggestion?

Thanks

Alex


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer