CE6.0 Driver Pointer Marshalling - passing pointers out only?
- From: Dave Peverley <dpeverley@xxxxxxxxxxxxxx>
- Date: Thu, 10 May 2007 22:35:32 +0100
Hi all,
First off, apologies if this is a repost - I think something
odd is going on with my news server!
I've got a pretty complex driver I'm porting up at the moment
and am stuck scratching my head over a slightly odd issue. I have
an API that talks to the driver via DeviceIoControl() with various
structures that relate to API parameters.
For all of the calls so far its been straightforward mapping
embedded pointers via CeOpenCallerBuffer() and CeCloseCallerBuffer().
However there's a particular API function where the app passes in :
UINT8 **bufferarray;
UINT32 buffersize;
UINT32 buffercount;
This is an array of pointers to (n) buffers that get set up
_by_the_driver_ and returned to the caller rather than passed
in. i.e. the app sets up the count and size parameters and then
the driver allocates the buffers (via an internal allocation
routine from its own block of reserved memory). So I can map
in the bufferarray to set the pointers up in, but I can't work
out how to map the allocated buffers back into the callers
process space.
Obviously to map the buffer back out via the CeOpenCallerBuffer()
idiom it would have to have been passed in in the first place which
it wasnt so I'm kind of stumped trying to think what the most correct
mechanism to do this by would be?!
Of course I understand that changing the driver so it doesn't work
this way is likely to be the first suggested answer but this is a very
large driver and API that is cross platform to various other OS's and
this isn't a feasible option sadly...
Has anyone else had to try and get around this or a similar issue
in CE6.0 yet?
Best Wishes,
~Pev
.
- Follow-Ups:
- Prev by Date: Re: FindFirstFile & system folder
- Next by Date: Re: Outport16(&p->BANKSEL, 3) fails for Lan91c111
- Previous by thread: Re: RasDial() in asynch mode generates Data Abort in gwes.exe
- Next by thread: Re: CE6.0 Driver Pointer Marshalling - passing pointers out only?
- Index(es):
Relevant Pages
|