site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=E4uZHscH9OATzFcOjVjR1d/D++g8JKQuI4IdJR0ckByiz7etiA3hFgVlhnT8Te1YiqOXxiPKxs4Z3FzCi+uVrx/ubRn968iTfdePZ2r1WpBDzWkwdF2wuKCVaS01H2INmrSuFPfnRgsG4hYozQadTvNxPyDgN9TFeW3XH46ShAc= 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 (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com