So, I’m writing a plugin for a program, which requires that two lots of data are passed to it. It needs to store that data in-between calls.
so, in psuedo-code:
MainFunction()
{
GenerateData1()
GenerateData2()
}
GenerateData1()
{
PassDataToDLL() //(DLL Stores data)
}
GenerateData2()
{
PassDataToDLL() //(DLL operates on both sets of data, returns results via pointer)
OutputResults()
}
Interestingly, if I modify the above such that after passing data to the dll, the function GenerateData1 calls GenerateData2 itself, then it works!
Am I trying to acheive something that can’t be done, or is there a technique that could help?
you can do
You can pass pSharedData around dlls and it will automatically be deleted when nobody is referencing it.