Diffrent data context in the same cpp node. c++

I`m currently creating reader for proprietary data container which include
many types of data - from points attribute to textures.

Currently for example in touchdesigner I can only retrieve texture and points
separately.
Lets say thru cpp top and cpp sop.

It means i will have to create two dlls, both reading from the same file.
Any trick for making it more efficient thru one dll ?

If not - what is the cpp touchdesigner way to approuch such case ?

thank you,
Barak.

You should put all the code that reads that data into a 3rd .dll that both of your .dlls use. .dlls are loaded uniquely by filename, so if they are both linked with the same .dll, only one instance if it will be loaded into the process and any global/static data in that .dll will be shared between the other two .dlls.