<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DE8ARHk_fSp7ImA9WhRaEE8.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630</id><updated>2012-02-12T14:07:25.745+08:00</updated><category term="android sdk failed to fetch url" /><category term="clip image and save" /><category term="save a region of a picture" /><category term="solution" /><category term="usb device can't work" /><category term="電腦介面卡Windows抓不到怎麼辦?" /><category term="MessageBoxTimeOut" /><category term="firefox extension doesn't work" /><category term="MS DevCon" /><category term="composite pattern" /><category term="hard disk partition program" /><category term="medicine lookup" /><category term="device manager" /><category term="P/Invoke" /><category term="NTLDR Missing" /><category term="Win 7" /><category term="change c# startup form" /><category term="sql server export to access" /><category term="boost my pc" /><category term="Windows Startup problem" /><category term="datagridview" /><category term="MessageBox Time Out" /><category term="multithread" /><category term="ms chart control show data point tooltip" /><category term="how to show axis scrollbar" /><category term="broken usb device" /><category term="effective C# item 1 digest" /><category term="MsgBox Time Out" /><category term="OpenPrinter" /><category term="troubleshooting tcp/ip failure" /><category term="datagridviewrow" /><category term="CD音響挑片" /><category term="thread safe" /><category term="Factory Method Pattern" /><category term="bad performance computer" /><category term="learning technique" /><category term="use command shell in .net" /><category term="delaytime function" /><category term="vgasave driver" /><category term="promote a Windows Server 2008" /><category term="disk partition program" /><category term="windows hibernation" /><category term="visitor pattern" /><category term="plateform invoke sample" /><category term="如何修復網路連線" /><category term=".net char control" /><category term="how to enable chart control axis scroll bar" /><category term="DllImport" /><category term=".Net" /><category term="MsgBoxTimeOut" /><category term="sql server export to excel" /><category term="win 7 dvd" /><category term="platform invoke" /><category term="天冷就回來" /><category term="diskpart" /><category term="use process class cmd.exe to issue a series of commands" /><category term="sql injection attack prevention method" /><category term="unknown devices" /><category term="Interface Tutorial" /><category term="netsted string" /><category term="design pattern" /><category term="NVIDIA GeForce4 MX440" /><category term="making thread-safe calls" /><category term=".Net Interop" /><category term="NVIDIA GeForce4 MX440 driver for Win 7." /><category term="msconfig.exe" /><category term="multi-thread" /><category term="Windows Update Error" /><category term="sql server default port" /><category term="biginteger class" /><category term="讀書與上課" /><category term="養生方面的五行知識" /><category term="sql injection attack" /><category term="USB unknown devices" /><category term="can't boot from VISTA or Win 7 DVD" /><category term="PInvoke" /><category term="電腦越跑越慢怎麼辦" /><category term="biginteger" /><category term="studying tips" /><category term="DevCon.exe" /><category term="抓不到主機版" /><category term="online medicine lookup" /><category term="Platform Invoke tutorial" /><category term="挑片有得救嗎" /><category term="Office Interop" /><category term="VB.NET Interface" /><category term="dotnet com" /><category term="Auto Closing Message Box" /><category term="textbox autocomplete" /><category term="datagridview cell color setting" /><category term="LDF repair" /><category term="partition program" /><category term="remove unwanted startup programs" /><category term="A referral was returned from the server" /><category term="How to embed NUnit in VS 2010" /><category term="comvisible" /><category term="free biginteger" /><category term="delay function" /><category term="NUnit in VS 2008" /><category term="can't install Windows XP" /><category term="Server service" /><category term="free big integer class" /><category term="How to get Current X coordinate and Y coordinate in Chart Control" /><category term="STOP 0x4000008A" /><category term="LDF corrupted" /><category term="MDF corrupted" /><category term="broken .net framework" /><category term="c++/cli pinvoke" /><category term="c++/cli" /><category term="chart control candlestick" /><category term="thread-safe" /><category term="螢幕一片黑" /><category term="c# win form startup form" /><category term="File and Printer Sharing service" /><category term="如何檢測網路" /><category term="free biginteger class" /><category term="promote a Windows Server 2003" /><category term="remove unwanted programs when booting" /><category term="repair .net framework" /><category term="c# to vb.net" /><category term="access import to sql server" /><category term="NVIDIA GeForce4 MX4000" /><category term="set NUnit as an external tools in Visual Studio" /><category term="android sdk fetch xml error" /><category term="how to remove unwanted programs at startup" /><category term="how to set datagridview row color" /><category term="P/Invoke Interop Assistant" /><category term="NVIDIA GeForce4 MX4000 driver" /><category term="learning method" /><category term="VIDEOPRT.sys error" /><category term="vb.net" /><category term="delay subroutine" /><category term="online drugs lookup" /><category term=".net cpp" /><category term="網路不通" /><category term="How to embed NUnit in VS 2008" /><category term="msconfig" /><category term="get back child process result" /><category term="Solved VgaSave driver in XP/Vista/Win 7" /><category term="1433 port" /><category term="effective C# digest" /><category term="candlestick chart" /><category term="calling c++ dll" /><category term="diskpart.exe" /><category term="effective c# itme 1 summary" /><category term="error code 80200053" /><category term="how to boost my pc" /><category term="how to change C# startup form" /><category term="turn off hibernation" /><category term="medication lookup" /><category term="C# startup form" /><category term=".Net spawning child process" /><category term="online medication lookup" /><category term="MDF repair" /><category term=".Net Process Class" /><category term="NUnit in VS 2005" /><category term="養生" /><category term="ms chart control" /><category term="usb driver displays unknown device" /><category term="vgasave problem" /><category term="vba call dotnet" /><category term="dotNet" /><category term="string in string" /><category term="tooltip" /><category term="sql injection" /><category term="NVIDIA GeForce4 MX440 driver" /><category term="sql server dynamic port" /><category term="excel import to sql server" /><category term="kline chart" /><category term="NVIDIA GeForce4 MX4000 driver for Win 7" /><category term="can't boot from vista dvd" /><category term="GetJob" /><category term="bill chung" /><category term="Computer Browser" /><category term="big integer" /><category term="vb.net to c#" /><category term="big integer class" /><category term="drugs lookup" /><category term="Promote Domain Controller" /><category term="win32 api" /><category term="datagridviewrow color" /><category term="DevCon" /><category term="MS DevCon.exe" /><category term="effective c# itme 2 summary" /><category term="partition tool" /><category term="select a region of a picture" /><category term="slower and slower computer" /><category term="android sdk error" /><category term="Windows 7" /><category term="dcpromo.exe" /><category term="use process class cmd.exe get back command result" /><category term="vba" /><category term="Windows Live Messenger一直斷線" /><category term="use commnad shell in vb.net" /><category term="simple factory pattern" /><category term="firefox extension" /><category term="troubleshooting network connections" /><category term="五行" /><category term="網路不能連怎麼辦" /><category term="Word Automation" /><category term="vista dvd" /><category term="textbox" /><category term="How to embed NUnit in VS 2005" /><category term="C#" /><category term="datagridview autocomplete" /><category term="effective C# item 2 digest" /><category term=".Net Interface" /><category term="Office Automation" /><category term="factory pattern" /><category term="fix .net framework" /><category term="Win32 Printer API" /><category term="studying method" /><category term="NUnit in VS 2010" /><category term="MSN一直斷線" /><category term="電腦越跑越慢" /><category term="can't boot from win 7 dvd" /><title>展翔研究室--IT 短文資訊分享</title><subtitle type="html">展翔研究室主要經營網頁設計服務, 網頁程式設計服務, 視窗應用程式設計, 軟體設計, 資料庫軟體設計, .Net應用程式設計, 區域網路規畫和架設及設定, Windows伺服器架設和管理, Linux伺服器架設和管理, 專業顧問諮詢, 電腦家教, .Net教學等, 專精於微軟.NET平台軟體寫作和Windows/LINUX作業系統管理和網路管理, 用C#和VB.NET和C++等語言代客訂做客製化軟體。</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://soho-hsh.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>84</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/tYbVGM" /><feedburner:info uri="blogspot/tybvgm" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>blogspot/tYbVGM</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;DE8ARHk9eyp7ImA9WhRaEE8.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-7852745501168519777</id><published>2012-02-12T14:03:00.005+08:00</published><updated>2012-02-12T14:07:25.763+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-12T14:07:25.763+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PInvoke" /><category scheme="http://www.blogger.com/atom/ns#" term="platform invoke" /><category scheme="http://www.blogger.com/atom/ns#" term="Platform Invoke tutorial" /><title>Platform Invoke Tutorial Part 1</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/VZhv4JDuZUe7QUzddqNHMXcK8qU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VZhv4JDuZUe7QUzddqNHMXcK8qU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/VZhv4JDuZUe7QUzddqNHMXcK8qU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VZhv4JDuZUe7QUzddqNHMXcK8qU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;In this artcile, I am going to discuss how to marshal a pointer to string(LPTSR) to the .Net style type, Please look at the Win32 API function prototype as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;pre style="font-family: Consolas, Courier, monospace; font-size: 12px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;UINT WINAPI GetSystemDirectory(
  __out&amp;nbsp;&amp;nbsp;LPTSTR lpBuffer,
  __in&amp;nbsp;&amp;nbsp;&amp;nbsp;UINT uSize
);&lt;/pre&gt;
&lt;pre style="font-family: Consolas, Courier, monospace; font-size: 12px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;/pre&gt;
&lt;pre style="overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;
&lt;dt style="font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; white-space: normal;"&gt;&lt;em&gt;lpBuffer&lt;/em&gt;&amp;nbsp;[out]&lt;/dt&gt;
&lt;span style="font-family: Consolas, Courier, monospace;"&gt;&lt;span style="font-size: 12px;"&gt;
&lt;/span&gt;&lt;/span&gt;A pointer to the buffer to receive the path. This path does not end with a backslash unless the system directory is the root directory. For example, if the system directory is named Windows\System32 on drive C, the path of the system directory retrieved by this function is C:\Windows\System32.&lt;/pre&gt;
&lt;pre style="overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;span style="font-family: Consolas, Courier, monospace;"&gt;&lt;span style="font-size: 12px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;span style="font-family: Consolas, Courier, monospace;"&gt;&lt;span style="font-size: 12px;"&gt;From the prototype above, there are two keywords we should know first. One is the __out keyword which means the lpBuffer parameter will get back a literal string data, the other is __in which means the uSize parameter is used as a passed-in value to the API GetSystemDirectory.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-family: Consolas, Courier, monospace; font-size: 12px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;/pre&gt;
&lt;pre style="font-family: Consolas, Courier, monospace; font-size: 12px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;Well, let's start from the simplest part. Once you see the __in modified keyword and their native data type in win32 are UINT, WORD, DWORD,...and so on. You can just use the corresponding .Net data type to represent them.  Please see the following article for reference:&lt;/pre&gt;
&lt;pre style="font-family: Consolas, Courier, monospace; font-size: 12px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;/pre&gt;
&lt;pre style="font-family: Consolas, Courier, monospace; font-size: 12px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;a href="http://soho-hsh.blogspot.com/2011/04/pinvoke-in-net-using-vbnet-calling-c.html"&gt;P/Invoke In .NET using C#/VB.Net to call C++ DLL&lt;/a&gt;&lt;/pre&gt;
&lt;pre style="font-family: Consolas, Courier, monospace; font-size: 12px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;/pre&gt;
&lt;pre style="font-family: Consolas, Courier, monospace; font-size: 12px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;All right, that is trivial and ok for us. The tricky part is the __out keyword that modified the parameter lpBuffer.  How should we represent the parameter's data type in .Net way?  Good question.  One of the many solutions is to represent the __out modified native data type parameter as StringBuilder class in .Net. (Hints: the other alternatives might be representing the lpBuffer as a .Net Byte array and must use passing by Reference).&lt;/pre&gt;
&lt;pre style="font-family: Consolas, Courier, monospace; font-size: 12px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;/pre&gt;
&lt;pre style="font-family: Consolas, Courier, monospace; font-size: 12px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;So the result is as follows:
&lt;/pre&gt;
&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Text&lt;br /&gt;
Imports System.Runtime.InteropServices&lt;br /&gt;
&lt;br /&gt;
Public Class Win32Wrap&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;dllimport("kernel32.dll", ,="" charset:="CharSet.Unicode)" entrypoint:="GetSystemDirectoryW" setlasterror:="true,"&gt; _&lt;dllimport("kernel32.dll", ,="" charset:="CharSet.Unicode)" entrypoint:="GetSystemDirectoryW" setlasterror:="true,"&gt;&amp;nbsp;Public Function GetSystemDirectory(&lt;marshalas(unmanagedtype.lptstr)&gt;lpBuffer As System.Text.StringBuilder, _
 uSize As UInteger ) As UInteger&lt;/marshalas(unmanagedtype.lptstr)&gt;&lt;/dllimport("kernel32.dll",&gt;&lt;br /&gt;
&lt;/dllimport("kernel32.dll",&gt;&lt;br /&gt;
&lt;div&gt;
&amp;nbsp;End function&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
End Class&lt;br /&gt;
&lt;pre style="overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;span style="font-family: Consolas, Courier, monospace;"&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;span style="font-family: Consolas, Courier, monospace;"&gt;Here is the sample code for using the api as follows:&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;span style="font-family: Consolas, Courier, monospace;"&gt;
&lt;/span&gt;&lt;/pre&gt;
Public Class App
 Public Shared Sub Main()
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dim strSysDirBuffer As New StringBuilder( 256 )
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Win32Wrap.GetSystemDirectory( strSysDirBuffer, strSysDirBuffer.Capacity )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MsgBox("The system directory is: " &amp;amp; strSysDirBuffer.ToString())&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
End Class&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;pre style="overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;span style="font-family: Consolas, Courier, monospace;"&gt;This is a pretty simple one of marshaling a Win32 api into .Net callable function.  I hope you will enjoy it.  I will see you all in part 2.&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;span style="font-family: Consolas, Courier, monospace;"&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;span style="font-family: Consolas, Courier, monospace;"&gt;--#--

&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="font-family: Consolas, Courier, monospace; font-size: 12px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-7852745501168519777?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/-ipkq353_dc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/7852745501168519777/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=7852745501168519777" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/7852745501168519777?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/7852745501168519777?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/-ipkq353_dc/platform-invoke-tutorial-part-1.html" title="Platform Invoke Tutorial Part 1" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2012/02/platform-invoke-tutorial-part-1.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUQMQn8_cSp7ImA9WhRaEEw.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-743853387877140774</id><published>2012-02-12T10:14:00.000+08:00</published><updated>2012-02-12T10:23:03.149+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-12T10:23:03.149+08:00</app:edited><title>Tansition from Windows App to ASP.Net app -- Differences and Commonalities between Win Form and Web Form apps</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ysVrC8OVEN1vgHN6lhbVTVYgwgE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ysVrC8OVEN1vgHN6lhbVTVYgwgE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ysVrC8OVEN1vgHN6lhbVTVYgwgE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ysVrC8OVEN1vgHN6lhbVTVYgwgE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;In .Net field since .Net 2.0 (The IDE was VS 2005 since then) could approximately categorized as two kinds. One is Win Form app(so-called the Windows Application using .Net technology) and the other is Web Form app(so-called ASP.Net technology using VB.Net or C# programming language).&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Since I am mostly programming under the Win Form environment and I have some experiences under ASP.Net since .Net 2.0(Now is .Net 4.0 or the forthcoming .Net 4.5).  I want to share some my two cents and opinions about the common and difference part of the two parties(Win Form v.s. Web Form). Firstly it comes the different parts as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;User Interface difference&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
The Windows apps use so-called Window to present its UI to the end users. And it is most likely called Client Apps or Win Apps and the Web Apps(ASP.Net apps) use browsers UI to present its UI to end users. &amp;nbsp;The browser could be vendor independent(such as you can use IE or &amp;nbsp;Chrome or Safari or Opera browser).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Application Execution Flow difference&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
The Windows apps work just like the older Windows apps since Windows 3.1. It got a message loop in its own UI thread and the message loop keep receiving and processing messages sent to it and hence do some processing and responds to user interactions. &amp;nbsp;And every window got is own message loop(if I were wrong, please feel free to let me know that). &amp;nbsp;In the other hand, the web app use browsers as its presentation UI and the most important part of Web apps lie on the Web Page Life Cycle in it. &amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We could also layout controls such as textboxes or buttons or labels on our Web form apps. &amp;nbsp;But the nature of Web apps is much different from Windows apps. &amp;nbsp;Web Form page uses a request and response method to present its UI. &amp;nbsp;While users open its browser to a web site such as www.microsoft.com, the browser send a http request(or Web Request) to the destination Web Server on microsoft.com web site, once the Web Server got the request it will start to process and send back the UI elements(such HTML Tags--the so called Web Response) to the browser as its final UI presentation. &amp;nbsp;Once the whole data has been sent out to the browser completely, the Web Server will disconnect the connection between the Web Server and the Browser.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Meanwhile, the Windows apps interact with the users by sending events(or so called messages to the inner window message loop) from the users end to the Windows app end. &amp;nbsp;Hence the Windows apps can interact with the users using the Event-Driven way. &amp;nbsp;However the Web apps interact with the user end by sending back a request again along with its filled in form data being submitted to the Web Server using Get or Post web form submit methods. &amp;nbsp;Once the Web Server receives the data, &amp;nbsp;it will start to analyze the data and do some computing and later on send back the result to the user end(the browser). &amp;nbsp;On the other hand, if the web form apps users want to persist data filled in the form already, there must be some mechanism existed to provide this functionality. &amp;nbsp;In the old and original Web apps, once the users send back submitted data to the Web Server, the returned result may or may not persist the data that has been filled in previously in the textboxes for example. The ASP.Net got a mechanism called View State on each and every controls which were layout on the web form. &amp;nbsp;The View State data are the filled in data by the user or the state of the control at that time when the last http request was sent back to Web Server. &amp;nbsp;The view state data is being hidden in HTML tags properties and also are encoded to prevent from deciphering and interpretation.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Hosting Context difference&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
To host a Web form app, we must first set up a Web Server such as IIS(Internet Information Server) and host many of the web apps on the web server. &amp;nbsp;Whereas the Windows apps written in C# or VB.Net are running under CLR(Common Language Runtime) environment. &amp;nbsp;The CLR acts as just like a Virtual Machine(such as Java Virtual Machine) and is a separate layer between the OS layer and the Windows apps. And it is also a platform including many sub-systems such as the .Net BCL(Base Class Library) and ASP.Net and Exception handling and so on.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;The UI Rendering difference&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
As I stated in the 2nd bullet item, Web Form and Win Form apps UI rendering is far much different between the two.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The aforementioned texts are the difference between Web Forms and Win Forms. &amp;nbsp;And in the section that follows is the common part of the two:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;The CLR BCL is the same&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Such as the ADO.Net classes and System.Net classes and Some Utility classes are all common to the web form and win form.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;The control layout style is the same&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Some people may argue that they are different but IMHO, they can be the same. &amp;nbsp;Just use the Code Behind style of coding in Web Form and the control uses and layout are much the same as the win form apps.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;The interaction style is the same&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Both of the web form and win form apps are the event driven style of interaction.&lt;/div&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;
I hope you enjoy this article and if you have some feedback or suggestions, please feel free to email me or leave a message.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&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;
&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-743853387877140774?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/J9BFtr4llQ4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/743853387877140774/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=743853387877140774" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/743853387877140774?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/743853387877140774?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/J9BFtr4llQ4/tansition-from-windows-app-to-aspnet.html" title="Tansition from Windows App to ASP.Net app -- Differences and Commonalities between Win Form and Web Form apps" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2012/02/tansition-from-windows-app-to-aspnet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cMQHo4eSp7ImA9WhRbFkw.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-4509683658758282081</id><published>2012-02-04T11:09:00.001+08:00</published><updated>2012-02-07T19:44:41.431+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-07T19:44:41.431+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="chart control candlestick" /><category scheme="http://www.blogger.com/atom/ns#" term="kline chart" /><category scheme="http://www.blogger.com/atom/ns#" term="candlestick chart" /><title>MS Chart Control -- CandleStick Chart about How to set PriceUp and PriceDown Color?</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/A32FcC5r71Y4CCwHoqnui1hTCEE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/A32FcC5r71Y4CCwHoqnui1hTCEE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/A32FcC5r71Y4CCwHoqnui1hTCEE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/A32FcC5r71Y4CCwHoqnui1hTCEE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Code Snippet as follows:&lt;br /&gt;
&lt;pre&gt;
Chart1.Series.Clear() 
Dim series1 As New Series
With series1
    .ChartType = SeriesChartType.Candlestick
    .Name = "Series1"
    .IsVisibleInLegend = True
    .Legend = "Legend1"
    .XValueMember = "Price"
    .YValueMembers = "High,Low,Open,Close"
    .CustomProperties = "PointWidth = 2.0, PriceDownColor = Green, PriceUpColor = Red"
End With
Chart1.Series.Add(series1)
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-4509683658758282081?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/XF1bOA5-hS0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/4509683658758282081/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=4509683658758282081" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/4509683658758282081?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/4509683658758282081?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/XF1bOA5-hS0/ms-chart-candlestick-chart-about-how-to.html" title="MS Chart Control -- CandleStick Chart about How to set PriceUp and PriceDown Color?" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2012/02/ms-chart-candlestick-chart-about-how-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQDRn0_cSp7ImA9WhRVFEw.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-8756819703171607214</id><published>2012-01-12T10:21:00.000+08:00</published><updated>2012-01-13T07:52:57.349+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-13T07:52:57.349+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Windows 7" /><category scheme="http://www.blogger.com/atom/ns#" term="Win 7" /><category scheme="http://www.blogger.com/atom/ns#" term="NVIDIA GeForce4 MX440" /><category scheme="http://www.blogger.com/atom/ns#" term="NVIDIA GeForce4 MX440 driver" /><category scheme="http://www.blogger.com/atom/ns#" term="NVIDIA GeForce4 MX4000" /><category scheme="http://www.blogger.com/atom/ns#" term="NVIDIA GeForce4 MX440 driver for Win 7." /><category scheme="http://www.blogger.com/atom/ns#" term="NVIDIA GeForce4 MX4000 driver" /><category scheme="http://www.blogger.com/atom/ns#" term="NVIDIA GeForce4 MX4000 driver for Win 7" /><title>Geforce4 MX 440 (MX4000) driver for Windows 7</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/WJi-_dbHM1mna327HrRkcguebBA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WJi-_dbHM1mna327HrRkcguebBA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/WJi-_dbHM1mna327HrRkcguebBA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WJi-_dbHM1mna327HrRkcguebBA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Well, to maximize the use of the Computer Hardware, I got an old PC running Windows 7 which its Graphics Card is a very old fashion NVIDIA GeForce4 MX4000 or NVIDIA GeForce4 MX440.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Under Win7, although the NVIDIA offical web site still offers Legacy GeForce4 MX440 driver for Windows XP, but it seems buggy or something like that. It often BSOD(Blue Screen of Death) saying nv4_mini.sys and Page fault in Nonpaged Area.&lt;br /&gt;
&lt;br /&gt;
I googled for several days and tried many method to resolve this issue. Finally I found this article at&lt;br /&gt;
&lt;a href="http://www.tomshardware.com/forum/264488-33-nvidia-geforce4-driver-windows"&gt;http://www.tomshardware.com/forum/264488-33-nvidia-geforce4-driver-windows&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above article, it states using 72.30 version can resolve the issue. But after testing for several days, it still got some compatabilities with Windows Media Center. Once I entered the Windows Media Center, it throwed me BSOD.&lt;br /&gt;
&lt;br /&gt;
Finally, I tried the older version 72.14 which states Media Center Support. And finally it works smoothly. Or at least 72.14 version is the least buggy version of NVIDIA Geforce4 MX440 driver for Windows 7.&lt;br /&gt;
&lt;br /&gt;
Hope it helps for those who got the same problem.&lt;br /&gt;
&lt;br /&gt;
Happy Chinese Lunar Year.&lt;br /&gt;
&lt;br /&gt;
Driver Download URL:&lt;br /&gt;
&lt;a href="http://www.driverheavendownloads.net/nvidia.htm"&gt;http://www.driverheavendownloads.net/nvidia.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
--#--&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-8756819703171607214?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/CQtX7WnzuNI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/8756819703171607214/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=8756819703171607214" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/8756819703171607214?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/8756819703171607214?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/CQtX7WnzuNI/geforce4-mx-440-mx4000-driver-for-win7.html" title="Geforce4 MX 440 (MX4000) driver for Windows 7" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2012/01/geforce4-mx-440-mx4000-driver-for-win7.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cGRHs6eCp7ImA9WhRVFkw.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-5292669153783904937</id><published>2012-01-09T18:41:00.000+08:00</published><updated>2012-01-15T16:10:25.510+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-15T16:10:25.510+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="textbox autocomplete" /><category scheme="http://www.blogger.com/atom/ns#" term="datagridview" /><category scheme="http://www.blogger.com/atom/ns#" term="datagridview autocomplete" /><category scheme="http://www.blogger.com/atom/ns#" term="textbox" /><title>How to Enable AutoComplete function of DataGridView</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/pPvCUrRQY4PSlNnH_x7n7eiZn3s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pPvCUrRQY4PSlNnH_x7n7eiZn3s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/pPvCUrRQY4PSlNnH_x7n7eiZn3s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pPvCUrRQY4PSlNnH_x7n7eiZn3s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Well, I am away for a few weeks. Today I am not gonna write about articles. Instead I wanna share a very nice article (actually VB.Net Code) about how to enable Edit AutoComplete function in DataGridView's Cells.&lt;br /&gt;
&lt;br /&gt;
In this example, you'll see how to enable the auto complete function of TextBox Control in DataGridView's Cells.&lt;br /&gt;
&lt;br /&gt;
The web page is at:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.vb-tips.com/DataGridViewAutoComplete.aspx"&gt;http://www.vb-tips.com/DataGridViewAutoComplete.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Happy New Year to everybody and Happy Chinese Lunar Year to you all.&lt;br /&gt;
&lt;br /&gt;
--#--&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-5292669153783904937?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/KApFOpbU28c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/5292669153783904937/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=5292669153783904937" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/5292669153783904937?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/5292669153783904937?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/KApFOpbU28c/how-to-eable-autocomplete-function-of.html" title="How to Enable AutoComplete function of DataGridView" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2012/01/how-to-eable-autocomplete-function-of.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcDQX0yeCp7ImA9WhRXFUk.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-2894491394280169071</id><published>2011-12-19T13:25:00.002+08:00</published><updated>2011-12-22T16:21:10.390+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-22T16:21:10.390+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="partition program" /><category scheme="http://www.blogger.com/atom/ns#" term="partition tool" /><category scheme="http://www.blogger.com/atom/ns#" term="hard disk partition program" /><category scheme="http://www.blogger.com/atom/ns#" term="diskpart" /><category scheme="http://www.blogger.com/atom/ns#" term="diskpart.exe" /><category scheme="http://www.blogger.com/atom/ns#" term="disk partition program" /><title>Introduction to DiskPart.exe—A Hard Disk Partition Tool and .vhd File Mounter</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/iYa5UaLWcQK9Y0nz0vpJqzatDng/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iYa5UaLWcQK9Y0nz0vpJqzatDng/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/iYa5UaLWcQK9Y0nz0vpJqzatDng/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iYa5UaLWcQK9Y0nz0vpJqzatDng/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;DiskPart.exe is a command-line executable file that is included in Windows Vista/Windows 7&amp;nbsp;Installation&amp;nbsp;DVD. &amp;nbsp; Although its style is commnad line oriented but this tool is quite useful when you have no any other way to do things using other tools, such as partitioning the hard drive or mounting the .VHD file when you need to read or write files stored in the Virtual Hard Disk(VHD) file.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
Let's get started now. Below are the booting process screen shots.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-_ywKdfdMigI/Tu6tBkhWu6I/AAAAAAAAAkM/zbrArT9LVk4/s1600/DiskPart01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="258" src="http://3.bp.blogspot.com/-_ywKdfdMigI/Tu6tBkhWu6I/AAAAAAAAAkM/zbrArT9LVk4/s320/DiskPart01.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
Pic. 1. Booting Windows 7&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-575pwkHDFLY/Tu6tC5MBujI/AAAAAAAAAkU/ukYB2gkrFGU/s1600/DiskPart02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://1.bp.blogspot.com/-575pwkHDFLY/Tu6tC5MBujI/AAAAAAAAAkU/ukYB2gkrFGU/s320/DiskPart02.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
Pic. 2.&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
In the Pic. 3., please click the Repair Your Computer.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-n1X8Ou-cydI/Tu6tETyDQYI/AAAAAAAAAkc/Zs1w0u9H_vw/s1600/DiskPart03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://1.bp.blogspot.com/-n1X8Ou-cydI/Tu6tETyDQYI/AAAAAAAAAkc/Zs1w0u9H_vw/s320/DiskPart03.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
Pic. 3.&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-NqXmOA6MqEY/Tu6tNvWUl_I/AAAAAAAAAkk/LHu6b_8BdoE/s1600/DiskPart04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://1.bp.blogspot.com/-NqXmOA6MqEY/Tu6tNvWUl_I/AAAAAAAAAkk/LHu6b_8BdoE/s320/DiskPart04.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
Pic. 4.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 4., please select the first radio button(Use Recovery Tools...).&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-9j9UtAzMGDE/Tu6tOomHm6I/AAAAAAAAAks/J1EejBl6sLs/s1600/DiskPart05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://2.bp.blogspot.com/-9j9UtAzMGDE/Tu6tOomHm6I/AAAAAAAAAks/J1EejBl6sLs/s320/DiskPart05.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 5.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 5., please click the Command Prompt.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-Gat4zT0Vxs0/Tu6tQNQ4S_I/AAAAAAAAAk0/1VnxcGXCB_g/s1600/DiskPart06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://2.bp.blogspot.com/-Gat4zT0Vxs0/Tu6tQNQ4S_I/AAAAAAAAAk0/1VnxcGXCB_g/s320/DiskPart06.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 6.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 6., please input "Diskpart" and press Enter.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-szhUzA4AY3s/Tu6tRL8ci2I/AAAAAAAAAk8/4eai5DZZE-c/s1600/DiskPart07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://4.bp.blogspot.com/-szhUzA4AY3s/Tu6tRL8ci2I/AAAAAAAAAk8/4eai5DZZE-c/s320/DiskPart07.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 7.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 7., please type "Help" to get a list of available commands in DiskPart Environment.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-aw7PngMuifs/Tu6tSgDn8MI/AAAAAAAAAlE/YK8zWLsqAt8/s1600/DiskPart08.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://3.bp.blogspot.com/-aw7PngMuifs/Tu6tSgDn8MI/AAAAAAAAAlE/YK8zWLsqAt8/s320/DiskPart08.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 8.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 8., you can see a list of commands.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-DbRFJ_Wf7mo/Tu6tT7PXOSI/AAAAAAAAAlM/R7NGNIL69ek/s1600/DiskPart09.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://2.bp.blogspot.com/-DbRFJ_Wf7mo/Tu6tT7PXOSI/AAAAAAAAAlM/R7NGNIL69ek/s320/DiskPart09.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 9.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 9., please input "List" to get a list of disk objects in diskpart environment.&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-AEYUUsrr34k/Tu6tUlt7uHI/AAAAAAAAAlU/s66dwf6-API/s1600/DiskPart10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://1.bp.blogspot.com/-AEYUUsrr34k/Tu6tUlt7uHI/AAAAAAAAAlU/s66dwf6-API/s320/DiskPart10.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
Pic. 10.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 10.,&amp;nbsp;please input "List Disk" and you'll see all of the available Hard Disks in your system.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-Or3saYqQrS8/Tu6tWOZKENI/AAAAAAAAAlc/lSSRd4_0B-E/s1600/DiskPart11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://2.bp.blogspot.com/-Or3saYqQrS8/Tu6tWOZKENI/AAAAAAAAAlc/lSSRd4_0B-E/s320/DiskPart11.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 11.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 11.,&amp;nbsp;please input "Select Disk 0" , which is indicating we are now targeting at the first Hard Disk. You will get response such as "Disk 0 is now the selected Disk.".&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-NAzS0WkCYGg/Tu6tXOYHkJI/AAAAAAAAAlk/5NUXok0Vy7E/s1600/DiskPart12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://3.bp.blogspot.com/-NAzS0WkCYGg/Tu6tXOYHkJI/AAAAAAAAAlk/5NUXok0Vy7E/s320/DiskPart12.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 12.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 12.,&amp;nbsp;please input "List Partition"&amp;nbsp;and this will list all of the partitions in the Hard Disk 0.&amp;nbsp;Now we get response such as "There are no partitions on this disk to show.".&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-kv8Zroo-GaA/Tu6tYWmU2lI/AAAAAAAAAls/h-o2QPHkp2s/s1600/DiskPart13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://2.bp.blogspot.com/-kv8Zroo-GaA/Tu6tYWmU2lI/AAAAAAAAAls/h-o2QPHkp2s/s320/DiskPart13.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
Pic. 13.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 13.,&amp;nbsp;please input "Help Create Partition Primary"&amp;nbsp;and this will show the help information regarding the primary partition creation.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-rZNDQUNEdKo/Tu6tZmqT6ZI/AAAAAAAAAl0/6wrwtJ4_NEo/s1600/DiskPart14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://2.bp.blogspot.com/-rZNDQUNEdKo/Tu6tZmqT6ZI/AAAAAAAAAl0/6wrwtJ4_NEo/s320/DiskPart14.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 14.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 14.,&amp;nbsp;please input "Create Partition Primary Size=12100", which is indicating we'll create a new primary partition and its size is about 12.1 GB(12100 MB).&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-X7Vwu1GtuaQ/Tu6ta85GBBI/AAAAAAAAAl8/GOJHXwObDgE/s1600/DiskPart15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://4.bp.blogspot.com/-X7Vwu1GtuaQ/Tu6ta85GBBI/AAAAAAAAAl8/GOJHXwObDgE/s320/DiskPart15.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 15.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 15.,&amp;nbsp;please input "List Partition" again. You'll see now we get a brand-new primary partition 1.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-a2-i5JEn10w/Tu6tb4Ct3nI/AAAAAAAAAmE/LdSQokXpY5g/s1600/DiskPart16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://1.bp.blogspot.com/-a2-i5JEn10w/Tu6tb4Ct3nI/AAAAAAAAAmE/LdSQokXpY5g/s320/DiskPart16.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 16.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 16.,&amp;nbsp;&amp;nbsp;please input "Create Partition Primary Size=43100", which is indicating we'll create the 2nd new primary partition and its size is about 43.1 GB(43100 MB).&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-V5o2mYdglH0/Tu6tczlVUOI/AAAAAAAAAmM/TyAAMW5jc2Q/s1600/DiskPart17.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://4.bp.blogspot.com/-V5o2mYdglH0/Tu6tczlVUOI/AAAAAAAAAmM/TyAAMW5jc2Q/s320/DiskPart17.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
Pic. 17.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 17.,&amp;nbsp;&amp;nbsp;please input "List Partition" again. Now we got two primary partitions and the 2nd partition is being active.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-Dn1F6so2yx4/Tu6teKZrbsI/AAAAAAAAAmU/4oFKX0yhpJ8/s1600/DiskPart18.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://4.bp.blogspot.com/-Dn1F6so2yx4/Tu6teKZrbsI/AAAAAAAAAmU/4oFKX0yhpJ8/s320/DiskPart18.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 18.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 18.,&amp;nbsp;&amp;nbsp;please input "Select Partition 1", which is indicating we are now targeting at the 1st partition. And please input "Active". This will make the 1st partition being set as Active.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-hUoJLX993XQ/Tu6tfCWEfEI/AAAAAAAAAmc/xeX4TrbFh-M/s1600/DiskPart19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://3.bp.blogspot.com/-hUoJLX993XQ/Tu6tfCWEfEI/AAAAAAAAAmc/xeX4TrbFh-M/s320/DiskPart19.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 19.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 19.,&amp;nbsp;&amp;nbsp;please input "List Partition" again. Now the 1st partition is set as active.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-EOSCMZ2csp4/Tu6tgYVfrHI/AAAAAAAAAmk/uta4yqNsJpo/s1600/DiskPart20.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://3.bp.blogspot.com/-EOSCMZ2csp4/Tu6tgYVfrHI/AAAAAAAAAmk/uta4yqNsJpo/s320/DiskPart20.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 20.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 20.,&amp;nbsp;&amp;nbsp;please input "List Volume". We will get all of the Disk Volumes in the diskpart environment.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-GSRRZixVvAw/Tu6thuJPioI/AAAAAAAAAms/ENSvj_dawus/s1600/DiskPart21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://1.bp.blogspot.com/-GSRRZixVvAw/Tu6thuJPioI/AAAAAAAAAms/ENSvj_dawus/s320/DiskPart21.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 21.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 21.,&amp;nbsp;&amp;nbsp;please input "Select Volume 1", which is indicating we are now targeting at the just created partition(that is, the 1st partition of the 1st Hard Disk).&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-KBPP38MOZ7Y/Tu6ti8xUBQI/AAAAAAAAAm0/pIP7R3dFqJ8/s1600/DiskPart22.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://1.bp.blogspot.com/-KBPP38MOZ7Y/Tu6ti8xUBQI/AAAAAAAAAm0/pIP7R3dFqJ8/s320/DiskPart22.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 22.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 22.,&amp;nbsp;&amp;nbsp;please input "Help Format" to get the help information about the format command.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-VSUhyUmCMBo/Tu6tj9vnCTI/AAAAAAAAAm8/ZM1wAJqaLwg/s1600/DiskPart23.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://2.bp.blogspot.com/-VSUhyUmCMBo/Tu6tj9vnCTI/AAAAAAAAAm8/ZM1wAJqaLwg/s320/DiskPart23.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 23.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 23.,&amp;nbsp;&amp;nbsp;please input "Format Quick" or "Format Quick Compress". This will quickly format the targeted partition and the partition will be in compressed state(It depens on whether the Compress keyword is added or not".&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-zGXRNmyGzyc/Tu6tk5NYihI/AAAAAAAAAnA/1Y45djM3aS8/s1600/DiskPart24.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://1.bp.blogspot.com/-zGXRNmyGzyc/Tu6tk5NYihI/AAAAAAAAAnA/1Y45djM3aS8/s320/DiskPart24.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 24.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 24.,&amp;nbsp;&amp;nbsp;please input "List Volume" again. We now see the Volume 1 was formated as NTFS file system.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-OPzaobnxxJw/Tu6tl9LW0UI/AAAAAAAAAnM/pdfibc5Ea1Q/s1600/DiskPart25.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://1.bp.blogspot.com/-OPzaobnxxJw/Tu6tl9LW0UI/AAAAAAAAAnM/pdfibc5Ea1Q/s320/DiskPart25.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 25.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 25.,&amp;nbsp;&amp;nbsp;please input "Online Volume". This will make the targeted volume promote to online state.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-0NzmdWqKlkY/Tu6tnC-xbfI/AAAAAAAAAnU/pjQGgR7IHUI/s1600/DiskPart26.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://3.bp.blogspot.com/-0NzmdWqKlkY/Tu6tnC-xbfI/AAAAAAAAAnU/pjQGgR7IHUI/s320/DiskPart26.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 26.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 26., Please ignore this picture.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-zeZ-YeFGElI/Tu6toXJ-kAI/AAAAAAAAAnc/B5xwA_l3RqQ/s1600/DiskPart27.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://3.bp.blogspot.com/-zeZ-YeFGElI/Tu6toXJ-kAI/AAAAAAAAAnc/B5xwA_l3RqQ/s320/DiskPart27.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 27.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 27.,&amp;nbsp;&amp;nbsp;please input "Assign" or "Assign Letter=C". This will assign a drive letter such as C: to the targeted volume.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-A3_krADEa2I/Tu6tpR_b7nI/AAAAAAAAAnk/1tr2I5zF1oQ/s1600/DiskPart28.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://3.bp.blogspot.com/-A3_krADEa2I/Tu6tpR_b7nI/AAAAAAAAAnk/1tr2I5zF1oQ/s320/DiskPart28.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 28.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 28.,&amp;nbsp;&amp;nbsp;please input "List Volume" again. You'll see the Volume 1 got Drive Letter C.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-P8VdfUp2Nv0/Tu6tqUqjjXI/AAAAAAAAAns/aQ_ho1rkaq4/s1600/DiskPart29.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="http://4.bp.blogspot.com/-P8VdfUp2Nv0/Tu6tqUqjjXI/AAAAAAAAAns/aQ_ho1rkaq4/s320/DiskPart29.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Pic. 29.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In the Pic. 29.,&amp;nbsp;&amp;nbsp;please input "Exit" to quit the diskpart environment.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Conclusion&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In addition, we have not mentioned the part about mounting the .vhd file in the diskpart.exe program. I'll write another article to describe it.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&amp;nbsp;See you soon.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
--#--&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-2894491394280169071?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/atwL4FGxYck" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/2894491394280169071/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=2894491394280169071" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/2894491394280169071?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/2894491394280169071?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/atwL4FGxYck/introduction-to-diskpartexea-hardi-disk.html" title="Introduction to DiskPart.exe—A Hard Disk Partition Tool and .vhd File Mounter" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-_ywKdfdMigI/Tu6tBkhWu6I/AAAAAAAAAkM/zbrArT9LVk4/s72-c/DiskPart01.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/12/introduction-to-diskpartexea-hardi-disk.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8FQHg4eSp7ImA9WhRRFkk.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-2144622798953491031</id><published>2011-11-30T13:14:00.001+08:00</published><updated>2011-11-30T16:13:31.631+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-30T16:13:31.631+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="vista dvd" /><category scheme="http://www.blogger.com/atom/ns#" term="can't boot from vista dvd" /><category scheme="http://www.blogger.com/atom/ns#" term="win 7 dvd" /><category scheme="http://www.blogger.com/atom/ns#" term="can't boot from win 7 dvd" /><title>Cannot boot from Vista or Win 7 DVD?</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/N77mpP2F-Bo3l08C4pYqudYc-UM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N77mpP2F-Bo3l08C4pYqudYc-UM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/N77mpP2F-Bo3l08C4pYqudYc-UM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N77mpP2F-Bo3l08C4pYqudYc-UM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Please refer to this article on my site:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://soho-hsh.blogspot.com/2011/11/stop-0x4000008a-of-blue-screen-of-death.html"&gt;STOP 0x4000008A of Blue Screen of Death VIDEOPRT.sys&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
--#--&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-2144622798953491031?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/A4J9uBINj64" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/2144622798953491031/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=2144622798953491031" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/2144622798953491031?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/2144622798953491031?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/A4J9uBINj64/cannot-boot-from-vista-or-win-7-dvd.html" title="Cannot boot from Vista or Win 7 DVD?" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/11/cannot-boot-from-vista-or-win-7-dvd.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QESXc-eSp7ImA9WhRRFk4.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-4520745037623128134</id><published>2011-11-30T12:45:00.001+08:00</published><updated>2011-11-30T15:48:28.951+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-30T15:48:28.951+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="STOP 0x4000008A" /><category scheme="http://www.blogger.com/atom/ns#" term="can't boot from VISTA or Win 7 DVD" /><category scheme="http://www.blogger.com/atom/ns#" term="can't install Windows XP" /><category scheme="http://www.blogger.com/atom/ns#" term="VIDEOPRT.sys error" /><title>STOP 0x4000008A of Blue Screen of Death VIDEOPRT.sys</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/I8BjtJNUMNpym8N5TtaSWKXP7LI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/I8BjtJNUMNpym8N5TtaSWKXP7LI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/I8BjtJNUMNpym8N5TtaSWKXP7LI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/I8BjtJNUMNpym8N5TtaSWKXP7LI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Well, three days ago one of my neighbors gave me an old pentium 4 PC. Surely I had to reinstall it with my own purchased version of Windows. I chose to install Windows Vista. I started out with booting from CDROM. It booted ok and copied all of the files that were needed while installing. But after rebooted, the screen went blank without any message shown. I had no patient to wait till it showed out error messages. I reseted the PC and started over the installation. But this time it wouldn't boot from my Vista DVD. I had tried many of the following procedures:&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
1. Booted from MSDOS disk and tried to re-partition the hard disk. But I couldn't get into the FDisk.exe or spfdisk.exe(one partition tool made in Taiwan).&lt;br /&gt;
&lt;br /&gt;
2. Later on, I attached it on another machine and deleted all of the partitions on the hard disk . And re-attached it to the original PC. And tried to get into spfdisk.exe. And it worked. I then re-partitioned the hard disk and rebooted. And then tried to boot into MSDOS again and lauched the fdisk.exe once more. But it still failed to be lauched.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;3. This time I chose to install Windows XP. It booted from DVD-ROM smoothly and had copied all of the files that were needed while installing. But after copying of files was finished and the old PC had rebooted, it still went blank and gave me this Blue Screen of Death showed message below:

STOP 0x4000008A

VIDEOPRT.sys Address xxxxxx base at xxxxxxx DataStamp xxxxxx.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;I then consulted the google and in MS documents it said it was related to the NVIDIA display driver problem. And it has been fixed in the XP Service Pack3.

Well, right at the beginning, I had noticed of the screen got dotted vertical red line on the screen. So I relaced the AGP card in the old PC with a good one that is functioning well. And then I tried to boot from Vista DVD. Oh yea? It can boot from Vista DVD. So I have installed the Vista all the way untill it succceeded.&lt;br /&gt;
&lt;br /&gt;
Problem:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;1. We can't install Windows XP and got blue screen of death showing STOP 0x4000008A VIDEOPRT.sys driver problem.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;2. we can't boot from Vista or Win 7 DVD from our DVD-ROM.

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
Relacing the Graphics Card(formerly known as VGA card or AGP card) with a good one.&lt;br /&gt;
&lt;br /&gt;
--#--&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-4520745037623128134?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/XLcx7nUHg5w" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/4520745037623128134/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=4520745037623128134" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/4520745037623128134?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/4520745037623128134?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/XLcx7nUHg5w/stop-0x4000008a-of-blue-screen-of-death.html" title="STOP 0x4000008A of Blue Screen of Death VIDEOPRT.sys" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/11/stop-0x4000008a-of-blue-screen-of-death.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MFR30yeCp7ImA9WhRSEk4.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-180084557718209200</id><published>2011-11-14T09:36:00.001+08:00</published><updated>2011-11-14T09:50:16.390+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-14T09:50:16.390+08:00</app:edited><title>Calling Win32 API in VB6 or VB.NET</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/UvNn1H0YpsNXypOJ-l0vmkDLLxk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UvNn1H0YpsNXypOJ-l0vmkDLLxk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/UvNn1H0YpsNXypOJ-l0vmkDLLxk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UvNn1H0YpsNXypOJ-l0vmkDLLxk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Generally speaking, we can use Win32 API in VB6 or in VB.NET with a Delcare keyword such as the following:&lt;br /&gt;
&lt;div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
Declare Auto Function MBox Lib "user32.dll" Alias "MessageBox" ( _ ByVal hWnd As Integer, _ ByVal txt As String, _ ByVal caption As String, _ ByVal Typ As Integer) _ As Integer&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
I just omitted the details about how to use the Win32 API in VB program. You can refer to this page at the url(about how to use Win32 API directly in VB6/VB.NET).&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="font-family: Consolas, Courier, monospace; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left; word-break: break-all; word-wrap: break-word;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/172wfck9(v=vs.80).aspx"&gt;http://msdn.microsoft.com/en-us/library/172wfck9(v=vs.80).aspx&lt;/a&gt;&lt;/pre&gt;
&lt;pre style="font-family: Consolas, Courier, monospace; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left; word-break: break-all; word-wrap: break-word;"&gt;&lt;/pre&gt;
The point is how to know the correct Declare Syntax for each and every win32 API so that we can use them in our Visual Basic program. Here I found a tool called win32api.exe which it will show you how to declare Win32 API in your VB program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download url at:&lt;br /&gt;
&lt;pre style="overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;span class="Apple-style-span" style="font-family: Consolas, Courier, monospace;"&gt;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=12427"&gt;http://www.microsoft.com/download/en/details.aspx?id=12427&lt;/a&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left; word-break: break-all; word-wrap: break-word;"&gt;&lt;/pre&gt;
Have fun with it.&lt;br /&gt;
--#--&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-180084557718209200?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/nJoe8gVFlcQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/180084557718209200/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=180084557718209200" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/180084557718209200?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/180084557718209200?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/nJoe8gVFlcQ/calling-win32-api-in-vb6-or-vbnet.html" title="Calling Win32 API in VB6 or VB.NET" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/11/calling-win32-api-in-vb6-or-vbnet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMBSX44cSp7ImA9WhRTE0w.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-6861248883330205714</id><published>2011-11-03T17:44:00.000+08:00</published><updated>2011-11-03T17:44:18.039+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-03T17:44:18.039+08:00</app:edited><title>Windows Server 2000/2003 File Backup Type</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/sQSy3HgdmlLamlKph-xzuYlnz-s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sQSy3HgdmlLamlKph-xzuYlnz-s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/sQSy3HgdmlLamlKph-xzuYlnz-s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sQSy3HgdmlLamlKph-xzuYlnz-s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Well, to keep it a snapshot note here. I decide to write down the Windows Server 2000/2003 File Backup Type short tutorial here.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
In Windows Server 2000/2003, please select the System Administration Tools-&amp;gt;Windows Server Backup item. To make the story short, I'll just writed down the most essential part of those file backup types.&lt;br /&gt;
&lt;br /&gt;
Below are file backup types that windows server supports:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Normal Backup&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;This type of backup could also be regarded as a system full backup in general. Note here: it will clear the archive bit of files. So if you have just finished the normal backup and you immediately do normal backup again, files won't be backup again. Note: All selected files and folders that have archive bit being set are backed up.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Differential Backup&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;This type of backup would search for those files with archive bit being set and backup all of these files. Note here: this type of backup will not clear the archive bit of files. So if you do backing up the same files in a row, it will backup those files again to the backup media such as tape or hard disk. The MSDN says this type of backup will backup files that have been changed since the last normal backup or incremental backup.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Incremental Backup&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;This type of backup basically is the same as Differential Backup except the fact that it will clear the archive bit of backed up files.&amp;nbsp;The MSDN says this type of backup will backup files that have been changed since the last normal backup or incremental backup.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Copy Backup&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;This type of backup is just like taking a snapshot copy of the fiull system in a time point. But it will not clear the archive bit of files. So this type of backup is only needed for some circumstances. And it will not affect the next backup such as Normal, Differential or Incremental backup because of the archive bit of those files are not cleared. All Selected files and folders will be backed up.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Daily Backup&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;All files that have been changed during the whole day will be backed up. It will not clear the archive bit of files that have been backed up.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;div&gt;
To summary all fo these text, the key point is whether or not the archive bit is cleared. The Copy Backup and Daily Backup and Differential Backup won't clear the archive bit of files. That is the important point. So consider some&amp;nbsp;scenarios&amp;nbsp;as follows:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;On Monday, we do Normal Backup and do Differential backup on Tuesday through Friday. If the system failed on Saturday, we have to take out the Normal Backup on Monday and the Differential Backup on Friday to restore the data to the time point on Friday.&lt;/li&gt;
&lt;li&gt;On Monday, we do Normal Backup and do Incremental backup on Tuesday through Friday. If the&amp;nbsp;system failed on Saturday, we have to take out the Normal Backup on Monday and the Incremental Backup on Tuesday,&amp;nbsp;Incremental Backup on Wednesday,&amp;nbsp;Incremental Backup on Thursday,&amp;nbsp;Incremental Backup on Friday&amp;nbsp; to restore the data to the time point on Friday.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
In Scenario 1, we do Differential Backup on Tuesday through Friday. On each day of Tuesday through Friday, the system will backup all files that have been changed since Monday. So on Tuesday through Friday, there are some files that have been backed up several times. This will cost lots of backup time.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In Scenario 2, we do Incremental Backup on Tuesday through Fridy. On Tuesday, the system will only backup files that have been changed since Monday.&amp;nbsp;On Wednesday, the system will only backup files that have been changed since Tuesday,&amp;nbsp;On Thursday, the system will only backup files that have been changed since Wednesday,&amp;nbsp;On Friday, the system will only backup files that have been changed since Thursday. This will reduce the backup time.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To compare the Differential and Incremental Backup Type, the Incremental Backup will spend less time and disk space to back up files but will spend more time to restore. Whereas the Differential Backup will spend more time to back up files and its benefit is we don't have to find lots of separate backup tapes which have the incremental backup files.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
--#--&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-6861248883330205714?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/Jw14HfSELcc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/6861248883330205714/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=6861248883330205714" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/6861248883330205714?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/6861248883330205714?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/Jw14HfSELcc/windows-server-20002003-file-backup.html" title="Windows Server 2000/2003 File Backup Type" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/11/windows-server-20002003-file-backup.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQGQnw8eCp7ImA9WhRTEkw.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-2673849290504733446</id><published>2011-11-02T14:08:00.000+08:00</published><updated>2011-11-02T14:12:03.270+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-02T14:12:03.270+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Windows Startup problem" /><category scheme="http://www.blogger.com/atom/ns#" term="NTLDR Missing" /><title>Windows Vista/7 Startup Problem! Possible Solutions!</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/W8vaXOO4DF5rOtiveRyRRf0ltog/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/W8vaXOO4DF5rOtiveRyRRf0ltog/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/W8vaXOO4DF5rOtiveRyRRf0ltog/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/W8vaXOO4DF5rOtiveRyRRf0ltog/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Actually, in my opinion, some of the tools that are included in the Windows Vista or Windows 7 installation DVD are of very great use. To name a few, diskpart.exe(Disk Partition Management Tool) ,bootrec.exe, and the bcdedit.exe.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
To fix up your Windows Vista or Windows 7 Startup problem, such as the NTLDR doesn't exist problem or something like that, well, we can use these included tools to help maintain our Windows Vista or Windows 7.&lt;br /&gt;
&lt;br /&gt;
To fix up Windows Startup problem:&lt;br /&gt;
&lt;br /&gt;
1. Boot up from your Windows Vista/7 installation DVD.&lt;br /&gt;
2. Click Next.&lt;br /&gt;
3. Select Repair your computer.&lt;br /&gt;
4. Select Use Recovery Tools that can help fix problems starting windows.&lt;br /&gt;
5. Select the OS that is listed below the text which you want to repair.&lt;br /&gt;
6. Click Next.&lt;br /&gt;
7. Click Startup Repair.&lt;br /&gt;
&lt;br /&gt;
The above method will automatically repair your Windows Startup problem. After it finishes, click Restart to reboot your machine.&lt;br /&gt;
&lt;br /&gt;
If the problem persists, please try the following method:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Boot up from your Windows Vista/7 installation DVD.&lt;br /&gt;
2. Click Next.&lt;br /&gt;
3. Select Repair your computer.&lt;br /&gt;
4. Select Use Recovery Tools that can help fix problems starting windows.&lt;br /&gt;
5. Select the OS that is listed below the text which you want to repair.&lt;br /&gt;
6. Click Next.&lt;br /&gt;
7. Click Command prompt.&lt;br /&gt;
&lt;br /&gt;
At the commnad prompt, try to type the following command sequentially.&lt;br /&gt;
&lt;br /&gt;
X:\Sources&amp;gt;bootrec /fixmbr&lt;br /&gt;
&lt;br /&gt;
If it shows The Operation Completed Successfully, then type the 2nd command.&lt;br /&gt;
&lt;br /&gt;
X:\Sources&amp;gt;bootrec /fixboot&lt;br /&gt;
&lt;br /&gt;
Then close the command prompt window to return to the Recovery Tools List, and then click Restart.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-2673849290504733446?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/FPsb6uAewhE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/2673849290504733446/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=2673849290504733446" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/2673849290504733446?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/2673849290504733446?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/FPsb6uAewhE/windows-vista7-startup-problem.html" title="Windows Vista/7 Startup Problem! Possible Solutions!" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/11/windows-vista7-startup-problem.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUMQ3cyeSp7ImA9WhRTEkw.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-6901571504530890740</id><published>2011-11-02T12:06:00.000+08:00</published><updated>2011-11-02T14:11:22.991+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-02T14:11:22.991+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Promote Domain Controller" /><category scheme="http://www.blogger.com/atom/ns#" term="promote a Windows Server 2003" /><category scheme="http://www.blogger.com/atom/ns#" term="dcpromo.exe" /><category scheme="http://www.blogger.com/atom/ns#" term="promote a Windows Server 2008" /><title>Promoting a Windows Server 2003/2008 to a AD Domain Contoller Failed!</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ODUzGyRU9vwtyutW38Ilm2nbV1o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ODUzGyRU9vwtyutW38Ilm2nbV1o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ODUzGyRU9vwtyutW38Ilm2nbV1o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ODUzGyRU9vwtyutW38Ilm2nbV1o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;While I was trying to promtoe a Windows Server 2008 with AD DS installed to a AD Domain Controller, I encountered the following problem:&lt;br /&gt;
&lt;br /&gt;
An error occurred when DNS was queried for the service location (SRV) resource record used to locate an Active Directory Domain Controller (AD DC) for domain "xxxDomainName.com".&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The Erroe is:&amp;nbsp;DNS name does not exist. The query was for the SRV record for _ldap._tcp.dc._msdcs.xxxDomainName.com&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Common causes of this error include the following: - The DNS SRV records required to locate a AD DC for the domain are not registered in DNS. These records are registered with a DNS server automatically when a AD DC is added to a domain. They are updated by the AD DC at set intervals. This computer is configured to use DNS servers with the following IP addresses:&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;127.0.0.1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;168.95.1.1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-US"&gt;10.0.0.1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
One or more of the following zones do not include delegation to its child zone: "zoneName" For information about correcting this problem, click Help.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The above Error Info gives us a hint for the reason that possibly caused the error. So I have tried the following procedure.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
1. Ping the AD DC Server IP Address.&lt;/div&gt;
&lt;div&gt;
2. Ping the AD DC Server FQDN(Fully Qualified Domain Name).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
1 and 2 are both successful.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Alternatively, if you want to make sure your DNS Service on the AD DC Server work as you expect, you can type the following commnad in the command prompt:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
C:\&amp;gt;telnet 10.0.0.1 53&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
While 10.0.0.1 is your AD DC Server IP address, the number 53 is the DNS communication port. If you got no any errors, then the DNS functions correctly. This step is also passed.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Well, I have no any idea how to do other things. So I have consulted the Internet. I got the conclusion below:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In the to-be Domain Controller Windows Server 2003, its primary DNS IP must be set to the IP address of the AD DC Server and the secondary DNS IP can be set to the public (Your DNS IP that ISP has given you) DNS IP.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This is the most important reason that I have failed this task. But it is very weird that I still failed the task. I have ensure the primary and secondary DNS IP being set correctly. So I typed the command in the commnad prompt:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
C:\&amp;gt;ipconfig/all&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In the DNS section of the list, it listed a very weird item at the first line of dns server ip.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
DNS Server......................... ::1&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ..........................10.0.0.1&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ..........................168.95.1.1&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In the ipconfig/all long listing, it also listed IPv6 address. So I went to check out the IPv6 settings and found that its primary DNS has been set to ::1&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I reset the DNS IP to "Acquire DNS IP automatically" in the IPv6 Setting.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I exmined the ipconfig/all again. This time, the first DNS IP is 10.0.0.1.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
And I tried to use "dcpromo.exe" to promote my Windows Server 2003/2008.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
It finally worked. And successfully made it as one of the AD Domain Controllers.&lt;/div&gt;
&lt;div&gt;
&lt;br /&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;
See Also:&lt;/div&gt;
&lt;div&gt;
&lt;a href="http://www.google.com.tw/url?sa=t&amp;amp;rct=j&amp;amp;q=Verify%2BDNS%2Bregistration%2Bfor%2Bdomain%2Bcontrollers%2Busing%2Bthe%2Bnslookup%2Bcommand&amp;amp;source=web&amp;amp;cd=2&amp;amp;ved=0CCcQFjAB&amp;amp;url=http%3A%2F%2Ftechnet.microsoft.com%2Fen-us%2Flibrary%2Fcc738991(v%3Dws.10).aspx&amp;amp;ei=g76wTtacFMrDmQWspI2UAg&amp;amp;usg=AFQjCNExZ2HAPlugPW7O851itFLDu3fOCw&amp;amp;sig2=Yjc4y8YhCjr8C6wyOV_cNg"&gt;Verify DNS Registration for Domain Controllers Using the nslookup Command&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
--#--&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-6901571504530890740?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/RfhWU_WXmIU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/6901571504530890740/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=6901571504530890740" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/6901571504530890740?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/6901571504530890740?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/RfhWU_WXmIU/adding-windows-server-20032008-to-ad.html" title="Promoting a Windows Server 2003/2008 to a AD Domain Contoller Failed!" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/11/adding-windows-server-20032008-to-ad.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAFRnc7fip7ImA9WhRTEEk.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-3583520726048167546</id><published>2011-10-31T11:03:00.006+08:00</published><updated>2011-10-31T14:31:57.906+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-31T14:31:57.906+08:00</app:edited><title>免費的MD5和SHA1碼檢查工具</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/sidYZizVbnEkvOHf5NUbdLNgUrA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sidYZizVbnEkvOHf5NUbdLNgUrA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/sidYZizVbnEkvOHf5NUbdLNgUrA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sidYZizVbnEkvOHf5NUbdLNgUrA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;微軟有一個免費的工具軟體可以用算出檔案(比如 .iso file)的MD5和SHA1碼的工具，名稱叫做 File Checksum Integrity Verifier(FCIV)，我們一般在下載完１ＧＢ以上的大檔時，為了驗證檔案的內容傳輸無誤或是為了確保軟體沒有在下載過程中被竄改，都會去比對檔案的完整性和正確性，這是一個防毒防駭的不可或缺工具，可是你會問，如果連下載回來的ＦＣＩＶ都不正確怎麼辦？你可以在下載回來的 .EXE檔上按滑鼠右鍵，然後選內容，檢查看看有沒有數位簽章頁次，有就點它，看看數位簽章簽署人是不是 Microsoft，還有注意一下它的日期，如果你的ＦＣＩＶ下載檔案連數位簽章頁次都看不到，那八成是遭到竄改的，千萬不要安裝。&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
除此之外，你的 Windows 7 or Windows Vista的 UAC(User Account Control) 最好打開，因為它會在安裝軟體時為您把關，並秀出該安裝內的數位簽章以保證檔案的完整性無誤，如果是沒有數位簽章的軟體，在安裝時ＵＡＣ會秀出黃色背景或紅色背景的詢問對話窗，為了保險起見，最好不要冒然安裝。&lt;br /&gt;
&lt;br /&gt;
另外，在驗證完ＭＤ５和ＳＨＡ１碼無誤之後，如果是ＩＳＯ檔，一般我們可能會將它燒成光碟，然後再安裝，其實在燒成光碟過程中也有可能發生資料讀取及寫入錯誤，而燒錄軟體沒有覺察到，此時我們可以再用一個微軟工具軟體，名稱叫做 crc305.exe，可以用來驗證燒好的光碟的MD5是否仍然不變(其實是得到一個CRC碼，所以最好有檔案的ＭＤ５和ＳＨＡ１以及ＣＲＣ碼)，這樣一來，再去安裝您的軟體，就可以確保軟體的正確性了。&lt;br /&gt;
&lt;br /&gt;
FCIV Download URL:&lt;br /&gt;
&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=11533"&gt;http://www.microsoft.com/download/en/details.aspx?id=11533&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
--#--&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-3583520726048167546?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/yRJD37gzNSI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/3583520726048167546/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=3583520726048167546" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/3583520726048167546?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/3583520726048167546?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/yRJD37gzNSI/md5sha1.html" title="免費的MD5和SHA1碼檢查工具" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/10/md5sha1.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYBQ3czeyp7ImA9WhRTEU8.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-1797654468028329372</id><published>2011-10-30T17:17:00.000+08:00</published><updated>2011-11-01T13:09:12.983+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-01T13:09:12.983+08:00</app:edited><title>微軟認證介紹單元 1 -- MCITP</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/N8fyTK-eGoho1QP7y9AtyKHtzZc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N8fyTK-eGoho1QP7y9AtyKHtzZc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/N8fyTK-eGoho1QP7y9AtyKHtzZc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N8fyTK-eGoho1QP7y9AtyKHtzZc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;來看看微軟的官方說法：&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;MCITP Overview&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The Microsoft Certified IT Professional (MCITP) certification helps validate that an individual has the comprehensive set of skills necessary to perform a particular job role, such as database administrator or enterprise messaging administrator. MCITP certifications build on the technical proficiency measured in the Microsoft Certified Technology Specialist (MCTS) certifications. Therefore, you will earn one or more MCTS certifications on your way to earning an MCITP certification.&lt;br /&gt;
&lt;br /&gt;
The above text is quoted from the url:&lt;br /&gt;
&lt;a href="https://www.microsoft.com/learning/en/us/certification/mcitp.aspx"&gt;https://www.microsoft.com/learning/en/us/certification/mcitp.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
MCITP是 Microsoft Certified IT Professional 的縮寫，中文直譯為微軟認證的ＩＴ專業人員，ＩＴ當然是指 Information Technology，MCITP的取得必須先取得多科的MCTS認證，MCTS是指 Microsoft Certified Technology Specialist，中文直譯為微軟認證的技術專家，基本上只要通過微軟的任一科認證考試，就可以取得MCTS的頭銜，過了一科『認證』的考試，就是MCTS，但是要總共要通過好幾科的認證考試，才能成為 MCITP，其中可以選擇的認證科目如下網址所示：&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Microsoft Certified IT Professional (MCITP)&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://www.microsoft.com/learning/en/us/certification/mcitp.aspx#tab2"&gt;https://www.microsoft.com/learning/en/us/certification/mcitp.aspx#tab2&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
成為MCITP你可以選擇全部都學Windows Server 2008 or Windows Server 2008 R2的技術以及一科Windows 7 or Windows Vista的認證考試，這是其中一種達成 MCITP 的路徑，這是指成為企業管理員的工作角色，你也可以選擇成為 SQL Server 2008技術的MCITP，如下網址所示：&lt;br /&gt;
&lt;br /&gt;
1. Enterprise Administrator Job Role&lt;br /&gt;
&lt;a href="http://www.microsoft.com/learning/Career/en/us/jobs/ent-admin.aspx#cert-path"&gt;http://www.microsoft.com/learning/Career/en/us/jobs/ent-admin.aspx#cert-path&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
2. Database Administrator Job Role&lt;br /&gt;
&lt;a href="http://www.microsoft.com/learning/Career/en/us/jobs/data-admin.aspx#certification-paths"&gt;http://www.microsoft.com/learning/Career/en/us/jobs/data-admin.aspx#certification-paths&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
我們以Enterprise Administrator Job Role來看：&lt;br /&gt;
&lt;br /&gt;
我們看以上網頁最左邊的直欄，這是企業管理員的工作角色(Enterprise Administrator Job Role)，是其中一條成為 MCITP 的一條路徑。所以一條可行的考試路徑是完成 70-620, 70-640, 70-642, 70-643, 70-647 的認證考試。當然這是指你之前並非 Windows Server 2003的 MCSE。如果你已是Windows Server 2003 MCSE，請看最右邊直欄。如果你要取得 Windows Server 2003 MCSE，請看中間直欄。&lt;br /&gt;
&lt;br /&gt;
你可以在MCITP的考試科目中看到也有列出 SQL Server 2008 的認證考試，詳情請看以上NO. 2的網址。&lt;br /&gt;
&lt;br /&gt;
--#--&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-1797654468028329372?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/H84Po1-1YVU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/1797654468028329372/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=1797654468028329372" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/1797654468028329372?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/1797654468028329372?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/H84Po1-1YVU/1-mcitp.html" title="微軟認證介紹單元 1 -- MCITP" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/10/1-mcitp.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUEMRH89fyp7ImA9WhdaF0o.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-848471541016112951</id><published>2011-10-28T11:48:00.001+08:00</published><updated>2011-10-28T11:48:05.167+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-28T11:48:05.167+08:00</app:edited><title>Windows Vista with SP2 and ZoneAlarm Pro 2012 Compatibility Issue!</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mFd6QdzIwGrYK45akiDRpvnde6E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mFd6QdzIwGrYK45akiDRpvnde6E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mFd6QdzIwGrYK45akiDRpvnde6E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mFd6QdzIwGrYK45akiDRpvnde6E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;I installed Windows Vista with SP2 yesterday and later on I immediately installed ZoneAlarm Pro 2012 right after finishing install Windows Vista with SP2. But I found the two parties seems to have some compatibility issues between them. I have tried to reproduce the issue between them. I got the same result all the time.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
Finally, I tried to install the oldest Windows Vista version ( the one without any service pack) and after that, I installed ZoneAlarm Pro 2012 right away. This time it installed sucessfully without any warning or error code message box.&lt;br /&gt;
&lt;br /&gt;
So maybe the problem reside in the Windows Vista with SP2 is brand-new and ZoneAlarm Pro 2012 still uses the old version of Windows Vista to work its way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--#--&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-848471541016112951?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/sQDG441AYk4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/848471541016112951/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=848471541016112951" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/848471541016112951?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/848471541016112951?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/sQDG441AYk4/windows-vista-with-sp2-and-zonealarm.html" title="Windows Vista with SP2 and ZoneAlarm Pro 2012 Compatibility Issue!" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/10/windows-vista-with-sp2-and-zonealarm.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUGQHc-fCp7ImA9WhdaFk8.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-6980203506062626240</id><published>2011-10-26T16:48:00.001+08:00</published><updated>2011-10-26T17:10:21.954+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-26T17:10:21.954+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="studying method" /><category scheme="http://www.blogger.com/atom/ns#" term="learning technique" /><category scheme="http://www.blogger.com/atom/ns#" term="learning method" /><category scheme="http://www.blogger.com/atom/ns#" term="studying tips" /><title>Learning Method Techniques and Tips for Students.</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gKCH_UdV1GuhmOgtTa3BnKnhTSI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gKCH_UdV1GuhmOgtTa3BnKnhTSI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gKCH_UdV1GuhmOgtTa3BnKnhTSI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gKCH_UdV1GuhmOgtTa3BnKnhTSI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;
First of all, choose the right time and place. The best time to study is in the morning after you get up from the bed and have finished the breakfast. And the right place. The place is where you feel comfortable such as there is bright light that makes you see more clearer and the place should be in good ventilation.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The second term of conditon is your health must be in good condtion while you are studying. If you feel sleepy, dropping down the study and go ahead to sleep. You can take a nap on the desk for 10-30 minutes or so. If you are too tired to study, don't hesitate and go directly to your bed as soon as possible. So staying fit is an inevitable condtion that maybe helps you study more effectivly and efficiently.&lt;br /&gt;
The above mentioned terms are the prerequisites that should be ready before you start to study.&lt;br /&gt;
&lt;br /&gt;
The Steps and Tips are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Inpire your learning desire.&lt;br /&gt;
2. Pick a topic or point that you want to know.&lt;br /&gt;
3. Focus on that point and study.&lt;br /&gt;
4. Trying to remember the keywords rargdings the points.&lt;br /&gt;
5. Trying to get acquainted with the keywords(terminologies) in detail.&lt;br /&gt;
6. Trying to explain the just learned terminology in your own words and tone. Remember to close the book or &amp;nbsp;not to access the studying material before you start to explain.&lt;br /&gt;
&lt;br /&gt;
Well, just to sharing my studying and learning method with you. &amp;nbsp;Hope you will enjoy it. I will make any additions whenever I think of new tips or techniques. So don't forget to come back to my site often. I am always welcome you back to my site.&lt;br /&gt;
&lt;br /&gt;
--#--&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-6980203506062626240?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/qvOCVVJqTXs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/6980203506062626240/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=6980203506062626240" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/6980203506062626240?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/6980203506062626240?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/qvOCVVJqTXs/learning-method-techniques-and-tips-for.html" title="Learning Method Techniques and Tips for Students." /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/10/learning-method-techniques-and-tips-for.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8DSX49fip7ImA9WhdaEUg.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-8522497849677772011</id><published>2011-10-21T08:26:00.001+08:00</published><updated>2011-10-21T08:27:58.066+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-21T08:27:58.066+08:00</app:edited><title>Windows Update KB2565057 failed! The possible solution!</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KRByQ9VAaRT1Qhla3qXk181uDSs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KRByQ9VAaRT1Qhla3qXk181uDSs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KRByQ9VAaRT1Qhla3qXk181uDSs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KRByQ9VAaRT1Qhla3qXk181uDSs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;
One of the possible reasons that hinders the installation of Windows Update is some services might be interferencing with your about to install Updates. So the possible solution is as follows:&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Click Start-&amp;gt;Run, Type in MSConfig.exe and press OK.&lt;/li&gt;
&lt;li&gt;At the General Page, Select the third radio button(Selective Boot).&lt;/li&gt;
&lt;li&gt;Select the Service Page, Press Disable All Button and then select DCOM Server Process Launcher and Remote Procedure Call(RPC) Locator and Remote Procedure Call(RPC) and your personal firewall service(it depends on what third party firewall &amp;nbsp;you are using).&lt;/li&gt;
&lt;li&gt;Press OK. And Restart the computer.&lt;/li&gt;
&lt;li&gt;Install the just donwloaded stand alone Update File.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
PS. This method indeed works! I have done it successfully. Hope you will install it smoothly too.&lt;br /&gt;
&lt;br /&gt;
See also:&lt;br /&gt;
&lt;a href="http://soho-hsh.blogspot.com/2011/10/windows-update-kb2468871-failed-msi.html"&gt;Windows Update KB2468871 failed! MSI returned 0x643! Possible solution!&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-8522497849677772011?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/GeVVopOIySk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/8522497849677772011/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=8522497849677772011" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/8522497849677772011?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/8522497849677772011?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/GeVVopOIySk/windows-update-kb2565057-failed.html" title="Windows Update KB2565057 failed! The possible solution!" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/10/windows-update-kb2565057-failed.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEBRH0zeip7ImA9WhdbGEs.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-3235231732961850204</id><published>2011-10-17T23:15:00.002+08:00</published><updated>2011-10-17T23:17:35.382+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-17T23:17:35.382+08:00</app:edited><title>如何更改C# 2010/VB 2010的目標.Net Framework?</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/94nhxbvMOrOQZ0UPFQMAPOYJXHI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/94nhxbvMOrOQZ0UPFQMAPOYJXHI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/94nhxbvMOrOQZ0UPFQMAPOYJXHI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/94nhxbvMOrOQZ0UPFQMAPOYJXHI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;如果您是從舊的.Net 2.0專案昇級上來VS 2010，由於相容的緣故，它會保留您的專案的目的.Net Framework為 2.0 版，如果想改用.Net 4.0 Framework，可以這麼做：&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;到方案總管中，找到您的專案名稱，在上面按滑鼠右鍵後選屬性。&lt;/li&gt;
&lt;li&gt;點選左邊的編譯，然後在右方的下方偏左一點有一個『進階編譯』，按它。&lt;/li&gt;
&lt;li&gt;你會在下方看到一個目標 Framework，請將它點選下拉，然後選 .Net Framework 4。&lt;/li&gt;
&lt;li&gt;按確定，大功告成。&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
當然您的專案如果有用到一些特殊的東西，您就自己想辦法自行解決。比如筆者在自己原本的 .Net 2.0 專案中有嵌入Manifest File，在我的專案屬性中有用到 MT.exe 去做嵌入Manifest File等的建置前、建置後的命令動作，而這一些命令是用相對路徑寫的，所以換到.Net 4.0後，這一些建置前後的執行命令就要自行修改路徑，當然可以依然用相對路徑去寫即可。可以參考這一篇：&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="background-color: #ced5db; color: #333333; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 16px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 class="post-name" style="clear: both; color: #3a3e43; font-family: 'Segoe UI Semibold', 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 1.75em; line-height: 26px; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="background-color: #ced5db; color: #333333; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 16px;"&gt;
&lt;a href="http://blogs.msdn.com/b/cheller/archive/2006/08/24/718757.aspx"&gt;How to embed a manifest in an assembly: let me count the ways...&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;span class="Apple-style-span" style="background-color: #ced5db; color: #333333; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 16px;"&gt;
&lt;div&gt;
如果您是用C# 2010，在進到專案屬性頁後，就可以直接在目標 Framework下拉選單中改了，比ＶＢ方便一點。&lt;/div&gt;
&lt;div&gt;
--#--&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-3235231732961850204?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/1Cc1VncLj6c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/3235231732961850204/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=3235231732961850204" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/3235231732961850204?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/3235231732961850204?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/1Cc1VncLj6c/vb-2010net-framework.html" title="如何更改C# 2010/VB 2010的目標.Net Framework?" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/10/vb-2010net-framework.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEACRn48cCp7ImA9WhdaFk8.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-656613886713166407</id><published>2011-10-16T21:11:00.002+08:00</published><updated>2011-10-26T18:59:27.078+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-26T18:59:27.078+08:00</app:edited><title>Windows Update KB2468871 failed! MSI returned 0x643! Possible solution!</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Tjb-Z9aNlmNNMdraUZNTmwPp4E8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Tjb-Z9aNlmNNMdraUZNTmwPp4E8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Tjb-Z9aNlmNNMdraUZNTmwPp4E8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Tjb-Z9aNlmNNMdraUZNTmwPp4E8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;This stand alone file&amp;nbsp;NDP40-KB2468871-v2-x86.exe "KB2468871" update failed!&lt;br /&gt;
The critical error code is "MSI returned 0x643" and in System Folder of the Event Viewer shows Event Id 20 Event returns Error Code 0x80070643.&lt;br /&gt;
&lt;br /&gt;
The possible solution is as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
1. Remove .Net Framework 4 (Or .Net Framework 4 Client Profile). And reinstall the "Redownloaded .Net Framework 4". Then go on Windows Update.&lt;br /&gt;
&lt;br /&gt;
2. If the above method can't resovle your problem, then go on to the "&lt;a href="http://soho-hsh.blogspot.com/2011/03/net-framework.html"&gt;How to fix your .Net Framework Section&lt;/a&gt;". But it is in Traditional Chinese. Sorry for inconvenience.&lt;br /&gt;
&lt;br /&gt;
3. Try &lt;a href="http://support.microsoft.com/fixit/"&gt;MS Fixit Solution Center&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
4. Follow the artcile "&lt;a href="http://soho-hsh.blogspot.com/2011/04/windows-update-error-code-80200053.html"&gt;Windows Update Error Code 80200053 Solved&lt;/a&gt;" solution. It may or may not resolve your problem.&lt;br /&gt;
&lt;br /&gt;
5. Download the NDP40-KB2468871-v2-x86.exe or&amp;nbsp;NDP40-KB2468871-v2-x64.exe or&amp;nbsp;NDP40-KB2468871-v2-IA64.exe according to your PC OS Platform(it depends on whether your Windows is installed as 64 bit or not). Most People would download x86 version. Please ensure this before downloading your stand alone Windows Update file. After finishing download, please install it.&lt;br /&gt;
&lt;br /&gt;
6. One of the possible reasons that hinders the installation of Windows Update is some services might be interferencing with your about to install Updates. So the possible solution is as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Click Start-&amp;gt;Run, Type in MSConfig.exe and press OK.&lt;/li&gt;
&lt;li&gt;At the General Page, Select the third radio button(Selective Boot).&lt;/li&gt;
&lt;li&gt;Select the Service Page, Press Disable All Button and then select DCOM Server Process Launcher and Remote Procedure Call(RPC) Locator and Remote Procedure Call(RPC) and your personal firewall service(it depends on what third party firewall &amp;nbsp;you are using).&lt;/li&gt;
&lt;li&gt;Press OK. And Restart the computer.&lt;/li&gt;
&lt;li&gt;Install the just donwloaded stand alone Update File.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
PS. This step indeed works! I have done it successfully. Hope you will install them smoothly too.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
--#--&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-656613886713166407?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/czlNXuSxAMY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/656613886713166407/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=656613886713166407" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/656613886713166407?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/656613886713166407?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/czlNXuSxAMY/windows-update-kb2468871-failed-msi.html" title="Windows Update KB2468871 failed! MSI returned 0x643! Possible solution!" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/10/windows-update-kb2468871-failed-msi.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUERHcyfSp7ImA9WhdbFEQ.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-5306402434669963312</id><published>2011-10-13T17:13:00.000+08:00</published><updated>2011-10-13T17:13:25.995+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-13T17:13:25.995+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="vb.net to c#" /><category scheme="http://www.blogger.com/atom/ns#" term="c# to vb.net" /><title>線上C#&lt;--&gt;VB.NET程式碼互轉的網站</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gRkwGNt0E33NWtWY4b_rGmgh33E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gRkwGNt0E33NWtWY4b_rGmgh33E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gRkwGNt0E33NWtWY4b_rGmgh33E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gRkwGNt0E33NWtWY4b_rGmgh33E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;其實您在 Google 打入 c# to vb.net 或 vb.net to c#，排名第一的站就是下面這個：&lt;br /&gt;
&lt;a href="http://www.developerfusion.com/tools/convert/csharp-to-vb/"&gt;http://www.developerfusion.com/tools/convert/csharp-to-vb/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
它不只可以貼上 C# 程式碼，然後在線上轉成 VB.NET，反過來也行，也可以貼上 VB.NET，然後按下Convert To C#，重點是你要事先在Ｆｒｏｍ右邊選好來源的語言，然後在Ｔｏ右邊也要選好你的目標語言，按下Convert就行了，不過，有一點小瑕疵的是，它的拷貝到剪貼簿的功能有點不太靈光，經常切回Visual Studio準備要貼上時，貼上的是居然是來源語言的程式碼。不知道是我哪邊操作出了問題。&lt;br /&gt;
&lt;br /&gt;
這是一個很不錯的站，向大家推薦。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-5306402434669963312?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/FrnMr6aAYhk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/5306402434669963312/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=5306402434669963312" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/5306402434669963312?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/5306402434669963312?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/FrnMr6aAYhk/c-vbnet.html" title="線上C#&lt;--&gt;VB.NET程式碼互轉的網站" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/10/c-vbnet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UMQ3o9fCp7ImA9WhdbE00.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-3193329303527943254</id><published>2011-10-10T13:02:00.001+08:00</published><updated>2011-10-11T10:48:02.464+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-11T10:48:02.464+08:00</app:edited><title>Happy Birthday! 中華民國一百年生日!</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Yr6geNSVOyf8heDiCV_boZsfH60/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Yr6geNSVOyf8heDiCV_boZsfH60/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Yr6geNSVOyf8heDiCV_boZsfH60/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Yr6geNSVOyf8heDiCV_boZsfH60/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;恭賀中華民國一百歲生日!&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-QTeyu7QQaIo/TpOuWgH56TI/AAAAAAAAAiE/nLOrkaRzWQU/s1600/TWROCflag.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://3.bp.blogspot.com/-QTeyu7QQaIo/TpOuWgH56TI/AAAAAAAAAiE/nLOrkaRzWQU/s320/TWROCflag.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-3193329303527943254?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/1osSeGMhT98" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/3193329303527943254/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=3193329303527943254" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/3193329303527943254?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/3193329303527943254?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/1osSeGMhT98/happy-birthday.html" title="Happy Birthday! 中華民國一百年生日!" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-QTeyu7QQaIo/TpOuWgH56TI/AAAAAAAAAiE/nLOrkaRzWQU/s72-c/TWROCflag.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/10/happy-birthday.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4AR306cCp7ImA9WhdaE08.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-6594459162843071145</id><published>2011-10-08T14:43:00.000+08:00</published><updated>2011-10-23T07:59:06.318+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-23T07:59:06.318+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PInvoke" /><category scheme="http://www.blogger.com/atom/ns#" term="platform invoke" /><category scheme="http://www.blogger.com/atom/ns#" term="P/Invoke Interop Assistant" /><category scheme="http://www.blogger.com/atom/ns#" term="P/Invoke" /><title>Useful P/Invoke Interop Assitant tool.</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xHP0MW6RKr5eOUuVuNTgbtxfxcc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xHP0MW6RKr5eOUuVuNTgbtxfxcc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xHP0MW6RKr5eOUuVuNTgbtxfxcc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xHP0MW6RKr5eOUuVuNTgbtxfxcc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;這個工具很有用，對於不熟P/Invoke，或是想要自己查閱Win 32 API 的P/Invoke原型時，此工具顯得特別有用。&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Managed, Native, and COM Interop Team&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;a href="http://clrinterop.codeplex.com/releases/view/14120"&gt;PInvoke Interop Assistant&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;See Also:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Platform_Invocation_Services"&gt;http://en.wikipedia.org/wiki/Platform_Invocation_Services&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-6594459162843071145?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/XucWJBaKvps" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/6594459162843071145/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=6594459162843071145" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/6594459162843071145?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/6594459162843071145?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/XucWJBaKvps/useful-pinvoke-interop-assitant-tool.html" title="Useful P/Invoke Interop Assitant tool." /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/10/useful-pinvoke-interop-assitant-tool.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUGQ3c_cSp7ImA9WhdUGUo.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-1918312581357361858</id><published>2011-10-07T16:29:00.005+08:00</published><updated>2011-10-07T16:30:22.949+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-07T16:30:22.949+08:00</app:edited><title>悼! Farewell Steve Jobs!</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KjGgXvCqYmyBM-PEkwYUDLlHR9Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KjGgXvCqYmyBM-PEkwYUDLlHR9Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KjGgXvCqYmyBM-PEkwYUDLlHR9Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KjGgXvCqYmyBM-PEkwYUDLlHR9Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;一代英才，才氣縱橫，正當蘋果大盛之時，雖說人逢喜事精神爽，但你贏得了金錢，卻失去了生命&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;，財富、功名、利碌，固然人人追求，但卻也要求得人生中的一個平衡點，前些時候，台灣有些科技工程師過勞死的新聞，時有所聞，我們要錢，但也要命，我們要工作，但也要休息。&lt;br /&gt;
&lt;br /&gt;
筆者用菜根譚的話來和大家分享：&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;『不眛己心  不盡人情  不竭物力』&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;『三者可以為天地立心  為生民立命   為子孫造福』&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
其中不竭物力，是指我們不論是對人對事對物，或用人用事用物，都不要把它／他／她給『用盡了』，只要用到六至七成就好，Steve Jobs 就是過度使用自己的身體，任何東西都會壞，我們要懂得適時的休息和保養，休息是為了走更長遠的路。&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
和大家共勉。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-1918312581357361858?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/aN6jPgsXmZY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/1918312581357361858/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=1918312581357361858" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/1918312581357361858?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/1918312581357361858?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/aN6jPgsXmZY/farewell-steve-jobs.html" title="悼! Farewell Steve Jobs!" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/10/farewell-steve-jobs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4DQn4zeyp7ImA9WhdUGUk.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-840219886536492437</id><published>2011-10-07T08:34:00.001+08:00</published><updated>2011-10-07T08:39:33.083+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-07T08:39:33.083+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MsgBoxTimeOut" /><category scheme="http://www.blogger.com/atom/ns#" term="MessageBox Time Out" /><category scheme="http://www.blogger.com/atom/ns#" term="MessageBoxTimeOut" /><category scheme="http://www.blogger.com/atom/ns#" term="Auto Closing Message Box" /><category scheme="http://www.blogger.com/atom/ns#" term="MsgBox Time Out" /><title>如何撰寫一個可自動關閉的訊息窗?</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0N44wS86li6IBZTUDhpRVRi6W6c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0N44wS86li6IBZTUDhpRVRi6W6c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0N44wS86li6IBZTUDhpRVRi6W6c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0N44wS86li6IBZTUDhpRVRi6W6c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;最簡單的方法是在自己寫一個訊息窗的表單, 在它的CLASS SCOPE中設一個私有的關閉時間變數, 然後在表單中設一個Timer變數, 可以將Timer的Interval屬性設為1秒, 請看Sample Code:

&lt;br /&gt;
&lt;pre&gt;'假設我們已經在表單上佈置好一個TextBox叫做 txtMsgContent。
'
Imports System.Timers

Public Class MsgBoxTimeOut
     Inherits System.Windows.Forms.Form
   
     Private _intTimeOutDuration As Integer
     Private _intCoutDown As Integer
     Private _strMsg As String
     Private _strCaption As String
     Private _aTimer As System.Timers.Timer = New System.Timers.Timer(1000)
   
     Public Sub New(ByVal strMsg As String, ByVal strCaption As String, Optional ByVal intDuration As Integer = 10)
         Me._intTimeOutDuration = intDuration
         Me._strMsg = strMsg
         Me._strCaption = strCaption
     End

     Private MsgBoxTimeOut_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MsgBoxTimeOut.Load
         AddHandler _aTimer.Elapsed, AddressOf OnTimedEvent
     End Sub

     Private Sub MsgBoxTimeOut_Enter(ByVal sender As Object, ByVal e As EventArgs) Handles MsgBoxTimeOut.Enter
         Me._intCountDown = _intTimeOutDuration 
         Me.txtMsgContent.Text = Me._strMsg
         Me.Text = Me._strCaption
         Me._aTimer.Enabled = True
     End Sub

     Private Sub OnTimedEvent(source As Object, e As ElapsedEventArgs)
         _intCountDown -= 1
        
         If _intCountDown &amp;lt;= 0 Then
　　　        aTimer.Enabled = False
             Me.Close()
         End If
     End Sub
End Class

'Code Snippes that use the MsgBoxTimeOut class

'假設省略最後一個參數, 將會預設為10秒關閉。
Dim objTimeOutFrm As New MsgBoxTimeOut("Auto Closing MsgBox Test", "This is caption of Form")

objTimeOutFrm.ShowDialog()

'設為30秒後自動關閉。
Dim objTimeOutFrm2 As New MsgBoxTimeOut("Auto Closing MsgBox Test2", "This is caption of Form2", 30)

objTimeOutFrm2.ShowDialog()
&lt;/pre&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-840219886536492437?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/SAA_LfqJrkk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/840219886536492437/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=840219886536492437" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/840219886536492437?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/840219886536492437?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/SAA_LfqJrkk/blog-post.html" title="如何撰寫一個可自動關閉的訊息窗?" /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/10/blog-post.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8MRHk5fip7ImA9WhdUGEo.&quot;"><id>tag:blogger.com,1999:blog-8844463379010397630.post-8157479085547144833</id><published>2011-10-06T11:44:00.001+08:00</published><updated>2011-10-06T12:21:25.726+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-06T12:21:25.726+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Win32 Printer API" /><category scheme="http://www.blogger.com/atom/ns#" term="GetJob" /><category scheme="http://www.blogger.com/atom/ns#" term="P/Invoke" /><category scheme="http://www.blogger.com/atom/ns#" term="OpenPrinter" /><category scheme="http://www.blogger.com/atom/ns#" term="win32 api" /><title>P/Invoke when passing a .Net Structure In and Out to UnManaged Win32 API.</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/MFix8FTUbpA_c2VwWzMsVuSAgGc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MFix8FTUbpA_c2VwWzMsVuSAgGc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/MFix8FTUbpA_c2VwWzMsVuSAgGc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MFix8FTUbpA_c2VwWzMsVuSAgGc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Below is the code snippets:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;pre&gt;
'
'Prerequisites:
'1. We must at least have a printer driver installed.

'2. Pause the printer that you want to test.

'3. Print a doc to the previous paused printer. And Check its pr'   int job id.

'4. Before call the GetJobDemo method, please obtain the print 
'   job id and 
'   pass it into the GetJobDemo method.

'5. Not really needed, but you can try this: Press Start-&gt;Run, 
'   type in
'   "spool" and press OK.
'   And then the system will open the spool directory for you. 
'   You can then go  '   into the Printers folder to see any 
'   paused print jobs in queue.
&lt;a name='more'&gt;&lt;/a&gt;
'In TutorialClass.vb file.
'
Imports System.Runtime.InteropServices

Public Class TutorialClass
    Public Shared Function GetJobDemo(ByVal strJobId As String) As Win32.JOB_INFO_2
        Dim pi2Result As Win32.JOB_INFO_2 = Nothing
        Dim ptrPrn As New IntPtr(0)
        Dim pdf As New Win32.PRINTER_DEFAULTS()

        'We don't need the following two fields. Set them to Nothing.
        pdf.pDatatype = Nothing
        pdf.pDevMode = Nothing

        'We must designate as the system administrator
        pdf.DesiredAccess = Win32.PRINTER_ACCESS_ADMINISTER

        'Here we invoke OpenPrinter API to get a printer handle into ptrPrn.
        'If it is successful, bResult will be True and ptrPrn won't be IntPtr.Zero.
        Dim bResult As Boolean = Win32.OpenPrinter("Substitue this with your Priner Name", ptrPrn, pdf)

        If bResult AndAlso ptrPrn &amp;lt;&amp;gt; IntPtr.Zero Then
            Dim intBytesNeeded As Integer = 0
            
            'Here we first invoke GetJobEx API to get the JOB_INFO_2 structure size which is needed in the 2nd invocation.
            Win32.GetJobEx(ptrPrn, CInt(strJobId), 2, IntPtr.Zero, 0, intBytesNeeded)

            'If the above call is successful, intBytesNeed will be greater than zero.
            If intBytesNeeded &amp;gt; 0 Then
                'Here we create an instance of JOB_INFO_2, which is a .Net object.
                Dim myPI2 As New Win32.JOB_INFO_2()

                'Here we obtain the Unmanaged memory space requied.
                Dim intSizeOfMyPI2 As Integer = Marshal.SizeOf(myPI2)

                'Allocate memory space that is needed.
                Dim ptrMyPI2 As IntPtr = Marshal.AllocHGlobal(intSizeOfMyPI2)

                'The 2nd time to invoke GetJobEx. This time we will get print job data that is put into the space which is pointed by ptrMyPI2.
                Win32.GetJobEx(ptrPrn, CInt(strJobId), 2, ptrMyPI2, intBytesNeeded, intBytesNeeded)

                'Here we use Marshal class's static method PtrToStructure(which means 
                'Converting a space pointed by a IntPtr object into .Net Structure object)
                Dim objPI2 As Object = Marshal.PtrToStructure(ptrMyPI2, GetType(Win32.JOB_INFO_2))

                'If it is not Nothing, then we are successful.
                If objPI2 IsNot Nothing Then
                    pi2Result = CType(objPI2, Win32.JOB_INFO_2)
                End If
            End If

        End If

        Return pi2Result
    End Function
End Class

'In Win32.vb file.

Imports System.Runtime.InteropServices

Public Class Win32

'&lt;structlayout(layoutkind.sequential, charset:="CharSet.Auto)"&gt;
Public Structure SYSTEMTIME
        Public wYear As Short
        Public wMonth As Short
        Public wDayOfWeek As Short
        Public wDay As Short
        Public wHour As Short
        Public wMinute As Short
        Public wSecond As Short
        Public wMilliseconds As Short
End Structure

'&lt;structlayout(layoutkind.sequential, charset:="CharSet.Auto)"&gt;
Public Structure JOB_INFO_2
        Public PrinterJobId As Integer
        Public PrinterName As String
        Public MachineName As String
        Public PrinterUserName As String
        Public PrinterDocument As String
        Public PrinterNotifyName As String
        Public PrinterDatatype As String
        Public PrintProcessor As String
        Public PrinterParameters As String
        Public PrinterDriverName As String
        Public PrinterDevMode As IntPtr
        Public pStatus As String
        Public PrinterSecurityDescriptor As Integer
        Public Status As Integer
        Public PrinterPriority As Integer
        Public Position As Integer
        Public StartTime As Integer
        Public UntilTime As Integer
        Public TotalPages As Integer
        Public Size As Integer
        Public Submitted As SYSTEMTIME
        Public Time As Integer
        Public PagesPrinted As Integer
End Structure

'&lt;/structlayout(layoutkind.sequential,&gt;&lt;/structlayout(layoutkind.sequential,&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;structlayout(layoutkind.sequential, charset:="CharSet.Auto)"&gt;&lt;structlayout(layoutkind.sequential, charset:="CharSet.Auto)"&gt;&lt;structlayout(layoutkind.sequential, charset:="CharSet.Auto)"&gt;Public Class DEVMODE
        &lt;marshalas(unmanagedtype.byvaltstr, sizeconst:="&amp;amp;H20)"&gt;Public dmDeviceName As String
        Public dmSpecVersion As Short
        Public dmDriverVersion As Short
        Public dmSize As Short
        Public dmDriverExtra As Short
        Public dmFields As Integer
        Public dmOrientation As Short
        Public dmPaperSize As Short
        Public dmPaperLength As Short
        Public dmPaperWidth As Short
        Public dmScale As Short
        Public dmCopies As Short
        Public dmDefaultSource As Short
        Public dmPrintQuality As Short
        Public dmColor As Short
        Public dmDuplex As Short
        Public dmYResolution As Short
        Public dmTTOption As Short
        Public dmCollate As Short
        &lt;marshalas(unmanagedtype.byvaltstr, sizeconst:="&amp;amp;H20)"&gt; _
        Public dmFormName As String
        Public dmLogPixels As Short
        Public dmBitsPerPel As Integer
        Public dmPelsWidth As Integer
        Public dmPelsHeight As Integer
        Public dmDisplayFlags As Integer
        Public dmDisplayFrequency As Integer
        Public dmICMMethod As Integer
        Public dmICMIntent As Integer
        Public dmMediaType As Integer
        Public dmDitherType As Integer
        Public dmICCManufacturer As Integer
        Public dmICCModel As Integer
        Public dmPanningWidth As Integer
        Public dmPanningHeight As Integer
End Class  'End of DEVMODE

'
Public Structure PRINTER_DEFAULTS
        Public pDatatype As IntPtr
        Public pDevMode As IntPtr
        Public DesiredAccess As Integer
End Structure

&amp;lt;DllImport("winspool.drv", EntryPoint:="OpenPrinterW", ExactSpelling:=True,    SetLastError:=True, CallingConvention:=CallingConvention.StdCall,    CharSet:=CharSet.Ansi)&amp;gt; _
 Public Shared Function OpenPrinter(&amp;lt;MarshalAs(UnmanagedType.LPTStr)&amp;gt; ByVal pPrinterName As String, ByRef hPrinter As IntPtr, ByRef pDefault As PRINTER_DEFAULTS) As Boolean
End Function

'
 &amp;lt;DllImport("winspool.drv", EntryPoint:="GetJobW")&amp;gt; _
Public Shared Function GetJobEx(ByVal hPrinter As IntPtr, ByVal JobId As Integer, ByVal Level As Integer, _
        ByVal pJob As IntPtr, ByVal cdBuf As Integer, ByRef pcbNeeded As Integer) As Integer
End Function



End Class   'End of Win32 Class

&lt;/marshalas(unmanagedtype.byvaltstr,&gt;&lt;/marshalas(unmanagedtype.byvaltstr,&gt;&lt;/structlayout(layoutkind.sequential,&gt;&lt;/structlayout(layoutkind.sequential,&gt;&lt;/structlayout(layoutkind.sequential,&gt;&lt;/pre&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8844463379010397630-8157479085547144833?l=soho-hsh.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tYbVGM/~4/HL4I7S1yz5o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soho-hsh.blogspot.com/feeds/8157479085547144833/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8844463379010397630&amp;postID=8157479085547144833" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/8157479085547144833?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8844463379010397630/posts/default/8157479085547144833?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tYbVGM/~3/HL4I7S1yz5o/pinvoke-when-passing-net-strureture-in.html" title="P/Invoke when passing a .Net Structure In and Out to UnManaged Win32 API." /><author><name>Shyh Hua Hung</name><uri>http://www.blogger.com/profile/00071658234519126640</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/-yRRfRs9bsdI/TpchUdAJ1QI/AAAAAAAAAjA/YrgdK-tNE40/s220/ShyhHuaHung5.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://soho-hsh.blogspot.com/2011/10/pinvoke-when-passing-net-strureture-in.html</feedburner:origLink></entry></feed>

