Re: How do I access the data contained within the performUpdate function's boundData parameter?
Ed Curren <[email protected]>
| Newsgroups | gmane.comp.encryption.cryptlib |
|---|---|
| Message-ID | <[email protected]> |
Hi Peter,
Thanks very much for the info. I am still running into an issue that is confusing me. When I call the boundData[0].type, (or any other struct member) in performUpdate I get an error of:
Unhandled exception at 0x102a02fc (cl32.dll) in cl333test.exe: 0xC0000005: Access violation reading location 0x00000122.
My processUpdate code (stripped down for testing) is:
static int performUpdate( DBMS_STATE_INFO *dbmsInfo, const char *command, const void *boundData, const int boundDataLength, const time_t boundDate, const DBMS_UPDATE_TYPE updateType )
{
BOUND_DATA *data = boundData;
BOUND_DATA_TYPE bdt = data[0].type;
return CRYPT_OK;
}
Thanks again for your help with this!
Ed
> From: [email protected]
> To: [email protected]; [email protected]
> Subject: Re: [Cryptlib] How do I access the data contained within the performUpdate function's boundData parameter?
> Date: Fri, 19 Feb 2010 17:48:09 +1300
>
> Ed Curren <[email protected]> writes:
>
> >I am writing a database plug-in to use sqlite as a back end certificate
> >store. Part of the performUpdate function parameter list is const void
> >*boundData. Through some investigation I see that the actual data type is
> >that of the struct BOUND_DATA.
> >
> >I have cast the const void *boundData as a BOUND_DATA*, however when I
> >attempt to read any of the three members of the BOUND_DATA struct I encounter
> >an error stating that the data cannot be read. I do not attempt to read the
> >boundData variable unless the boundDataLength is greater than zero.
> >
> >So my ultimate question is, how do I access the data contained within the
> >boundData parameter?
>
> boundData is an array of [0...BOUND_DATA_MAXITEMS] items, you can iterate
> through it with:
>
> for( i = 0; boundData[ i ].type != BOUND_DATA_NONE; i++ )
>
> There's no boundDataLength value present (except in the old dbx_rpcc.c).
>
> Peter.
_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.