
Originally Posted by
zuck
Thanks zuck, i successfully used QSharedMemory between two Qt applications. what i'm looking for is trasferring data from a visual c++ application to a Qt application ...
More explicitly, how to attach the two memory segments ...
In the visual c++ side i'm implementing shared memory using :
m_hSharedMemoryFile = CreateFileMapping((HANDLE)0xFFFFFFFF,
NULL,
PAGE_READWRITE,
0/*dwMaximumSizeHigh*/,
dwNumberOfBytesToMap/*dwMaximumSizeLow*/,
csName.GetBuffer(0));
m_hSharedMemoryFile = CreateFileMapping((HANDLE)0xFFFFFFFF,
NULL,
PAGE_READWRITE,
0/*dwMaximumSizeHigh*/,
dwNumberOfBytesToMap/*dwMaximumSizeLow*/,
csName.GetBuffer(0));
To copy to clipboard, switch view to plain text mode
And in the Qt side i'm using QSharedMemory. Both methods are working alone. (i.e. data trasfer from visual c++ to visual c++ and from Qt to Qt ) but not from visual c++ to Qt or from Qt to visual c++
I think i'm not using the same mechanism in the 2 sides. (Using FileMapping from visual c++ and semaphre from Qt)
Any ideas ?
Rgards,
Hassen
Bookmarks