<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Microsonic Development</title>
	
	<link>http://microsonic.org</link>
	<description />
	<lastBuildDate>Thu, 21 Jan 2010 21:14:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Microsonic" /><feedburner:info uri="microsonic" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>New Year – Lots of Work to be Done!</title>
		<link>http://feedproxy.google.com/~r/Microsonic/~3/5QJOQE5qyZ0/</link>
		<comments>http://microsonic.org/2010/01/21/new-year-lots-of-work-to-be-done/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 21:14:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://microsonic.org/?p=203</guid>
		<description><![CDATA[Hey everyone,
The new year has brought a tremendous amount of work along with it and I want to thank all of you. I definitely prefer an abundance of work to a scarcity of work, and that is surely the situation I find myself in today. As soon as I finish these projects up, however, I [...]]]></description>
			<content:encoded><![CDATA[<p>Hey everyone,</p>
<p>The new year has brought a tremendous amount of work along with it and I want to thank all of you. I definitely prefer an abundance of work to a scarcity of work, and that is surely the situation I find myself in today. As soon as I finish these projects up, however, I will be writing some new tutorials.</p>
<p>In the recent and current projects I&#8217;ve received I have encountered some tasks that I have found unusual and so took some time to figure out an efficient way to complete the task. Not that some of the things haven&#8217;t already been done, but since they are new to me I will try (being not far from the situation of the user seeking help since it was just days or weeks prior that I was in also in that situation) to explain them as thoroughly and simply as possible. </p>
<p>It seems the more familiar a topic becomes, the more difficult it is to relate to the issues of those just learning and that is why I try to write tutorials as soon as I have done something I find intriguing, but also familiarity (as you can see in the PHP/Salt tutorial) is not always a bad thing either because you can easily increase complexity and security. So more or less, it&#8217;s a give and take and I&#8217;m now beginning to ramble. </p>
<p>So in the meantime, hang tight, subscribe, and I will hopefully get these projects done quickly to write some more tutorials. Yes, I know I have been saying this for over a month, but the Holidays were very busy fortunately or unfortunately and work has to come first to tutorials since it&#8217;s a source of income as I&#8217;m sure it is for many of you (and so hopefully a bit easier to sympathize with my cause).</p>
<p>Regards,<br />
Dennis M.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/HjjHoOXA1DeXZxjoqHmukZHg4sA/0/da"><img src="http://feedads.g.doubleclick.net/~a/HjjHoOXA1DeXZxjoqHmukZHg4sA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/HjjHoOXA1DeXZxjoqHmukZHg4sA/1/da"><img src="http://feedads.g.doubleclick.net/~a/HjjHoOXA1DeXZxjoqHmukZHg4sA/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/Microsonic/~4/5QJOQE5qyZ0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://microsonic.org/2010/01/21/new-year-lots-of-work-to-be-done/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://microsonic.org/2010/01/21/new-year-lots-of-work-to-be-done/</feedburner:origLink></item>
		<item>
		<title>Happy Holidays to All!</title>
		<link>http://feedproxy.google.com/~r/Microsonic/~3/jK26zad9ywA/</link>
		<comments>http://microsonic.org/2009/12/15/happy-holidays-to-all/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 18:44:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[christmas]]></category>
		<category><![CDATA[happy]]></category>
		<category><![CDATA[merry]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[year]]></category>

		<guid isPermaLink="false">http://microsonic.org/?p=201</guid>
		<description><![CDATA[I would just like to thank every user for coming to the site! Unfortunately, my posts have been slow in the past few months (due to many out of town visits as well as the Holidays). Also, Merry Christmas and a Happy New Year to everyone as well! I hope it&#8217;s a wonderful holiday season [...]]]></description>
			<content:encoded><![CDATA[<p>I would just like to thank every user for coming to the site! Unfortunately, my posts have been slow in the past few months (due to many out of town visits as well as the Holidays). Also, Merry Christmas and a Happy New Year to everyone as well! I hope it&#8217;s a wonderful holiday season for you and your family.</p>
<p>Regards,<br />
Dennis M.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/GM6wPnBXuUc9NDUhpsmr0VBqUgE/0/da"><img src="http://feedads.g.doubleclick.net/~a/GM6wPnBXuUc9NDUhpsmr0VBqUgE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/GM6wPnBXuUc9NDUhpsmr0VBqUgE/1/da"><img src="http://feedads.g.doubleclick.net/~a/GM6wPnBXuUc9NDUhpsmr0VBqUgE/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/Microsonic/~4/jK26zad9ywA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://microsonic.org/2009/12/15/happy-holidays-to-all/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://microsonic.org/2009/12/15/happy-holidays-to-all/</feedburner:origLink></item>
		<item>
		<title>Why Not All Traffic Is Good Traffic</title>
		<link>http://feedproxy.google.com/~r/Microsonic/~3/Z3yFa8pW6iQ/</link>
		<comments>http://microsonic.org/2009/11/15/why-not-all-traffic-is-good-traffic/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 00:32:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[stats]]></category>
		<category><![CDATA[traffic]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://microsonic.org/?p=199</guid>
		<description><![CDATA[Web traffic; it&#8217;s the &#8220;money-maker&#8221; for many webmasters. But is all traffic really a good thing? Well, this is a topic that isn&#8217;t quite &#8220;black and white&#8221; so to speak. Traffic can have many affects on a site, both positive and negative. Ultimately, good traffic is defined as frequent visitors, or a visitor who buys [...]]]></description>
			<content:encoded><![CDATA[<p>Web traffic; it&#8217;s the &#8220;money-maker&#8221; for many webmasters. But is all traffic really a good thing? Well, this is a topic that isn&#8217;t quite &#8220;black and white&#8221; so to speak. Traffic can have many affects on a site, both positive and negative. Ultimately, good traffic is defined as frequent visitors, or a visitor who buys your product (if you&#8217;re selling something). Bad traffic, on the other hand, consists of mostly anything else: spam, abusers, web-surfers, etc.</p>
<p>We will begin by discussing the positive effects of all traffic. Having good traffic, obviously, cannot hurt you. There is no way that comes to mind that I can think of in which good traffic will hurt your site; be it resale value or otherwise (thus its name, &#8220;good&#8221; traffic). If you&#8217;re getting tons of good traffic, your site is booming, and if you ever want to sell it, that raises it&#8217;s value!</p>
<p>Now, bad traffic can also have some (temporarily) &#8220;positive&#8221; effects. If you&#8217;re running a site which does not worry about visitor comments spam hits and robots shouldn&#8217;t be much of a problem for you. In fact, they may make your stats look great at first glance, and you may even be able to catch a gullible buyer and convincing him or her (by not saying anything more than to look at the visitor count) that the traffic is great! However, for those serious domainers, etc. they will check those stats down to the IP&#8217;s of the visits. When they track back all those IP&#8217;s to public proxies, and known spam bots they will throw the name back in your face and your sale will fall through.</p>
<p>So in the end, all traffic does not quite turn into good traffic. It is indeed a great factor for any sale of a site, but visitor turn around is what really matters. So when analyzing your own traffic, check as if you were buying your site up and take steps to minimize spam traffic!</p>
<p>Regards,<br />
Dennis M.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/loBeW6XgVtNmI5dFx0jhvjhC_vA/0/da"><img src="http://feedads.g.doubleclick.net/~a/loBeW6XgVtNmI5dFx0jhvjhC_vA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/loBeW6XgVtNmI5dFx0jhvjhC_vA/1/da"><img src="http://feedads.g.doubleclick.net/~a/loBeW6XgVtNmI5dFx0jhvjhC_vA/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/Microsonic/~4/Z3yFa8pW6iQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://microsonic.org/2009/11/15/why-not-all-traffic-is-good-traffic/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
		<feedburner:origLink>http://microsonic.org/2009/11/15/why-not-all-traffic-is-good-traffic/</feedburner:origLink></item>
		<item>
		<title>Thoughts or Comments: Re-opening the Hosting Branch</title>
		<link>http://feedproxy.google.com/~r/Microsonic/~3/a3_P9CIDTYI/</link>
		<comments>http://microsonic.org/2009/10/20/thoughts-or-comments-re-opening-the-hosting-branch/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 21:14:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[branch]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[microsonic]]></category>

		<guid isPermaLink="false">http://microsonic.org/?p=197</guid>
		<description><![CDATA[Hey everyone!
As many of you may or may not know, Microsonic used to be a hosting company. From 2005-2008 I ran the site as &#8220;Microsonic Hosting.&#8221; In 2009, however, I decided to make it a more specialized place consisting of my thoughts and sharing my skills with others. Today, however, an idea ran across my [...]]]></description>
			<content:encoded><![CDATA[<p>Hey everyone!</p>
<p>As many of you may or may not know, Microsonic used to be a hosting company. From 2005-2008 I ran the site as &#8220;Microsonic Hosting.&#8221; In 2009, however, I decided to make it a more specialized place consisting of my thoughts and sharing my skills with others. Today, however, an idea ran across my head: re-open the hosting branch. So in this topic, I&#8217;ll take you through my head a bit more.</p>
<p>Well, what does this entail? The mere thought makes one wonder what would happen to the current site. Well, it would remain the same. As I mentioned, it would be a &#8220;branch&#8221; of Microsonic Development. I actually run &#8220;Microsonic Development&#8221; as a freelance programming company, so I may even revamp this to being much more than simply a blog! A hosting company that is not run by C/O&#8217;s who know very little about what they&#8217;re selling, but rather a professional selling services to another professional. Keeping in mind the reason I closed up shop in the first place, however, is also very important.</p>
<p>Due to lack of business and trying to keep prices low, costs built up and I ended up taking a loss on the whole project unfortunately. Not that I am in it to solely make a profit, but just like for everyone else, finances are tight. But then again, in retrospect it is important to think about what caused the collapse. My lack of advertising was the ultimate beast that did it in in the first place. All clients I had were extremely happy and very upset when I announced the initial closing of the company, however, had more people known about the satisfaction perhaps more members would have joined.</p>
<p>So now, as I continue to ponder my own thoughts, what are you personal thoughts? Perhaps I should specialize? Rather than web hosting, perhaps I will provide shell or VPS hosting? Let me know what you think! Your thoughts are, as usual, very helpful for me as they inspire my decisions about how to proceed in certain actions and what kinds of articles to write!</p>
<p>Regards,<br />
Dennis M.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/Re-dQ85b_ON0OKwyv8W2zWzxVvY/0/da"><img src="http://feedads.g.doubleclick.net/~a/Re-dQ85b_ON0OKwyv8W2zWzxVvY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Re-dQ85b_ON0OKwyv8W2zWzxVvY/1/da"><img src="http://feedads.g.doubleclick.net/~a/Re-dQ85b_ON0OKwyv8W2zWzxVvY/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/Microsonic/~4/a3_P9CIDTYI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://microsonic.org/2009/10/20/thoughts-or-comments-re-opening-the-hosting-branch/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://microsonic.org/2009/10/20/thoughts-or-comments-re-opening-the-hosting-branch/</feedburner:origLink></item>
		<item>
		<title>Server Maintenance: A Necessary Frustration</title>
		<link>http://feedproxy.google.com/~r/Microsonic/~3/dX5xrP5vI9c/</link>
		<comments>http://microsonic.org/2009/10/10/server-maintenance-a-necessary-frustration/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 14:36:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[frustration]]></category>
		<category><![CDATA[maintenance]]></category>
		<category><![CDATA[necessary]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[updates]]></category>

		<guid isPermaLink="false">http://microsonic.org/?p=195</guid>
		<description><![CDATA[I&#8217;d like to begin this post with an apology to all my subscribers. It has been over a month since I&#8217;ve posted anything! This is because I have been involved in a very large project which I should hopefully be finishing very soon (yes, I&#8217;m still not finished with it). And without further adieu: 
Server [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d like to begin this post with an apology to all my subscribers. It has been over a month since I&#8217;ve posted anything! This is because I have been involved in a very large project which I should hopefully be finishing very soon (yes, I&#8217;m still not finished with it). And without further adieu: </p>
<p>Server Maintenance. It&#8217;s a love-hate relationship really. One never knows how long it&#8217;s truly going to take, so you generally lose a lot of precious uptime due to it. On the other hand, it keeps the system running strong and fast so it can keep up with other servers.</p>
<p>This server even has some scheduled maintenance coming up very soon (I believe Sunday October, 11 at 9:00am CST, but I could be wrong). But it&#8217;s not always a thing to get angry about. In the time it takes to update the server, most people won&#8217;t lose any clients.</p>
<p>Most companies or users try to find a time (analyzing statistics) where their traffic is the lowest. During this time is when they normally try to schedule maintenance if it&#8217;s possible. This already minimizes the amount of clients lost. Also, maintenance normally lasts an hour or so (but I&#8217;ve had experiences with up to 24) and then you come back to a much faster working network.</p>
<p>So overall, this server maintenance thing is really a blessing in disguise. Although you will get some immediate frustration that you cannot access your site, you will be able to come back to a quick server. Not only quick (by way of RAM), but many times a quicker internet speed as well (a connection update!).</p>
<p>Regards,<br />
Dennis M.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/HkDZcWtH3t6G2hkSVkaPB8F195c/0/da"><img src="http://feedads.g.doubleclick.net/~a/HkDZcWtH3t6G2hkSVkaPB8F195c/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/HkDZcWtH3t6G2hkSVkaPB8F195c/1/da"><img src="http://feedads.g.doubleclick.net/~a/HkDZcWtH3t6G2hkSVkaPB8F195c/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/Microsonic/~4/dX5xrP5vI9c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://microsonic.org/2009/10/10/server-maintenance-a-necessary-frustration/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://microsonic.org/2009/10/10/server-maintenance-a-necessary-frustration/</feedburner:origLink></item>
		<item>
		<title>Windows Programming: Creating/Using DLL’s</title>
		<link>http://feedproxy.google.com/~r/Microsonic/~3/URRVNRCLuOI/</link>
		<comments>http://microsonic.org/2009/09/08/windows-programming-creatingusing-dlls/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 02:50:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Italiano]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[dll]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[vc++]]></category>
		<category><![CDATA[vcpp]]></category>
		<category><![CDATA[visual]]></category>

		<guid isPermaLink="false">http://microsonic.org/?p=191</guid>
		<description><![CDATA[In the world of programming, there are MANY different types. Unfortunately, programming for some systems is different than others, but it&#8217;s things like that which keep the world turning. Today, we will discuss what exactly is a Dynamic Link Library (DLL) and how to use them to keep our programming easier and more organized. I [...]]]></description>
			<content:encoded><![CDATA[<p>In the world of programming, there are MANY different types. Unfortunately, programming for some systems is different than others, but it&#8217;s things like that which keep the world turning. Today, we will discuss what exactly is a Dynamic Link Library (DLL) and how to use them to keep our programming easier and more organized. I will also include an Italian translation of this tutorial in the download source below! (Un traduzione del questo tutorial è in il download link per richiesta)</p>
<p>We&#8217;ll begin with what a DLL is and what it&#8217;s purpose is. A DLL is a wonderful tool to keep your programs organized by creating a DLL per set of functions. Also, it helps developers keep their closed source functions closed source, but also allows (with proper documentation/instructions on doing so) other users to use their work. Below we will give a few simple examples on how it all works!</p>
<p>To create the DLL we will be using Microsoft&#8217;s Visual C++. This is a free IDE compiler. I use it for any sort of Windows programming that I may do and will include the solution file in the download. Of course, I prefer GNU&#8217;s GCC which is also free, but the Windows ports of the compiler are not as good as the standard linux version.</p>
<p>The first note that I want to make is that if you&#8217;re making this project on your own (and not using my solution file), be sure to go to Project->Your Project&#8217;s Properties->Configuration Properties->General->Configuration Type and change it to &#8220;Dynamic Library (.dll)&#8221; otherwise it will not compile correctly.</p>
<p>Now in this tutorial, I am assuming you already know how to write programs, so this first file is test_dll.cpp. It contains the actual definitions, etc. of our functions:</p>
<blockquote><p><code>/**<br />
 * Test Dynamic Library File<br />
 *<br />
 * (C) 2009 Dennis J. McWherter, Jr. All Rights Reserved.<br />
 *<br />
 */</p>
<p>#define WIN32_LEAN_AND_MEAN // No need for the extra stuff.<br />
							// Non includere i file cui non hanno un scopo<br />
#include &lt;windows.h&gt;<br />
#include &lt;iostream&gt;<br />
#include "test_dll.h" // Our header file<br />
					  // Il nostro header file</p>
<p>using namespace std;</p>
<p>// Initiate the DLL (For programs)<br />
// Iniziare il DLL (per i programmi)<br />
BOOL APIENTRY DllMain(HINSTANCE dllHinst, DWORD reason, LPVOID lpvReserved){<br />
	// Use a switch to tell the program how to cycle the processes<br />
	// Usare un switch per fare il programma funziona<br />
	switch(reason){<br />
		case DLL_PROCESS_ATTACH:<br />
		break;<br />
		case DLL_PROCESS_DETACH:<br />
		break;<br />
		case DLL_THREAD_ATTACH:<br />
		break;<br />
		case DLL_THREAD_DETACH:<br />
		break;<br />
	}<br />
	return true;<br />
}</p>
<p>// The functions of our class. These are defined in "test_dll.h"<br />
// Le funzioni del nostro class. Gli questi sono definire in "test_dll.h"</p>
<p>// Constructor<br />
test_dll::test_dll(){}</p>
<p>// Basically a pointless function just to see how we can make them work together XD<br />
// Una funziona senza la usa. è più di un demonstrazione.<br />
char test_dll::func1(char lang){<br />
	return lang;<br />
}</p>
<p>int test_dll::func2(float x,float y,char op){<br />
	// Simple math function!<br />
	// Semplice funziona della matematica<br />
	switch(op){<br />
		case 'a':<br />
			cout&lt;&lt; x &lt;&lt; "+" &lt;&lt; y &lt;&lt; "=" &lt;&lt; x+y;<br />
			return 0;<br />
		break;<br />
		case 's':<br />
			cout&lt;&lt; x &lt;&lt; "-" &lt;&lt; y &lt;&lt; "=" &lt;&lt; x-y;<br />
			return 0;<br />
		break;<br />
		case 'd':<br />
			cout&lt;&lt; x &lt;&lt; "/" &lt;&lt; y &lt;&lt; "=" &lt;&lt; x/y;<br />
			return 0;<br />
		break;<br />
		default:<br />
			cout&lt;&lt; x &lt;&lt; "*" &lt;&lt; y &lt;&lt; "=" &lt;&lt; x*y;<br />
			return 0;<br />
		break;<br />
	}<br />
	return 0;<br />
}<br />
</code></p></blockquote>
<p>Again, a fairly straightforward example. What you do have to notice in this that is different from most programs is that fact that we&#8217;re not really calling a &#8220;Main&#8221; function to be run. We call BOOL WINAPI <strong>DllMain</strong> instead. This next file is the header file. A rather important file overall as it let&#8217;s us know what to export.</p>
<blockquote><p><code><br />
 /**<br />
 * Test Dynamic Library File<br />
 *<br />
 * (C) 2009 Dennis J. McWherter, Jr. All Rights Reserved.<br />
 *<br />
 */</p>
<p>#ifndef HEADER<br />
#define HEADER<br />
	// To keep the code clean we'll define this with a macro but this tells the processor<br />
		// to export whichever function/class it preceeds.<br />
	// Ci definiamo il questo con un macro ma ci vedremmo come lo funziona in più ritardo<br />
#define EXPORT_DLL __declspec(dllexport)</p>
<p>// Now our class - If you export a class, all its functions come with! <img src='http://microsonic.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  else do each function<br />
// Adesso il nostro class! Se exporti un class poi i tutti funzione di lo sono exportare.<br />
	// se individuale ti exporti poi si deve __declspec(dllexport) per ogni<br />
class EXPORT_DLL test_dll{ // = class __declspec(dllexport) test_dll{<br />
public:<br />
	test_dll(); // Constructor/Costruttore<br />
	char func1(char lang); // First function definition/La definizione della prima funziona<br />
	int func2(float x,float y,char op);<br />
};</p>
<p>#endif<br />
</code></p></blockquote>
<p>The comments explain it, but it&#8217;s really worth going over again. EXPORT_DLL is defined just for the purpose that we could potentially have more than a single class to export. This goes both ways for the dllexport and dllimport options, so really, EXPORT_DLL just translates to __declspec(dllexport) which would also work if you replaced EXPORT_DLL. Now, compile that code and VC++ should provide you with a .dll file and a .lib file with whatever name you gave the project (in our case: &#8220;DLL_Tutorial.lib/.dll&#8221;).</p>
<p>Now, you cannot run DLL files by themselves; you need a client program (.exe) which is what we&#8217;re getting to now. For the sake of brevity, we will just make this a simple console program which runs the proper functions. Now, create a new project and make sure you copy the &#8220;DLL_Tutorial.lib&#8221; file into the source directory. You need the .lib file to compile the client program, but you only need the .dll to run the program.</p>
<p>So here is the client main file. A console program of course to keep things simple <img src='http://microsonic.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  We&#8217;ll call this test_client.cpp</p>
<blockquote><p><code>/**<br />
 * Test Dynamic Library File<br />
 *<br />
 * (C) 2009 Dennis J. McWherter, Jr. All Rights Reserved.<br />
 *<br />
 */</p>
<p>#include &lt;iostream&gt;<br />
#include &lt;string&gt;<br />
#include "test_client.h"</p>
<p>using namespace std;</p>
<p>int main(){<br />
	// Create object to class<br />
	// Creare l'oggetto a class<br />
	test_dll test;</p>
<p>	// Init var<br />
	string num1,num2,addition,subtraction,division,multiplication,ans,operation;<br />
	float x,y;<br />
	char choice[5], op[5]; // Allow more chars just in case - otherwise we'll break the script <img src='http://microsonic.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
						   // Permettere dei più caratteri così non ci romperiamo il script! <img src='http://microsonic.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
	cout&lt;&lt; "Please select a language\r\n\r\nEnglish - en\r\nItaliano - it\r\n \r\nSelect: ";<br />
	cin&gt;&gt;choice;<br />
	switch(test.func1(choice[0])){<br />
		case 'i':<br />
			num1 = "Numero 1: ";<br />
			num2 = "Numero 2: ";<br />
			addition = "Per piacere selezi i tuoi numeri per aggiungiere";<br />
			subtraction = "Per piacere selezi i tuoi numeri per sottrarre";<br />
			division = "Per piacere selezi i tuoi numeri per dividere";<br />
			multiplication = "Per piacere selezi i tuoi numeri per moltiplicare";<br />
			ans = "La tua risposta: ";<br />
			operation = "\r\nPer piacere selezi il tuo operazione:\r\na - Aggiungiere\r\ns - Sottrarre\r\nd - Divisione\r\nm - Moltiplicazione\r\n\r\nSelection: ";<br />
		break;<br />
		default:<br />
			num1 = "Number 1: ";<br />
			num2 = "Number 2: ";<br />
			addition = "Please select your numbers to add";<br />
			subtraction = "Please select your numbers to subtract";<br />
			division = "Please select your numbers to divide";<br />
			multiplication = "Please select your numbers to multiply";<br />
			ans = "Your answer: ";<br />
			operation = "\r\nPlease select your option:\r\na - Addition\r\ns - subtraction\r\nd - Division\r\nm - Multiplication\r\n\r\nSelection: ";<br />
		break;<br />
	}</p>
<p>	cout&lt;&lt; operation;<br />
	cin&gt;&gt;op;<br />
	cout&lt;&lt; endl &lt;&lt; endl &lt;&lt; num1;<br />
	cin&gt;&gt;x;<br />
	cout&lt;&lt; endl &lt;&lt; num2;<br />
	cin&gt;&gt;y;</p>
<p>	test.func2(x,y,op[0]);</p>
<p>	cout&lt;&lt; endl &lt;&lt; endl &lt;&lt; "Type in anything to exit...";<br />
	cin&gt;&gt;op;</p>
<p>	return 0;<br />
}</code></p></blockquote>
<p>Naturally, the header file that follows is test_client.h</p>
<blockquote><p><code>/**<br />
 * Test Dynamic Library File<br />
 *<br />
 * (C) 2009 Dennis J. McWherter, Jr. All Rights Reserved.<br />
 *<br />
 */</p>
<p>#ifndef TEST_HEADER<br />
#define TEST_HEADER<br />
#define DLL_IMPORT __declspec(dllimport) // Same concept as export<br />
									     // Il stesso concepto come export</p>
<p>// Define the class</p>
<p>// What is the purpose of redefining? That's all you need to do is redefine structure <img src='http://microsonic.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
	// and not function <img src='http://microsonic.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
// Perchè ti deve ridefinire la class? Perché solo lo struttura si deve essere definire!<br />
	// e no funziona <img src='http://microsonic.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
class DLL_IMPORT test_dll{<br />
public:<br />
	test_dll(); // Constructor/Costruttore<br />
	char func1(char lang); // First function definition/La definizione della prima funziona<br />
	int func2(float x,float y,char op);<br />
};</p>
<p>#endif</code></p></blockquote>
<p>Within these two files, they are essentially creating a calculator. Since I wrote this program in dual languages, I added SIMPLE (meaning hard-coded) dual language support into the program. Also, this gives a reason for the first function, just to see how one can use multiple functions from a DLL just as if they were in the source.</p>
<p>If anyone has further questions or is receiving errors, feel free to let me know and I will be glad to help! Now make sure, however, that everything is set right as well. I ran into an error compiling the client the first time because my project subsystem (found in project properties->linker->System) was set to WINDOWS rather than CONSOLE so it was looking for the WINMAIN where there was none. So just a word of caution to anyone trying this without my source and you are receiving a WINMAIN compilation error.</p>
<p>So the land of DLL&#8217;s really aren&#8217;t as complex as it seems. It&#8217;s simply a closed source utility which helps other developers in WINDOWS programs.</p>
<p>Regards,<br />
Dennis M.</p>
<p><a href='http://microsonic.org/2009/09/08/windows-programming-creatingusing-dlls/dll_tutorial/' rel='attachment wp-att-192'>DLL Tutorial Source Code and Binaries</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/soLACD2i8mlh1oJ8oA941fZtFlw/0/da"><img src="http://feedads.g.doubleclick.net/~a/soLACD2i8mlh1oJ8oA941fZtFlw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/soLACD2i8mlh1oJ8oA941fZtFlw/1/da"><img src="http://feedads.g.doubleclick.net/~a/soLACD2i8mlh1oJ8oA941fZtFlw/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/Microsonic/~4/URRVNRCLuOI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://microsonic.org/2009/09/08/windows-programming-creatingusing-dlls/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://microsonic.org/2009/09/08/windows-programming-creatingusing-dlls/</feedburner:origLink></item>
		<item>
		<title>Converting a String to a Vector</title>
		<link>http://feedproxy.google.com/~r/Microsonic/~3/necGSNUGYzQ/</link>
		<comments>http://microsonic.org/2009/08/24/converting-a-string-to-a-vector/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 03:52:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Italiano]]></category>
		<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://microsonic.org/?p=187</guid>
		<description><![CDATA[It has been a long while since I&#8217;ve posted a C or C++ tutorial, but here comes another one! I try to help with programming tips on various forums across the internet. I am a fluent English and Italian speaker, so naturally I work on forums of both languages. While browsing an Italian forum, I [...]]]></description>
			<content:encoded><![CDATA[<p>It has been a long while since I&#8217;ve posted a C or C++ tutorial, but here comes another one! I try to help with programming tips on various forums across the internet. I am a fluent English and Italian speaker, so naturally I work on forums of both languages. While browsing an Italian forum, I came across an interesting question. How does one convert a C++ string to a vector. I decided I would lend a hand, and it bears repeating on here.</p>
<p>Vectors can be used for various things in C++, but they are for the more advanced programmer really. They are not really necessary if it is not a complex program, but this tutorial could serve useful for many I&#8217;m sure.</p>
<p>I myself was at first puzzled by the question. I had never thought of a reason to do this and so, frankly, I never have. After some thought, it wasn&#8217;t too bad, but still an interesting concept. I&#8217;ll post the code below and then explain further below that. Comments are in both English and Italian. The reason being is what I previously mentioned about the original reason I wrote this code.</p>
<blockquote><p><code>/**<br />
 * String to Vector Tutorial by Dennis M.<br />
 *<br />
 * un tutorial di microsonic.org<br />
 *<br />
 */</p>
<p>// Include files ~ Includere i file<br />
#include &lt;string&gt;<br />
#include &lt;iostream&gt;<br />
#include &lt;vector&gt;</p>
<p>using namespace std;</p>
<p>int main()<br />
{<br />
	// Declare Variables ~ Definire i varibili<br />
	string data = "one - uno";<br />
	vector&lt;string&gt; vect;</p>
<p>	// Insert data into vector ~ Inserire l'informazione in il vector<br />
	vect.push_back(data);<br />
	data = "two - due";<br />
	vect.push_back(data);<br />
	data = "three - tre";<br />
	vect.push_back(data);</p>
<p>	// Loop to view the contents of the vector ~ Loop per vedere i contenti di il vector<br />
	for(unsigned int i=0;i&lt;vect.size();i++){<br />
		cout&lt;&lt; i &lt;&lt; ": " &lt;&lt; vect.at(i) &lt;&lt; endl;<br />
	}</p>
<p>	// Memory Management ~ Ci sicuriamo la memoria!<br />
	vect.clear();</p>
<p>	return 0;<br />
}<br />
</code></p></blockquote>
<p>Now the code is pretty self-explanatory and the comments I think do a pretty good job. The only thing one may be perplexed about is where the functions and pointers come from. If you examine the documentation (header file?) for a vector, all is clearly defined. This example will also print the vector and clear it before it exits.</p>
<p>So I hope this post is of some service to someone and as usual, I have included the source and binaries in the post!</p>
<p><a href='http://microsonic.org/2009/08/24/converting-a-string-to-a-vector/string-vector-tar/' rel='attachment wp-att-188'>String to Vector Tutorial</a></p>
<p>Regards,<br />
Dennis M.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/9qtmrLJSBXPx0q14rkWnK6TFLc8/0/da"><img src="http://feedads.g.doubleclick.net/~a/9qtmrLJSBXPx0q14rkWnK6TFLc8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/9qtmrLJSBXPx0q14rkWnK6TFLc8/1/da"><img src="http://feedads.g.doubleclick.net/~a/9qtmrLJSBXPx0q14rkWnK6TFLc8/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/Microsonic/~4/necGSNUGYzQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://microsonic.org/2009/08/24/converting-a-string-to-a-vector/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://microsonic.org/2009/08/24/converting-a-string-to-a-vector/</feedburner:origLink></item>
		<item>
		<title>Importance of Structure and Coding Etiquette</title>
		<link>http://feedproxy.google.com/~r/Microsonic/~3/DaJXN_q3YQ8/</link>
		<comments>http://microsonic.org/2009/08/07/importance-of-structure-and-coding-etiquette/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 16:11:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[etiquette]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[professional]]></category>
		<category><![CDATA[professionalism]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[structure]]></category>
		<category><![CDATA[to]]></category>

		<guid isPermaLink="false">http://microsonic.org/?p=185</guid>
		<description><![CDATA[Well, it&#8217;s been a very long time since I last updated and I&#8217;d like to apologize to all my subscribers for that. I&#8217;ve been very busy, but it seems the work load is going down and I&#8217;ll have more time to continue writing! Now, on with the article.
So recently, I have just finished a project [...]]]></description>
			<content:encoded><![CDATA[<p>Well, it&#8217;s been a very long time since I last updated and I&#8217;d like to apologize to all my subscribers for that. I&#8217;ve been very busy, but it seems the work load is going down and I&#8217;ll have more time to continue writing! Now, on with the article.</p>
<p>So recently, I have just finished a project where one developer had started and then decided he could not finish the work, so I was hired to finish it. The natural thought to one who is inexperienced is, &#8220;This will be a cakewalk. Most of the programming is already done!&#8221; &#8211; wrong. The first thing that went through my mind was, &#8220;I wonder how bad this really is.&#8221; So, I accept the project (as I had only a few projects at the time) and take a look.</p>
<p>The code was atrocious to say the least. I felt as if this other developer had never learned how to use comments or his tab key/space bar to format. Most of the time on the project was bent around figuring out what the original developer had tried to do. It was a nightmare.</p>
<p>As I started digging through files and files of unnecessary sloppy code, I thought to myself, &#8220;I need to write something about this. This kind of work needs to stop.&#8221; I was not upset because of the amateur programming, nor the fact that it was undocumented and poorly written. What bugs me is the fact that someone paid for that kind of work. It looked like the developer copy/pasted everything from snippets he or she found online. That being said, one must learn the importance of structure and coding etiquette. </p>
<p>Structure is important for general organization. It keeps code neat and clean looking and much easier for anyone, to include yourself, to go back and fix errors/security holes. Most people see structural formatting as a simple aesthetic quality when in reality it is like formatting a letter. The structure keeps things organized and understandable on a more universal level.</p>
<p>Coding etiquette, on the other hand, is something learned over a long period of time. No new developer can simply logon and expect to program to the standards set right now, but at the same time should begin mimicking the styles of major developers. Examining the work of others is one of the best ways for any developer to learn, so studying (yes, just like in school) the work of past developers, and prominent works of today, one can easily understand how to program professionally. A simple example would be to write functions rather than hardcode functions multiple times. Or rather than using raw MySQL functions, create an SQL wrapper to execute the functions.</p>
<p>There are many resources on learning how to program professionally, and be neat, but it&#8217;s up to developers to use the tools. The vast majority of developers, I would say, hold to the standards. However, for those who do not, they are just ripping off their client in the long-run.</p>
<p>Regards,<br />
Dennis M.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/INUFR3n0cFChoM-3dhK7R6nJEDY/0/da"><img src="http://feedads.g.doubleclick.net/~a/INUFR3n0cFChoM-3dhK7R6nJEDY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/INUFR3n0cFChoM-3dhK7R6nJEDY/1/da"><img src="http://feedads.g.doubleclick.net/~a/INUFR3n0cFChoM-3dhK7R6nJEDY/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/Microsonic/~4/DaJXN_q3YQ8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://microsonic.org/2009/08/07/importance-of-structure-and-coding-etiquette/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://microsonic.org/2009/08/07/importance-of-structure-and-coding-etiquette/</feedburner:origLink></item>
		<item>
		<title>Using php mail(); and headers</title>
		<link>http://feedproxy.google.com/~r/Microsonic/~3/oNRu5yWBF3Q/</link>
		<comments>http://microsonic.org/2009/07/16/using-php-mail-and-headers/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 04:25:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://microsonic.org/?p=183</guid>
		<description><![CDATA[So today, I came across an interesting question today which never had come up before to me. The PHP mail(); function. It is such a seemingly simple function, but often misunderstood; largely because its format and raw mail syntax.
PHP mail(); does not offer a specific field for each and every possible mail option, but we&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>So today, I came across an interesting question today which never had come up before to me. The PHP mail(); function. It is such a seemingly simple function, but often misunderstood; largely because its format and raw mail syntax.</p>
<p>PHP mail(); does not offer a specific field for each and every possible mail option, but we&#8217;ll go into it later. We&#8217;ll go through the very basics, then start touching upon what I am alluding to (headers).</p>
<p>The basic syntax is: mail(TO,SUBJECT,MESSAGE,HEADERS).<br />
I assume one can figure out what each of those are (provided that you speak English well).</p>
<p>Now, since the function itself is self-explanatory, we&#8217;re back to the reason for this article; headers. Headers are optional fields in a CLR format using \r\n line-breaks between each of the different types. A common header would be something like from. For clarity (and cleanliness), headers are usually stored in a variable, so let&#8217;s take a quick look at how one code make this work.</p>
<blockquote><p><code>&lt;?php<br />
$headers = "From: your@email.com\r\n<br />
CC: a.public@email.address.com\r\n<br />
BCC: secret@user1.com,\r\nsecret@user2.com,\r\nand@so.on.com\r\n";</p>
<p>mail("someone@somewhere.com","Test e-mail!","Some message",$headers);<br />
exit();<br />
?&gt;</code></p></blockquote>
<p>The above code should thoroughly explain headers. There are many different fields one could put in there, but these are just a few. The above example includes a from address, a CC, and a BCC (with multiple addresses).</p>
<p>So overall, the php mail(); function is a simple, yet very useful tool for many users to use. A much better alternative to some forms, especially the last resort &#8220;mailto&#8221; link type.</p>
<p>Regards,<br />
Dennis M.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/7lRubSWCc4Ma3ab_3ISnTiX50pc/0/da"><img src="http://feedads.g.doubleclick.net/~a/7lRubSWCc4Ma3ab_3ISnTiX50pc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/7lRubSWCc4Ma3ab_3ISnTiX50pc/1/da"><img src="http://feedads.g.doubleclick.net/~a/7lRubSWCc4Ma3ab_3ISnTiX50pc/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/Microsonic/~4/oNRu5yWBF3Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://microsonic.org/2009/07/16/using-php-mail-and-headers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://microsonic.org/2009/07/16/using-php-mail-and-headers/</feedburner:origLink></item>
		<item>
		<title>Delayed Updates…</title>
		<link>http://feedproxy.google.com/~r/Microsonic/~3/ICthHngraWk/</link>
		<comments>http://microsonic.org/2009/07/10/delayed-updates/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 23:11:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://microsonic.org/?p=181</guid>
		<description><![CDATA[In a new blog I will soon inform you on why the updates have been so delayed. I apologize for this, but the blog is STILL active. Content is simply slow at the moment, but again, in the next post I&#8217;ll inform everyone as to why. 
Thanks for your understanding,
Dennis M.
]]></description>
			<content:encoded><![CDATA[<p>In a new blog I will soon inform you on why the updates have been so delayed. I apologize for this, but the blog is STILL active. Content is simply slow at the moment, but again, in the next post I&#8217;ll inform everyone as to why. </p>
<p>Thanks for your understanding,<br />
Dennis M.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/sUoMli_4a4_j5MGk2qcup8REJrU/0/da"><img src="http://feedads.g.doubleclick.net/~a/sUoMli_4a4_j5MGk2qcup8REJrU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/sUoMli_4a4_j5MGk2qcup8REJrU/1/da"><img src="http://feedads.g.doubleclick.net/~a/sUoMli_4a4_j5MGk2qcup8REJrU/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/Microsonic/~4/ICthHngraWk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://microsonic.org/2009/07/10/delayed-updates/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://microsonic.org/2009/07/10/delayed-updates/</feedburner:origLink></item>
	</channel>
</rss>
