<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://community.opennetcf.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Articles and Resources</title><link>http://community.opennetcf.com/forums/36.aspx</link><description>Use this forum to find and discuss Alex Feinman's sample code. Note these are not OpenNETCF libraries and may use a different license model than OpenNETCF.org.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP2 (Build: 20611.960)</generator><item><title>Re: Usage scenarios</title><link>http://community.opennetcf.com/forums/thread/54076.aspx</link><pubDate>Fri, 27 Aug 2004 17:40:44 GMT</pubDate><guid isPermaLink="false">8728999e-43f4-4b8d-bbf2-8b1961517928:54076</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>http://community.opennetcf.com/forums/thread/54076.aspx</comments><wfw:commentRss>http://community.opennetcf.com/forums/commentrss.aspx?SectionID=36&amp;PostID=54076</wfw:commentRss><description>&lt;blockquote id="quote"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica" id="quote"&gt;quote:&lt;hr height="1" noshade id="quote"&gt;I'm using the modified AdvancedMarshaler code in a second application that includes marshaling to memory mapped files as well as for WM_COPYDATA messaging. When I've finished testing this application I'll send the code. It will have more testing at that time.&lt;br /&gt;&lt;hr height="1" noshade id="quote"&gt;&lt;/blockquote id="quote"&gt;&lt;/font id="quote"&gt;&lt;br /&gt;&lt;br /&gt;Jim,&lt;br /&gt;&lt;br /&gt;That's a very interesting usage scenario (MMF and WM_COPYDATA) of AdvancedMarshaler that I've wanted to try myself but never had time to do it. Would you like to write an article on that topic? We could publish it here.&lt;br /&gt;&lt;br /&gt;Thanks... Alex &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Alex Yakhnin, eMVP&lt;br /&gt;IntelliProg, Inc.&lt;br /&gt;http://www.intelliprog.com&lt;br /&gt;</description></item><item><title>Re: Usage scenarios</title><link>http://community.opennetcf.com/forums/thread/54075.aspx</link><pubDate>Fri, 27 Aug 2004 00:13:35 GMT</pubDate><guid isPermaLink="false">8728999e-43f4-4b8d-bbf2-8b1961517928:54075</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>http://community.opennetcf.com/forums/thread/54075.aspx</comments><wfw:commentRss>http://community.opennetcf.com/forums/commentrss.aspx?SectionID=36&amp;PostID=54075</wfw:commentRss><description>Alex,&lt;br /&gt;&lt;br /&gt;I'm using the modified AdvancedMarshaler code in a second application that includes marshaling to memory mapped files as well as for WM_COPYDATA messaging.  When I've finished testing this application I'll send the code.  It will have more testing at that time.&lt;br /&gt;&lt;br /&gt;Jim&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Jim Frazer</description></item><item><title>Re: Usage scenarios</title><link>http://community.opennetcf.com/forums/thread/54074.aspx</link><pubDate>Thu, 26 Aug 2004 14:49:55 GMT</pubDate><guid isPermaLink="false">8728999e-43f4-4b8d-bbf2-8b1961517928:54074</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>http://community.opennetcf.com/forums/thread/54074.aspx</comments><wfw:commentRss>http://community.opennetcf.com/forums/commentrss.aspx?SectionID=36&amp;PostID=54074</wfw:commentRss><description>Jim,&lt;br /&gt;&lt;br /&gt;You can send me a modified version of the AdvancedMarshaler ayakhnin(at)opennetcf.org and I'll inlcude the appropriate fixed/improvements into SDF.&lt;br /&gt;&lt;br /&gt;Thanks... Alex&lt;br /&gt;&lt;br /&gt;Alex Yakhnin, eMVP&lt;br /&gt;IntelliProg, Inc.&lt;br /&gt;http://www.intelliprog.com&lt;br /&gt;</description></item><item><title>Re: Usage scenarios</title><link>http://community.opennetcf.com/forums/thread/54073.aspx</link><pubDate>Tue, 24 Aug 2004 15:19:20 GMT</pubDate><guid isPermaLink="false">8728999e-43f4-4b8d-bbf2-8b1961517928:54073</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>http://community.opennetcf.com/forums/thread/54073.aspx</comments><wfw:commentRss>http://community.opennetcf.com/forums/commentrss.aspx?SectionID=36&amp;PostID=54073</wfw:commentRss><description>Hi Alex,&lt;br /&gt;&lt;br /&gt;I have a working version of the AdvancedMarshaler that handles marshaling to and from a memory mapped file (MMF) space.  In order to do this, I made several changes to the AdvancedMarshaler.cs code.  Here are descriptions of these changes:&lt;br /&gt;&lt;br /&gt;1.  I added two properties to the AdvancedMarshaler class.  One is "MMFAddr" and is used to contain the address in the memory mapped file for the class derived from AdvancedMarshaler.  The second is "Size" which provides easy access to the size of the object in the memory map.&lt;br /&gt;&lt;br /&gt;2.  I modified the constructor of AdvancedMarshaler so that it initializes the Size property and allocates the internal data array.  The internal data array was not accessible to classes that inherited from AdvancedMarshaler so the data array could not be allocated there.&lt;br /&gt;&lt;br /&gt;3.  I added two methods - SerializeToMMF() and DeserializeFromMMF().  SerializeToMMF calls Serialize() and then marshals the internal data array to the MMF using MMFAddr as the pointer.  DeserializeFromMMF() marshals data from MMF to the internal data array and then calls Deserialize().&lt;br /&gt;&lt;br /&gt;4.  The memory mapped data that I'm referencing contains arrays and substructures.  I found that GetSize() was not returning the size that I expected for classes containing substructures.  I changed GetSize() so that it calculates the size of substructures contained in the main structure.&lt;br /&gt;&lt;br /&gt;5.  I had problems with Serialize and Deserialize that were related to substructures.  The ReadFromStream and WriteToStream methods were creating new instances of substructures and then recursively calling themselves.  The new instances of the substructures had empty data buffers and this was causing the problem.  I modified both of these methods so that they use the existing instance of the substructure and that seems to work just fine.&lt;br /&gt;&lt;br /&gt;6.  I added a WriteMethods Marshalling method for type System.Byte[].  I found I was getting an exception when Serializing in some cases.  Tracing showed that the type being written was "System.Byte[]".&lt;br /&gt;&lt;br /&gt;I've done a fair amount of testing on this altered version of AdvancedMarshaler and it seems to work as I planned.  I have not tested the code with examples that marshal data going to or from WinAPI calls, but I think some of the changes I made will apply here as well.&lt;br /&gt;&lt;br /&gt;Please let me know if or how I should post the code for the modified version.&lt;br /&gt;&lt;br /&gt;The AdvancedMarshaler gave me a great starting point.  Thanks for your effort in putting it together.&lt;br /&gt;&lt;br /&gt;Jim Frazer</description></item><item><title>Re: Usage scenarios</title><link>http://community.opennetcf.com/forums/thread/54072.aspx</link><pubDate>Mon, 23 Aug 2004 16:11:53 GMT</pubDate><guid isPermaLink="false">8728999e-43f4-4b8d-bbf2-8b1961517928:54072</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>http://community.opennetcf.com/forums/thread/54072.aspx</comments><wfw:commentRss>http://community.opennetcf.com/forums/commentrss.aspx?SectionID=36&amp;PostID=54072</wfw:commentRss><description>Yes, Jim, you can ask them here. I hope everybody else will benefit from it too.&lt;br /&gt;&lt;br /&gt;Alex Yakhnin, eMVP&lt;br /&gt;IntelliProg, Inc.&lt;br /&gt;http://www.intelliprog.com&lt;br /&gt;</description></item><item><title>Re: Usage scenarios</title><link>http://community.opennetcf.com/forums/thread/54071.aspx</link><pubDate>Wed, 18 Aug 2004 01:33:37 GMT</pubDate><guid isPermaLink="false">8728999e-43f4-4b8d-bbf2-8b1961517928:54071</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>http://community.opennetcf.com/forums/thread/54071.aspx</comments><wfw:commentRss>http://community.opennetcf.com/forums/commentrss.aspx?SectionID=36&amp;PostID=54071</wfw:commentRss><description>Hi Alex,&lt;br /&gt;&lt;br /&gt;I've started testing with the AdvancedMarshaler and I'm running into a problem.  In the CustomMarshaler example, classes that are derived from CustomMarshaler, such as MIB_IFTABLE, have access to the data byte array within CustomMarshaler.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;public MIB_IFTABLE()&lt;br /&gt;{&lt;br /&gt;    this.data = new byte[this.GetSize()];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;In my project, I'm unable to do this.  I get the following error:&lt;br /&gt;'OpenNETCF.Runtime.InteropServices.AdvancedMarshaler.data' is inaccessible due to its protection level'&lt;br /&gt;&lt;br /&gt;How does one create the data byte array in order to use the Serialize method?&lt;br /&gt;&lt;br /&gt;Please keep in mind I'm still a bit green with C#.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;Jim Frazer</description></item><item><title>Re: Usage scenarios</title><link>http://community.opennetcf.com/forums/thread/54070.aspx</link><pubDate>Tue, 17 Aug 2004 16:18:06 GMT</pubDate><guid isPermaLink="false">8728999e-43f4-4b8d-bbf2-8b1961517928:54070</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>http://community.opennetcf.com/forums/thread/54070.aspx</comments><wfw:commentRss>http://community.opennetcf.com/forums/commentrss.aspx?SectionID=36&amp;PostID=54070</wfw:commentRss><description>Hi Alex,&lt;br /&gt;&lt;br /&gt;I'm looking at using the AdvancedMarshaler to read from and write to a memory-mapped file (MMF) that is used to communicate real-time machine control information among several processes.  In a typical application, C++ programs control the machine and, in the past, eVB programs provided the human interface system.  In the CE 3.00 environment, an ActiveX control could be used by both languages to access the MMF.  Now that we're moving to CE.Net, we need another means of accessing the MMF for C# applications (at least at this point).&lt;br /&gt;&lt;br /&gt;The information in the MMF consists of several structures, some of which contain structures embedded in them, so the AdvancedMarshaler looks attractive.&lt;br /&gt;&lt;br /&gt;I have several questions about using the AdvancedMarshaler for this application.  Is this forum the best place to post those questions?&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;Jim Frazer</description></item><item><title>Usage scenarios</title><link>http://community.opennetcf.com/forums/thread/2417.aspx</link><pubDate>Mon, 28 Jun 2004 17:12:03 GMT</pubDate><guid isPermaLink="false">8728999e-43f4-4b8d-bbf2-8b1961517928:2417</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>http://community.opennetcf.com/forums/thread/2417.aspx</comments><wfw:commentRss>http://community.opennetcf.com/forums/commentrss.aspx?SectionID=36&amp;PostID=2417</wfw:commentRss><description>Please post a successfull usage scenarios or samples for CustomMarshaler here. It'd be really interesting for me to know if it works for you.&lt;br /&gt;&lt;br /&gt;Thanks... Alex&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Alex Yakhnin, eMVP&lt;br /&gt;IntelliProg, Inc.&lt;br /&gt;http://www.intelliprog.com&lt;br /&gt;</description></item></channel></rss>