<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-800716815110966936</id><updated>2012-02-26T06:33:11.274+05:30</updated><category term='XSLT'/><category term='Javascript'/><category term='CSV file Trailer'/><category term='registry'/><category term='android rooting'/><category term='cifs'/><category term='WM_SETTINGCHANGE'/><category term='Tibco BW'/><category term='XML'/><category term='MACspoofing'/><category term='Outlook2002'/><category term='Microsoft.VisualBasic.Devices.KeyBoard'/><category term='stagnography'/><category term='C#.NET'/><category term='ASP.NET'/><category term='windows XP'/><category term='android'/><category term='Read CSV'/><category term='MAC address'/><category term='Drive Locker'/><category term='gpupdate'/><category term='Downloads'/><category term='yahoo messenger'/><category term='XML as parameter in TIBCO'/><category term='ReloadPolicy'/><category term='Move To Tray'/><title type='text'>Code Junction</title><subtitle type='html'>Articles/Samples/Tips n Trick</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-1032537025002097527</id><published>2011-11-17T22:47:00.000+05:30</published><updated>2011-11-17T22:48:47.430+05:30</updated><title type='text'>How to convert CSV file to XML file using XSLT</title><content type='html'>&lt;div&gt;Whenever the source system is sending the data in the mode of .csv files then for transformation purpose if the target expects in xml format, the below mentioned technique can be used.&lt;/div&gt;&lt;div&gt;In the sample code attached with this post , xslt code is given where it take csv input('file:///d:/abc.csv') and converts it into xml format. This is generic xslt which can be used to convert csv to xml format.&lt;/div&gt;&lt;div&gt;To download the XSLT please click &lt;a href="http://dl.dropbox.com/u/44602273/CSVToXML.txt"&gt;here&lt;/a&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/800716815110966936-1032537025002097527?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/1032537025002097527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=1032537025002097527' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/1032537025002097527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/1032537025002097527'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2011/11/how-to-convert-csv-file-to-xml-file.html' title='How to convert CSV file to XML file using XSLT'/><author><name>Vivek Ojha</name><uri>http://www.blogger.com/profile/11930780083877121618</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_bBSq0Jpoh7E/SlVc-XwIneI/AAAAAAAAAAY/58rRr_p705k/S220/Ajay435.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-3274925683360731013</id><published>2011-11-17T22:39:00.000+05:30</published><updated>2011-11-17T22:46:34.558+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML as parameter in TIBCO'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='XSLT'/><title type='text'>How to Pass XML as a parameter to XSLT in TIBCO</title><content type='html'>&lt;div&gt;XSLT is extensively used in the areas where XML transformation is needed. Generally it is used to transfer one xml form to another. However if there are multiple XML’s and the output xml needs to be derived from the set of values in more than one xml’s then XSLT provides you the provision to pass the multiple XML’s as parameter to XSLT.&lt;/div&gt;&lt;div&gt;In this post we will take two XML’s and the output will be generated based on the values from both the XML.&lt;/div&gt;&lt;div&gt;Before implementing it in BW, in order to test in and debug properly let’s see how this can be done using any XSLT editor like Altova XML SPY. The two XML files used in the example are:-&lt;/div&gt;&lt;div&gt;Employee_Personal_Details.xml&lt;/div&gt;&lt;div&gt;Employee_Professional_Details.xml&lt;/div&gt;&lt;div&gt;The XSLT file ‘Transform_Editor.xslt’ is the XSLT used to transform the XML.&lt;/div&gt;&lt;div&gt;In order to do it in Tibco you will need a little modification in XSLT i.e. you need not to pass the parameter as ‘document’. &lt;/div&gt;&lt;div&gt;I have shared the sample BW code.&lt;/div&gt;&lt;div&gt;To download all the artifacts use in this post as a single zip file, click &lt;a href="http://dl.dropbox.com/u/44602273/XSLTAsParameter.zip"&gt;here&lt;/a&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/800716815110966936-3274925683360731013?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/3274925683360731013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=3274925683360731013' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/3274925683360731013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/3274925683360731013'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2011/11/how-to-pass-xml-as-parameter-to-xslt-in.html' title='How to Pass XML as a parameter to XSLT in TIBCO'/><author><name>Vivek Ojha</name><uri>http://www.blogger.com/profile/11930780083877121618</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_bBSq0Jpoh7E/SlVc-XwIneI/AAAAAAAAAAY/58rRr_p705k/S220/Ajay435.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-3046035617201395993</id><published>2011-11-12T01:02:00.002+05:30</published><updated>2011-11-12T01:05:52.527+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Read CSV'/><category scheme='http://www.blogger.com/atom/ns#' term='Tibco BW'/><category scheme='http://www.blogger.com/atom/ns#' term='CSV file Trailer'/><title type='text'>How to Read a CSV file in Tibco BW having a Header, Body and trailer</title><content type='html'>&lt;div&gt;Tibco BW provides a ‘Data format’ in order to parse/render the text data. However the palette has a limitation that it can read the file only if file has a fixed sequence.&lt;/div&gt;&lt;div&gt;However in general the CSV file contains a Header section which has the basic information like file creation date/time, number of records etc. The actual data will be present in the section called “Body” and then the last section known as “trailer”.&lt;/div&gt;&lt;div&gt;In order to read such a file in Tibco a small trick is needed. &lt;/div&gt;&lt;div&gt;Please note that you need to create three different data formats one for each header, body and trailer.&lt;/div&gt;&lt;div&gt;I have included the sample file and the BW project in this post. Download the zip file and import the same into BW.   Let me know if you have any doubts in the sample included.&lt;/div&gt;&lt;div&gt;Comments/Questions are welcome.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Click &lt;a href="http://dl.dropbox.com/u/44602273/ReadCSV.zip"&gt;here &lt;/a&gt;to download sample&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/800716815110966936-3046035617201395993?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/3046035617201395993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=3046035617201395993' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/3046035617201395993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/3046035617201395993'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2011/11/how-to-read-csv-file-in-tibco-bw-having.html' title='How to Read a CSV file in Tibco BW having a Header, Body and trailer'/><author><name>Vivek Ojha</name><uri>http://www.blogger.com/profile/11930780083877121618</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_bBSq0Jpoh7E/SlVc-XwIneI/AAAAAAAAAAY/58rRr_p705k/S220/Ajay435.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-7036135646202513444</id><published>2011-09-29T22:13:00.003+05:30</published><updated>2011-09-29T22:17:53.946+05:30</updated><title type='text'>Connect to Oracle Queue using RAC URL in TIBCO BW</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/-QwBas5gPG5c/ToShFqhSGJI/AAAAAAAAAPQ/cbDedeye4_s/s1600/SreeenShot_BW.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 260px;" src="http://3.bp.blogspot.com/-QwBas5gPG5c/ToShFqhSGJI/AAAAAAAAAPQ/cbDedeye4_s/s400/SreeenShot_BW.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5657824150569490578" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Currently, Oracle AQ has not been fully certified with BW yet and TIBCO does not suggest its customers to use the JMS activities to interact with Oracle AQ.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;However this can be implemented using JAVA Code activity in TIBCO BW. I am writing a sample code which can be used to connect to oracle queue. Please note that in below code I am using Oracle Thin drier to connect to database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Before trying the below code following points must be noted:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpFirst" style="margin-bottom:0in;margin-bottom:.0001pt; mso-add-space:auto;text-indent:-.25in;line-height:normal;mso-list:l0 level1 lfo1"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span&gt;1.&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;The Code below is only meant for ‘JavaCode’ palette in TIBCO BW. In order to run the below code in other API, it will need a modification.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpMiddle" style="margin-bottom:0in;margin-bottom: .0001pt;mso-add-space:auto;text-indent:-.25in;line-height:normal;mso-list:l0 level1 lfo1"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span&gt;2.&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;The java classes that need to be imported should be included along with the code by selection full class radio button present in the ‘code’ tab of palette.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpMiddle" style="margin-bottom:0in;margin-bottom: .0001pt;mso-add-space:auto;text-indent:-.25in;line-height:normal;mso-list:l0 level1 lfo1"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span&gt;3.&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;The basic connection parameters like username, password etc is passed Global Variables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpMiddle" style="margin-bottom:0in;margin-bottom: .0001pt;mso-add-space:auto;text-indent:-.25in;line-height:normal;mso-list:l0 level1 lfo1"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span&gt;4.&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Please note that If you are getting exception&lt;span&gt;  &lt;/span&gt;like “ClassNotFound” then you must place the jar file “&lt;b&gt;&lt;u&gt;apaqi.jar&lt;/u&gt;&lt;/b&gt;” in &lt;b&gt;&lt;u&gt;&amp;lt;&lt;tibco_home&gt;&amp;gt;/bw/&amp;lt;&lt;version&gt;&amp;gt;/lib&lt;/version&gt;&lt;/tibco_home&gt;&lt;/u&gt;&lt;/b&gt; folder. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpLast" style="margin-bottom:0in;margin-bottom:.0001pt; mso-add-space:auto;text-indent:-.25in;line-height:normal;mso-list:l0 level1 lfo1"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span&gt;5.&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;The syntax of complete RAC URL(not appearing in screenshot) is: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="font-size:12.0pt; font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;RAC URL&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt; : &lt;i&gt;jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=testhost-vip)(PORT=1561))(ADDRESS=(PROTOCOL=TCP)(HOST=testbackuphost-vip)(PORT=1561)))(CONNECT_DATA=(SERVICE_NAME=oraclsid)))&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="margin-bottom:0in;margin-bottom:.0001pt; mso-add-space:auto;text-indent:-.25in;line-height:normal;mso-list:l0 level1 lfo1"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span&gt;6.&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Please refer to screenshot attached in this post in order to view the exact GV’s I have used in this.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Import java.util.*;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Import java.io.*;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Import javax.jms.*;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Import javax.jms.Queue;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Import oracle.jms.*;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Import oracle.jdbc.*;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Import oracle.jdbc.pool.OracleDataSource;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Import java.lang.Object.*;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Import java.lang.Class.*;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Import java.sql.Connection;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;//Create Objects for the classes which are needed to create JMS connection&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;QueueConnection qconn = null;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;QueueConnectionFactory qcfact = null;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Queue queue = null;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;QueueSession qsess = null;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;QueueSender sender = null;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;TextMessage txtmsg;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;//Creating Property to get User Name and Password.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Properties connection = new Properties();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;connection.put("user",USER);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;connection.put("password",PassWord);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;//Get Queue Connection factory from Driver and Property initialized above.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;qcfact = AQjmsFactory.getQueueConnectionFactory(Driver,connection);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;qconn = qcfact.createQueueConnection(USER, PassWord);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;//Creating Session and provide the acknowledgement mode&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;qsess = qconn.createQueueSession(true, Session.CLIENT_ACKNOWLEDGE);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;qconn.start();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;queue = ((AQjmsSession) qsess).getQueue(QueueUser, Destination_Queue);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;// Publishing the message&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;sender = qsess.createSender(queue);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;txtmsg = qsess.createTextMessage();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;txtmsg.setJMSCorrelationID(CorrelationID);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;txtmsg.setText(XML_DATA);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;((AQjmsQueueSender)sender).send(queue,txtmsg);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;qsess.commit();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;output = "Succesfully placed the message on OracleAdvancedQueue";&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;// Cleaning up before exiting&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;qsess.close();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;qconn.close();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Cheers,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Vivek&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/800716815110966936-7036135646202513444?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/7036135646202513444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=7036135646202513444' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/7036135646202513444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/7036135646202513444'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2011/09/connect-to-oracle-queue-using-rac-url.html' title='Connect to Oracle Queue using RAC URL in TIBCO BW'/><author><name>Vivek Ojha</name><uri>http://www.blogger.com/profile/11930780083877121618</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_bBSq0Jpoh7E/SlVc-XwIneI/AAAAAAAAAAY/58rRr_p705k/S220/Ajay435.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-QwBas5gPG5c/ToShFqhSGJI/AAAAAAAAAPQ/cbDedeye4_s/s72-c/SreeenShot_BW.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-955938172763267718</id><published>2011-07-31T15:27:00.002+05:30</published><updated>2011-07-31T15:32:47.161+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='android rooting'/><title type='text'>Why,how and what is rooting android?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;strong&gt;What is rooting?&lt;/strong&gt;&lt;br /&gt;In android each process runs under a seprate user identity and the privilege of root user has been restricted by platform but there are certain hacks using which one can achieve root access and process of gaining the root access is known as rooting. The basic process of rooting includes following steps&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Remounting of /system with read/write access. &lt;/li&gt;&lt;li&gt;Copying the patched binary of su into /system/bin/.&lt;/li&gt;&lt;li&gt;Installation of superuser application (Available in market)&lt;/li&gt;&lt;/ol&gt;&lt;strong&gt;How to root my android?&lt;/strong&gt;&lt;br /&gt;There are many application using which you can root android but i prefer SuperClick utlitiy which is pretty simple and lets you root/unroot android. You can read more or download super click from &lt;a href="http://forum.xda-developers.com/showthread.php?t=803682"&gt;http://forum.xda-developers.com/showthread.php?t=803682&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Why do i require the to root access?&lt;/strong&gt;&lt;br /&gt;Root access is mostly require to do hacks like inserting module any external kernal module using insmod, accessing/modifcation of system files etc. A normal user never requires root access for performing basic operations.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/800716815110966936-955938172763267718?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/955938172763267718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=955938172763267718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/955938172763267718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/955938172763267718'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2011/07/whyhow-and-what-is-rooting-android.html' title='Why,how and what is rooting android?'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-6978303912472645788</id><published>2011-07-31T13:42:00.005+05:30</published><updated>2011-11-20T01:40:34.653+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='cifs'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Mounting windows share on android Froyo</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Recently i bought my first android based mobile (Samsung Galaxy Pro) and since then i was looking for something to access my windows&amp;nbsp;shared folder via wifi. So i started exploring and found that on a rooted device it is possible to mount a window share using using cifs (Common Internet File Sharing Protocol) kernel module (cifs.ko) and mount command. I looked over net and found many builds of&amp;nbsp;cifs.ko but didn't found&amp;nbsp;a build&amp;nbsp;for my kernel version 2.6.23.9-perf PREEMPT so i decided to build my own cifs. To make the kernel module i downloaded firmware source code from samsung's open source code distribution website &lt;a href="https://opensource.samsung.com/"&gt;https://opensource.samsung.com/&lt;/a&gt;. During the build i found that cifs module depends on slow-work&amp;nbsp;and for that i&amp;nbsp;build another module slow-work.ko and then i used terminal emulator to exeute mount command for inserting kernel modules and mounting the share.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #444444;"&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; insmod /mnt/system/lib/slow-work.ko&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #444444;"&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; insmod /mnt/system/lib/cifs.ko&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #444444;"&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mount -o username=&lt;username&gt;,password=&lt;password&gt; -t cifs anil-pc/d$ /mnt/cifs/d&lt;/password&gt;&lt;/username&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and wollla now i can access&amp;nbsp;any shared file from&amp;nbsp;laptop on mobile via wifi like any other local file on mobile.&lt;br /&gt;&lt;br /&gt;If you are not good at linux commands then you can download Cifs manager&amp;nbsp;&lt;a href="https://market.android.com/details?id=ws.plattner.cifsmanager&amp;amp;hl=en"&gt;https://market.android.com/details?id=ws.plattner.cifsmanager&amp;amp;hl=en&lt;/a&gt;&amp;nbsp;to do the same for you.&lt;br /&gt;&lt;br /&gt;You can download my build of kernel modules here &lt;a href="http://dl.dropbox.com/u/48560079/cifs_and_slow_work_modules_2.6.32.9-perf_PREEMPT.zip"&gt;http://dl.dropbox.com/u/48560079/cifs_and_slow_work_modules_2.6.32.9-perf_PREEMPT.zip&lt;/a&gt;&amp;nbsp;(Specific to kernel version: 2.6.23.9-perf PREEMPT, use uname -a command to find your kernel version or goto Settings&amp;gt;About phone&amp;gt;Kernel Version)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/800716815110966936-6978303912472645788?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/6978303912472645788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=6978303912472645788' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/6978303912472645788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/6978303912472645788'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2011/07/mounting-windows-share-on-android-froyo.html' title='Mounting windows share on android Froyo'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-1916567144324639307</id><published>2011-03-13T17:48:00.003+05:30</published><updated>2011-03-15T22:35:18.130+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Move To Tray'/><title type='text'>Move To Tray</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;MoveToTray can move any program from taskbar to system notification area (beside the clock). Just press Ctrl+Alt+M (Move to tray shortcut key) and it will move the active application to the system tray. Once an application is moved to system tray it can be moved back to the taskbar by double click on the application icon in system tray.&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;a href="http://download1us.softpedia.com/dl/e00a14bb67ffe339bac82e8ce6e9078e/4d7f9c0a/100183368/software/system/MoveToTray.exe"&gt;&lt;img border="0" q6="true" src="https://lh5.googleusercontent.com/--Z787_pDZHo/TVLL5Z2JPgI/AAAAAAAACXY/QNom9o-Mpb0/s1600/softpedia_download_small.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&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/800716815110966936-1916567144324639307?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/1916567144324639307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=1916567144324639307' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/1916567144324639307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/1916567144324639307'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2011/03/move-to-tray.html' title='Move To Tray'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh5.googleusercontent.com/--Z787_pDZHo/TVLL5Z2JPgI/AAAAAAAACXY/QNom9o-Mpb0/s72-c/softpedia_download_small.gif' height='72' width='72'/><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-7490016024884586972</id><published>2011-02-12T11:50:00.000+05:30</published><updated>2011-02-12T11:50:50.035+05:30</updated><title type='text'>Code to find WLAN MAC address of nokia mobile</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;MAC address of WLAN device (i.e. wifi NIC) on nokia phones can be reterived using *#62209526# i.e *#MAC0WLAN# code&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/800716815110966936-7490016024884586972?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/7490016024884586972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=7490016024884586972' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/7490016024884586972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/7490016024884586972'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2011/02/code-to-find-wlan-mac-address-of-nokia.html' title='Code to find WLAN MAC address of nokia mobile'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-1062152625818062736</id><published>2011-02-09T23:23:00.000+05:30</published><updated>2011-02-09T23:23:18.068+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>Installing and Uninstalling ASP.NET on IIS</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;It often occurs that IIS ASP.NET get misconfigured or gets corrupted in such cases we can uninstall and reinstall asp.net on IIS using command prompt utilitiy aspnet_regiis.exe which comes with Microsoft Framework. &lt;br /&gt;Below is the command install asp.net &lt;br /&gt;&lt;br /&gt;C:\Windows\Microsoft.NET\Framework\v2.0.50727&amp;gt;&lt;strong&gt;aspnet_regiis.exe -i&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;and to uninstall asp.net from IIS use&lt;br /&gt;&lt;br /&gt;C:\Windows\Microsoft.NET\Framework\v2.0.50727&amp;gt;&lt;strong&gt;aspnet_regiis.exe -u&lt;/strong&gt;&lt;br /&gt;&lt;br /&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/800716815110966936-1062152625818062736?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/1062152625818062736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=1062152625818062736' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/1062152625818062736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/1062152625818062736'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2011/02/installing-and-uninstalling-aspnet-on.html' title='Installing and Uninstalling ASP.NET on IIS'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-5707508862337601783</id><published>2011-02-08T22:57:00.003+05:30</published><updated>2011-02-09T22:48:52.056+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drive Locker'/><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><title type='text'>Drive Locker</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Now you can hide and lock any drive on your windows OS. You can download the application from &lt;br /&gt;&lt;br /&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;a href="http://download1us.softpedia.com/dl/4e7da366c6596913efcfb8220ae8aea8/4d52cc19/100181234/software/security/DriveLocker.zip" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" h5="true" src="http://4.bp.blogspot.com/_2EpAPkKH8dM/TVLL5Z2JPgI/AAAAAAAACXY/x1nCxoh1pv4/s1600/softpedia_download_small.gif" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;strong&gt;&lt;u&gt;Screen Shot&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_2EpAPkKH8dM/TVF8ZPfxhMI/AAAAAAAACXU/Q_C-o7bZkJU/s1600/Screenshot.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" h5="true" src="http://4.bp.blogspot.com/_2EpAPkKH8dM/TVF8ZPfxhMI/AAAAAAAACXU/Q_C-o7bZkJU/s1600/Screenshot.jpg" /&gt;&lt;/a&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/800716815110966936-5707508862337601783?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/5707508862337601783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=5707508862337601783' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/5707508862337601783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/5707508862337601783'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2011/02/drive-locker.html' title='Drive Locker'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_2EpAPkKH8dM/TVLL5Z2JPgI/AAAAAAAACXY/x1nCxoh1pv4/s72-c/softpedia_download_small.gif' height='72' width='72'/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-8746318421269341101</id><published>2011-02-06T20:18:00.000+05:30</published><updated>2011-02-06T20:28:34.812+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='WM_SETTINGCHANGE'/><category scheme='http://www.blogger.com/atom/ns#' term='ReloadPolicy'/><category scheme='http://www.blogger.com/atom/ns#' term='gpupdate'/><title type='text'>Reload Group policy using gpupdate and WM_SETTINGCHANGE</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;When we change any of the group policy setting using registry then applications does not get notified about the change of policy and the effect take place only when the application gets restart or the&amp;nbsp;user logs off and login again. To avoid restarting application and user logoff we have to notify all application about the change in group policy and so the application will reload the group policies. The applications can be notifiied about the change by using anyone of the below given approach&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. &lt;u&gt;Using gpupdate.exe&lt;/u&gt;&lt;/strong&gt; We can reload group policies by executing below command at command prompt.&lt;br /&gt;gpupdate.exe /Force &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. &lt;u&gt;Using WM_SETTINGCHANGE Message&lt;/u&gt;&lt;/strong&gt; The group policies can be reloaded programatically by broadcasting WM_SETTINGCHANGE message using SendNotifyMessage. SendNotifyMessage take following paramters&lt;br /&gt;&lt;br /&gt;hwnd: HWND_BROADCAST = 0xFFFF &lt;br /&gt;msg:&amp;nbsp;WM_SETTINGCHANGE = 0x001A&lt;br /&gt;wParam: 0 when user group policies are applied and 1 when reload machie level group policies are applied.&lt;br /&gt;lParam: pointer to string "Policy". &lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Here is an implmentation of same using C#.NET&amp;nbsp; &lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]&lt;/div&gt;static extern bool SendNotifyMessage(IntPtr hWnd, uint Msg, IntPtr wParam,&lt;br /&gt;&lt;br /&gt;private void reloadPolicies()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; IntPtr hwnd = new IntPtr(0xFFFF);&lt;br /&gt;&amp;nbsp;&amp;nbsp; IntPtr wparam = new IntPtr(0);&lt;br /&gt;&amp;nbsp;&amp;nbsp; IntPtr lparam = Marshal.StringToHGlobalUni("Policy");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SendNotifyMessage(hwnd, 0x1A, wparam, lparam);&lt;br /&gt;&amp;nbsp;&amp;nbsp; System.Threading.Thread.Sleep(1500);&lt;br /&gt;&amp;nbsp;&amp;nbsp; Marshal.FreeHGlobal(lparam);&amp;nbsp; &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/800716815110966936-8746318421269341101?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/8746318421269341101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=8746318421269341101' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/8746318421269341101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/8746318421269341101'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2011/02/reloading-group-policy.html' title='Reload Group policy using gpupdate and WM_SETTINGCHANGE'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-6495841182538991844</id><published>2011-02-06T12:56:00.001+05:30</published><updated>2011-02-06T21:07:49.448+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#.NET'/><title type='text'>C# .NET creating a IntPtr to a int</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;A IntPtr to int can be simply created using a constructor of IntPtr. &lt;br /&gt;&lt;strong&gt;&lt;u&gt;Example&lt;/u&gt;&lt;/strong&gt;: In many windows message queue API function we&amp;nbsp;need to send a brodacast message to all top level window using hwnd = 0xFFFF and for such cases we can get the IntPtr to 0xFFFF using&lt;br /&gt;&lt;br /&gt;IntPtr hwnd = new IntPtr(0xFFFF);&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/800716815110966936-6495841182538991844?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/6495841182538991844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=6495841182538991844' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/6495841182538991844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/6495841182538991844'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2011/02/c-net-creating-intptr-to-int.html' title='C# .NET creating a IntPtr to a int'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-83297414455407182</id><published>2011-01-26T13:56:00.001+05:30</published><updated>2011-02-06T21:05:24.784+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#.NET'/><title type='text'>String To IntPtr</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Often we required to copy our managed string into unmanaged memory and gets it pointer to pass string's integer pointer (IntPtr) to the unmanaged api. To create a copy of managed string into unmanaged memory call one of the below given static method of Marshal class.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;1. Marshal.StringToHGlobalAnsi&lt;/u&gt;&lt;/strong&gt; : Creates the ANSI encoded unmanaged copy of the string.&lt;br /&gt;&lt;br /&gt;public static IntPtr StringToHGlobalAnsi (string s)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;E.g.&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;string str = "my string";&lt;br /&gt;IntPtr ptrStr Marshal.StringToHGlobalAnsi(str);&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;2. Marshal.StringToHGlobalUni&lt;/u&gt;&lt;/strong&gt; : Creates the Unicoded encoded unmanaged copy of the string. &lt;br /&gt;&lt;br /&gt;public static IntPtr StringToHGlobalUni (string s)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;E.g.&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;string str = "my string";&lt;br /&gt;IntPtr ptrStr = Marshal.StringToHGlobalUni(str);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Releasing the unmanaged resources&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;The unamanaged resources are not disposed or released by the garbage collector so we must release the unmanaged resource after its use and to release our unmanaged string from memory we uses another static method Marshal class which is Marshal.FreeHGlobal&lt;br /&gt;&lt;br /&gt;public static void FreeHGlobal (IntPtr hglobal)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;E.g.&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;FreeHGlobal(ptrStr);&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/800716815110966936-83297414455407182?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/83297414455407182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=83297414455407182' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/83297414455407182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/83297414455407182'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2011/01/string-to-intptr.html' title='String To IntPtr'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-7751580921268347928</id><published>2011-01-26T11:52:00.000+05:30</published><updated>2011-02-06T13:46:34.566+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft.VisualBasic.Devices.KeyBoard'/><title type='text'>C#.NET Combinational mouse and Keyboard shortcuts</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Often it is required to implement combinational keyboard shortcut like shift+left Click or Shift+Right Click but we cannot implement them so easily in provided mouse and keyboard events like (mousedown, click, keydown, keypress or keyup) because in all these events one of the event information either Key events or mouse events are missing. So to implement such shortcut we can use Microsoft.VisualBasic.Device.KeyBoard class. &lt;br /&gt;&lt;br /&gt;The same is discussed with example by me at eggheadcafe's FAQ section&lt;br /&gt;&lt;a href="http://www.eggheadcafe.com/sample-code/csharp.NET/d5c0ae86-2bd8-4abf-9c88-335779499169/net-keydown-events-like-shiftclick-or-altclick.aspx"&gt;http://www.eggheadcafe.com/sample-code/csharp.NET/d5c0ae86-2bd8-4abf-9c88-335779499169/net-keydown-events-like-shiftclick-or-altclick.aspx&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/800716815110966936-7751580921268347928?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/7751580921268347928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=7751580921268347928' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/7751580921268347928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/7751580921268347928'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2011/01/cnet-combinational-moure-keyboard.html' title='C#.NET Combinational mouse and Keyboard shortcuts'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-7725383166985198070</id><published>2011-01-22T10:17:00.002+05:30</published><updated>2011-02-06T21:02:13.956+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='registry'/><category scheme='http://www.blogger.com/atom/ns#' term='Outlook2002'/><title type='text'>Registry Trick: Keeping the Outlook 2002 in system tray instead of taskbar</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If you are using outlook 2002 and you want to keep the outlook in system tray like th outlook 2003 and above you have to addd registry value. Which will put the outlook in system tray when minimized.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Step1:&lt;/u&gt; Goto start&amp;gt;run type regedit and press enter&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Step2:&lt;/u&gt; Browse to the below registry key&lt;br /&gt;&lt;strong&gt;HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Preferences&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Step3:&lt;/u&gt; Modify or create the value &lt;strong&gt;MinToTray&lt;/strong&gt; of &lt;strong&gt;DWORD&lt;/strong&gt; datatype and set its value to 0 = Disabled or 1 = Enabled&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Step4:&lt;/u&gt; Exit regedit and restart outlook.&lt;br /&gt;&lt;br /&gt;Now on minimizing outlook it will move to system tray.&lt;br /&gt;&lt;br /&gt;&lt;script src="http://connect.facebook.net/en_US/all.js#xfbml=1"&gt;&lt;/script&gt;&lt;like action="like" colorscheme="light" layout="standard" show_faces="false" width="450"&gt;&lt;/like&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/800716815110966936-7725383166985198070?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/7725383166985198070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=7725383166985198070' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/7725383166985198070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/7725383166985198070'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2011/01/registry-trick-keeping-outlook-2002-in.html' title='Registry Trick: Keeping the Outlook 2002 in system tray instead of taskbar'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-2730244145899312382</id><published>2011-01-21T23:26:00.001+05:30</published><updated>2011-02-06T21:03:55.097+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows XP'/><category scheme='http://www.blogger.com/atom/ns#' term='registry'/><title type='text'>Registry Trick: Hide and lock any drive(s) using regedit</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;You can hide any of drive(s) by just adding two keys in windows registry&lt;br /&gt;&lt;br /&gt;goto start&amp;gt;run &lt;br /&gt;&lt;br /&gt;Type regedit and press enter. This will bring you to the registry editor.To hide any drive you have to follow these 2 steps&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;STEP1: Hidding Drive&lt;/strong&gt;&lt;br /&gt;goto HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer now create a new &lt;strong&gt;DWORD&lt;/strong&gt; value &lt;strong&gt;NoDrives&lt;/strong&gt; and set its value as &lt;br /&gt;&lt;br /&gt;2^(Alpha Number of Drive Letter-1)&lt;br /&gt;where Alpha number are simple counting of alphabets from A to Z as 1 - 26 &lt;br /&gt;&lt;br /&gt;for example: to hide C drive &lt;br /&gt;Alpha number of C is 3 so 2^(3-1) = 4 (decimal value)&lt;br /&gt;&lt;br /&gt;If you want to hide more than one drive than calculate the value of each drive as explained and then set sum of those numbers as value&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step2: Prevent Access to the drive&lt;/strong&gt;&lt;br /&gt;Now as we have make our drive invissible but it is still accesible so to lock the drive we will create another &lt;strong&gt;DWORD&lt;/strong&gt; value at&lt;br /&gt;&lt;br /&gt;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer &lt;br /&gt;create a new DWORD value &lt;strong&gt;NoViewOnDrive&lt;/strong&gt; and set its value same as you have calculated for hidding the drive(s)&lt;br /&gt;&lt;br /&gt;Now your drive is locked. If you want to unlock and unhidden the drive then just delete these two keys and your drive is again accessible. You can also create two .reg files one for hidding and locking and another one for unlocking and unhidding&lt;br /&gt;&lt;br /&gt;&lt;script src="http://connect.facebook.net/en_US/all.js#xfbml=1"&gt;&lt;/script&gt;&lt;like action="like" colorscheme="light" layout="standard" show_faces="false" width="450"&gt;&lt;/like&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/800716815110966936-2730244145899312382?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/2730244145899312382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=2730244145899312382' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/2730244145899312382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/2730244145899312382'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2011/01/hide-and-lock-any-drives-using-regedit.html' title='Registry Trick: Hide and lock any drive(s) using regedit'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-5256487864644512262</id><published>2010-12-11T21:18:00.002+05:30</published><updated>2011-02-06T21:04:44.681+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><title type='text'>javascript Date difference in days</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Many times it is required to compare two Date object and get the difference between the dates in days. Following javascript function will get you the difference in days&lt;br /&gt;&lt;div style="background-color: lightgrey; border-bottom: black 1px solid; border-left: black 1px solid; border-right: black 1px solid; border-top: black 1px solid; color: black; font-size: 12px; height: 240px; overflow: auto; padding-left: 10px; width: 450px;"&gt;&lt;br /&gt;Date.getDaysDifference = function(fromDate,toDate)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;fromDate = new Date(fromDate.getFullYear(),fromDate.getMonth(),fromDate.getDate());&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;toDate = new Date(toDate.getFullYear(),toDate.getMonth(),toDate.getDate());&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return ((toDate-fromDate)/86400000); //Total millisends in day =1000*60*60*24&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Date.prototype.getDaysDifference = function(toDate)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return Date.getDaysDifference(this,toDate);&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;strong&gt;Usage Example&lt;/strong&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;var fromDate= new Date(2010,1,1);&lt;br /&gt;var toDate= new Date(); //today's date&lt;br /&gt;alert(Date.getDaysDifference(fromDate,toDate));&lt;br /&gt;//or&lt;br /&gt;alert(fromDate.getDaysDifference(toDate));&lt;br /&gt;&lt;br /&gt;&lt;script src="http://connect.facebook.net/en_US/all.js#xfbml=1"&gt;&lt;/script&gt;&lt;like action="like" colorscheme="light" layout="standard" show_faces="false" width="450"&gt;&lt;/like&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/800716815110966936-5256487864644512262?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/5256487864644512262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=5256487864644512262' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/5256487864644512262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/5256487864644512262'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2010/12/javcrscript-date-difference-in-days.html' title='javascript Date difference in days'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-4534189655263830084</id><published>2010-11-20T00:05:00.001+05:30</published><updated>2011-02-06T21:02:53.898+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='yahoo messenger'/><category scheme='http://www.blogger.com/atom/ns#' term='registry'/><title type='text'>Registry Trick: Multiple instances of yahoo messenger</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Have you ever felt the need of using multiple yahoo messenger instance from the same machine? Yes, then here is the way to do it. &lt;br /&gt;&lt;br /&gt;•Click start then run. Write regedit, press enter&lt;br /&gt;•Goto "HKEY_CURRENT_USER\Software\Yahoo\Pager\Test"&lt;br /&gt;•Create a DWORD registry value named "Plural" by right clicking the right hand side window.&lt;br /&gt;•Double click the new DWORD entry and set the value to 1&lt;br /&gt;Now you remain online with two or more different yahoo ids at the same time.&lt;br /&gt;&lt;br /&gt;source: http://www.thinkdigit.com/forum/showthread.php?t=55350&lt;br /&gt;&lt;br /&gt;&lt;script src="http://connect.facebook.net/en_US/all.js#xfbml=1"&gt;&lt;/script&gt;&lt;like action="like" colorscheme="light" layout="standard" show_faces="false" width="450"&gt;&lt;/like&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/800716815110966936-4534189655263830084?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/4534189655263830084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=4534189655263830084' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/4534189655263830084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/4534189655263830084'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2010/11/registry-trick-multiple-instances-of.html' title='Registry Trick: Multiple instances of yahoo messenger'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-9183170144137991238</id><published>2010-11-17T15:43:00.001+05:30</published><updated>2011-02-06T21:05:45.043+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#.NET'/><title type='text'>Timeout Expired in SqlConnection.Open method</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Recently we encoutered a strange exception at SqlConnection.Open method in our application. The exception raised was&lt;br /&gt;&lt;br /&gt;&lt;div style="border-bottom: #000000 1px solid; border-left: #000000 1px solid; border-right: #000000 1px solid; border-top: #000000 1px solid; height: 300px; overflow: auto; width: 450px;"&gt;&lt;br /&gt;&lt;strong&gt;Exception Type&lt;/strong&gt;: SqlException&lt;br /&gt;&lt;strong&gt;Exception message:&lt;/strong&gt; Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.&lt;br /&gt;&lt;strong&gt;Stack Trace: &lt;/strong&gt;System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.&lt;br /&gt;at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)&lt;br /&gt;at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)&lt;br /&gt;at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)&lt;br /&gt;at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)&lt;br /&gt;at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)&lt;br /&gt;at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt, Boolean trustServerCert, Boolean&amp;amp; marsCapable)&lt;br /&gt;at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)&lt;br /&gt;at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)&lt;br /&gt;at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)&lt;br /&gt;at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)&lt;br /&gt;at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)&lt;br /&gt;at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)&lt;br /&gt;at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)&lt;br /&gt;at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)&lt;br /&gt;at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)&lt;br /&gt;at System.Data.SqlClient.SqlConnection.Open()&lt;/div&gt;&lt;br /&gt;The application task was to call a procedure on receiving data in a file which the application keeps on monitoring. After looking into the sql server logs and Activity monitor for the reason we came to know that there were too many opened connections. We thought that this could be the possible reason and we patched the application accordingly and closed all the Connection immediately after use but this doesn't worked and the exception was still occuring.&lt;br /&gt;&lt;br /&gt;This brings us to conclude that there must be some problem with the server and thus we started googling and found the most possible reason that the IPSec is blocking the random port which SqlClient is picking up to connect to the server(&lt;a href="http://blogs.msdn.com/b/toddca/archive/2008/03/23/database-disconnect-issues-with-sharepoint.aspx"&gt;see here&lt;/a&gt;). To fix this we changed the network protocol to be used by the sql client in the connection string. We used shared memory protocol because the application was running on server and it provide a better performance than any other protocol. Till now we have not received the exception yet and we hope it will not occur again.&lt;br /&gt;&lt;br /&gt;&lt;script src="http://connect.facebook.net/en_US/all.js#xfbml=1"&gt;&lt;/script&gt;&lt;like action="like" colorscheme="light" layout="standard" show_faces="false" width="450"&gt;&lt;/like&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/800716815110966936-9183170144137991238?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/9183170144137991238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=9183170144137991238' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/9183170144137991238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/9183170144137991238'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2010/11/timeout-expired.html' title='Timeout Expired in SqlConnection.Open method'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-8139877553141942971</id><published>2010-11-14T14:07:00.000+05:30</published><updated>2011-02-06T20:31:04.050+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MAC address'/><category scheme='http://www.blogger.com/atom/ns#' term='MACspoofing'/><title type='text'>MAC Spoofing</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;strong&gt;What is MAC address?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Each and every network device in this world have a unique MAC (Medium access control) address. A MAC address is a 6 byte address which is often displayed in XX-XX-XX-XX-XX-XX where each X is a hex digit like 00-1D-2F-BE-BA-01 or AE-01-AE-29-BE-0F.&lt;br /&gt;&lt;br /&gt;In windows we can get the mac address by using &lt;strong&gt;ipconfig /all&lt;/strong&gt; command or using &lt;strong&gt;getmac&lt;/strong&gt; command. These commands will return you the mac address each NIC (network interface card) connected to the computer. E.g.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is MAC Spoofing?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Changing of MAC address for making a node (computer or any device) get the identity of other node(desiguse) in the network is know as MAC spoofing. By changing the MAC address we spoof the network routing device like switch and router. Many switch and router provides a interface using which administrator can restrict the nodes in the network, typically called as MAC address filtering. Administrator can there define the MAC address of devices which are allowed to connect to the network and thus prevents conectivity of unidentified node to the network.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How to change a MAC address?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In windows we can change the MAC address using multiple ways.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Method1:&lt;/u&gt; Using network card configuration window. Goto &lt;strong&gt;Control Panel&amp;gt;Network Connections&lt;/strong&gt; select the network right click on it select properties this will open up Network connection properties.&lt;br /&gt;Now click on the configuration button this will open the NIC device (using which network is communicating) properties which can be also opened via device manager. Select the Advanced tab from the NIC device property window and select the "&lt;strong&gt;Network Address&lt;/strong&gt;" from the property list and set its new value to any desired valid MAC address. &lt;a href="http://1.bp.blogspot.com/_2EpAPkKH8dM/TN-w5qhBUeI/AAAAAAAACUI/kjEsEXChFhw/s1600/ss1.jpg"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5539340571400819170" src="http://1.bp.blogspot.com/_2EpAPkKH8dM/TN-w5qhBUeI/AAAAAAAACUI/kjEsEXChFhw/s320/ss1.jpg" style="cursor: hand; float: left; height: 320px; margin: 0px 10px 10px 0px; width: 254px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_2EpAPkKH8dM/TN-w57F1GyI/AAAAAAAACUQ/ZPBfgbTsaZw/s1600/ss2.jpg"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5539340575850175266" src="http://2.bp.blogspot.com/_2EpAPkKH8dM/TN-w57F1GyI/AAAAAAAACUQ/ZPBfgbTsaZw/s320/ss2.jpg" style="cursor: hand; float: left; height: 320px; margin: 0px 10px 10px 0px; width: 289px;" /&gt;&lt;/a&gt;&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;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/800716815110966936-8139877553141942971?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/8139877553141942971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=8139877553141942971' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/8139877553141942971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/8139877553141942971'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2010/11/mac-spoofing.html' title='MAC Spoofing'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_2EpAPkKH8dM/TN-w5qhBUeI/AAAAAAAACUI/kjEsEXChFhw/s72-c/ss1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-4438442644058779232</id><published>2010-11-10T22:14:00.001+05:30</published><updated>2011-02-06T21:06:08.956+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><title type='text'>Javascript injections and Javascript debugging techniques.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Javascript injection is a technique of executing javascript in already loaded page in a browser. JS injections are commonly used for executing XSS(cross side scripting), SQL injection, for bypassing client side validations and also for debugging javascript in webpages.&lt;br /&gt;There are many approach by which we can execute a javascript injection, few of them are shown here&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;1. Query inside address bar (works in almost all brower):&lt;/u&gt;&lt;/strong&gt; Like we write javascript statement in anchor href attribute which gets executed on click of anchor. In the same way we can put javascript in address bar and execute them.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;E.g&lt;/strong&gt;. Copy and paste below given line in address bar and press enter&lt;br /&gt;javascript: alert("This is a simple js injection.");&lt;br /&gt;we can also add a js function using js injection like&lt;br /&gt;javascript: void(window.myfunc = function(){alert("This alert is shown via myfunc function.");}); func();&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;strong&gt;2. Using browser js debugger&lt;/strong&gt;:&lt;/u&gt; Almost all modern browser have there debugger for the web developers. Like IE Developer Tools (which comes with IE8 and onwards), firebug in Mozilla, Dragonfly in Opera. These all tools have a javascipt console where we can write javascript and execute them. Using these tools we can even write multiline javascript.&lt;br /&gt;&lt;br /&gt;&lt;script src="http://connect.facebook.net/en_US/all.js#xfbml=1"&gt;&lt;/script&gt;&lt;like action="like" colorscheme="light" layout="standard" show_faces="false" width="450"&gt;&lt;/like&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/800716815110966936-4438442644058779232?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/4438442644058779232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=4438442644058779232' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/4438442644058779232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/4438442644058779232'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2010/11/javascript-injections-and-javascript.html' title='Javascript injections and Javascript debugging techniques.'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-9204242544676014824</id><published>2009-11-17T21:13:00.001+05:30</published><updated>2011-02-06T21:03:26.441+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><title type='text'>C# like trim(),trimStart(),trimEnd() function in javascript</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;code&gt;String.prototype.trimStart=function(c)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;{&lt;/code&gt;&lt;br /&gt;&lt;code&gt;c = c?c:' ';&lt;/code&gt;&lt;br /&gt;&lt;code&gt;var i=0;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;for(;i&lt;this.length&gt;&lt;br /&gt;&lt;code&gt;return this.substring(i);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;br /&gt;String.prototype.trimEnd=function(c)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;{&lt;/code&gt;&lt;br /&gt;&lt;code&gt;c = c?c:' ';&lt;/code&gt;&lt;br /&gt;&lt;code&gt;var i=this.length-1;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;for(;i&amp;gt;=0 &amp;amp;&amp;amp; this.charAt(i)==c;i--);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;return this.substring(0,i+1);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;br /&gt;&lt;code&gt;String.prototype.trim=function(c)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;{&lt;/code&gt;&lt;br /&gt;&lt;code&gt;return this.trimStart(c).trimEnd(c);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;br /&gt;&lt;code&gt;Example:&lt;/code&gt;&lt;br /&gt;&lt;code&gt;" anil soni ".trim() &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;script src="http://connect.facebook.net/en_US/all.js#xfbml=1"&gt;&lt;/script&gt;&lt;like action="like" colorscheme="light" layout="standard" show_faces="false" width="450"&gt;&lt;/like&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/800716815110966936-9204242544676014824?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/9204242544676014824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=9204242544676014824' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/9204242544676014824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/9204242544676014824'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2009/11/c-like-trim-function-in-javascript.html' title='C# like trim(),trimStart(),trimEnd() function in javascript'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-800716815110966936.post-4193925563764465249</id><published>2007-01-15T15:11:00.001+05:30</published><updated>2011-02-06T21:07:15.751+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='stagnography'/><title type='text'>Hide your information in Images</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div align="justify"&gt;Now&amp;nbsp;every&amp;nbsp;one&amp;nbsp;here&amp;nbsp;on&amp;nbsp;internet&amp;nbsp;want&amp;nbsp;to&amp;nbsp;hide&amp;nbsp;there&amp;nbsp;data&amp;nbsp;like&amp;nbsp;usernames&amp;nbsp;and&amp;nbsp;password&amp;nbsp;etc.&amp;nbsp;So&amp;nbsp;here&amp;nbsp;i&amp;nbsp;am&amp;nbsp;telling&lt;br /&gt;you&amp;nbsp;the&amp;nbsp;method&amp;nbsp;used&amp;nbsp;by&amp;nbsp;spies. Take&amp;nbsp;any&amp;nbsp;of&amp;nbsp;your&amp;nbsp;faourite&amp;nbsp;Image(should&amp;nbsp;be&amp;nbsp;a jpeg file)&amp;nbsp;for eg. myimage.jpeg now&lt;br /&gt;put all your secret data in a text file and then archive this file with winzip, winrar any software. Now open command prompt and type&lt;br /&gt;[code]copy /b myimge.jpeg+hidden.zip newfile.jpeg [Press enter][/code]&lt;br /&gt;now this will create a new&amp;nbsp;image&amp;nbsp;file&amp;nbsp;-&amp;nbsp;newfile.jpeg if you will open&amp;nbsp;this&amp;nbsp;file&amp;nbsp;you&amp;nbsp;will&amp;nbsp;see&amp;nbsp;your&amp;nbsp;favourite &amp;nbsp;image&amp;nbsp;but when&amp;nbsp;you&amp;nbsp;open&amp;nbsp;this&amp;nbsp;file&amp;nbsp;in&amp;nbsp;winzip&amp;nbsp;or&amp;nbsp;winrar&amp;nbsp;then&amp;nbsp;you&amp;nbsp;will&amp;nbsp;see&amp;nbsp;your&amp;nbsp;hidden&amp;nbsp;files&amp;nbsp;inside&amp;nbsp;it.&amp;nbsp;Extract&amp;nbsp;those&amp;nbsp;file&amp;nbsp;and&amp;nbsp;read&lt;br /&gt;them.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;script src="http://connect.facebook.net/en_US/all.js#xfbml=1"&gt;&lt;/script&gt;&lt;like action="like" colorscheme="light" layout="standard" show_faces="false" width="450"&gt;&lt;/like&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/800716815110966936-4193925563764465249?l=anilsoni85.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anilsoni85.blogspot.com/feeds/4193925563764465249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=800716815110966936&amp;postID=4193925563764465249' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/4193925563764465249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/800716815110966936/posts/default/4193925563764465249'/><link rel='alternate' type='text/html' href='http://anilsoni85.blogspot.com/2007/01/hide-your-information-in-images.html' title='Hide your information in Images'/><author><name>Anil Soni</name><uri>http://www.blogger.com/profile/11147812791354927004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-kgYonb9Due0/TXy-nJRCguI/AAAAAAAACYQ/XI2Wn5GZSa4/s220/avtar2.jpg'/></author><thr:total>0</thr:total></entry></feed>
