<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	「通过WriteFile对硬盘发送数据」的评论	</title>
	<atom:link href="https://www.lab-z.com/wf/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.lab-z.com/wf/</link>
	<description></description>
	<lastBuildDate>Mon, 01 Dec 2014 01:29:05 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>
	<item>
		<title>
		评论者：ziv2013		</title>
		<link>https://www.lab-z.com/wf/#comment-6453</link>

		<dc:creator><![CDATA[ziv2013]]></dc:creator>
		<pubDate>Mon, 01 Dec 2014 01:29:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab-z.com/?p=2400#comment-6453</guid>

					<description><![CDATA[回复给 &lt;a href=&quot;https://www.lab-z.com/wf/#comment-6095&quot;&gt;snowman1101&lt;/a&gt;。

谢谢哈  刚看到这个评论，后面我会试试。]]></description>
			<content:encoded><![CDATA[<p>回复给 <a href="https://www.lab-z.com/wf/#comment-6095">snowman1101</a>。</p>
<p>谢谢哈  刚看到这个评论，后面我会试试。</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		评论者：snowman1101		</title>
		<link>https://www.lab-z.com/wf/#comment-6095</link>

		<dc:creator><![CDATA[snowman1101]]></dc:creator>
		<pubDate>Thu, 20 Nov 2014 02:25:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.lab-z.com/?p=2400#comment-6095</guid>

					<description><![CDATA[不知道这么些为什么会成功，可能是编译器自动纠错，也可能是WriteFile会自动纠错
1.你命名注释了 FILE_SHARE_WRITE,    // must be opened with exclusive-access
你却给共享了，
2.磁盘写的最小值是 512 bytes 这个的确没错，因为目前，估计今后也不会出现Sector小于 512B的磁盘
3.fSuccess=WriteFile(hFile, &#038;txchar, 512, &#038;iBytesWritten,NULL);
这里应该是  fSuccess=WriteFile(hFile, txchar, 512, &#038;iBytesWritten,NULL); 吧？但写入结果居然正确，不太理解
4.你这样写，应该只能写入 512字节，如果你换成char txchar[1024]; 写入1024字节有可能会出错，这要看分区的位置。
原因是 你的磁盘 已经被windows mount为 G:了，你必须FSCTL_LOCK_VOLUME or FSCTL_DISMOUNT_VOLUME才能对其写入]]></description>
			<content:encoded><![CDATA[<p>不知道这么些为什么会成功，可能是编译器自动纠错，也可能是WriteFile会自动纠错<br />
1.你命名注释了 FILE_SHARE_WRITE,    // must be opened with exclusive-access<br />
你却给共享了，<br />
2.磁盘写的最小值是 512 bytes 这个的确没错，因为目前，估计今后也不会出现Sector小于 512B的磁盘<br />
3.fSuccess=WriteFile(hFile, &amp;txchar, 512, &amp;iBytesWritten,NULL);<br />
这里应该是  fSuccess=WriteFile(hFile, txchar, 512, &amp;iBytesWritten,NULL); 吧？但写入结果居然正确，不太理解<br />
4.你这样写，应该只能写入 512字节，如果你换成char txchar[1024]; 写入1024字节有可能会出错，这要看分区的位置。<br />
原因是 你的磁盘 已经被windows mount为 G:了，你必须FSCTL_LOCK_VOLUME or FSCTL_DISMOUNT_VOLUME才能对其写入</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
