Re: How to catch integer 64 bit return variable type
- Posted by Juergen Luethje <j.lue at gmx.de> Jun 08, 2007
- 601 views
ChrisBurch2 wrote: > Juergen Luethje wrote: > > > > D. Darmawan wrote: > > > > > Thanks your quick response Juergen, > > > > > > I try to make my expectation more understandable. > > > Assume that C function in API library is like this: > > > > > > }}} <eucode> > > > long long int desired_function(any_struct_value*); > > > </eucode> {{{ > > > that will return any 64 bit integer value. > > > > > > Then I link and call that C function in my Eu code: > > > > > > }}} <eucode> > > > myAPIfunc = define_c_func(myDLL, "desired_function", {C_POINTER}, C_LONG) > > > > > > x = c_func(myAPIfunc, {lpMyVar1}) > > > </eucode> {{{ > > > > > > Now, my question is: > > > How to catch the 64bit integer return value from myAPIfunc and assign it > > > into > > > 'x' variable??? > > > > I see. Unfortunately, for this case I don't have a solution. > > However, if we declare the problem "insoluble", then Matt will solve it. :) > > > > Regards, > > Juergen > > > Hi > > This is interesting. > > Are you using the sqlite3 wrappers? No, I don't do so. I probably expressed myself somewhat unclear. > Are you trying to get a large signed integer from a database query, or as > a return value from one of the other functions? As far as I can see, the peek8u() and peek8s() functions that I posted are only useful when a parameter of a sqlite function is a _pointer_ to a 64-bit integer. Is this sometimes the case? > The reason I ask is that database queries are returned as text values in > sqlite3, > so you have to do the conversion afterwards. > > However, if you are using functions not yet wrapped in eusqlite3, and you do > manage to wrap them, I would be more than happy to add them to eusqlite3 > library. Unfortunately, I almost don't know anything about sqlite. Regards, Juergen