From: Chris <enderx12@my-deja.com>
Subject: Re: Interface to C; Storage_Error
Date: Wed, 20 Dec 2000 23:57:28 GMT
Date: 2000-12-20T23:57:28+00:00 [thread overview]
Message-ID: <91rh14$vco$1@nnrp1.deja.com> (raw)
In-Reply-To: 91qote$9cj$1@nnrp1.deja.com
After trying many different configurations,
I now seem to be making negative progress. So
I'm going back to the C code and getting my
brain out of Ada for a few moments... in case
this helps someone make sense of what I should
do, here's what the code looks like in C:
typedef void* SRV_HANDLE;
typedef void* RSLT_HANDLE;
typedef void* CTX_HANDLE;
SRV_HANDLE hand = 0;
RSLT_HANDLE results;
CTX_HANDLE ctx = 0;
char name[255];
double value = 0.0;
status = InititalizeLibrary("config.txt", &hand);
// omitting error checking here
status = LookupResults(hand, "keystring", &results);
// reset these after every lookup
ctx = 0;
name[0] = 0;
status = GetNextVal(hand, results, &ctx, name, &value);
// this call can be repeated to get a series of name/value
// pairs. ctx is the handle to keep track of repeated
// calls, and starts at the beginning when 0.
Clear as mud? I'm stumped, and sad that my Ada is so rusty.
--chris
Sent via Deja.com
http://www.deja.com/
next prev parent reply other threads:[~2000-12-20 23:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-19 22:28 Interface to C; Storage_Error Chris
2000-12-20 3:52 ` Ted Dennison
2000-12-20 8:55 ` Robert Dewar
2000-12-20 11:39 ` Thomas Wolf
2000-12-20 17:05 ` Chris
2000-12-20 23:57 ` Chris [this message]
2000-12-21 15:35 ` Thomas Wolf
2000-12-21 18:07 ` Chris
2000-12-21 3:25 ` DuckE
2000-12-21 11:38 ` Robert Dewar
2000-12-23 2:45 ` DuckE
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox