Problem regarding IOMemoryDescriptor ::writeBytes()
Problem regarding IOMemoryDescriptor ::writeBytes()
- Subject: Problem regarding IOMemoryDescriptor ::writeBytes()
- From: santosh katvate <email@hidden>
- Date: Thu, 11 Aug 2005 19:40:40 +0530
Hello everybody
I am not able to write in IOMemoryDescriptor buffer using the
writeBytes function.
But i am able to read from it using readBytes function.
The return value is coming out to be 0
and it is giving error in log file as
IOGMD(0xaddr):wB=o0,l4
What is the cause of the problem.
The code is given below
IOMemoryDescriptor *buffer = IOBufferMemoryDescriptor::withCapacity
(LengthToWrite, kIODirectionOut);
buffer->prepare (kIODirectionOut);
UInt32* testtemp=(UInt32*)IOMalloc(4);
ByteCount1=buffer->readBytes(0,testtemp,4);
IOLog("ByteCount1=%d\n",ByteCount1 );
ByteCount2 = buffer->writeBytes (0, pMyBuffer, 4);
IOLog("ByteCount2=%d\n",ByteCount2 );
Output in system.log is
ByteCount1=4
ByteCount2=0
Thanking in Advance
santosh k
--
Life is Small and Lots of Things to Learn
Lets Share the Knowledge
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden