1. Embedded EDS possible?

I was thinking of creating a readonly EDS, and embedding it in a DLL. How easy would it be to modify the db_open so that it either

  • takes a pointer to a memshare (i.e. a memory mapped portion of the DLL itself), or
  • takes a third parameter which is the offset into the DLL where the EDS data actually begins

Thoughts?

Kind regards, Bruce.

new topic     » topic index » view message » categorize

2. Re: Embedded EDS possible?

Toward answering my own question, I could edit my own database.e and tweak db_open(). If path ends with ".dll" or ".DLL" then assume database is appended to end of dll (with something like 'COPY /B database.dll + database.edb final_database.dll'.) Interrogate the dll's header to find physical length (is that possible?.) Seek to length+1 and assume that as starting point.

Feasible?

new topic     » goto parent     » topic index » view message » categorize

3. Re: Embedded EDS possible?

Or I could stuff it into a resource, though the problem then is now to make it available to db_open and its cronies.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Embedded EDS possible?

bruce1961 said...

Or I could stuff it into a resource, though the problem then is now to make it available to db_open and its cronies.

one possible solution
1) make it a custom resource
2) Load DLL and copy the resource to a temporary file
4) open that temporary file with db_open()
5) delete temporary file before leaving application.
You can use memory mapped file to improve speed: http://msdn.microsoft.com/en-us/library/aa366556(v=vs.85).aspx

Jacques

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu