Ok, I figured it out !!!
This was actually a calling convention problem. Our software is built
using __fastcall as default convention, and the function in sqlite3.h
is declared as:
int __cdecl sqlite3_create_function(
sqlite3 *,
const char *zFunctionName,
int nArg,
int eTextRep,
void*,
Sorry I forgot to mention: I already tried single C function. I even
tried with extern "C" just in case but got exactly the same result.
I also tried __stdcall and __cdecl but looks like SQLite is wayting
for __fastcall function pointer
On Wed, Dec 17, 2008 at 5:37 PM, Martin Engelschalk
wrote:
Hello,
Looks like my last reply wasn't received
So I tried with a static function out of a class without more success.
Then I tried changing the calling convention to __stdcall and even
__cdecl, but I got a compilation error asking for a __fastcall
function, so no more success here (I'm usin
Guillaume Schub
wrote:
> sqlite3_create_function(m_pDB, "ScorePosition", "ScorePosition", 8,
> SQLITE_ANY, NULL, &ScorePosition, NULL, NULL);
>
> class MyClass
> {
> ...
> static void ScorePosition(sqlite3_context *pContext,int argc,
> sqlite3_value** argv);
> ...
> };
>
> No the problem is that t
Guillaume,
This is my callback function. As Martin suggested, it's defined
outside of any class. It looks to me like you're not passing the
correct parameters tothe create function.
static void sqlite3_regexp(sqlite3_context *pDB, int argc, sqlite3_value **argv)
{
CDBSqLite3* pThis =
r
Hi,
i suspect that you problem is the class MyClass.
Try to define your function "ScorePosition" as a C-function outside of a
class.
Martin
Guillaume Schub wrote:
> Hi everyone,
>
> I have spent nearly one day on this already with no success. I am
> currently trying to create some custom functi
Hi everyone,
I have spent nearly one day on this already with no success. I am
currently trying to create some custom function on a SQLite3 database.
What I did (just to test):
sqlite3_create_function(m_pDB, "ScorePosition", "ScorePosition", 8,
SQLITE_ANY, NULL, &ScorePosition, NULL, NULL);
cla
7 matches
Mail list logo