<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>pubsub Work Item Rss Feed</title><link>http://www.codeplex.com/pubsub/WorkItem/List.aspx</link><description>pubsub Work Item Rss Description</description><item><title>Closed Issue: Stack imbalance between SharedMemoryMgr and SharedQueue [12335]</title><link>http://pubsub.codeplex.com/workitem/12335</link><description>SharedMemoryMgr uses the cdecl calling convention for five methods. The SharedQueue class that calls these methods uses the stdcall convention. As a result, there is a memory leak every time a call is made, because each side assumes the other will clean up the stack. &lt;br /&gt;&lt;br /&gt;Here are the declarations in SharedMemoryMgr &amp;#40;C&amp;#43;&amp;#43;&amp;#41;&amp;#58;&lt;br /&gt;extern INT32 __cdecl InitMemoryMgr&amp;#40;LPCTSTR SharedMemoryName, DWORD SharedMemorySize, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl JoinMemoryMgr&amp;#40;LPCTSTR SharedMemoryName, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl ReleaseMemoryMgr&amp;#40;PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl PutBuffer&amp;#40;LPCSTR pEventBuffer, DWORD dwEventLength, DWORD dwTimeOut, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl GetBuffer&amp;#40;LPCSTR pEventBuffer, DWORD dwEventBufferLength, DWORD dwTimeOut, DWORD &amp;#42;pBytesRead, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;Here is a sample C&amp;#35; declaration, in SharedQueue.cs&amp;#58;&lt;br /&gt;&lt;br /&gt;            &amp;#91;DllImport&amp;#40;SharedMemoryMgr, ExactSpelling &amp;#61; true, CharSet &amp;#61; CharSet.Ansi&amp;#41;&amp;#93;&lt;br /&gt;            internal static extern ReturnCode InitMemoryMgr&amp;#40;&lt;br /&gt;                String sharedMemoryName,&lt;br /&gt;                UInt32 sharedMemorySize,&lt;br /&gt;                ref IntPtr commBuffer&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;To fix this issue, the DllImportAttribute should have the calling convention specified&amp;#58;&lt;br /&gt;&lt;br /&gt;            &amp;#91;DllImport&amp;#40;SharedMemoryMgr, ExactSpelling &amp;#61; true, CharSet &amp;#61; CharSet.Ansi, CallingConvention &amp;#61; CallingConvention.Cdecl&amp;#41;&amp;#93;&lt;br /&gt;            internal static extern ReturnCode InitMemoryMgr&amp;#40;&lt;br /&gt;                String sharedMemoryName,&lt;br /&gt;                UInt32 sharedMemorySize,&lt;br /&gt;                ref IntPtr commBuffer&amp;#41;&amp;#59;&lt;br /&gt;Comments: &lt;p&gt;Bug is fixed and code checked-in.&lt;/p&gt;</description><author>keithh</author><pubDate>Sat, 11 Dec 2010 02:50:50 GMT</pubDate><guid isPermaLink="false">Closed Issue: Stack imbalance between SharedMemoryMgr and SharedQueue [12335] 20101211025050A</guid></item><item><title>Commented Issue: Stack imbalance between SharedMemoryMgr and SharedQueue [12335]</title><link>http://pubsub.codeplex.com/workitem/12335</link><description>SharedMemoryMgr uses the cdecl calling convention for five methods. The SharedQueue class that calls these methods uses the stdcall convention. As a result, there is a memory leak every time a call is made, because each side assumes the other will clean up the stack. &lt;br /&gt;&lt;br /&gt;Here are the declarations in SharedMemoryMgr &amp;#40;C&amp;#43;&amp;#43;&amp;#41;&amp;#58;&lt;br /&gt;extern INT32 __cdecl InitMemoryMgr&amp;#40;LPCTSTR SharedMemoryName, DWORD SharedMemorySize, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl JoinMemoryMgr&amp;#40;LPCTSTR SharedMemoryName, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl ReleaseMemoryMgr&amp;#40;PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl PutBuffer&amp;#40;LPCSTR pEventBuffer, DWORD dwEventLength, DWORD dwTimeOut, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl GetBuffer&amp;#40;LPCSTR pEventBuffer, DWORD dwEventBufferLength, DWORD dwTimeOut, DWORD &amp;#42;pBytesRead, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;Here is a sample C&amp;#35; declaration, in SharedQueue.cs&amp;#58;&lt;br /&gt;&lt;br /&gt;            &amp;#91;DllImport&amp;#40;SharedMemoryMgr, ExactSpelling &amp;#61; true, CharSet &amp;#61; CharSet.Ansi&amp;#41;&amp;#93;&lt;br /&gt;            internal static extern ReturnCode InitMemoryMgr&amp;#40;&lt;br /&gt;                String sharedMemoryName,&lt;br /&gt;                UInt32 sharedMemorySize,&lt;br /&gt;                ref IntPtr commBuffer&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;To fix this issue, the DllImportAttribute should have the calling convention specified&amp;#58;&lt;br /&gt;&lt;br /&gt;            &amp;#91;DllImport&amp;#40;SharedMemoryMgr, ExactSpelling &amp;#61; true, CharSet &amp;#61; CharSet.Ansi, CallingConvention &amp;#61; CallingConvention.Cdecl&amp;#41;&amp;#93;&lt;br /&gt;            internal static extern ReturnCode InitMemoryMgr&amp;#40;&lt;br /&gt;                String sharedMemoryName,&lt;br /&gt;                UInt32 sharedMemorySize,&lt;br /&gt;                ref IntPtr commBuffer&amp;#41;&amp;#59;&lt;br /&gt;Comments: ** Comment from web user: keithh ** &lt;p&gt;I updated the installs on the download page with the fix. I still need to update the source code and then I&amp;#39;ll close this out.&lt;/p&gt;</description><author>keithh</author><pubDate>Sat, 11 Dec 2010 00:49:11 GMT</pubDate><guid isPermaLink="false">Commented Issue: Stack imbalance between SharedMemoryMgr and SharedQueue [12335] 20101211124911A</guid></item><item><title>Closed Issue: Mutex released when not owned [12638]</title><link>http://pubsub.codeplex.com/workitem/12638</link><description>The InitMemoryMgr method creates the mutex without taking ownership&amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#9;CommBuffer-&amp;#62;ghMutex &amp;#61; CreateMutex&amp;#40;&amp;#38;sa, FALSE, MUTEX_NAME&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;Then, later in the function, it releases ownership in multiple places although it does not have it&amp;#58;&lt;br /&gt;&lt;br /&gt;    if &amp;#40;CommBuffer-&amp;#62;ghEvent &amp;#61;&amp;#61; NULL&amp;#41; &lt;br /&gt;    &amp;#123; &lt;br /&gt;&amp;#9;&amp;#9;if&amp;#40;errco &amp;#61;&amp;#61; 0&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;errco &amp;#61; GENERALERRORCODE&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;free&amp;#40;&amp;#40;char&amp;#42;&amp;#41;lpSharedMemoryName&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;ReleaseMutex&amp;#40;CommBuffer-&amp;#62;ghMutex&amp;#41;&amp;#59;&lt;br /&gt;...&lt;br /&gt;&amp;#9;if&amp;#40;CommBuffer-&amp;#62;ghMapFile &amp;#61;&amp;#61; NULL &amp;#124;&amp;#124; CommBuffer-&amp;#62;ghMapFile &amp;#61;&amp;#61; INVALID_HANDLE_VALUE&amp;#41; &lt;br /&gt;&amp;#9;&amp;#123; &lt;br /&gt;&amp;#9;&amp;#9;if&amp;#40;errco &amp;#61;&amp;#61; 0&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;errco &amp;#61; GENERALERRORCODE&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;free&amp;#40;&amp;#40;char&amp;#42;&amp;#41;lpSharedMemoryName&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;ReleaseMutex&amp;#40;CommBuffer-&amp;#62;ghMutex&amp;#41;&amp;#59;&lt;br /&gt;...&lt;br /&gt;   if &amp;#40;CommBuffer-&amp;#62;gpBuf &amp;#61;&amp;#61; NULL&amp;#41; &lt;br /&gt;   &amp;#123; &lt;br /&gt;&amp;#9;&amp;#9;if&amp;#40;errco &amp;#61;&amp;#61; 0&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;errco &amp;#61; GENERALERRORCODE&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;free&amp;#40;&amp;#40;char&amp;#42;&amp;#41;lpSharedMemoryName&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;ReleaseMutex&amp;#40;CommBuffer-&amp;#62;ghMutex&amp;#41;&amp;#59;&lt;br /&gt;...&lt;br /&gt;   ReleaseMutex&amp;#40;CommBuffer-&amp;#62;ghMutex&amp;#41;&amp;#59;&lt;br /&gt;   free&amp;#40;&amp;#40;char&amp;#42;&amp;#41;lpSharedMemoryName&amp;#41;&amp;#59;&lt;br /&gt;   return SUCCESS&amp;#59;&lt;br /&gt;&lt;br /&gt;The Join method does the same thing.&lt;br /&gt;Comments: &lt;p&gt;Since these lines of code are absolutely benign, I&amp;#39;m not inclined to remove them. I know logically they should never succeed but I&amp;#39;d rather leave them. These lines of code are also only executed during clean-up when a fatal error has occured.&lt;/p&gt;</description><author>keithh</author><pubDate>Thu, 09 Dec 2010 05:58:08 GMT</pubDate><guid isPermaLink="false">Closed Issue: Mutex released when not owned [12638] 20101209055808A</guid></item><item><title>Commented Issue: Stack imbalance between SharedMemoryMgr and SharedQueue [12335]</title><link>http://pubsub.codeplex.com/workitem/12335</link><description>SharedMemoryMgr uses the cdecl calling convention for five methods. The SharedQueue class that calls these methods uses the stdcall convention. As a result, there is a memory leak every time a call is made, because each side assumes the other will clean up the stack. &lt;br /&gt;&lt;br /&gt;Here are the declarations in SharedMemoryMgr &amp;#40;C&amp;#43;&amp;#43;&amp;#41;&amp;#58;&lt;br /&gt;extern INT32 __cdecl InitMemoryMgr&amp;#40;LPCTSTR SharedMemoryName, DWORD SharedMemorySize, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl JoinMemoryMgr&amp;#40;LPCTSTR SharedMemoryName, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl ReleaseMemoryMgr&amp;#40;PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl PutBuffer&amp;#40;LPCSTR pEventBuffer, DWORD dwEventLength, DWORD dwTimeOut, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl GetBuffer&amp;#40;LPCSTR pEventBuffer, DWORD dwEventBufferLength, DWORD dwTimeOut, DWORD &amp;#42;pBytesRead, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;Here is a sample C&amp;#35; declaration, in SharedQueue.cs&amp;#58;&lt;br /&gt;&lt;br /&gt;            &amp;#91;DllImport&amp;#40;SharedMemoryMgr, ExactSpelling &amp;#61; true, CharSet &amp;#61; CharSet.Ansi&amp;#41;&amp;#93;&lt;br /&gt;            internal static extern ReturnCode InitMemoryMgr&amp;#40;&lt;br /&gt;                String sharedMemoryName,&lt;br /&gt;                UInt32 sharedMemorySize,&lt;br /&gt;                ref IntPtr commBuffer&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;To fix this issue, the DllImportAttribute should have the calling convention specified&amp;#58;&lt;br /&gt;&lt;br /&gt;            &amp;#91;DllImport&amp;#40;SharedMemoryMgr, ExactSpelling &amp;#61; true, CharSet &amp;#61; CharSet.Ansi, CallingConvention &amp;#61; CallingConvention.Cdecl&amp;#41;&amp;#93;&lt;br /&gt;            internal static extern ReturnCode InitMemoryMgr&amp;#40;&lt;br /&gt;                String sharedMemoryName,&lt;br /&gt;                UInt32 sharedMemorySize,&lt;br /&gt;                ref IntPtr commBuffer&amp;#41;&amp;#59;&lt;br /&gt;Comments: ** Comment from web user: keithh ** &lt;p&gt;I will be testing the fixes later today. If all works well, I&amp;#39;ll update Codeplex.&lt;/p&gt;&lt;p&gt;I&amp;#39;ll be interested to hear how well an all .Net version of the SharedMemoryMgr works. Using shared memory from .Net via pinvokes was too costly. I haven&amp;#39;t looked at .Net 4.0&amp;#39;s implementation to see how efficient it might be.&lt;/p&gt;</description><author>keithh</author><pubDate>Mon, 06 Dec 2010 20:58:31 GMT</pubDate><guid isPermaLink="false">Commented Issue: Stack imbalance between SharedMemoryMgr and SharedQueue [12335] 20101206085831P</guid></item><item><title>Created Issue: Mutex released when not owned [12638]</title><link>http://pubsub.codeplex.com/workitem/12638</link><description>The InitMemoryMgr method creates the mutex without taking ownership&amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#9;CommBuffer-&amp;#62;ghMutex &amp;#61; CreateMutex&amp;#40;&amp;#38;sa, FALSE, MUTEX_NAME&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;Then, later in the function, it releases ownership in multiple places although it does not have it&amp;#58;&lt;br /&gt;&lt;br /&gt;    if &amp;#40;CommBuffer-&amp;#62;ghEvent &amp;#61;&amp;#61; NULL&amp;#41; &lt;br /&gt;    &amp;#123; &lt;br /&gt;&amp;#9;&amp;#9;if&amp;#40;errco &amp;#61;&amp;#61; 0&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;errco &amp;#61; GENERALERRORCODE&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;free&amp;#40;&amp;#40;char&amp;#42;&amp;#41;lpSharedMemoryName&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;ReleaseMutex&amp;#40;CommBuffer-&amp;#62;ghMutex&amp;#41;&amp;#59;&lt;br /&gt;...&lt;br /&gt;&amp;#9;if&amp;#40;CommBuffer-&amp;#62;ghMapFile &amp;#61;&amp;#61; NULL &amp;#124;&amp;#124; CommBuffer-&amp;#62;ghMapFile &amp;#61;&amp;#61; INVALID_HANDLE_VALUE&amp;#41; &lt;br /&gt;&amp;#9;&amp;#123; &lt;br /&gt;&amp;#9;&amp;#9;if&amp;#40;errco &amp;#61;&amp;#61; 0&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;errco &amp;#61; GENERALERRORCODE&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;free&amp;#40;&amp;#40;char&amp;#42;&amp;#41;lpSharedMemoryName&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;ReleaseMutex&amp;#40;CommBuffer-&amp;#62;ghMutex&amp;#41;&amp;#59;&lt;br /&gt;...&lt;br /&gt;   if &amp;#40;CommBuffer-&amp;#62;gpBuf &amp;#61;&amp;#61; NULL&amp;#41; &lt;br /&gt;   &amp;#123; &lt;br /&gt;&amp;#9;&amp;#9;if&amp;#40;errco &amp;#61;&amp;#61; 0&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;errco &amp;#61; GENERALERRORCODE&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;free&amp;#40;&amp;#40;char&amp;#42;&amp;#41;lpSharedMemoryName&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;ReleaseMutex&amp;#40;CommBuffer-&amp;#62;ghMutex&amp;#41;&amp;#59;&lt;br /&gt;...&lt;br /&gt;   ReleaseMutex&amp;#40;CommBuffer-&amp;#62;ghMutex&amp;#41;&amp;#59;&lt;br /&gt;   free&amp;#40;&amp;#40;char&amp;#42;&amp;#41;lpSharedMemoryName&amp;#41;&amp;#59;&lt;br /&gt;   return SUCCESS&amp;#59;&lt;br /&gt;</description><author>DeeGee</author><pubDate>Mon, 06 Dec 2010 20:25:18 GMT</pubDate><guid isPermaLink="false">Created Issue: Mutex released when not owned [12638] 20101206082518P</guid></item><item><title>Commented Issue: Stack imbalance between SharedMemoryMgr and SharedQueue [12335]</title><link>http://pubsub.codeplex.com/workitem/12335</link><description>SharedMemoryMgr uses the cdecl calling convention for five methods. The SharedQueue class that calls these methods uses the stdcall convention. As a result, there is a memory leak every time a call is made, because each side assumes the other will clean up the stack. &lt;br /&gt;&lt;br /&gt;Here are the declarations in SharedMemoryMgr &amp;#40;C&amp;#43;&amp;#43;&amp;#41;&amp;#58;&lt;br /&gt;extern INT32 __cdecl InitMemoryMgr&amp;#40;LPCTSTR SharedMemoryName, DWORD SharedMemorySize, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl JoinMemoryMgr&amp;#40;LPCTSTR SharedMemoryName, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl ReleaseMemoryMgr&amp;#40;PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl PutBuffer&amp;#40;LPCSTR pEventBuffer, DWORD dwEventLength, DWORD dwTimeOut, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl GetBuffer&amp;#40;LPCSTR pEventBuffer, DWORD dwEventBufferLength, DWORD dwTimeOut, DWORD &amp;#42;pBytesRead, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;Here is a sample C&amp;#35; declaration, in SharedQueue.cs&amp;#58;&lt;br /&gt;&lt;br /&gt;            &amp;#91;DllImport&amp;#40;SharedMemoryMgr, ExactSpelling &amp;#61; true, CharSet &amp;#61; CharSet.Ansi&amp;#41;&amp;#93;&lt;br /&gt;            internal static extern ReturnCode InitMemoryMgr&amp;#40;&lt;br /&gt;                String sharedMemoryName,&lt;br /&gt;                UInt32 sharedMemorySize,&lt;br /&gt;                ref IntPtr commBuffer&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;To fix this issue, the DllImportAttribute should have the calling convention specified&amp;#58;&lt;br /&gt;&lt;br /&gt;            &amp;#91;DllImport&amp;#40;SharedMemoryMgr, ExactSpelling &amp;#61; true, CharSet &amp;#61; CharSet.Ansi, CallingConvention &amp;#61; CallingConvention.Cdecl&amp;#41;&amp;#93;&lt;br /&gt;            internal static extern ReturnCode InitMemoryMgr&amp;#40;&lt;br /&gt;                String sharedMemoryName,&lt;br /&gt;                UInt32 sharedMemorySize,&lt;br /&gt;                ref IntPtr commBuffer&amp;#41;&amp;#59;&lt;br /&gt;Comments: ** Comment from web user: DeeGee ** &lt;p&gt;I&amp;#39;ve rebuilt the projects using .NET 4.0, and I&amp;#39;m in the midst of replacing SharedMemoryMgr.dll with a set of .NET classes in the SharedQueue assembly, since we now have a System.IO.MemoryMapped file class. I don&amp;#39;t know how performance will compare, but in our environment there have been issues deploying the SharedMemoryMgr to all locations where we need it.&lt;/p&gt;</description><author>DeeGee</author><pubDate>Sat, 04 Dec 2010 19:16:21 GMT</pubDate><guid isPermaLink="false">Commented Issue: Stack imbalance between SharedMemoryMgr and SharedQueue [12335] 20101204071621P</guid></item><item><title>Commented Issue: Stack imbalance between SharedMemoryMgr and SharedQueue [12335]</title><link>http://pubsub.codeplex.com/workitem/12335</link><description>SharedMemoryMgr uses the cdecl calling convention for five methods. The SharedQueue class that calls these methods uses the stdcall convention. As a result, there is a memory leak every time a call is made, because each side assumes the other will clean up the stack. &lt;br /&gt;&lt;br /&gt;Here are the declarations in SharedMemoryMgr &amp;#40;C&amp;#43;&amp;#43;&amp;#41;&amp;#58;&lt;br /&gt;extern INT32 __cdecl InitMemoryMgr&amp;#40;LPCTSTR SharedMemoryName, DWORD SharedMemorySize, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl JoinMemoryMgr&amp;#40;LPCTSTR SharedMemoryName, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl ReleaseMemoryMgr&amp;#40;PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl PutBuffer&amp;#40;LPCSTR pEventBuffer, DWORD dwEventLength, DWORD dwTimeOut, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl GetBuffer&amp;#40;LPCSTR pEventBuffer, DWORD dwEventBufferLength, DWORD dwTimeOut, DWORD &amp;#42;pBytesRead, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;Here is a sample C&amp;#35; declaration, in SharedQueue.cs&amp;#58;&lt;br /&gt;&lt;br /&gt;            &amp;#91;DllImport&amp;#40;SharedMemoryMgr, ExactSpelling &amp;#61; true, CharSet &amp;#61; CharSet.Ansi&amp;#41;&amp;#93;&lt;br /&gt;            internal static extern ReturnCode InitMemoryMgr&amp;#40;&lt;br /&gt;                String sharedMemoryName,&lt;br /&gt;                UInt32 sharedMemorySize,&lt;br /&gt;                ref IntPtr commBuffer&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;To fix this issue, the DllImportAttribute should have the calling convention specified&amp;#58;&lt;br /&gt;&lt;br /&gt;            &amp;#91;DllImport&amp;#40;SharedMemoryMgr, ExactSpelling &amp;#61; true, CharSet &amp;#61; CharSet.Ansi, CallingConvention &amp;#61; CallingConvention.Cdecl&amp;#41;&amp;#93;&lt;br /&gt;            internal static extern ReturnCode InitMemoryMgr&amp;#40;&lt;br /&gt;                String sharedMemoryName,&lt;br /&gt;                UInt32 sharedMemorySize,&lt;br /&gt;                ref IntPtr commBuffer&amp;#41;&amp;#59;&lt;br /&gt;Comments: ** Comment from web user: Coffee_fan ** &lt;p&gt;Thanks DeeGee and Keith. Please keep in mind that the impact may not be low if you are sending thousands of events per second. Added my vote for a fix.&lt;/p&gt;</description><author>Coffee_fan</author><pubDate>Sat, 04 Dec 2010 02:15:23 GMT</pubDate><guid isPermaLink="false">Commented Issue: Stack imbalance between SharedMemoryMgr and SharedQueue [12335] 20101204021523A</guid></item><item><title>Commented Issue: Stack imbalance between SharedMemoryMgr and SharedQueue [12335]</title><link>http://pubsub.codeplex.com/workitem/12335</link><description>SharedMemoryMgr uses the cdecl calling convention for five methods. The SharedQueue class that calls these methods uses the stdcall convention. As a result, there is a memory leak every time a call is made, because each side assumes the other will clean up the stack. &lt;br /&gt;&lt;br /&gt;Here are the declarations in SharedMemoryMgr &amp;#40;C&amp;#43;&amp;#43;&amp;#41;&amp;#58;&lt;br /&gt;extern INT32 __cdecl InitMemoryMgr&amp;#40;LPCTSTR SharedMemoryName, DWORD SharedMemorySize, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl JoinMemoryMgr&amp;#40;LPCTSTR SharedMemoryName, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl ReleaseMemoryMgr&amp;#40;PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl PutBuffer&amp;#40;LPCSTR pEventBuffer, DWORD dwEventLength, DWORD dwTimeOut, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl GetBuffer&amp;#40;LPCSTR pEventBuffer, DWORD dwEventBufferLength, DWORD dwTimeOut, DWORD &amp;#42;pBytesRead, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;Here is a sample C&amp;#35; declaration, in SharedQueue.cs&amp;#58;&lt;br /&gt;&lt;br /&gt;            &amp;#91;DllImport&amp;#40;SharedMemoryMgr, ExactSpelling &amp;#61; true, CharSet &amp;#61; CharSet.Ansi&amp;#41;&amp;#93;&lt;br /&gt;            internal static extern ReturnCode InitMemoryMgr&amp;#40;&lt;br /&gt;                String sharedMemoryName,&lt;br /&gt;                UInt32 sharedMemorySize,&lt;br /&gt;                ref IntPtr commBuffer&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;To fix this issue, the DllImportAttribute should have the calling convention specified&amp;#58;&lt;br /&gt;&lt;br /&gt;            &amp;#91;DllImport&amp;#40;SharedMemoryMgr, ExactSpelling &amp;#61; true, CharSet &amp;#61; CharSet.Ansi, CallingConvention &amp;#61; CallingConvention.Cdecl&amp;#41;&amp;#93;&lt;br /&gt;            internal static extern ReturnCode InitMemoryMgr&amp;#40;&lt;br /&gt;                String sharedMemoryName,&lt;br /&gt;                UInt32 sharedMemorySize,&lt;br /&gt;                ref IntPtr commBuffer&amp;#41;&amp;#59;&lt;br /&gt;Comments: ** Comment from web user: keithh ** &lt;p&gt;Thanks for the find. I am making some other changes to the code and will check everything in sometime in January.&lt;/p&gt;</description><author>keithh</author><pubDate>Fri, 03 Dec 2010 16:35:59 GMT</pubDate><guid isPermaLink="false">Commented Issue: Stack imbalance between SharedMemoryMgr and SharedQueue [12335] 20101203043559P</guid></item><item><title>Created Issue: Stack imbalance between SharedMemoryMgr and SharedQueue [12335]</title><link>http://pubsub.codeplex.com/workitem/12335</link><description>SharedMemoryMgr uses the cdecl calling convention for five methods. The SharedQueue class that calls these methods uses the stdcall convention. As a result, there is a memory leak every time a call is made, because each side assumes the other will clean up the stack. &lt;br /&gt;&lt;br /&gt;Here are the declarations in SharedMemoryMgr &amp;#40;C&amp;#43;&amp;#43;&amp;#41;&amp;#58;&lt;br /&gt;extern INT32 __cdecl InitMemoryMgr&amp;#40;LPCTSTR SharedMemoryName, DWORD SharedMemorySize, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl JoinMemoryMgr&amp;#40;LPCTSTR SharedMemoryName, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl ReleaseMemoryMgr&amp;#40;PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl PutBuffer&amp;#40;LPCSTR pEventBuffer, DWORD dwEventLength, DWORD dwTimeOut, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;extern INT32 __cdecl GetBuffer&amp;#40;LPCSTR pEventBuffer, DWORD dwEventBufferLength, DWORD dwTimeOut, DWORD &amp;#42;pBytesRead, PCOMMBUFFER &amp;#42;CommBufferIn&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;Here is a sample C&amp;#35; declaration, in SharedQueue.cs&amp;#58;&lt;br /&gt;&lt;br /&gt;            &amp;#91;DllImport&amp;#40;SharedMemoryMgr, ExactSpelling &amp;#61; true, CharSet &amp;#61; CharSet.Ansi&amp;#41;&amp;#93;&lt;br /&gt;            internal static extern ReturnCode InitMemoryMgr&amp;#40;&lt;br /&gt;                String sharedMemoryName,&lt;br /&gt;                UInt32 sharedMemorySize,&lt;br /&gt;                ref IntPtr commBuffer&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;To fix this issue, the DllImportAttribute should have the calling convention specified&amp;#58;&lt;br /&gt;&lt;br /&gt;            &amp;#91;DllImport&amp;#40;SharedMemoryMgr, ExactSpelling &amp;#61; true, CharSet &amp;#61; CharSet.Ansi, CallingConvention &amp;#61; CallingConvention.Cdecl&amp;#41;&amp;#93;&lt;br /&gt;            internal static extern ReturnCode InitMemoryMgr&amp;#40;&lt;br /&gt;                String sharedMemoryName,&lt;br /&gt;                UInt32 sharedMemorySize,&lt;br /&gt;                ref IntPtr commBuffer&amp;#41;&amp;#59;&lt;br /&gt;</description><author>DeeGee</author><pubDate>Sun, 24 Oct 2010 00:46:36 GMT</pubDate><guid isPermaLink="false">Created Issue: Stack imbalance between SharedMemoryMgr and SharedQueue [12335] 20101024124636A</guid></item><item><title>Closed Issue: Problem building latest source</title><link>http://pubsub.codeplex.com/WorkItem/View.aspx?WorkItemId=7297</link><description>Communicator.cs &amp;#40;line 1203&amp;#41; has a reference to SubscriptionMgr.subscriptionsLock. This doesn&amp;#39;t seem to exist&amp;#58;&lt;br /&gt;&lt;br /&gt;lock &amp;#40;SubscriptionMgr.subscriptionsLock&amp;#41;&lt;br /&gt;Comments: Issue was resolved</description><author>keithh</author><pubDate>Fri, 03 Apr 2009 17:44:37 GMT</pubDate><guid isPermaLink="false">Closed Issue: Problem building latest source 20090403054437P</guid></item><item><title>Commented Issue: Problem building latest source</title><link>http://pubsub.codeplex.com/WorkItem/View.aspx?WorkItemId=7297</link><description>Communicator.cs &amp;#40;line 1203&amp;#41; has a reference to SubscriptionMgr.subscriptionsLock. This doesn&amp;#39;t seem to exist&amp;#58;&lt;br /&gt;&lt;br /&gt;lock &amp;#40;SubscriptionMgr.subscriptionsLock&amp;#41;&lt;br /&gt;Comments: ** Comment from web user: keithh ** &lt;p&gt;I updated the SubscriptionMgr.cs file to the correct version. Surprising no one had complained earlier. Thanks for letting me know.&lt;/p&gt;</description><author>keithh</author><pubDate>Wed, 18 Mar 2009 18:15:02 GMT</pubDate><guid isPermaLink="false">Commented Issue: Problem building latest source 20090318061502P</guid></item><item><title>Commented Issue: Problem building latest source</title><link>http://pubsub.codeplex.com/WorkItem/View.aspx?WorkItemId=7297</link><description>Communicator.cs &amp;#40;line 1203&amp;#41; has a reference to SubscriptionMgr.subscriptionsLock. This doesn&amp;#39;t seem to exist&amp;#58;&lt;br /&gt;&lt;br /&gt;lock &amp;#40;SubscriptionMgr.subscriptionsLock&amp;#41;&lt;br /&gt;Comments: ** Comment from web user: dwaterworth ** &lt;p&gt;I&amp;#39;m seeing the same issue, the HEAD revision of svn doesn&amp;#39;t appear match the most recent binaries, the subscriptionsLock field is not defined in SubscriptionMgr &lt;/p&gt;&lt;p&gt;127&amp;#58; internal class SubscriptionMgr &amp;#58; ServiceThread&lt;br /&gt;128&amp;#58; &amp;#123;&lt;br /&gt;129&amp;#58;           internal static Dictionary&amp;#60;Guid, SubscriptionEntry&amp;#62; subscriptions &amp;#61; new Dictionary&amp;#60;Guid, SubscriptionEntry&amp;#62;&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;130&amp;#58;&lt;br /&gt;131&amp;#58;           private DateTime nextTimeout &amp;#61; DateTime.UtcNow.AddMinutes&amp;#40;subscriptionExpirationIncrement&amp;#41;&amp;#59;&lt;br /&gt;132&amp;#58;           private DateTime nextPushSubscriptions &amp;#61; DateTime.UtcNow.AddMinutes&amp;#40;subscriptionRefreshIncrement&amp;#41;&amp;#59;&lt;br /&gt;&lt;/p&gt;</description><author>dwaterworth</author><pubDate>Wed, 18 Mar 2009 02:35:42 GMT</pubDate><guid isPermaLink="false">Commented Issue: Problem building latest source 20090318023542A</guid></item><item><title>Commented Issue: Problem building latest source</title><link>http://pubsub.codeplex.com/WorkItem/View.aspx?WorkItemId=7297</link><description>Communicator.cs &amp;#40;line 1203&amp;#41; has a reference to SubscriptionMgr.subscriptionsLock. This doesn&amp;#39;t seem to exist&amp;#58;&lt;br /&gt;&lt;br /&gt;lock &amp;#40;SubscriptionMgr.subscriptionsLock&amp;#41;&lt;br /&gt;Comments: ** Comment from web user: keithh ** &lt;p&gt;It&amp;#39;s defined on line 129 of the SubscriptionMgr.cs file. Is it in the file you have also&amp;#63;&lt;/p&gt;</description><author>keithh</author><pubDate>Tue, 17 Mar 2009 22:00:14 GMT</pubDate><guid isPermaLink="false">Commented Issue: Problem building latest source 20090317100014P</guid></item><item><title>Created Issue: Problem building latest source</title><link>http://pubsub.codeplex.com/WorkItem/View.aspx?WorkItemId=7297</link><description>Communicator.cs &amp;#40;line 1203&amp;#41; has a reference to SubscriptionMgr.subscriptionsLock. This doesn&amp;#39;t seem to exist&amp;#58;&lt;br /&gt;&lt;br /&gt;lock &amp;#40;SubscriptionMgr.subscriptionsLock&amp;#41;&lt;br /&gt;</description><author>JohnPWest</author><pubDate>Tue, 17 Mar 2009 19:20:00 GMT</pubDate><guid isPermaLink="false">Created Issue: Problem building latest source 20090317072000P</guid></item></channel></rss>