<?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-17335590</id><updated>2011-12-05T07:14:42.490Z</updated><title type='text'>Developers Guide</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://testtrack.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://testtrack.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Amir Alfoly</name><uri>http://www.blogger.com/profile/12542148343343168229</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-17335590.post-7194216207600370344</id><published>2010-12-19T22:09:00.004Z</published><updated>2010-12-19T22:32:23.111Z</updated><title type='text'>Restoring database replication tables like sysmergepublications</title><content type='html'>&lt;div&gt;For Microsoft SQL Servers,&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;To restore a database backup and keep the merge replication tables like &lt;b&gt;&lt;i&gt;sysmergepublications &lt;/i&gt;&lt;/b&gt;and &lt;b&gt;&lt;i&gt;sysmergearticles &lt;/i&gt;&lt;/b&gt;you need to restore the database from &lt;b&gt;T-SQL &lt;/b&gt;using the &lt;b&gt;RESTORE &lt;/b&gt;command and use the &lt;b&gt;keep_replication&lt;/b&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;This will allow you to restore the merge replication required data and the publication definition.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335590-7194216207600370344?l=testtrack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://testtrack.blogspot.com/feeds/7194216207600370344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17335590&amp;postID=7194216207600370344' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/7194216207600370344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/7194216207600370344'/><link rel='alternate' type='text/html' href='http://testtrack.blogspot.com/2010/12/restoring-database-replication-tables.html' title='Restoring database replication tables like sysmergepublications'/><author><name>Amir Alfoly</name><uri>http://www.blogger.com/profile/12542148343343168229</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17335590.post-2389592474862779618</id><published>2010-12-14T17:19:00.004Z</published><updated>2010-12-14T17:44:32.975Z</updated><title type='text'>Free UML Modeling using ArgoUML</title><content type='html'>&lt;div&gt;&lt;div&gt;I have tried ArgoUML and I thought that it will be nice that I share my first learning experience with you.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;A direct URL to my tutorial for modeling a simple class diagram:&lt;/div&gt;&lt;div&gt;&lt;a href="http://argouml.tigris.org/files/documents/4/48762/file_48762.dat/ArgoUML%20Tutorial.pdf"&gt;http://argouml.tigris.org/files/documents/4/48762/file_48762.dat/ArgoUML%20Tutorial.pdf&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can find also find more links in the Tutorials section:&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.argouml-users.net/index.php?title=Tutorials"&gt;http://www.argouml-users.net/index.php?title=Tutorials&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;If you are interested in this free UML modeling tool then try to visit:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://argouml.tigris.org/"&gt;http://argouml.tigris.org/&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/17335590-2389592474862779618?l=testtrack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://testtrack.blogspot.com/feeds/2389592474862779618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17335590&amp;postID=2389592474862779618' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/2389592474862779618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/2389592474862779618'/><link rel='alternate' type='text/html' href='http://testtrack.blogspot.com/2010/12/free-uml-modeling-using-argouml.html' title='Free UML Modeling using ArgoUML'/><author><name>Amir Alfoly</name><uri>http://www.blogger.com/profile/12542148343343168229</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17335590.post-1797516463441313938</id><published>2009-05-17T21:09:00.005Z</published><updated>2009-05-17T21:21:10.416Z</updated><title type='text'>Converting CString to double in MFC</title><content type='html'>You can use the following snippet to convert &lt;span style="font-weight: bold;"&gt;CString &lt;/span&gt;to &lt;span style="font-weight: bold;"&gt;double &lt;/span&gt;in MFC:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;#include &lt;stdlib.h&gt;&lt;/stdlib.h&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;"stdlib.h"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;double func(CString pValue)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;        wchar_t* stopString;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;        double num = wcstod(&lt;/span&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;pValue&lt;/span&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;&lt;/span&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;, &amp;amp;stopString);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;return num;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;}&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335590-1797516463441313938?l=testtrack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://testtrack.blogspot.com/feeds/1797516463441313938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17335590&amp;postID=1797516463441313938' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/1797516463441313938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/1797516463441313938'/><link rel='alternate' type='text/html' href='http://testtrack.blogspot.com/2009/05/converting-cstring-to-double-in-mfc.html' title='Converting CString to double in MFC'/><author><name>Amir Alfoly</name><uri>http://www.blogger.com/profile/12542148343343168229</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17335590.post-99785259721425336</id><published>2009-04-07T09:25:00.001Z</published><updated>2009-04-07T09:26:09.589Z</updated><title type='text'>View Native DLL Dependencies</title><content type='html'>&lt;p&gt;If you develop a native DLL using Visual Studio 2005 SP1, you may need to know the dependencies of this DLL in order to ship it with your application, you can use the Visual Studio utility: &lt;strong&gt;depends.exe&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;a href="http://lh5.ggpht.com/_pXkS4IVsgsg/Sdsb4pOLHbI/AAAAAAAAAEo/Hdg2ei5Qz6g/s1600-h/image%5B4%5D.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="377" alt="image" src="http://lh6.ggpht.com/_pXkS4IVsgsg/Sdsb7pYIH7I/AAAAAAAAAEs/mzGlCGidc7A/image_thumb%5B2%5D.png?imgmax=800" width="644" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Run Visual Studio Command Prompt&lt;/li&gt;    &lt;li&gt;type depends.exe and press enter.&lt;/li&gt;    &lt;li&gt;Click file-&amp;gt;open to choose your DLL.&lt;/li&gt;    &lt;li&gt;View the dependencies in the left side tree view.&lt;/li&gt; &lt;/ol&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335590-99785259721425336?l=testtrack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://testtrack.blogspot.com/feeds/99785259721425336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17335590&amp;postID=99785259721425336' title='26 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/99785259721425336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/99785259721425336'/><link rel='alternate' type='text/html' href='http://testtrack.blogspot.com/2009/04/view-native-dll-dependences.html' title='View Native DLL Dependencies'/><author><name>Amir Alfoly</name><uri>http://www.blogger.com/profile/12542148343343168229</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_pXkS4IVsgsg/Sdsb7pYIH7I/AAAAAAAAAEs/mzGlCGidc7A/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>26</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17335590.post-7491246771387847667</id><published>2007-10-07T22:57:00.000Z</published><updated>2007-10-07T23:30:55.269Z</updated><title type='text'>Office SharePoint Server Development - What's Needed?</title><content type='html'>To begin playing with SharePoint Development you will need:&lt;br /&gt;&lt;br /&gt;- Windows Server 2003.&lt;br /&gt;- Install &lt;a href="http://technet.microsoft.com/en-us/windowsserver/sharepoint/bb400747.aspx"&gt;Windows SharePoint Services 3.0 (WSS)&lt;/a&gt; or Microsoft Office SharePoint Server (MOSS)&lt;br /&gt;- Visual Studio 2005&lt;br /&gt;- &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=10CC340B-F857-4A14-83F5-25634C3BF043&amp;amp;displaylang=en"&gt;.NET Framework 3.0&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=5D61409E-1FA3-48CF-8023-E8F38E709BA6&amp;amp;displaylang=en"&gt;Microsoft® Visual Studio® 2005 Extensions for Windows Workflow Foundation&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=19F21E5E-B715-4F0C-B959-8C6DCBDC1057&amp;amp;displaylang=en"&gt;&lt;span style="font-size:100%;"&gt;Windows SharePoint Services 3.0 Tools: Visual Studio 2005 Extensions&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=6d94e307-67d9-41ac-b2d6-0074d6286fa9&amp;amp;displaylang=en"&gt;&lt;span style="font-size:100%;"&gt;SharePoint Server 2007 SDK: Software Development Kit&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335590-7491246771387847667?l=testtrack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://testtrack.blogspot.com/feeds/7491246771387847667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17335590&amp;postID=7491246771387847667' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/7491246771387847667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/7491246771387847667'/><link rel='alternate' type='text/html' href='http://testtrack.blogspot.com/2007/10/office-sharepoint-server-development.html' title='Office SharePoint Server Development - What&apos;s Needed?'/><author><name>Amir Alfoly</name><uri>http://www.blogger.com/profile/12542148343343168229</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17335590.post-114001164653186103</id><published>2006-02-15T13:47:00.001Z</published><updated>2007-10-10T02:52:30.076Z</updated><title type='text'>C# Invalid Cross Thread Operation</title><content type='html'>In  .NET Framework 2.0 with default settings you can not change a Windows Control Property from an external thread, and if you try to do that you will get the following Exception&lt;br /&gt;"Invalid Cross-Thread Operation"&lt;br /&gt;&lt;br /&gt;to avoid this exception you can disable the checking for invalid Cross-Thread Operation by setting this static Property to false:&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Control.CheckForIllegalCrossThreadCalls = false;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);font-family:arial;" &gt;This settings is not recommended it is done only to avoid the exception appearing while debugging, it may cause serious problems if you disabled it (its done mainly to warn you while you debug your application).&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;To See other techniques to avoid this problem, see:&lt;br /&gt;&lt;a href="http://weblogs.asp.net/justin_rogers/archive/2004/10/08/240077.aspx"&gt;http://weblogs.asp.net/justin_rogers/archive/2004/10/08/240077.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.wwwcoder.com/amachin/archive/2004/12/15/1146.aspx"&gt;http://blogs.wwwcoder.com/amachin/archive/2004/12/15/1146.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335590-114001164653186103?l=testtrack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://testtrack.blogspot.com/feeds/114001164653186103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17335590&amp;postID=114001164653186103' title='87 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/114001164653186103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/114001164653186103'/><link rel='alternate' type='text/html' href='http://testtrack.blogspot.com/2006/02/c-invalid-cross-thread-operation_15.html' title='C# Invalid Cross Thread Operation'/><author><name>Amir Alfoly</name><uri>http://www.blogger.com/profile/12542148343343168229</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>87</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17335590.post-113931226676454532</id><published>2006-02-07T11:31:00.000Z</published><updated>2006-02-07T11:37:46.773Z</updated><title type='text'>Invalid character value for cast specification</title><content type='html'>&lt;span style="font-family:arial;"&gt;If you catch this error and you are trying to use a DateTime Value with &lt;span style="font-weight: bold;"&gt;SQL Server&lt;/span&gt; then check that your date in this range:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1/1/1753&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;31/12/9999&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;it will probably fix the problem&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335590-113931226676454532?l=testtrack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://testtrack.blogspot.com/feeds/113931226676454532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17335590&amp;postID=113931226676454532' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/113931226676454532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/113931226676454532'/><link rel='alternate' type='text/html' href='http://testtrack.blogspot.com/2006/02/invalid-character-value-for-cast.html' title='Invalid character value for cast specification'/><author><name>Amir Alfoly</name><uri>http://www.blogger.com/profile/12542148343343168229</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17335590.post-112990600339663584</id><published>2005-10-21T14:46:00.000Z</published><updated>2005-10-21T15:01:31.290Z</updated><title type='text'>PDF Files</title><content type='html'>&lt;strong&gt;&lt;/strong&gt;I found a fantastic class library project to edit and create PDF files its name is "IText_Sharp" which is an import for the original project "IText" from Java to C#, Check it out if you need to edit or create PDF files.&lt;br /&gt;&lt;a href="http://www.sourceforge.net/projects/itextsharp/"&gt;www.sourceforge.net/projects/itextsharp/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335590-112990600339663584?l=testtrack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://testtrack.blogspot.com/feeds/112990600339663584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17335590&amp;postID=112990600339663584' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/112990600339663584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/112990600339663584'/><link rel='alternate' type='text/html' href='http://testtrack.blogspot.com/2005/10/pdf-files.html' title='PDF Files'/><author><name>Amir Alfoly</name><uri>http://www.blogger.com/profile/12542148343343168229</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17335590.post-112887475584171945</id><published>2005-10-09T15:56:00.000Z</published><updated>2005-10-21T15:03:31.786Z</updated><title type='text'>Coding Style</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;strong&gt;&lt;/strong&gt;coding style &lt;/span&gt;&lt;span style=";font-family:Trebuchet MS;font-size:100%;"  &gt;is an important factor in producing an efficient code that can be reused or modified eaisly&lt;/span&gt;&lt;span style="font-size:100%;"&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:Trebuchet MS;font-size:100%;"  &gt;I will review here basic hints in coding styles&lt;/span&gt;&lt;span style="font-size:100%;"&gt;:&lt;br /&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;naming variables: best way to name a variable is to choose first an abreviation for it based on its type like "str" for "String" and "num" for "Numebers", then add a descriptive name for the variable ex: if you are declaring a variable for the Monthly Income its name may be like "numMonthlyIncome", take care that to make the variable readable Start every descriptve word in it with a capital letter and the varaiable abbreviation must be in small letters.&lt;/span&gt;&lt;/li&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;  &lt;/span&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;naming Functions: try to name Functions so that describe their operation and target and avoid ambigous names, and concentrate on choosing a name that describes the output not the input since the input will be described in the parameteres declaration in the function ex: int GetAverageIncome(string strEmployeeName).&lt;/span&gt;&lt;/li&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;  &lt;/span&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Return Codes: it is a coding style where all the functions in the code always returns an integer value describing the status of the result or any other related message like errors that may occure or confirmation messages or you can combine between the return value of a function and its return codes like in the example of the previous function declaration, we know that an average value of an income must be always a postive value so we can return negative values describing error messages like -1 for "That employee does not exist in the database" and so on.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:100%;"&gt;    &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335590-112887475584171945?l=testtrack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://testtrack.blogspot.com/feeds/112887475584171945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17335590&amp;postID=112887475584171945' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/112887475584171945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/112887475584171945'/><link rel='alternate' type='text/html' href='http://testtrack.blogspot.com/2005/10/coding-style.html' title='Coding Style'/><author><name>Amir Alfoly</name><uri>http://www.blogger.com/profile/12542148343343168229</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17335590.post-112838258711544034</id><published>2005-10-03T22:52:00.000Z</published><updated>2007-10-10T02:53:52.711Z</updated><title type='text'>VBScript and COM (The Array Dilemma) !</title><content type='html'>&lt;span style="color: rgb(255, 153, 0);font-family:arial;font-size:100%;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;its my second day to deal with COM and VBScript and i have faced the problem of passing arrays to and from .NET DLL serving as a COM Component, i described how to do this in the previous post&lt;br /&gt;&lt;br /&gt;A problem arises when trying to return an array from a function or pass array to it&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How to reproduce:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt; &lt;ul  style="font-family:arial;"&gt;   &lt;li&gt;&lt;span style="font-size:100%;"&gt;you have a .NET DLL using it as a COM Object&lt;/span&gt;&lt;/li&gt;   &lt;li&gt;&lt;span style="font-size:100%;"&gt;you have a function in a class that returns an array of any type&lt;/span&gt;&lt;/li&gt;   &lt;li&gt;&lt;span style="font-size:100%;"&gt;you create an instance of this class using CreateObject&lt;/span&gt;&lt;/li&gt;   &lt;li&gt;&lt;span style="font-size:100%;"&gt;you call the function that returns an array&lt;/span&gt;&lt;/li&gt;   &lt;li&gt;&lt;span style="font-size:100%;"&gt;test the array using IsArray() and VarType() and Ubound()&lt;/span&gt;&lt;/li&gt;   &lt;li&gt;&lt;span style="font-size:100%;"&gt;the object is truly an array and its VarType() denots its type and Ubound() gives its valid size&lt;/span&gt;&lt;/li&gt;   &lt;li&gt;&lt;span style="font-size:100%;"&gt;then you an item in the array it will give you error "Type Mismatch" !!&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt; &lt;span style=";font-family:arial;font-size:100%;"  &gt;&lt;span style="font-weight: bold;"&gt;Why:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;ul  style="font-family:arial;"&gt;   &lt;li&gt;&lt;span style="color: rgb(255, 153, 0);font-family:arial;font-size:100%;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;VBScript datatypes are all based on a basic type called "Variant" which may corresponds to the "Object" data type in .NET&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;   &lt;li&gt;&lt;span style="color: rgb(255, 153, 0);font-family:arial;font-size:100%;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;its logic that if VBScript can know the array type which it can access, so why when trying to access a certain item in the array it gives "Type Mismatch" !!!!&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;   &lt;li&gt;&lt;span style="color: rgb(255, 153, 0);font-family:arial;font-size:100%;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;i think that this is due to a diffrence in implementing and viewing the array from the prespective of .NET and the prespective of VBScript&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;   &lt;li&gt;&lt;span style="color: rgb(255, 153, 0);font-family:arial;font-size:100%;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Some solutions on the newsgroups said that you must return your datatype as an Object and this worked in some cases&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;   &lt;li&gt;&lt;span style="color: rgb(255, 153, 0);font-family:arial;font-size:100%;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;the version of the VBScript processor DLL may have also an influnce in producing this problem&lt;/span&gt;&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335590-112838258711544034?l=testtrack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://testtrack.blogspot.com/feeds/112838258711544034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17335590&amp;postID=112838258711544034' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/112838258711544034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/112838258711544034'/><link rel='alternate' type='text/html' href='http://testtrack.blogspot.com/2005/10/vbscript-and-com-array-dilemma.html' title='VBScript and COM (The Array Dilemma) !'/><author><name>Amir Alfoly</name><uri>http://www.blogger.com/profile/12542148343343168229</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17335590.post-112829806432984392</id><published>2005-10-02T23:52:00.000Z</published><updated>2007-10-10T02:45:46.886Z</updated><title type='text'>Calling .NET DLL from Classic ASP Page</title><content type='html'>&lt;span style=";font-family:arial;font-size:100%;"  &gt;I needed to call a .NET DLL from some ASP pages, the DLL was for a search engine and the ASP site was serving as its interface i have done some research and found a way to deal with this the steps are as following:&lt;br /&gt;&lt;br /&gt;1- Create a DLL in .NET and be aware that only one class will be used from it (I wasn't able to use any other class than the first one in the dll)&lt;br /&gt;&lt;br /&gt;2- build the project&lt;br /&gt;&lt;br /&gt;3- Open .NET Command prompt from the tools of .NET located in the Start Menu Shortcuts of .NET&lt;br /&gt;&lt;br /&gt;4- Run the following command:&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 0);font-family:courier new;" &gt;Regasm [Your DLL Path] /codebase&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;5- in your ASP page create an object from your DLL class&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;set Inst = Server.CreateObject("NameSpace.ClassName")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:times new roman;" &gt;replace the NameSpace by your DLL NameSpace and the ClassName by your class name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:times new roman;" &gt;Note:this code runs in VBScript and it would defer a little if JScript was used&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;6- You can call a function from your dll using the instance created like:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;Inst.CallFunction()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335590-112829806432984392?l=testtrack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://testtrack.blogspot.com/feeds/112829806432984392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17335590&amp;postID=112829806432984392' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/112829806432984392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/112829806432984392'/><link rel='alternate' type='text/html' href='http://testtrack.blogspot.com/2005/10/calling-net-dll-from-classic-asp-page.html' title='Calling .NET DLL from Classic ASP Page'/><author><name>Amir Alfoly</name><uri>http://www.blogger.com/profile/12542148343343168229</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17335590.post-112817612939794634</id><published>2005-10-01T13:18:00.000Z</published><updated>2005-11-12T00:56:26.046Z</updated><title type='text'>How to call C or C++ DLL in C#</title><content type='html'>&lt;span style="font-family:arial;"&gt;You can call functions in a dll using the following simple method&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;1) you must know the function prototype (name of the function and its parameters and its return type).&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;2) in your code use a code like the following where &lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;DllImport &lt;/span&gt;&lt;span style="font-family:arial;"&gt;Specfies the dll where the function exists and the line under it specifies the function prototype.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;using System.Runtime.InteropServices;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;namespace myNameSpace&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;    public class MyClass&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;        [DllImport("DLLPath.DLL")]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;        public static extern int FunctionName(int Argument1, bool Argument2);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;an Example for using &lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;DllImport&lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;font-family:arial;" &gt; &lt;/span&gt;&lt;span style="font-family:arial;"&gt;is to use a Windows API function&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;we will call a a function that can make you copy a file, its name is CopyFile and it is loacted in Kernel32.dll&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;this code sample demonstrate how to call this function&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;using System.Runtime.InteropServices;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;namespace FileSystemClasses&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;    public class FileSystem&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;        [DllImport("Kernel32.DLL")]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;        public static extern bool CopyFile(string strSourcePath, string strTargetPath, bool bOverwrite);&lt;br /&gt;&lt;br /&gt;      public void TestDll()&lt;br /&gt;     {&lt;br /&gt;  FileSystem.CopyFile("c:\\a.txt", "c:\\b.txt", true);&lt;br /&gt;     }&lt;br /&gt;&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;there are other options that can be used with DllImport directive which gives some advanced options and more control which can be explained in another article&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;For a list of Windows API Functions according to their usage go to:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdkintro/sdkintro/contents_of_the_platform_sdk.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdk&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdkintro/sdkintro/contents_of_the_platform_sdk.asp"&gt;intro/sdkintro/contents_of_the_platform_sdk.asp&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335590-112817612939794634?l=testtrack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://testtrack.blogspot.com/feeds/112817612939794634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17335590&amp;postID=112817612939794634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/112817612939794634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335590/posts/default/112817612939794634'/><link rel='alternate' type='text/html' href='http://testtrack.blogspot.com/2005/10/how-to-call-c-or-c-dll-in-c.html' title='How to call C or C++ DLL in C#'/><author><name>Amir Alfoly</name><uri>http://www.blogger.com/profile/12542148343343168229</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
