Sqlite API is ANSI C, there's no reason why <windows.h> is needed. Surely
you are free to use the dll with any windows program and refer to windows
API at the same time.

Sqlite can be used in managed code (C#) as demonstrated with Mono
(http://www.go-mono.com) sqlite .net data provider. There were a rather
serious one-line bug that was in mono 0.28 release (it was identified and
patches were posted in email list before 0.29 was out, so probably fixed
already).

One leftover issue, is the C callback function for sqlite_exec

int Callback(void *pArg, int argc, char **argv, char **columnNames){
  return 0;
}

It is generally cdecl but Microsoft C# P/Invoke supports only STDALL for
callback (not sure how mono handles this). Maybe a paralell
sqlite_exec_stdcallback could be defined for C# support to use P/Invoke
directly.Luke----- Original Message ----- 
From: "Tim McDaniel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 19, 2003 11:13 AM
Subject: RE: [sqlite] how can I use sqlite within windows managed code?


The code example you give does not look like managed code, if by "managed
code" you mean .NET code.
Your example looks like plain Windows C++ code.

> -----Original Message-----
> From: Kayhan Yuksel [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 19, 2003 10:33 AM
> To: '[EMAIL PROTECTED]'
> Subject: [sqlite] how can I use sqlite within windows managed code?
>
>
> To whom it may concern,
> I would like to know how can I use sqlite in a windows
> managed code ?I am trying to modify the code at
> "..\Dev-Cpp\Examples\WinMenut" that comes with the devcpp
> 4.9.8.0 ....I have copied the sqlite.h to include directory,
> included the sqlite.h as <sqlite.h> modified some part of the
> code to something like that : case IDM_DOSYAYENI:
>                   {
>                   sqlite* p_db = sqlite_open("c:\test.sdb", 0777, 0);
>                   MessageBox( hwnd, (LPSTR) " 'test'
> Veritabanı hazır.",
>                   (LPSTR) szClassName,
>                   MB_ICONINFORMATION | MB_OK );
>                   return 0;
>                   }
> and I got this error :
> [Linker error] undefined reference to `sqlite_open'
>
> Is there an example that uses <windows.h> with sqlite?
>
> Yours sincerely+happy new year,
>
> Kayhan YUKSEL
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to