25 #ifndef _ODREMOTEGEOMPROXY_INCLUDED_
26 #define _ODREMOTEGEOMPROXY_INCLUDED_
91 static const OdString g_strGeomBlockBegin =
OD_T(
"rblock_begin");
92 static const OdString g_strGeomBlockEnd =
OD_T(
"rblock_end");
152 #if defined(_WIN32) && !defined(_WINRT) && !defined(_WIN32_WCE)
156 HANDLE hBufferWritten = ::OpenEvent(EVENT_MODIFY_STATE | SYNCHRONIZE, FALSE, L
"OdaRemoteGeometryBufferWrittenEvent");
157 HANDLE hBufferProcessed = ::OpenEvent(EVENT_MODIFY_STATE | SYNCHRONIZE, FALSE, L
"OdaRemoteGeometryBufferProcessedEvent");
159 if(hBufferWritten !=
NULL && hBufferProcessed !=
NULL)
161 ::WaitForSingleObject(hBufferProcessed, INFINITE);
164 HANDLE hIPCFile = ::OpenFileMapping(FILE_MAP_READ | FILE_MAP_WRITE, FALSE, L
"OdaRemoteGeometryViewerIPCBuffer");
167 void* pBuffer = ::MapViewOfFile(hIPCFile, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
176 memcpy(pIpcFile, &n,
sizeof(n));
177 pIpcFile +=
sizeof(n);
180 memcpy(pIpcFile, &n,
sizeof(n));
181 pIpcFile +=
sizeof(n);
183 memcpy(pIpcFile, graphics.
getPtr(), graphics.
size());
185 ::UnmapViewOfFile(pBuffer);
187 ::CloseHandle(hIPCFile);
190 ::SetEvent(hBufferWritten);
192 ::CloseHandle(hBufferWritten);
193 ::CloseHandle(hBufferProcessed);
203 #if defined(_WIN32) && !defined(_WINRT) && !defined(_WIN32_WCE)
205 HANDLE hBufferWritten = ::OpenEvent(EVENT_MODIFY_STATE | SYNCHRONIZE, FALSE, L
"OdaRemoteGeometryBufferWrittenEvent");
206 HANDLE hBufferProcessed = ::OpenEvent(EVENT_MODIFY_STATE | SYNCHRONIZE, FALSE, L
"OdaRemoteGeometryBufferProcessedEvent");
208 if(hBufferWritten !=
NULL && hBufferProcessed !=
NULL)
210 ::WaitForSingleObject(hBufferProcessed, INFINITE);
212 HANDLE hIPCFile = ::OpenFileMapping(FILE_MAP_READ | FILE_MAP_WRITE, FALSE, L
"OdaRemoteGeometryViewerIPCBuffer");
215 void* pBuffer = ::MapViewOfFile(hIPCFile, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
221 memcpy(pIpcFile, &n,
sizeof(n));
222 pIpcFile +=
sizeof(n);
225 memcpy(pIpcFile, &n,
sizeof(n));
227 pIpcFile +=
sizeof(n);
228 memcpy(pIpcFile, s.
c_str(), n);
230 ::UnmapViewOfFile(pBuffer);
232 ::CloseHandle(hIPCFile);
235 ::SetEvent(hBufferWritten);
238 ::CloseHandle(hBufferWritten);
239 ::CloseHandle(hBufferProcessed);
246 #endif //_ODREMOTEGEOMPROXY_INCLUDED_