Oct 26, 2011 at 10:49 AM

Multithreading is very important for development Metro applications and as it seems your API does not support multithreading.

When I try to use async/await on database I get an exception like this:
Unable to cast COM object of type 'System.__ComObject' to interface type 'SQLite.__IDatabaseFactory'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{CD66E6CF-B2F3-3D9F-B922-839948A140C6}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

Database must be used on the same thread it was created which is not pratical since Task.Run doesn't seems to use current thread.

Oct 28, 2011 at 4:48 PM

The C# projection doesn't work correctly in the preview version. The database works on a different thread using the following code. Microsoft should fix it soon.

ThreadPool::RunAsync(ref new WorkItemHandler([db](Windows::Foundation::IAsyncAction^ operation) { ... }))->Start();