1. Embedded EDS possible?
- Posted by bruce1961 Feb 05, 2011
- 1370 views
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.
2. Re: Embedded EDS possible?
- Posted by bruce1961 Feb 07, 2011
- 1313 views
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?
3. Re: Embedded EDS possible?
- Posted by bruce1961 Feb 07, 2011
- 1277 views
Or I could stuff it into a resource, though the problem then is now to make it available to db_open and its cronies.
4. Re: Embedded EDS possible?
- Posted by coconut Feb 07, 2011
- 1319 views
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