<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>libopc Discussions Rss Feed</title><link>http://libopc.codeplex.com/discussions</link><description>libopc Discussions Rss Description</description><item><title>New Post: Building libopc for armv7 with clang</title><link>http://libopc.codeplex.com/discussions/441784</link><description>&lt;div style="line-height: normal;"&gt;Hey Florian,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks for the input, works like a charm. Just one thing, you can't set the host in your config file so I had to hack it a little to get it to work (set it manually), I don't know if this is intended (or if there is a nicer way to do it) or not, but I though I should write it here if anybody has this problem in the future.&lt;br /&gt;
&lt;/div&gt;</description><author>valentinradu</author><pubDate>Sat, 27 Apr 2013 18:23:21 GMT</pubDate><guid isPermaLink="false">New Post: Building libopc for armv7 with clang 20130427062321P</guid></item><item><title>New Post: Building libopc for armv7 with clang</title><link>http://libopc.codeplex.com/discussions/441784</link><description>&lt;div style="line-height: normal;"&gt;
&lt;div dir="ltr"&gt;Hi,
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;you need to define the platform in the Makefile.platform.xml. I use &lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&amp;lt;platform name=&amp;quot;ios4-debug-gcc-i386&amp;quot; family=&amp;quot;ios-debug-gcc-x86&amp;quot;&lt;span style="white-space:pre"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;cc=&amp;quot;/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2&amp;quot;&lt;/div&gt;
&lt;div&gt;ld=&amp;quot;/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ld&amp;quot;&lt;/div&gt;
&lt;div&gt;ar=&amp;quot;/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ar&amp;quot;&lt;/div&gt;
&lt;div&gt;cflags=&amp;quot;-g -O0 -arch i386 -fno-exceptions -fvisibility=hidden -fstack-protector&amp;quot;&lt;/div&gt;
&lt;div&gt;cflags_c=&amp;quot;-std=c99&amp;quot; cflags_cpp=&amp;quot;-fno-rtti&amp;quot;&lt;/div&gt;
&lt;div&gt;cppflags=&amp;quot;-D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/&amp;quot;
&lt;/div&gt;
&lt;div&gt;ldflags=&amp;quot;-framework Foundation -framework UIKit -framework CoreText -framework CoreGraphics -framework OpenGLES -framework QuartzCore -lstdc&amp;#43;&amp;#43;&amp;quot;/&amp;gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;&amp;lt;platform name=&amp;quot;ios4-release-gcc-i386&amp;quot; family=&amp;quot;ios-release-gcc-x86&amp;quot;&lt;span style="white-space:pre"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;cc=&amp;quot;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang&amp;quot;&lt;/div&gt;
&lt;div&gt;ld=&amp;quot;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld&amp;quot;&lt;/div&gt;
&lt;div&gt;ar=&amp;quot;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar&amp;quot;&lt;/div&gt;
&lt;div&gt;cflags=&amp;quot;-g -Os -arch i386 -fno-exceptions -fvisibility=hidden&amp;quot;&lt;/div&gt;
&lt;div&gt;cflags_c=&amp;quot;-std=c99&amp;quot; cflags_cpp=&amp;quot;-fno-rtti&amp;quot;&lt;/div&gt;
&lt;div&gt;cppflags=&amp;quot;-DNDEBUG -D_NDEBUG -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/&amp;quot;
&lt;/div&gt;
&lt;div&gt;ldflags=&amp;quot;-framework Foundation -framework UIKit -framework CoreText -framework CoreGraphics -framework OpenGLES -framework QuartzCore -lstdc&amp;#43;&amp;#43;&amp;quot;/&amp;gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;&amp;lt;platform name=&amp;quot;ios4-debug-gcc-armv7&amp;quot; family=&amp;quot;ios-debug-gcc-arm&amp;quot;&lt;/div&gt;
&lt;div&gt;cc=&amp;quot;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang&amp;quot;&lt;/div&gt;
&lt;div&gt;ld=&amp;quot;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld&amp;quot;&lt;/div&gt;
&lt;div&gt;ar=&amp;quot;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar&amp;quot;&lt;/div&gt;
&lt;div&gt;cflags=&amp;quot;-g -O0 -arch armv7 -fno-exceptions -fvisibility=hidden -mthumb&amp;quot;&lt;/div&gt;
&lt;div&gt;cflags_c=&amp;quot;-std=c99&amp;quot; cflags_cpp=&amp;quot;-fno-rtti&amp;quot;&lt;/div&gt;
&lt;div&gt;cppflags=&amp;quot;-miphoneos-version-min=4.3 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk&amp;quot;
&lt;/div&gt;
&lt;div&gt;ldflags=&amp;quot;-framework Foundation -framework UIKit -framework CoreText -framework CoreGraphics -framework OpenGLES -framework QuartzCore -lstdc&amp;#43;&amp;#43;&amp;quot;/&amp;gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;&amp;lt;platform name=&amp;quot;ios4-release-gcc-armv7&amp;quot; family=&amp;quot;ios-release-gcc-arm&amp;quot;&lt;/div&gt;
&lt;div&gt;cc=&amp;quot;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang&amp;quot;&lt;/div&gt;
&lt;div&gt;ld=&amp;quot;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld&amp;quot;&lt;/div&gt;
&lt;div&gt;ar=&amp;quot;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar&amp;quot;&lt;/div&gt;
&lt;div&gt;cflags=&amp;quot;-g -Os -arch armv7 -fno-exceptions -fvisibility=hidden -mthumb&amp;quot;&lt;/div&gt;
&lt;div&gt;cflags_c=&amp;quot;-std=c99&amp;quot; cflags_cpp=&amp;quot;-fno-rtti&amp;quot;&lt;/div&gt;
&lt;div&gt;cppflags=&amp;quot;-DNDEBUG -D_NDEBUG -miphoneos-version-min=4.3 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk&amp;quot;
&lt;/div&gt;
&lt;div&gt;ldflags=&amp;quot;-framework Foundation -framework UIKit -framework CoreText -framework CoreGraphics -framework OpenGLES -framework QuartzCore -lstdc&amp;#43;&amp;#43;&amp;quot;&amp;quot;/&amp;gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;on my machine.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div style=""&gt;Let me know whether this works,&lt;/div&gt;
&lt;div style=""&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div style=""&gt;Florian&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;br&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description><author>flr</author><pubDate>Sat, 27 Apr 2013 17:04:13 GMT</pubDate><guid isPermaLink="false">New Post: Building libopc for armv7 with clang 20130427050413P</guid></item><item><title>New Post: Building libopc for armv7 with clang</title><link>http://libopc.codeplex.com/discussions/441784</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
Fist of all, thank you for this great lib. I'm trying to build it for armv7 but it seems it's not supported out of the box. I've tried to set the os/ver/toolchain/arch to ios4-debug-clang-armv7 with no luck. Also, it seems the config file only accepts &lt;code&gt;debug&lt;/code&gt; for the &lt;code&gt;clang&lt;/code&gt; toolchain. Is there a easy way to do it?&lt;br /&gt;
&lt;/div&gt;</description><author>valentinradu</author><pubDate>Sat, 27 Apr 2013 16:27:50 GMT</pubDate><guid isPermaLink="false">New Post: Building libopc for armv7 with clang 20130427042750P</guid></item><item><title>New Post: .rels xml missing header</title><link>http://libopc.codeplex.com/discussions/438392</link><description>&lt;div style="line-height: normal;"&gt;Hi Florian,&lt;br /&gt;
thank you for your reply. I'm using the compiled version libopc-sdk-darwin-debug/release-gcc-x64-0.0.3 and do not feel confident to compile the library myself at this stage.&lt;br /&gt;
If you don't mind could you please add this line:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;opcContainerWriteUtf8Raw(out, _X('&amp;lt;?xml version=&amp;quot;1&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;')) &lt;/code&gt;&lt;/pre&gt;

before your next release?&lt;br /&gt;
Thank you for this very useful library.&lt;br /&gt;
Regards,&lt;br /&gt;
Matthias&lt;br /&gt;
&lt;/div&gt;</description><author>DrLudwig</author><pubDate>Sat, 30 Mar 2013 20:44:25 GMT</pubDate><guid isPermaLink="false">New Post: .rels xml missing header 20130330084425P</guid></item><item><title>New Post: .rels xml missing header</title><link>http://libopc.codeplex.com/discussions/438392</link><description>&lt;div style="line-height: normal;"&gt;Hi, well --- it should not be a problem. But you can easily add the header in opcContainerWriteRels (container.c). Simply put a opcContainerWriteUtf8Raw(out, _X(&amp;quot;&amp;lt;?xml version=....&amp;quot;)); in there. Best, Florian&lt;br /&gt;
&lt;/div&gt;</description><author>flr</author><pubDate>Sat, 30 Mar 2013 10:37:23 GMT</pubDate><guid isPermaLink="false">New Post: .rels xml missing header 20130330103723A</guid></item><item><title>New Post: .rels xml missing header</title><link>http://libopc.codeplex.com/discussions/438392</link><description>&lt;div style="line-height: normal;"&gt;When I create a custom opc package using libopc on MacOS X and add a relationship with opcRelationAdd the produced .rels xml file does not have the usual xml header:&lt;br /&gt;
&amp;lt;?xml version= ...&lt;br /&gt;
&lt;br /&gt;
This does not seem to be a problem, but is not equivalent to what microsoft is doing.&lt;br /&gt;
&lt;/div&gt;</description><author>DrLudwig</author><pubDate>Thu, 28 Mar 2013 23:16:55 GMT</pubDate><guid isPermaLink="false">New Post: .rels xml missing header 20130328111655P</guid></item><item><title>New Post: using in C#</title><link>http://libopc.codeplex.com/discussions/401985</link><description>&lt;div style="line-height: normal;"&gt;I do need this library to create a c# .net wrapper how to do it&lt;br /&gt;
&lt;/div&gt;</description><author>connectsrini2011</author><pubDate>Sun, 10 Mar 2013 01:11:35 GMT</pubDate><guid isPermaLink="false">New Post: using in C# 20130310011135A</guid></item><item><title>New Post: .NET Wrapper</title><link>http://libopc.codeplex.com/discussions/436029</link><description>&lt;div style="line-height: normal;"&gt;Does a .NET Wrapper Exist and if not how to create a .NET Wrapper ( C# ) from object file library&lt;br /&gt;
&lt;/div&gt;</description><author>connectsrini2011</author><pubDate>Sun, 10 Mar 2013 01:07:16 GMT</pubDate><guid isPermaLink="false">New Post: .NET Wrapper 20130310010716A</guid></item><item><title>New Post: .NET Wrapper (no SDK)</title><link>http://libopc.codeplex.com/discussions/432545</link><description>&lt;div style="line-height: normal;"&gt;Do you know if a .NET wrapper exists for libOPC? I'm working with WinRT, which doesn't support IO.Packaging. So it looks like libOPC may be the way to go, but I haven't a clue as to what do with C++/CLI stuff.&lt;br /&gt;
&lt;br /&gt;
If a wrapper exists, could you point me to it? If not, how would one go about creating one? My needs are pretty simple - read-only and a rough estimation of IO.Packaging to load the streams (PackageParts, XML, images, etc.). No need for SDK type of mapping to named package parts.&lt;br /&gt;
&lt;/div&gt;</description><author>toddmain</author><pubDate>Sat, 09 Feb 2013 01:40:11 GMT</pubDate><guid isPermaLink="false">New Post: .NET Wrapper (no SDK) 20130209014011A</guid></item><item><title>New Post: Problem iterating relations</title><link>http://libopc.codeplex.com/discussions/430451</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Well, sorry for the question, the real problem was at example code!!!!!!!!!!!!&lt;/p&gt;
&lt;p&gt;In the second loop, &amp;quot;rel&amp;quot; must be compared with&amp;nbsp;OPC_RELATION_INVALID instead of&amp;nbsp;OPC_PART_INVALID.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards!&lt;/p&gt;
&lt;/div&gt;</description><author>rebustiano</author><pubDate>Tue, 22 Jan 2013 16:51:59 GMT</pubDate><guid isPermaLink="false">New Post: Problem iterating relations 20130122045159P</guid></item><item><title>New Post: Problem iterating relations</title><link>http://libopc.codeplex.com/discussions/430451</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Well, I have just fixed my problem but I think the solution is not &amp;quot;elegant&amp;quot;.&lt;/p&gt;
&lt;p&gt;I could see when a part has no relations opcRelationFirst return UINT_MAX as relation. Then:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt; &lt;span style="color:blue"&gt;for&lt;/span&gt;(opcPart part=opcPartGetFirst(c);OPC_PART_INVALID!=part;part=opcPartGetNext(c, part)) {
		 &lt;span style="color:green"&gt;//printf(&amp;quot;%s;%s \n&amp;quot;, part, opcPartGetType(c, part));&lt;/span&gt;
	   &lt;span style="color:blue"&gt;for&lt;/span&gt;(opcRelation rel=opcRelationFirst(c, part);
		 OPC_PART_INVALID!=rel; rel=opcRelationNext(c, part, rel)) 
      {
		   &lt;span style="color:blue"&gt;if&lt;/span&gt; (rel == UINT_MAX) &lt;span style="color:blue"&gt;break&lt;/span&gt;;
			...
			...
       }
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As I said, I dont like the solution, Could somebody get de images &amp;quot;id&amp;quot; by other way or with a more elegant code?&lt;br&gt;
Many Thanks!&lt;/p&gt;
&lt;/div&gt;</description><author>rebustiano</author><pubDate>Tue, 22 Jan 2013 16:32:18 GMT</pubDate><guid isPermaLink="false">New Post: Problem iterating relations 20130122043218P</guid></item><item><title>New Post: Problem iterating relations</title><link>http://libopc.codeplex.com/discussions/430451</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;HI every one.&lt;/p&gt;
&lt;p&gt;I am making a reader and render for docx files and using libopc to read it.&lt;/p&gt;
&lt;p&gt;Well, I have a problem to get the images &amp;quot;id&amp;quot;, then I decided get the image &amp;quot;Id&amp;quot; by the same way that opcContainerDump method is printing this information. For beginning I tried to print every relationship by using the code that I see in libopc documentation
 but the code is crashing...&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;opcContainer *c = opcContainerOpen(_X(filePath.c_str()),  OPC_OPEN_READ_ONLY,  NULL,  NULL);
&lt;span style="color:blue"&gt;if&lt;/span&gt; (c)
{
		
    &lt;span style="color:blue"&gt;for&lt;/span&gt;(opcPart part=opcPartGetFirst(c);OPC_PART_INVALID!=part;part=opcPartGetNext(c, part)) {
	   &lt;span style="color:blue"&gt;for&lt;/span&gt;(opcRelation rel=opcRelationFirst(c, part); OPC_PART_INVALID!=rel; rel=opcRelationNext(c, part, rel)) {
		   opcPart internal_target=opcRelationGetInternalTarget(c, part, rel);
		   &lt;span style="color:blue"&gt;const&lt;/span&gt; xmlChar *external_target=opcRelationGetExternalTarget(c, part, rel);
		   &lt;span style="color:blue"&gt;const&lt;/span&gt; xmlChar *target=(NULL!=internal_target?internal_target:external_target);
		   &lt;span style="color:blue"&gt;const&lt;/span&gt; xmlChar *prefix=NULL;
		   opc_uint32_t counter=-1;
		   &lt;span style="color:blue"&gt;const&lt;/span&gt; xmlChar *type=NULL;
		   opcRelationGetInformation(c, part, rel, &amp;amp;prefix, &amp;amp;counter, &amp;amp;type);        
		   &lt;span style="color:blue"&gt;if&lt;/span&gt; (-1==counter) { &lt;span style="color:green"&gt;/* no counter after prefix */&lt;/span&gt;
			  printf(&lt;span style="color:#a31515"&gt;&amp;quot;%s;%s;%s;%s\n&amp;quot;&lt;/span&gt;, part, prefix, target, type);
		   } &lt;span style="color:blue"&gt;else&lt;/span&gt; {
			  printf(&lt;span style="color:#a31515"&gt;&amp;quot;%s;%s%i;%s;%s\n&amp;quot;&lt;/span&gt;, part, prefix, counter, target, type);
		   }
	   }
}
...
....
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any suggestion?&lt;/p&gt;
&lt;p&gt;Many thanks and great library!&lt;/p&gt;
&lt;/div&gt;</description><author>rebustiano</author><pubDate>Tue, 22 Jan 2013 16:01:38 GMT</pubDate><guid isPermaLink="false">New Post: Problem iterating relations 20130122040138P</guid></item><item><title>New Post: Large parts and Windows X64</title><link>http://libopc.codeplex.com/discussions/428893</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Well, duh, now that I submitted this, I see that Zip64 is not currently supported and there is an
&lt;a title="Work item for Zip64 support." href="http://libopc.codeplex.com/workitem/165"&gt;
existing work item to add Zip64 support&lt;/a&gt;. The field set in the quoted code is the original zip header, for file sizes up to 0xFFFFFFFF. &amp;nbsp;I just voted the work item up. Any comments on the difficulty of accomplishing this?&lt;/p&gt;
&lt;/div&gt;</description><author>dmendres</author><pubDate>Tue, 08 Jan 2013 17:18:33 GMT</pubDate><guid isPermaLink="false">New Post: Large parts and Windows X64 20130108051833P</guid></item><item><title>New Post: Large parts and Windows X64</title><link>http://libopc.codeplex.com/discussions/428893</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;I have rebuilt libopc on Windows (VS2010) for X64 platform (I think!). It certainly is running in a 64-bit executable. However, I see that the part headers in zip.c appear to be hard-coded as unsigned int 32:&lt;/p&gt;
&lt;pre style="font-family:Consolas; font-size:13; color:black; background:white"&gt;&amp;nbsp;&amp;&amp;&amp;nbsp;(4==opcZipRawWriteU32(io,&amp;nbsp;rawState,&amp;nbsp;compressed_size))&amp;nbsp;&amp;nbsp;&lt;span style="color:green"&gt;//&amp;nbsp;compressed&amp;nbsp;size&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;&amp;&amp;nbsp;(4==opcZipRawWriteU32(io,&amp;nbsp;rawState,&amp;nbsp;uncompressed_size))&amp;nbsp;&amp;nbsp;&lt;span style="color:green"&gt;//&amp;nbsp;uncompressed&amp;nbsp;size&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As expected, when I create a large part (12391552489), the recorded archive compressed size &amp;nbsp;(3801617899) is incorrect, and is exactly the remainder of the original size modulo max unsigned int32:&lt;/p&gt;
&lt;p style="margin:0in; font-family:Calibri; font-size:11.0pt"&gt;12391552489%4294967295&lt;/p&gt;
&lt;p style="margin:0in; font-family:Calibri; font-size:11.0pt"&gt;=&lt;/p&gt;
&lt;p style="margin:0in; font-family:Calibri; font-size:11.0pt"&gt;3801617899&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Now, Winzip knows the actual size of the uncompressed part, so I believe the deflated stream is written correctly, but the header is incorrect.&lt;/p&gt;
&lt;p&gt;Have I built the X64 target incorrectly or is this a libopc limitation? I suspect the latter because of the 4 byte write quoted from zip.c, above.&lt;/p&gt;
&lt;/div&gt;</description><author>dmendres</author><pubDate>Tue, 08 Jan 2013 15:12:56 GMT</pubDate><guid isPermaLink="false">New Post: Large parts and Windows X64 20130108031256P</guid></item><item><title>New Post: Creating xlsx file from scratch?</title><link>http://libopc.codeplex.com/discussions/271883</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;I've tested Masood's code to get a xlsx file text content like this:&lt;/p&gt;
&lt;p&gt;static void dumpSharedrows(mceTextReader_t *reader){&lt;br&gt;
#if 0&lt;br&gt;
&amp;nbsp;xmlChar *ln = xmlStrdup(xmlTextReaderLocalName(reader-&amp;gt;reader)); &lt;br&gt;
&amp;nbsp;const char * lnvalue=(const char*)ln; &lt;br&gt;
&amp;nbsp;if((strcmp(lnvalue,&amp;quot;si&amp;quot;))==0) {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //id3++; &lt;br&gt;
&amp;nbsp;} &lt;br&gt;
#endif&lt;br&gt;
&amp;nbsp;mce_skip_attributes(reader);&lt;br&gt;
&amp;nbsp;//mce_start_attributes(reader){ }&lt;br&gt;
&amp;nbsp;//mce_end_attributes(reader);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;mce_start_children(reader){ &lt;br&gt;
&amp;nbsp; mce_start_element(reader,NULL,NULL)&lt;br&gt;
&amp;nbsp; { dumpSharedrows(reader); }&lt;br&gt;
&amp;nbsp; mce_end_element(reader);&lt;/p&gt;
&lt;p&gt;&amp;nbsp; mce_start_text(reader){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(const xmlChar *txt=xmlTextReaderConstValue(reader-&amp;gt;reader);0!=*txt;txt++)
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;putc(*txt, stdout);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;putc('\n', stdout);&lt;br&gt;
&amp;nbsp;//remove((const char *)xmlTextReaderConstValue(reader-&amp;gt;reader));&lt;/p&gt;
&lt;p&gt;&amp;nbsp;//LOGI(&amp;quot;%s&amp;quot;, xmlTextReaderConstValue(reader-&amp;gt;reader));&lt;/p&gt;
&lt;p&gt;&amp;nbsp;}mce_end_text(reader); &lt;br&gt;
&amp;nbsp;}&lt;br&gt;
&amp;nbsp;mce_end_children(reader);&lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;int __stdcall processxlsx(_TCHAR* inputFilename, _TCHAR* outputFilename)&lt;br&gt;
{&lt;br&gt;
#ifdef WIN32&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _CrtSetDbgFlag (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);&lt;br&gt;
#endif&lt;/p&gt;
&lt;p&gt;opcInitLibrary();&lt;br&gt;
opcContainer *c=opcContainerOpen(_X(inputFilename), OPC_OPEN_READ_ONLY, NULL, NULL);&lt;br&gt;
if (NULL!=c) { &lt;br&gt;
&amp;nbsp;mceTextReader_t reader;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;if (OPC_ERROR_NONE==opcXmlReaderOpen(c, &amp;reader, _X(&amp;quot;xl/sharedStrings&amp;quot;), NULL, 0, 0)) //&amp;nbsp; xl/worksheets/sheet1.xml&lt;br&gt;
&amp;nbsp;{&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;mce_start_document(&amp;reader) &lt;br&gt;
&amp;nbsp;&amp;nbsp;{ &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;mce_start_element(&amp;reader, NULL, NULL)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;{ &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dumpSharedrows(&amp;reader);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;mce_end_element(&amp;reader);&lt;br&gt;
&amp;nbsp;&amp;nbsp;} &lt;br&gt;
&amp;nbsp;&amp;nbsp;mce_end_document(&amp;reader); mceTextReaderCleanup(&amp;reader);&lt;br&gt;
&amp;nbsp;} &lt;br&gt;
&amp;nbsp;opcContainerClose(c, OPC_CLOSE_NOW); &lt;br&gt;
}&lt;br&gt;
opcFreeLibrary();&lt;/p&gt;
&lt;p&gt;#ifdef WIN32&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; OPC_ASSERT(!_CrtDumpMemoryLeaks());&lt;br&gt;
#endif&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;&lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;only part of the text content would be&amp;nbsp;&amp;nbsp;received. I'd lovely to get whole text at a time,but it seems I must process xl/worksheets/sheet1.xml&lt;br&gt;
,xl/worksheets/sheet2.xml...&amp;nbsp; is it ture?&amp;nbsp; how i can do that?&lt;/p&gt;
&lt;p&gt;Another question, how can i get the whole text content from a pptx file? i am seeking of it.&lt;/p&gt;
&lt;p&gt;Regards.&lt;/p&gt;
&lt;p&gt;Cooor.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;</description><author>Cooor</author><pubDate>Thu, 22 Nov 2012 07:53:45 GMT</pubDate><guid isPermaLink="false">New Post: Creating xlsx file from scratch? 20121122075345A</guid></item><item><title>New Post: Concurrent dump?</title><link>http://libopc.codeplex.com/discussions/402351</link><description>&lt;div style="line-height: normal;"&gt;
&lt;blockquote style="border:solid .1em #ccc; font-style:italic; margin:.25em 1em 0 1em; padding:0 .25em 0 .25em"&gt;
&lt;strong&gt;flr wrote:&lt;/strong&gt;
&lt;p&gt;One more thing: libopc is NOT thread safe. So if you are calling the &amp;quot;dump&amp;quot; function from different thread be sure to add a MUTEX before calling libopc.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Well that'd be it then - I read &amp;quot;Concurrent Write&amp;quot; to mean &amp;quot;can write/read from two separate threads so long as they're different parts without the need for a mutex&amp;quot;. Talk about reading into it!.... maybe don't use the term concurrent on that page - it's
 not concurrent (occurring&amp;nbsp;at the same time) at all.&lt;/p&gt;
&lt;p&gt;Thanks for the clarification.&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;</description><author>gemmell</author><pubDate>Tue, 13 Nov 2012 04:49:38 GMT</pubDate><guid isPermaLink="false">New Post: Concurrent dump? 20121113044938A</guid></item><item><title>New Post: using in C#</title><link>http://libopc.codeplex.com/discussions/401985</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;/div&gt;</description><author>rzarei</author><pubDate>Fri, 09 Nov 2012 07:16:20 GMT</pubDate><guid isPermaLink="false">New Post: using in C# 20121109071620A</guid></item><item><title>New Post: using in C#</title><link>http://libopc.codeplex.com/discussions/401985</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;you must be referring to:&amp;nbsp;http://en.wikipedia.org/wiki/Opc_server. The "opc" in libopc refers to:&amp;nbsp;http://en.wikipedia.org/wiki/Open_Packaging_Conventions.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;so I'm sorry. I guess this it not the lib your are looking for ;-)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Florian&lt;/p&gt;&lt;/div&gt;</description><author>flr</author><pubDate>Thu, 08 Nov 2012 16:52:00 GMT</pubDate><guid isPermaLink="false">New Post: using in C# 20121108045200P</guid></item><item><title>New Post: Concurrent dump?</title><link>http://libopc.codeplex.com/discussions/402351</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Well --- it should do interleaved reads and writes!!! I guess there is a little --- bug&amp;nbsp;:-(&lt;/p&gt;
&lt;p&gt;Here is a little sample program. A modified version of opc_extract which will dump two streams interleaved:&lt;/p&gt;
&lt;p&gt;
&lt;div style="color: black; background-color: white;"&gt;
&lt;pre&gt;#include &amp;lt;opc/opc.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#ifdef WIN32
#include &amp;lt;io.h&amp;gt;
#include &amp;lt;fcntl.h&amp;gt;
#endif
#ifdef WIN32
#include &amp;lt;crtdbg.h&amp;gt;
#endif

&lt;span style="color: blue;"&gt;int&lt;/span&gt; main( &lt;span style="color: blue;"&gt;int&lt;/span&gt; argc, &lt;span style="color: blue;"&gt;const&lt;/span&gt; &lt;span style="color: blue;"&gt;char&lt;/span&gt;* argv[] )
{
#ifdef WIN32
     _CrtSetDbgFlag (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif

#ifdef WIN32
    _setmode( _fileno( stdout ), _O_BINARY ); &lt;span style="color: green;"&gt;// make sure LF are not translated to CR LF on windows...&lt;/span&gt;
#endif
    &lt;span style="color: blue;"&gt;if&lt;/span&gt; (OPC_ERROR_NONE==opcInitLibrary() &amp;amp;&amp;amp; 4==argc) {
        opcContainer *c=NULL;
        &lt;span style="color: blue;"&gt;if&lt;/span&gt; (NULL!=(c=opcContainerOpen(_X(argv[1]), OPC_OPEN_READ_ONLY, NULL, NULL))) {
            opcPart part=OPC_PART_INVALID;
            opcContainerInputStream *stream[2]={NULL, NULL};
            &lt;span style="color: blue;"&gt;for&lt;/span&gt;(&lt;span style="color: blue;"&gt;int&lt;/span&gt; i=0;i&amp;lt;2;i++) {
                &lt;span style="color: blue;"&gt;if&lt;/span&gt; ((part=opcPartFind(c, _X(argv[2+i]), NULL, 0))!=OPC_PART_INVALID) {
                    stream[i]=opcContainerOpenInputStream(c, part);;
                }
            }
            &lt;span style="color: blue;"&gt;while&lt;/span&gt;(stream[0]!=NULL || stream[1]!=NULL) {
                &lt;span style="color: blue;"&gt;for&lt;/span&gt;(&lt;span style="color: blue;"&gt;int&lt;/span&gt; i=0;i&amp;lt;2;i++) {
                    &lt;span style="color: blue;"&gt;if&lt;/span&gt; (NULL!=stream[i]) {
                        opc_uint8_t buf[100];
                        opc_uint32_t len=0;
                        &lt;span style="color: blue;"&gt;if&lt;/span&gt;((len=opcContainerReadInputStream(stream[i], buf, &lt;span style="color: blue;"&gt;sizeof&lt;/span&gt;(buf)))&amp;gt;0) {
                            fwrite(buf, &lt;span style="color: blue;"&gt;sizeof&lt;/span&gt;(opc_uint8_t), len, stdout);
                        } &lt;span style="color: blue;"&gt;else&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (0==len) {
                            opcContainerCloseInputStream(stream[i]);
                            stream[i]=NULL;
                        } &lt;span style="color: blue;"&gt;else&lt;/span&gt; {
                            assert(0); &lt;span style="color: green;"&gt;// not good...&lt;/span&gt;
                        }
                    }
                }
            }
            opcContainerClose(c, OPC_CLOSE_NOW);
        } &lt;span style="color: blue;"&gt;else&lt;/span&gt; {
            fprintf(stderr, &lt;span style="color: #a31515;"&gt;"ERROR: file \"%s\" could not be opened.\n"&lt;/span&gt;, argv[1]);
        }
        opcFreeLibrary();
    } &lt;span style="color: blue;"&gt;else&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (2==argc) {
        fprintf(stderr, &lt;span style="color: #a31515;"&gt;"ERROR: initialization of libopc failed.\n"&lt;/span&gt;);    
    } &lt;span style="color: blue;"&gt;else&lt;/span&gt; {
        fprintf(stderr, &lt;span style="color: #a31515;"&gt;"opc_extract FILENAME PART1 PART2\n\n"&lt;/span&gt;);
        fprintf(stderr, &lt;span style="color: #a31515;"&gt;"Sample: opc_extract test.docx word/document.xml word/styles.xml\n"&lt;/span&gt;);
    }
#ifdef WIN32
    OPC_ASSERT(!_CrtDumpMemoryLeaks());
#endif
    &lt;span style="color: blue;"&gt;return&lt;/span&gt; 0;
}

&lt;/pre&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;I gave it a try with:&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;nbsp;opc_extract2 OOXMLI1.docx word/document.xml word/styles.xml&lt;/p&gt;
&lt;p&gt;and it gave me the two streams without any assertion failure.&lt;/p&gt;
&lt;p&gt;It would be great to understand the bug which triggers the assertion in your program.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One more thing: libopc is NOT thread safe. So if you are calling the "dump" function from different thread be sure to add a MUTEX before calling libopc.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hope that helps,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Florian&lt;/p&gt;&lt;/div&gt;</description><author>flr</author><pubDate>Thu, 08 Nov 2012 16:48:31 GMT</pubDate><guid isPermaLink="false">New Post: Concurrent dump? 20121108044831P</guid></item><item><title>New Post: using in C#</title><link>http://libopc.codeplex.com/discussions/401985</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I'm developing a monitoring application that interacts with PLCs. I want to create an OPC Server and expose Tags; i think you&amp;nbsp;misunderstood&amp;nbsp;my question.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;/div&gt;</description><author>rzarei</author><pubDate>Thu, 08 Nov 2012 14:22:28 GMT</pubDate><guid isPermaLink="false">New Post: using in C# 20121108022228P</guid></item></channel></rss>