How to create common memory for two ocx
-
Hi, I have a web based application in which we have 8 ocx for displaying images. Currently images are loaded from CD .But now we want to allocate some memory in some of the 8 ocx we have and in this memory we will save maximum files that we could. Then we want to access this memory buffer using cmemfile. So we need to create a common memory which can be accessed by all the ocx on the page. I dont know how to create such memory? And then how to access the memory through different ocx. Please provide me some inputs on this..
Surendra Vishwkarma
-
Hi, I have a web based application in which we have 8 ocx for displaying images. Currently images are loaded from CD .But now we want to allocate some memory in some of the 8 ocx we have and in this memory we will save maximum files that we could. Then we want to access this memory buffer using cmemfile. So we need to create a common memory which can be accessed by all the ocx on the page. I dont know how to create such memory? And then how to access the memory through different ocx. Please provide me some inputs on this..
Surendra Vishwkarma
You might want to look up the CoTaskMemAlloc function and also Memory Mapped Files. Your biggest problem is likely to be browser security. It will not like your embedded controls accessing memory outside their normal scope. You might even have to consider replacing the OCX with Javascript but hopefully not:~ . It should be possible to write script on the page which can access the controls and negotiate between them which one will own/create a memory mapped file and then communicate it's handle to the other controls.
Nothing is exactly what it seems but everything with seems can be unpicked.