How C # makes SQLite assemblies adaptable to both 32-bit systems and 64-bit systems

Source: Internet
Author: User
Tags sqlite

Share 5:

Requirements: All know that Sqlite3 is divided into 32-bit and 64-bit versions, if a Sqlite3.dll file is fully applicable

Analysis: SQLite is a lightweight database file, using a mixed programming, part of the implementation of unmanaged C + + code, part of the use of managed code and. NET Framework interface, because unmanaged code can not be built as "any CPU", all have a system-differentiated;

According to the data, whether it is 32-bit or 64-bit, In addition to SQlite.Interop.dll different, other dynamic libraries are the same, according to the official explanation, Sqlite.Interop.dll can be put with System.Data.SQLite.dll (this Sqlite file is about 255k (, this is separated, do not use the wrong ) in the same directory, it can also be placed under the x86 or x64 directory. Therefore, we only need to bring the System.Data.SQLite.dll file into the project, and then X86\sqlite.interop.dll and x64\ SQLite.Interop.dll Copy to the project root directory, you can complete different systems are available to SQLite.

At this point, the addition of different systems can be used by the SQLite combination package;

Https://files.cnblogs.com/files/ysq0908/SQLite3%E7%BB%84%E5%90%88.rar

How C # makes SQLite assemblies adaptable to both 32-bit systems and 64-bit systems

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.