<?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:blogger='http://schemas.google.com/blogger/2008' 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-5947584971613873961</id><updated>2024-09-20T18:49:35.995+03:00</updated><category term="COM"/><category term="DCOM"/><category term="8tracks"/><category term="CLR"/><category term="DCE/RPC"/><category term="MFC"/><category term="Music"/><category term="WMI"/><category term="WTL"/><category term="אבטחת מידע"/><category term="לקוחות"/><category term="מייקרוסופט"/><category term="נסיעות"/><category term="עסקים"/><category term="פשע מקוון"/><title type='text'>Break Point</title><subtitle type='html'>Optimistic Implementation Methodology</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sagym.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sagym.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11967638511237903271</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.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>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5947584971613873961.post-6698320387733247327</id><published>2012-11-24T15:22:00.004+02:00</published><updated>2012-11-24T15:35:41.186+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="8tracks"/><category scheme="http://www.blogger.com/atom/ns#" term="Music"/><title type='text'>8tracks - use it!</title><content type='html'>Well this is not software engineering related, but if you read my blog than you probably aware that I really like good music. Lately I discovered a website that I wasn&#39;t aware of before. It goes by the name &lt;b&gt;&lt;i&gt;&lt;a href=&quot;http://8tracks.com/&quot; target=&quot;_blank&quot;&gt;8tracks&lt;/a&gt; &lt;/i&gt;&lt;/b&gt;and it&#39;s an internet radio.&lt;br /&gt;
&lt;br /&gt;
Yep, I know - there are lots of those lately... &lt;b&gt;Pandora, Last.fm, Grooveshark, Jango, Deezer, Serendip&lt;/b&gt; - there are so many more. Some of them free, some of them not.&lt;br /&gt;
&lt;br /&gt;
Those online music services suggest you music to listen to and some of the algorithms that are responsible for that are very interesting. While &lt;b&gt;Pandora&lt;/b&gt;, &lt;b&gt;Jango &lt;/b&gt;and &lt;b&gt;Grooveshark &lt;/b&gt;are based on the resemblance of the music parameters, &lt;b&gt;Last.fm&lt;/b&gt; and &lt;b&gt;Serendip &lt;/b&gt;based on the social networking approach.&lt;br /&gt;
&lt;br /&gt;
To my opinion, while some of these site provide pretty good playlists for you to listen, they are not focusing enough on the mood of the listener and rely on the assumption that if you listen to a certain music style, you probably would like to listen to songs in the same style over and over again. This assumption is right for, let&#39;s say, 85% of the time - &quot;I&#39;m in a mood for some Jazz&#39;, you&#39;ll say for yourself, &quot;I&#39;ll use &lt;b&gt;Jango &lt;/b&gt;and ask it to play some good old&amp;nbsp;Brazilian&amp;nbsp;Jazz&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_u8qjmk8rNKM2E1JwOdcBrXaDwYIqtdWsvRCdFOSbZTUh4lwin0SIs4xlUCc4Q-Sn8cxWn6NLikGvTb8dj_vYBK9sOiI1mab2MlVtnEAwk8rRhn5tcjmfbvv6I6z_KGRrW6QHZ0XvRl9K/s1600/StanGetz.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;181&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_u8qjmk8rNKM2E1JwOdcBrXaDwYIqtdWsvRCdFOSbZTUh4lwin0SIs4xlUCc4Q-Sn8cxWn6NLikGvTb8dj_vYBK9sOiI1mab2MlVtnEAwk8rRhn5tcjmfbvv6I6z_KGRrW6QHZ0XvRl9K/s320/StanGetz.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;i&gt;Stan Getz, Bossa nova anyone?&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
But what about the other 15% of the time when you are&amp;nbsp;interested,&amp;nbsp;for example, to listen to music when you are drinking you morning coffee? You don&#39;t care if this is&amp;nbsp;Stan Getz, the Red Hot Chili Peppers or Bob Marley as long as it is in the right mood to fit in the scene of you drinking your morning coffee, right?&lt;br /&gt;
&lt;br /&gt;
The best job, up until I discovered &lt;b&gt;&lt;i&gt;8tracks&lt;/i&gt;&lt;/b&gt;, was done by &lt;b&gt;Serendip&lt;/b&gt;. &lt;b&gt;Serendip &lt;/b&gt;is pretty new in the scene of the online music radio websites. The idea of it is so simple, yet very smart. It connects to your Facebook and Twitter friends and plays the music that your friends shared on their walls. The trick is that this is done almost in real time and therefore the stream consists of tracks that create &quot;the music of now&quot;. The music that your friends shared in the morning might fit your morning as well right? The music that you want to hear on a cold winter day, might as well be shared by a friend in the same mood, isn&#39;t it?&lt;br /&gt;
&lt;br /&gt;
Nevertheless, what I found so special about &lt;b&gt;&lt;i&gt;8tracks &lt;/i&gt;&lt;/b&gt;is that they don&#39;t fight for the spot of who has the best algorithm to match the music for your personal taste. It is based on the idea of a simple radio show - meaning that the users&amp;nbsp;themselves&amp;nbsp;create the playlists. The websites provides a very nice and easy to use interface to create a playlist, name it, say a few words about it, and the most important - &lt;i&gt;tag it&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
The &lt;i&gt;tag cloud&lt;/i&gt; of &lt;i&gt;&lt;b&gt;8tracks&lt;/b&gt;&lt;/i&gt; is a vast list of moods, music styles, state of minds and more: &quot;sleep&quot;, &quot;love&quot;, &quot;workout&quot;, &quot;cozy&quot;, &quot;party&quot;, &quot;rock&quot;... there are so many. One might create a playlist that has a nice acoustic tunes that can fit a gloomy Saturday&amp;nbsp;morning nap, the other can create a playlist that is the best for jogging. This is so simple, yet&amp;nbsp;genius.&lt;br /&gt;
&lt;br /&gt;
Although we are&amp;nbsp;living in the era of technology. Sometimes algorithms, formulas and calculations simply cannot provide what I think is best described by the term &quot;a human touch&quot;. Until we would be able to describe a machine what is &quot;&lt;i&gt;a gloomy Saturday&amp;nbsp;morning nap mood&lt;/i&gt;&quot; the algorithms based websites will stay on that 85%.&lt;br /&gt;
&lt;br /&gt;
Try &lt;b&gt;&lt;i&gt;&lt;a href=&quot;http://8tracks.com/&quot;&gt;8tracks.com&lt;/a&gt;&lt;/i&gt;&lt;/b&gt; guys.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe height=&quot;250&quot; src=&quot;http://8tracks.com/mixes/815128/player_v3_universal&quot; style=&quot;border: 0px none;&quot; width=&quot;300&quot;&gt;&lt;/iframe&gt; &lt;br /&gt;
&lt;div class=&quot;_8t_embed_p&quot; style=&quot;font-size: 11px; line-height: 12px;&quot;&gt;
&lt;a href=&quot;http://8tracks.com/emptyskiesabove/gloomy-saturday-morning&quot;&gt;Gloomy Saturday Morning&lt;/a&gt; from &lt;a href=&quot;http://8tracks.com/emptyskiesabove&quot;&gt;emptyskiesabove&lt;/a&gt; on &lt;a href=&quot;http://8tracks.com/&quot;&gt;8tracks Radio&lt;/a&gt;.&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://sagym.blogspot.com/feeds/6698320387733247327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sagym.blogspot.com/2012/11/8tracks-use-it.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/6698320387733247327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/6698320387733247327'/><link rel='alternate' type='text/html' href='http://sagym.blogspot.com/2012/11/8tracks-use-it.html' title='8tracks - use it!'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11967638511237903271</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_u8qjmk8rNKM2E1JwOdcBrXaDwYIqtdWsvRCdFOSbZTUh4lwin0SIs4xlUCc4Q-Sn8cxWn6NLikGvTb8dj_vYBK9sOiI1mab2MlVtnEAwk8rRhn5tcjmfbvv6I6z_KGRrW6QHZ0XvRl9K/s72-c/StanGetz.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5947584971613873961.post-4682070667468483762</id><published>2012-11-10T14:17:00.000+02:00</published><updated>2012-11-10T14:17:12.975+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="COM"/><category scheme="http://www.blogger.com/atom/ns#" term="DCE/RPC"/><category scheme="http://www.blogger.com/atom/ns#" term="DCOM"/><title type='text'>What is DCOM? (Part 2)</title><content type='html'>&lt;br /&gt;
After discussing &lt;a href=&quot;http://sagym.blogspot.co.il/2012/10/introduction-to-com.html&quot; target=&quot;_blank&quot;&gt;COM&lt;/a&gt; and &lt;a href=&quot;http://sagym.blogspot.co.il/2012/10/what-is-dcom-part-1.html&quot; target=&quot;_blank&quot;&gt;DCOM&lt;/a&gt; in the previous posts, I would like to dig into the way DCOM is transmitted over the wire. As I already mentioned, DCOM needs to execute procedures and receive their output via the network. To achieve that it has to use a standard protocol that is implemented on multiple platforms, be security aware and provide a suitable interface that will not harm the advantage of DCOM.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;DCE/RPC&lt;/b&gt; protocol was chosen for those reasons and it is used as the wire-protocol for DCOM. DCE/RPC stands for &lt;i&gt;Distributed Computing Environment / Remote Procedure Calls&lt;/i&gt; and it defines a standard for converting objects and structures into a format that can be split into packets and sent over the network in a platform independent way. Let&#39;s dig a little more into details.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;b&gt;The Challenge&lt;/b&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
It can be said that the goal is set up a &quot;conversation&quot; between a user and the service provider in a way that that the interface that is defined by the service provider could be called by the user from far away, the service provider will process the request and return an answer. When this happens within a local machine, both client and server will usually share the same memory address space so the interface calls, the arguments passed and the return values can be passed and accessed on the process&#39;s stack.&lt;br /&gt;
&lt;br /&gt;
When the whole things goes remote and the client and server are not on the same machine/system, the interface calls including the arguments and return values must have a Network Data Representation (NDR) to be sent over the network. The cool thing that RPC mechanism managed to achieve is that it makes the process look to the programmer almost as the interface he uses is just a regular local procedure call. That is why using DCE/RPC was chosen from DCOM.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;b&gt;The IDL&lt;/b&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
The Interface Definition Language and its compiler. DCE/RPC uses a language to define the procedures, the parameters to these procedures and the data types and objects that the interface will use. An IDL interface will have the following structure:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;interface&amp;gt; ::= &amp;lt;interface_header&amp;gt; { &amp;lt;interface_body&amp;gt; }&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
For a detailed explanation regarding the definition for the interface header and body, please refer to the DCE/RPC opengroup.org document &lt;a href=&quot;http://pubs.opengroup.org/onlinepubs/9629399/chap4.htm&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;b&gt;RPC runtime library&lt;/b&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
The RPC runtime library is used by both client and server side to implement the communication between them. The runtime library is responsible for finding the server over the network, manage the connection, sending messages, receiving answers, manage and handle errors and more. To keep it simple let&#39;s just look at the diagram below.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihfowHxIVgeiZhCexJEbmtJHDE5cFSloxlIQL1alkvfx6H64_DggFzeLPhpWfMrxoQ5LvLOwACRxh8xhLt1c05w-_cyvW2vSENcQ4LvkBt6dzuyVVIysolBcTZ-O8f_NDFRNndCGYlCb0n/s1600/IC196578.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihfowHxIVgeiZhCexJEbmtJHDE5cFSloxlIQL1alkvfx6H64_DggFzeLPhpWfMrxoQ5LvLOwACRxh8xhLt1c05w-_cyvW2vSENcQ4LvkBt6dzuyVVIysolBcTZ-O8f_NDFRNndCGYlCb0n/s1600/IC196578.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;i&gt;RPC flow (Source: MSDN)&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
The client application calls a client stub that is responsible on calling the runtime library interface with the parameter the client application has passed to it. The client RPC runtime library converts the request into a standard NDR and sends the message to the server. The server receives the requests, the runtime library translates it back from NDR into objects and structures that the server understands, queries the server application for and answers and transmits it back to the client.&lt;br /&gt;
&lt;br /&gt;
Every DCE enables machine runs a daemon application called DCE Host Daemon (DCED) and a DCE control program (DCECP) to administrate it. The DCED is listening to the DCE requests and manage them.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;b&gt;DCE/RPC development process&lt;/b&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
When it comes to the development of a DCE/RPC client/server application the process is pretty straightforward. It comprises of defining the interfaces using DCE IDL, running the IDL compiler to create the client and the server stubs and implement them on the client and server machines.&lt;br /&gt;
&lt;br /&gt;
The IDL interface, like every other interface in computer science, is a set of procedures that the server can execute. On the client side, the client application is linked with the client-stub created by the IDL compiler. The client-stub hides all the network communication with the server. On the server side, the server-stub is linked with the server application, converts the client&#39;s calls from NDR and calls the server application that the client requested.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;b&gt;Conclusion&lt;/b&gt;&lt;/h3&gt;
&lt;br /&gt;
After this discussion I feel that now you should have a pretty good idea what is DCOM, why do we need it and how it works. I didn&#39;t go into many details as I think that this blog should be a more-or-less easy read for those of you who want to have a general idea of the subjects that I&#39;m dealing with. Please comment and write me your remarks or requests.&lt;br /&gt;
&lt;br /&gt;
It&#39;s a rainy day today so let me finish with a song on that subject. Enjoy!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/9DrH7tJOrFI?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sagym.blogspot.com/feeds/4682070667468483762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sagym.blogspot.com/2012/11/what-is-dcom-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/4682070667468483762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/4682070667468483762'/><link rel='alternate' type='text/html' href='http://sagym.blogspot.com/2012/11/what-is-dcom-part-2.html' title='What is DCOM? (Part 2)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11967638511237903271</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihfowHxIVgeiZhCexJEbmtJHDE5cFSloxlIQL1alkvfx6H64_DggFzeLPhpWfMrxoQ5LvLOwACRxh8xhLt1c05w-_cyvW2vSENcQ4LvkBt6dzuyVVIysolBcTZ-O8f_NDFRNndCGYlCb0n/s72-c/IC196578.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5947584971613873961.post-5779624914284468978</id><published>2012-10-20T13:59:00.000+02:00</published><updated>2012-10-20T14:01:00.721+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="COM"/><category scheme="http://www.blogger.com/atom/ns#" term="DCOM"/><title type='text'>What is DCOM? (Part 1)</title><content type='html'>So in the &lt;a href=&quot;http://sagym.blogspot.co.il/2012/10/introduction-to-com.html&quot; target=&quot;_blank&quot;&gt;last post&lt;/a&gt; I gave you a very brief introduction to what COM actually is. In this post, I&#39;d like to talk about DCOM – Distributed COM.&lt;br /&gt;
&lt;br /&gt;
I won&#39;t concentrate on how to write a DCOM program. I will write from a theoretical angle and try to provide a simple explanation of what DCOM actually is. If you are interested in trying some hands-on development, please refer to the excellent article called &lt;a href=&quot;http://www.codeproject.com/Articles/666/DCOM-D-Mystified-A-DCOM-Tutorial-Step-1&quot; target=&quot;_blank&quot;&gt;&quot;DCOM D-Mystified: A DCOM Tutorial&quot; by Brian C Hart on codeproject.com&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
So, where were we?&lt;br /&gt;
&lt;br /&gt;
COM objects are self-contained components that can be used in an application and provide a certain service. One can write a COM object and this object can be used via COM APIs. This functionality is extended by the DCOM – Distributed Component Object Model. DCOM allows the COM components to reside on different computers and be accessed by an application from distance.&lt;br /&gt;
&lt;br /&gt;
Imagine complicated software that is using a lot of components to manipulate different tasks and actions – this software doesn&#39;t even have to be aware that the components it&#39;s using do not reside on the same machine it is running on because DCOM &quot;hides&quot; this headache from the user by providing it &quot;location transparency&quot; that eases the development of distributed applications.&lt;br /&gt;
&lt;br /&gt;
DCOM communicate with distant objects through a remote procedure call protocol that is simply called RPC (maybe more on that in the future posts), handles the &quot;low-level&quot; details of the networking and allows the developer to concentrate solely on his program&#39;s functionality.&lt;br /&gt;
&lt;br /&gt;
You can think of DCOM as a mechanism of inter-process communication (this is actually one of the uses of COM), but in a distributed environment. Neither the COM client, nor the COM server should be aware that they do not reside on the same machine and the client&#39;s questions as well as the server&#39;s answers are carried by the DCOM network protocol back and forth.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW3w2NadHbk5M1J_iT7Qh7vU5vBTEUaZuqj2HA7tgHqWCnnyO64hY7B1JevUWLxa-WfwW3IYqQ7piK4s9z3IhiBORCzs1cvL8FwBarRZ1r8O2D4eQzuoFX6-P98Nl4WKYiAnxCOQUQ_FR-/s1600/dcom1.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW3w2NadHbk5M1J_iT7Qh7vU5vBTEUaZuqj2HA7tgHqWCnnyO64hY7B1JevUWLxa-WfwW3IYqQ7piK4s9z3IhiBORCzs1cvL8FwBarRZ1r8O2D4eQzuoFX6-P98Nl4WKYiAnxCOQUQ_FR-/s400/dcom1.gif&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;i&gt;DCOM: COM Components on different machines (Source: MSDN)&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
You can meet DCOM in multiuser network games, chat applications, VoIP applications, network monitoring applications and many more. In the next post I&#39;ll dig a little deeper into the guts of the whole process and its exciting features and benefits.&lt;br /&gt;
&lt;br /&gt;
That&#39;s all for now. Thanks for reading!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As always I&#39;d like to share with you a tune that I keep listening to on and on during the last week. Enjoy!&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/P5s9illHQlc&quot; width=&quot;420&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://sagym.blogspot.com/feeds/5779624914284468978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sagym.blogspot.com/2012/10/what-is-dcom-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/5779624914284468978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/5779624914284468978'/><link rel='alternate' type='text/html' href='http://sagym.blogspot.com/2012/10/what-is-dcom-part-1.html' title='What is DCOM? (Part 1)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11967638511237903271</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW3w2NadHbk5M1J_iT7Qh7vU5vBTEUaZuqj2HA7tgHqWCnnyO64hY7B1JevUWLxa-WfwW3IYqQ7piK4s9z3IhiBORCzs1cvL8FwBarRZ1r8O2D4eQzuoFX6-P98Nl4WKYiAnxCOQUQ_FR-/s72-c/dcom1.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5947584971613873961.post-3599233121528391895</id><published>2012-10-06T15:04:00.001+02:00</published><updated>2012-10-13T18:02:03.534+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CLR"/><category scheme="http://www.blogger.com/atom/ns#" term="COM"/><category scheme="http://www.blogger.com/atom/ns#" term="WMI"/><title type='text'>A few words about COM</title><content type='html'>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
I would really like to talk about Distributed Component Object Model (DCOM) a little, but to do that I first must talk aboutsome basic terms as Managed and Unmanaged code, COM (Component Object Model) andothers. So this post will deal with these terms while in the next post I&#39;lltalk about DCOM and where you can use it.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
So let&#39;s start at the very beginning.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
In the Windows operating system you can write User mode or Kernel mode code. I will write posts about Kernel mode development in the future, but in this one I would like to discuss some basic staff about user space development.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Unmanaged code – a quick reminder&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
I know that it&#39;s probably not agood idea to explain what an unmanaged code is by telling you what is a managed code, but I guess that this would be the easier way to understand it.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Managed code is a Microsoft term for a code that the compilation and execution of which is managed by the CLR - Common Language Runtime. The CLR is an environment that is part of the .NET framework designed to manage the execution of programs. You may think of the CLR as the Java VM because here the code is also compiled to an intermediate language (CIL) that can executed later by the CLR that will convert it into machine code.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
There are numerous benefits that you gain from that. Probably the major one is the memory management that the CLR does for you by releasing objects that are no longer in use (managed data)and operating a Garbage Collector that eliminates memory leaks. But there are other benefits that reduce common programmers&#39; errors.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
In unmanaged code you&#39;ll need to manage your own memory allocations, avoid memory leaks and free unused space in the memory. The library/executable that is resulted by the unmanaged code compilation is written in machine code (therefore running faster) and don&#39;t need the .NET framework installed.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
There are several ways to manage an unmanaged code. One of them is exposing the required methods through COM and use the COM object from the managed code program - this is the most widely used method. A nice article about that can be found &lt;a href=&quot;http://www.codeproject.com/Articles/34648/Managing-the-Unmanaged-Code&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
BTW, The CLR is implemented as a COM server.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;What is COM?&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Well, we&#39;ll need more than one blog post to deeply understand what COM is, but let&#39;s try to keep it simple. For those of you that would like to deepen the understanding and learn how to use COM, I would recommend the &lt;a href=&quot;http://www.codeproject.com/Articles/633/Introduction-to-COM-What-It-Is-and-How-to-Use-It&quot;&gt;&quot;Introduction to COM&quot; article&lt;/a&gt; by Michael Dunn in Codeproject.com – an oldie but a goodie.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
COM is a standard that lets COM objects to interact with other object enabling sharing binary code across different applications. COM is a binary standard that applies after a program has been translated to binary machine code and specifies that the binary modules (libraries and executables) must be compiled to match a specific structure.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
This is the beauty of it. There is a little that is up to the programmer while the compiler does all the work in creating the COM objects that is easy to use later.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
A COM object is made up of a set of data and the functions that manipulate the data. Access to an object&#39;s data is achieved exclusively through interface methods. COM requires that the only way to gain access to the methods of an interface is through a pointer to the interface.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
COM also defines how objects work together over a distributed environment and has added security features&amp;nbsp;to help provide system and component integrity – but more on that in the next post.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;An example – WMI (WindowsManagement Instrumentation)&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;i&gt;&quot;WMI provides a uniform interface for any local or remote applications or scripts that obtain management data from a computer system, a network, or an enterprise.&quot;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
(&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/windows/desktop/aa394553(v=vs.85).aspx&quot;&gt;WMI Architecture&lt;/a&gt;,MSDN)&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
There is lots of cool stuff you can do with WMI and if you&#39;re not familiar with it yet, I would recommend toget familiar with it (maybe I&#39;ll write a post about WMI too) but let&#39;s focus on the fact that the way to use WMI is by its COM interface. The WMI COM API enables developers to write a WMI client or an application that uses WMI information.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Let&#39;s take a look at the example from the article &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/windows/desktop/aa390423(v=vs.85).aspx&quot;&gt;&quot;GettingWMI Data from the Local Computer&quot; in the MSDN&lt;/a&gt;. First it initialize the COM parameters using the CoInitializeEx() function, then some security information is passed via CoInitializeSecurity() and then we get access to the WMI COM API by using CoCreateInstance() function with the CLSID_WbemLocator object and getting the IWbemLocator pointer.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Now we can call IWbemLocatorobject&#39;s function (like ConnectServer()).&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;LTR&quot; style=&quot;margin-bottom: .0001pt; margin: 0cm;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;HRESULT hres;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;hres =&amp;nbsp; CoInitializeEx(0, COINIT_MULTITHREADED); &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt; (FAILED(hres))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&quot;Failed to initialize COM library. Error code = 0x&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; hex &amp;lt;&amp;lt; hres &amp;lt;&amp;lt;endl;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt; 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;// Program has failed.&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hres =&amp;nbsp;CoInitializeSecurity(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL, &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -1,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;// COM authentication&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;// Authentication services&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;// Reserved&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RPC_C_AUTHN_LEVEL_DEFAULT,&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;//Default authentication &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RPC_C_IMP_LEVEL_IMPERSONATE, &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;// Default Impersonation&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;//Authentication info&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EOAC_NONE,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;// Additional capabilities &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;// Reserved&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt; (FAILED(hres))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&quot;Failed to initialize security. Error code = 0x&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; hex &amp;lt;&amp;lt; hres &amp;lt;&amp;lt;endl;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CoUninitialize();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt; 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;// Program has failed.&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IWbemLocator *pLoc = NULL;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hres = CoCreateInstance(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLSID_WbemLocator,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0, &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLSCTX_INPROC_SERVER, &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IID_IWbemLocator, (LPVOID *)&amp;amp;pLoc);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt; (FAILED(hres))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&quot;Failed to create IWbemLocator object.&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; &lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&quot; Err code = 0x&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; hex &amp;lt;&amp;lt; hres &amp;lt;&amp;lt;endl;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CoUninitialize();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt; 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;// Program has failed.&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IWbemServices *pSvc = NULL;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hres = pLoc-&amp;gt;ConnectServer(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _bstr_t(L&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&quot;ROOT\\CIMV2&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;), &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;// Object path of WMI namespace&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;// User name. NULL = current user&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;// User password. NULL = current&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;//Locale. NULL indicates current&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;// Security flags.&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;// Authority (for example, Kerberos)&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;// Context object &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;pSvc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;// pointer to IWbemServices proxy&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt; (FAILED(hres))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&quot;Could not connect. Error code = 0x&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; hex &amp;lt;&amp;lt; hres&amp;lt;&amp;lt; endl;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pLoc-&amp;gt;Release();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CoUninitialize();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt; 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;//Program has failed.&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;LTR&quot; style=&quot;direction: ltr; line-height: 12pt; margin-bottom: 0.0001pt; unicode-bidi: embed;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;LTR&quot; style=&quot;margin-bottom: .0001pt; margin: 0cm;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;LTR&quot; style=&quot;margin-bottom: .0001pt; margin: 0cm;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Nice! Isn&#39;t it?&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;LTR&quot; style=&quot;margin-bottom: .0001pt; margin: 0cm;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Let&#39;s conclude this post with a nice song by Jimi Hendrix, Love or Confusion, because that&#39;s how you probably feel right now, isn&#39;t it?&lt;span style=&quot;font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Wingdings;&quot;&gt;J&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;LTR&quot; style=&quot;margin-bottom: .0001pt; margin: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/SdjLFIyafh0&quot; width=&quot;420&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sagym.blogspot.com/feeds/3599233121528391895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sagym.blogspot.com/2012/10/introduction-to-com.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/3599233121528391895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/3599233121528391895'/><link rel='alternate' type='text/html' href='http://sagym.blogspot.com/2012/10/introduction-to-com.html' title='A few words about COM'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11967638511237903271</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/SdjLFIyafh0/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5947584971613873961.post-1591107267162721138</id><published>2012-09-30T18:44:00.000+02:00</published><updated>2012-09-30T18:44:01.065+02:00</updated><title type='text'>Now in English!</title><content type='html'>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
I will continue this blog in&amp;nbsp;English&amp;nbsp;from now on...&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
While I&#39;m working on my new post, enjoy this tune:&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;iframe width=&quot;420&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/78vm-ZBj27I&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://sagym.blogspot.com/feeds/1591107267162721138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sagym.blogspot.com/2012/09/now-in-english.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/1591107267162721138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/1591107267162721138'/><link rel='alternate' type='text/html' href='http://sagym.blogspot.com/2012/09/now-in-english.html' title='Now in English!'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11967638511237903271</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/78vm-ZBj27I/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5947584971613873961.post-1575897087515908658</id><published>2011-10-04T20:00:00.000+02:00</published><updated>2011-10-04T20:09:54.714+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="לקוחות"/><category scheme="http://www.blogger.com/atom/ns#" term="נסיעות"/><category scheme="http://www.blogger.com/atom/ns#" term="עסקים"/><title type='text'>מסביב לאירופה ב 7 ימים</title><content type='html'>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;נסיעת העסקים האחרונה שלי לקחה אותי לאירופה. בתכנון: פגישה עם לקוחות גדולים והדגמה של יכולות במוצר חדש. 7 ימים, 5 טיסות - המשמעות היא הרבה ביזנס, מעט פלז׳ר. חמוש בבגדים ההולמים את המעמד, בלפטופ עם כל המסמכים וקבצי ההתקנה ותקוות להרשים את הלקוחות, יצאתי לדרך.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsJyzFXmSZ-hfiWfFwVvfiuN2Fo4mrPr5pRoszRFkvAHMcAGD6bY2jURDznfJ6KhyHi6qDhzoahdycnu0DDAHzkotheFm13nf3cJF2AkaKCh-zIaqnTq5zgIwnPdU0SkISzKwWbcjdCLy9/s1600/8019210-beautiful-landscape-in-siegerland-north-rhine-westphalia-germany.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsJyzFXmSZ-hfiWfFwVvfiuN2Fo4mrPr5pRoszRFkvAHMcAGD6bY2jURDznfJ6KhyHi6qDhzoahdycnu0DDAHzkotheFm13nf3cJF2AkaKCh-zIaqnTq5zgIwnPdU0SkISzKwWbcjdCLy9/s320/8019210-beautiful-landscape-in-siegerland-north-rhine-westphalia-germany.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
לא אעייף את הקוראים בפרטים טכניים ואגש היישר לכמה תובנות מרכזיות מהנסיעה הזו:&lt;br /&gt;
&lt;br /&gt;
1. כמה שנראה לך שחשבת על כל התסריטים האפשריים מראש ובדקת את כל מה שיכולת להעלות בדעתך בסביבת המעבדה, בסביבה של לקוח יש חוקים אחרים! אפילו שקיבלתי תרשימים מפורטים של סביבת העבודה של הלקוח וטרחתי להתקין העתק מדוייק של הסביבה במעבדה - כשמגיעים לדבר האמיתי - כל החוקים משתנים. אף על פי כן, כמות הבעיות שגילינו במעבדה ותיקנו בטרם הנסיעה הייתה שווה את המאמץ ולכן &lt;b&gt;&lt;i&gt;אין דבר חשוב מללמוד היטב את סביבת הלקוח בטרם מגיעים להתקנה&lt;/i&gt;&lt;/b&gt;. &lt;br /&gt;
&lt;br /&gt;
2. חשוב להבהיר ללקוח את מטרת הביקור. אם המטרה היא להדגים יכולות למשל, אסור שהלקוח יחשוב שהוא הולך לקבל מוצר בו יוכל לעשות שימוש כבר למחרת. חשוב להסביר שהמוצר הוא עדיין בתהליך פיתוח ומדובר בגרסה ראשונית בלבד. &lt;b&gt;&lt;i&gt;תיאום ציפיות מראש הוא המפתח להצלחה של פגישה עם לקוח&lt;/i&gt;&lt;/b&gt;. &lt;br /&gt;
&lt;br /&gt;
3. כשמתגלות בעיות בזמן ההתקנה, עדיף לצאת מהשוק כמה שיותר מהר ולעבור למצב בו משדרים ביטחון ונינוחות, לרשום את הבעיות שנתגלו ומומלץ אף להוסיף בדיחה שוברת קרח כמו ״זה לא באג, זה פיצ׳ר״. לקוחות לא אוהבים לראות מהנדסים מתפתלים שמנסים לתרץ את הבאגים שלהם, לכן &lt;b&gt;&lt;i&gt;צריך להראות נחישות וביטחון שימצא פתרון ואם אפשר גם לספק הבטחה לתיקון עם לוח זמנים&lt;/i&gt;&lt;/b&gt;. &lt;br /&gt;
&lt;br /&gt;
4. &lt;b&gt;&lt;i&gt;לקחת אתכם איש QA שאחראי על בדיקת המוצר זה אחד הרעיונות הטובים ביותר בנסיעה ללקוחות&lt;/i&gt;&lt;/b&gt;. סיבה אחת היא שלאנשי QA יש בדרך כלל נסיון רב בהתקנת המוצר, הם עשו זאת עשרות פעמים ויוכלו להיות לעזר רב בעבודה אצל הלקוח. סיבה נוספת זה שתחושת המוצר, ייעודו, מגבלותיו ותכונותיו - מתגלים בצורה המדוייקת יותר בסביבה אמיתית ולא בסביבת המעבדה הרגילה. ברגע שרואים איך המוצר עובד בסביבה אמיתית, שומעים על הצרכים של הלקוח ממקור ראשון, מבינים את המשמעות של כל תכונה במוצר, מקבלים את התחושה בשטח לגבי דרך פעולתו של המוצר - אפשר לבדוק אותו לאחר מכן באופן מדוייק יותר, לחשוב על תסריטי בדיקה חדשים ועל ידי כך לשפר את איכות המוצר בצורה מדהימה. &lt;br /&gt;
&lt;br /&gt;
5. והכי חשוב: את השוקולדים למשרד הביאו באמת מהמדינה שאליה נסעתם ולא מהדיוטי פרי בארץ - הרי זו הסיבה האמיתית שבגללה שולחים אתכם לחו&quot;ל :)&lt;br /&gt;
&lt;br /&gt;
אמנם לא נסעתי ברכבות באירופה, אבל אם הייתי נוסע, בטוח שככה זה היה נראה (ונשמע):&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/qBGNlTPgQII?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sagym.blogspot.com/feeds/1575897087515908658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sagym.blogspot.com/2011/10/7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/1575897087515908658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/1575897087515908658'/><link rel='alternate' type='text/html' href='http://sagym.blogspot.com/2011/10/7.html' title='מסביב לאירופה ב 7 ימים'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11967638511237903271</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsJyzFXmSZ-hfiWfFwVvfiuN2Fo4mrPr5pRoszRFkvAHMcAGD6bY2jURDznfJ6KhyHi6qDhzoahdycnu0DDAHzkotheFm13nf3cJF2AkaKCh-zIaqnTq5zgIwnPdU0SkISzKwWbcjdCLy9/s72-c/8019210-beautiful-landscape-in-siegerland-north-rhine-westphalia-germany.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5947584971613873961.post-5586069989262271503</id><published>2011-07-23T00:50:00.000+03:00</published><updated>2011-07-23T00:50:14.385+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="אבטחת מידע"/><category scheme="http://www.blogger.com/atom/ns#" term="פשע מקוון"/><title type='text'>פשע מקוון</title><content type='html'>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;כשאומרים פשע מקוון מתכוונים לניצול רשת האינטרנט לצרכי פשיעה. הפשיעה יכולה להיות מכוונת לבני אדם בודדים, קבוצות או אפילו אומות שלמות. קיימים סוגים רבים של פשיעה מקוונת.&amp;nbsp;שליחת ספאם - שליחת דואר זבל נחשב לפשע במדינות רבות (כולל ישראל),&amp;nbsp;הונאה באמצעות שינוי, מחיקה או זיוף מידע, טרור ברשת נגד רשויות או גופים ציבוריים, גניבת זהות של אדם אחר ושימוש בזהותו לרעה, חדירה למחשבו של אדם אחר ועוד.&lt;br /&gt;
&lt;br /&gt;
הבעייה הגדולה ביותר בסוג פשיעה כזה, הוא אי היכולת בדר&quot;כ לנתר את מקור התקיפה, את התוקף או את המניעים שלו. הבעייה ממשיכה גם אם מצליחים למצוא את התוקף - אין כמעט אכיפה בינלאומית כיום שתאפשר להביא את התוקף לשלם על פשעיו. קשה מאוד לאתר פושעים מעבר לים וקשה עוד יותר להעמיד אותם לדין. בעייה זו גורמת לאנשים רבים מאוד למצוא את עצמם שותפים לפשע מקוון והתעשייה הזאת מגלגלת כספים רבים שקשה לדמיין בכלל.&lt;br /&gt;
&lt;br /&gt;
זה לא שפעולות נגד פושעים אלו לא מתבצעות, רק לפני יומיים &lt;a href=&quot;http://www.calcalist.co.il/internet/articles/0,7340,L-3525065,00.html&quot;&gt;התבשרנו&lt;/a&gt; על מבצע מפואר שהצריך שיתוף פעולה בין 3 מדינות אשר הביא למעצרם של 21 איש בחשד לחברות באנונימוס ובקבוצת הבת שלה לולז-סק (lulz sec - כלומר &quot;עושים צחוק מאבטחה&quot;). החבר&#39;ה האלה היו מעורבים כנראה בתקיפה על שרתי פייפאל. &lt;a href=&quot;http://www.guardian.co.uk/world/2011/jul/19/anonymous-hackers-arrested-fbi-raids&quot;&gt;דיווחו&lt;/a&gt; גם על מעצר של קטין בן 16 בלונדון בחשד דומה. אבל כמובן שמדובר בקצה המזלג, בתעשיית פשע שמגלגלת כל כך הרבה כסף (עשרות מיליארדים, על פי ההערכות).&lt;br /&gt;
&lt;br /&gt;
אני ממליץ על ההרצאה המעניינת מאוד, בת כ 18 דקות מפיו של מיקו היפונן, חוקר אבטחה של חברת F-Secure הפינית, שראיתי היום. מיקו נותן סקירה קצרה על התחלת הפשע המקוון (שני אחים פקיסטנים כתבו את הוירוס הראשון לפני 25 שנה), מסביר את הסכנות, מדבר על אי ההתמודדות של העולם עם הבעיה ועושה את כל זה בדרך משעשעת ומעניינת:&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;object height=&quot;326&quot; width=&quot;446&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://video.ted.com/assets/player/swf/EmbedPlayer.swf&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; /&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot;/&gt;&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&lt;/param&gt;&lt;param name=&quot;bgColor&quot; value=&quot;#ffffff&quot;&gt;&lt;/param&gt;&lt;param name=&quot;flashvars&quot; value=&quot;vu=http://video.ted.com/talk/stream/2011G/Blank/MikkoHypponen_2011G-320k.mp4&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/MikkoHypponen-2011G.embed_thumbnail.jpg&amp;vw=432&amp;vh=240&amp;ap=0&amp;ti=1192&amp;lang=eng&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=mikko_hypponen_fighting_viruses_defending_the_net;year=2011;theme=what_s_next_in_tech;theme=a_taste_of_tedglobal_2011;theme=bold_predictions_stern_warnings;theme=new_on_ted_com;event=TEDGlobal+2011;tag=Global+Issues;tag=Technology;tag=computers;tag=crime;tag=internet;tag=virus;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;&quot; /&gt;&lt;embed src=&quot;http://video.ted.com/assets/player/swf/EmbedPlayer.swf&quot; pluginspace=&quot;http://www.macromedia.com/go/getflashplayer&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; bgColor=&quot;#ffffff&quot; width=&quot;446&quot; height=&quot;326&quot; allowFullScreen=&quot;true&quot; allowScriptAccess=&quot;always&quot; flashvars=&quot;vu=http://video.ted.com/talk/stream/2011G/Blank/MikkoHypponen_2011G-320k.mp4&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/MikkoHypponen-2011G.embed_thumbnail.jpg&amp;vw=432&amp;vh=240&amp;ap=0&amp;ti=1192&amp;lang=eng&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=mikko_hypponen_fighting_viruses_defending_the_net;year=2011;theme=what_s_next_in_tech;theme=a_taste_of_tedglobal_2011;theme=bold_predictions_stern_warnings;theme=new_on_ted_com;event=TEDGlobal+2011;tag=Global+Issues;tag=Technology;tag=computers;tag=crime;tag=internet;tag=virus;&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
מה שהכי קשה בכל זה, זה חוסר האונים שלנו, כמשתמשים במחשב באופן קבוע כמעט לכל צרכי החיים שלנו, להגן על עצמנו ב 100% מפני פשיעה מסוג זה. אין תוכנת פלא שאפשר להתקין על המחשב שלך ולהמנע לחלוטין מכל בעייה של פשע מקוון. אפשר להפחית את הבעייה על שימוש בתוכנות פיירוול ואנטי-וירוס, אבל הבעייה לא נפתרת לחלוטין. אנטי וירוס למשל הוא לא פרו-אקטיבי, הוא ינקה את המחשב שלכם מוירוסים אותם הוא &quot;מכיר&quot;, אבל הוא לא יודע למנוע הדבקה מוירוסים שהוא לא מכיר. רק בשביל לסבר את האוזן, כל שנה מתגלים עשרות מיליונים של נוזקות חדשות...&lt;br /&gt;
&lt;br /&gt;
יבגני קספרסקי, כן כן ההוא מהאנטיוירוס המפורסם, &lt;a href=&quot;http://www.eweek.com/c/a/Security/Cloud-Security-Services-Can-Reduce-Malware-329353/&quot;&gt;ציין השבוע&lt;/a&gt; שהוא חושב שעם המעבר של ארגונים לשירותי מחשב בענן, כתיבת נוזקות תהפוך למלאכה קשה יותר מכפי שהיא כיום ונערים מחוצ&#39;קנים עם יותר מידי זמן לא יוכלו כבר לעשות זאת. ידרשו לכך גאונים, כך הבטיח קספרסקי.&lt;br /&gt;
&lt;br /&gt;
בהודעה זו התעלם, לדעתי, קספרסקי מזירה חדשה ואטרקטיבית (לפושעים) לא פחות - הסמארטפונים. הוא מקווה שהמעבר למחשוב ענן יוריד את כמות הנוזקות המסתובבות היום בעולם, אבל הוא לא לוקח בחשבון את העליה בהן בתחום המובייל. בעידן שלנו, בו הסמאטפונים הם נחלת הכלל והם רק הולכים והופכים חלק אינטגרלי מחיינו, קשה יהיה עוד יותר להגן עלינו מפני פשע מקוון. כבר היום אנחנו ניגשים לחשבון הבנק דרך הסמארטפון, קובעים תורים לרופא, מתחברים לשירותי דוא&quot;ל ובכלל עכשיו כולם מדברים הרבה על כך שהסמארטפון יחליף את כרטיסי האשראי. ברור כמה נחמד יהיה להשתלט על המכשירים הקטנים והחכמים הללו, אשר כרגע כמעט ולא מוגנים.&lt;br /&gt;
&lt;br /&gt;
שיר לסיום.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;object width=&quot;320&quot; height=&quot;266&quot; class=&quot;BLOGGER-youtube-video&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot; data-thumbnail-src=&quot;http://3.gvt0.com/vi/YFK6H_CcuX8/0.jpg&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/YFK6H_CcuX8&amp;fs=1&amp;source=uds&quot; /&gt;&lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot; /&gt;&lt;embed width=&quot;320&quot; height=&quot;266&quot;  src=&quot;http://www.youtube.com/v/YFK6H_CcuX8&amp;fs=1&amp;source=uds&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sagym.blogspot.com/feeds/5586069989262271503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sagym.blogspot.com/2011/07/blog-post_22.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/5586069989262271503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/5586069989262271503'/><link rel='alternate' type='text/html' href='http://sagym.blogspot.com/2011/07/blog-post_22.html' title='פשע מקוון'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11967638511237903271</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5947584971613873961.post-9122715921524255397</id><published>2011-07-12T13:23:00.000+03:00</published><updated>2011-07-12T13:23:12.226+03:00</updated><title type='text'>התקנים לחלונות</title><content type='html'>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;אני חושב שאין מי שמתכנת למחייתו ולא מכיר את האתר המצויין &lt;a href=&quot;http://www.codeproject.com/&quot;&gt;קוד-פרוג&#39;קט&lt;/a&gt;. זהו אתר המספק מקום למפתחים מכל העולם, לשתף אחד את השני ברעיונות, קטעי קוד, מדריכים ומהווה מאגר ענק לכל מי שרוצה ללמוד טכנולוגיות חדשות, טכנולוגיות ישנות, לחפש הכוונה וכיו&quot;ב. כמה פעמים באת לכתוב משהו ואז עצרתם וחשבתם - &quot;רגע, בטוח מישהו כבר עשה משהו כזה בעבר&quot; - ונכנסתם לקוד-פרוג&#39;קט לחפש? לי זה קורה המון.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdnxX9V3sguhYkyuIpEayvSenyqmtV6n_FEBUoTkKpQBUigsJGdUezwG7X_-fRt_xdWuEH-e9RwxJVsrRAxUadYvbqhm3MUN7o9RSzyOGwWAsNYaXHzAJ1XseqozZG3INMlN6uWLGDPFx4/s1600/logo225x90.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdnxX9V3sguhYkyuIpEayvSenyqmtV6n_FEBUoTkKpQBUigsJGdUezwG7X_-fRt_xdWuEH-e9RwxJVsrRAxUadYvbqhm3MUN7o9RSzyOGwWAsNYaXHzAJ1XseqozZG3INMlN6uWLGDPFx4/s1600/logo225x90.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
הפוסט הבא הוא למעשה המלצה, או אולי מחווה, לאחד מהמדריכים הטובים שקראתי בקוד-פרוג&#39;קט ואולי באינטרנט בכלל. את &lt;a href=&quot;http://www.codeproject.com/KB/system/driverdev.aspx&quot;&gt;המדריך הזה&lt;/a&gt;, שנכתב בחמישה חלקים כתב מתכנת אמריקאי בשם טובי אופפרמן והוא עוסק בפיתוח התקנים (דרייברים) לחלונות (וינדואוס).&lt;br /&gt;
&lt;br /&gt;
למי שיצא לפתח בעבר דרייברים יודע שמדובר במלאכה לא פשוטה, אשר בעיקרה מצריכה מהתמתכנת לדעת בדיוק מה הוא עושה. כאשר אתם מתכנתים בקרנל, באג קטן שהיה מוביל במקרה הכי גרוע לקראש ב user space יוביל לבלו-סקרין או תקיעה של המכונה כאשר אתם נמצאים בקרנל. פונקציות וספריות אשר אנחנו רגילים כל כך להשתמש בהן ביוזר ספייס, לא נגישות לשימוש בקרנל. המדריך הזה עושה עבודה מצויינת בלהסביר כיצד מתחילים לכתוב דרייבר, כיצד טוענים אותו וכיצד מדברים איתו מהיוזר ספייס. הוא עושה את ההכנה הכי טובה לקראת מה שמצופה למתכנת שיוצר דרייבר לראשונה בחייו, ונותן רפרנסים רבים תוך כדי למקורות קריאה נוספת. המדריך גם מצויין למי שנתקל כבר בדרייברים בעבר ורוצה לחדד דקויות או להעמיק את הידע בנושא מסויים.&lt;br /&gt;
&lt;br /&gt;
מה שהכי מצא חן בעיני במדריך הזה הוא יכולתו הגבוהה של הכותב להסביר מבלי להתפזר (כמו שקורא במדריכים רבים אחרים, בהם הקורא מאוהב בידע שלו ומשתף קצת יותר ממה שצריך :) ), הכותב יודע להתעמק בנקודות החשובות ולבסוף גם לספק קטעי קוד לדוגמא שמהם אפשר להתחיל לעבוד בפועל.&lt;br /&gt;
&lt;br /&gt;
אגב, יש כלי מצויין בוינדואוס, שנקרא &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ff545448(v=vs.85).aspx&quot;&gt;Driver Verifier&lt;/a&gt;, המספק יכולת לוודא שהדרייברים שכתבתם תקינים מבחינת ניהול זכרון, עמידה בעומס, עמידה במצב בו במערכת יש מעט מאוד משאבים, בדיקות I/O, זיהוי דד-לוקים, באגים הקשורים בשימוש ברמות IRQ לא נכונות ועוד תכונות נוספות שמפורטות &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ff545470(v=vs.85).aspx&quot;&gt;כאן&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
שיר הסיום המתאים כאן צריך לדבר על Drivers, אז הנה אחד ה Driving songs הכי אהובים עליי:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;object class=&quot;BLOGGER-youtube-video&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot; data-thumbnail-src=&quot;http://0.gvt0.com/vi/1EBw_da7BZk/0.jpg&quot; height=&quot;266&quot; width=&quot;320&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/1EBw_da7BZk&amp;fs=1&amp;source=uds&quot; /&gt;&lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot; /&gt;&lt;embed width=&quot;320&quot; height=&quot;266&quot;  src=&quot;http://www.youtube.com/v/1EBw_da7BZk&amp;fs=1&amp;source=uds&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sagym.blogspot.com/feeds/9122715921524255397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sagym.blogspot.com/2011/07/blog-post_12.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/9122715921524255397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/9122715921524255397'/><link rel='alternate' type='text/html' href='http://sagym.blogspot.com/2011/07/blog-post_12.html' title='התקנים לחלונות'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11967638511237903271</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdnxX9V3sguhYkyuIpEayvSenyqmtV6n_FEBUoTkKpQBUigsJGdUezwG7X_-fRt_xdWuEH-e9RwxJVsrRAxUadYvbqhm3MUN7o9RSzyOGwWAsNYaXHzAJ1XseqozZG3INMlN6uWLGDPFx4/s72-c/logo225x90.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5947584971613873961.post-7630751275397181812</id><published>2011-07-07T21:40:00.000+03:00</published><updated>2011-07-07T21:40:57.604+03:00</updated><title type='text'>מוזיקה וסטטיסטיקה</title><content type='html'>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;כפי שכבר השתמע מפוסטים קודמים, אני שומע מוזיקה כל זמן שאני לא ישן. ברכבת בדרך לעבודה, בזמן העבודה (כל עוד אין ישיבות), בבית, באוטו ואפילו בזמן כתיבת שורות אלה מתנגן פה &lt;a href=&quot;http://www.youtube.com/watch?v=RIl_Lp-H2mI&quot;&gt;שיר ישן של פינק פלויד ברקע&lt;/a&gt;. דבר נוסף שאפשר לומר שהוא &quot;הקטע שלי&quot; זה לתעד את המוזיקה שאני שומע בעזרת אתר מצויין הנקרא &lt;a href=&quot;http://last.fm/&quot;&gt;last.fm&lt;/a&gt;. זהו אתר שהוא משהו בין רשת חברתית לרדיו אינטרנטי, אשר בין השאר מאפשר להתקין תוכנה קטנה על המחשב, אשר מתחברת לנגן המוזיקה ושולחת לשרתי האתר את פרטי השיר המושמע בנגן. האתר צובר סטיסטיקה ויודע לעשות איתה כמה דברים:&lt;br /&gt;
&lt;br /&gt;
1. בעזרת אלגוריתמים חברתיים חכמים להתאים לך את המוזיקה שאתה אוהב לשמוע במידה ובחרת להקשיב (ושילמת) למוזיקה דרך שירות הרדיו של האתר.&lt;br /&gt;
2. מציג נתונים וטבלאות סטטיסטיות בנוגע להשמעות של אמנים, אלבומים ושירים לפי חתכים של זמן. דווקא באופציה הזאת אני מוצא המון עניין. מעניין אותי לדעת איזו להקה שמעתי הכי הרבה בשנה האחרונה, משהו השיר ששמעתי הכי הרבה פעמים מאז ומעולם ועוד עובדות חסרות משמעות ומעניינות כאחד.&lt;br /&gt;
&lt;br /&gt;
יש רק בעייה אחת. last.fm חסום אצלנו במשרדים משיקולי רוחב פס ולכן אי אפשר לא להתקין את התוכנה ובטח שלא להתחבר לשרתי last.fm על מנת לדווח על השירים המושמעים. וכך, החלק הכי משמעותי של רשימת ההשמעה שלי במהלך היום לא נכנס לסטטיסטיקה. דרמטי ככל שזה נשמע :).&lt;br /&gt;
&lt;br /&gt;
לא ויתרתי ומצאתי פתרון!&lt;br /&gt;
&lt;br /&gt;
נגן המוזיקה שאני הכי אוהב הוא &lt;a href=&quot;http://www.mediamonkey.com/%20&quot;&gt;Mediamonkey&lt;/a&gt;, הלא הוא קוף המדיה. בפעם אחרת אולי אספר למה אני מוצא את התוכנה הזאת כמוצלחת ביותר לצורך ניהול ספריית המוזיקה על המחשב, אבל לא לשם כך נתכנסנו כאן היום. קוף-המדיה מאפשר להתקין עליו &lt;a href=&quot;http://www.mediamonkey.com/forum/viewtopic.php?f=6&amp;amp;t=34632&amp;amp;sd=d&quot;&gt;פלאגין &lt;/a&gt;המאפשר לשלוח את הדיווח על המוזיקה לשרתי last.fm ללא צורך בהתקנת התוכנה של last.fm על המחשב. זה עדיין לא עוזר לנו, היות ואי אפשר להתחבר לשרתי last.fm ממחשבי המשרד. אך פלאגין זה מאפשר גם אופציה של לשמור cache של השירים שהושמעו בקובץ לוג.&lt;br /&gt;
&lt;br /&gt;
כעת, כל מה שנותר לעשות הוא לשלוח את קובץ הלוג במייל, נאמר פעם בשבוע, ומהמחשב הביתי לשלוח את הרשימה ל last.fm. נשמע די פשוט, לא?&lt;br /&gt;
&lt;br /&gt;
מצאתי &lt;a href=&quot;http://qtscrob.sourceforge.net/&quot;&gt;תוכנת קוד פתוח&lt;/a&gt; שיודעת לעשות את הפעולה הזאת על קבצי דטה בייס של אייפוד, כדי לא לכתוב את הכל מאפס. כתבתי פרסר (parser) פשוט לקובץ הלוג שמוציא הפלאגין בעבודה וכל השאר היסטוריה כמו שאומרים. כעת שום שיר לא חומק ממלתעות הסטטיסטיקה ומתועד היטב בבסיסי הנתונים של last.fm! ניצחון!&lt;br /&gt;
&lt;br /&gt;
מספר בעיות עלו בזמן העבודה על הפרוייקט הקטע הזה. למשל, ה QTScrobbler, אותה תוכנת קוד פתוח אותה התאמתי לצרכיי, משתמשת בספריית &lt;a href=&quot;http://curl.haxx.se/&quot;&gt;libcurl&lt;/a&gt; בעזרתה היא מבצעת את עבודת ה HTTP ברשת. מפתחי התוכנה לא ראו לנכון לצרף את ה dllים וה libים של libcurl איתם הם מקמפלים את הפרוייקט, מה שהצריך לחפש ברשת את הספריות המתאימות. האתר של curl מאפשר אמנם להורים dllים מקומפלים, אבל כאשר מורידים אותם ומנסים להשתמש, מגלים בעיות רבות כמו תלויות במודולים אחרים (&lt;a href=&quot;http://asg.web.cmu.edu/sasl/&quot;&gt;sasl&lt;/a&gt; ואחרים) אשר גם אותם צריך לאתר ברשת. אחרי ששרפתי כמה שעות בחיפושים, נתקלתי בהמלצות בפורומים מקצועיים ובמיילינג ליסטס להוריד את הסורסים של libcurl ולקמפל אותו לבד. כך עשיתי ו libcurl נכנס כספרייה סטטית לתוך הפרוייקט.&lt;br /&gt;
&lt;br /&gt;
בסוף השבוע אני אנקה קצת את הקוד, אקמפל גירסת release ואעלה אותה לפה, במידה ומישהו יתקל אי פעם בבעיות הקשות שתיארתי פה :)&lt;br /&gt;
&lt;br /&gt;
גם את הסורסים שלי, אשמח לשתף במידה ויהיה ביקוש.&lt;br /&gt;
&lt;br /&gt;
לא נדלג גם הפעם על שיר סיום. הפעם, מחווה לקוף-המדיה. זה שיר שחיבבתי מהרגע ששמעתי אותו לראשונה. שיתוף פעולה בין אוזי אוסבורן ללהקת Coal Chamber. &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/GMk-8pmTpgU?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sagym.blogspot.com/feeds/7630751275397181812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sagym.blogspot.com/2011/07/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/7630751275397181812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/7630751275397181812'/><link rel='alternate' type='text/html' href='http://sagym.blogspot.com/2011/07/blog-post.html' title='מוזיקה וסטטיסטיקה'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11967638511237903271</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5947584971613873961.post-5155374427534622487</id><published>2011-06-16T11:48:00.000+03:00</published><updated>2011-06-16T11:51:16.814+03:00</updated><title type='text'>תלויות או לא להיות</title><content type='html'>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;הפוסט הבא שלי הוא בהשראת &lt;a href=&quot;http://www.codeguru.com/cpp/cpp/cpp_mfc/files/article.php/c18941&quot;&gt;המאמר&lt;/a&gt; שקראתי לאחרונה ב CodeGuru שעסק בצימצום תלויות בפרוייקט C++ על ידי שימוש ב&quot;תבנית המפעל&quot; (Factory Pattern).&lt;br /&gt;
&lt;br /&gt;
הפאקטורי הוא אחד מהפאטרנים (תסלחו לי על העברית-אנגלית) הראשונים שלומדים בדרך כלל בקורסים של Design Patterns והעיקרון שלו פשוט מאוד. הרעיון הוא ליצור מחלקה (או שיטה) שתייצר עבורך את האובייקטים לפי קריטריון שאתה מעביר אליה. לדוגמא, יש לנו מחלקה מסוג פרי, ממנה יורשים תפוח, אפרסק, שזיף ואגס ויש לנו שיטה שמקבלת כפרמטר את סוג הפרי שרוצים ומחזירה מצביע לאובייקט החדש.&lt;br /&gt;
&lt;br /&gt;
תרשים מחלקות שלקחתי מהאתר &lt;a href=&quot;http://www.oodesign.com/&quot;&gt;OODesign&lt;/a&gt;, נראה כך:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.oodesign.com/images/stories/factory%20implementation.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;237&quot; src=&quot;http://www.oodesign.com/images/stories/factory%20implementation.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
כלומר הפאקטורי הוא זה שמייצר את המוצר עבור היוזרים ולא היוזרים עצמם. מתי הדבר שימושי? כאשר תהליך הייצור של האובייקט הוא מסובך או מכוער ורוצים להסתיר תהליך זה על מנת ליצור קוד נקי ומסודר יותר, אבל תוצר הלוואי המעניין של השימוש בתבנית זו הוא צימצום התלויות בקוד, ודווקא בזה הייתי רוצה להתמקד.&lt;br /&gt;
&lt;br /&gt;
כיצד זה מצמצם תלויות? במקום שהמחלקה שמשתמשת תעשה include לקבצי ה header של תפוח, אפרסם, שזיף ואגס, היא עושה include רק ל headers של פרי ושל מחלקת המפעל ומשתמש רק בהם. שינוי במימוש של מחלקת השזיף לא יגרור קימפול מחדש של המחלקה המשתמשת.&lt;br /&gt;
&lt;br /&gt;
כותב המאמר ב CodeGuru צייר את התרשים הבא כדוגמא לתלויות בלתי רצויות בקוד:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.codeguru.com/dbfiles/get_image.php?id=18941&amp;amp;lbl=PHYSICAL_01_GIF&amp;amp;ds=20110609&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;218&quot; src=&quot;http://www.codeguru.com/dbfiles/get_image.php?id=18941&amp;amp;lbl=PHYSICAL_01_GIF&amp;amp;ds=20110609&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
בדוגמא זו, כל שינוי במחלקה אחת מביא לקימפול חוזר של כל המחלקות התלויות בה, לפעמים שלא לצורך, במיוחד כאשר מדובר בפרוייקטים גדולים עם הרבה מאוד מחלקות ותלויות. לפעמים, למשל כאשר משנים התנהגות או ממשק, אין ברירה אלא לקמפל מחדש את כל התלויות, אבל לרוב, מדובר בשינוי קטן שגורם לנו לבזבז זמן יקר מול המסך בהמתנה שתהליך הקימפול יסתיים.&lt;br /&gt;
&lt;br /&gt;
אחד הפרוייקטים עליהם אני אחראי כעת נכתב על ידי ארבעה אנשים (כולל אותי) במשך כ 3 שנים. עבודה באוירה לוחצת ונלחצת כמו בהייטק מצריכה מאיתנו לעשות ויתורים שונים על מנת לעמוד בלוח הזמנים הלוחץ. כמה פעמים הזנחתם warning של הקומפיילר שלוקח יותר מ 5 דקות לתקן ואמרתם שאין לכם זמן לזה עכשיו? כמה פעמים עשיתם include להדרים שאין לכם צורך בהם ואחרי זה לא יצא לכם למחוק כי הבדיקה מה צריך ומה לא תיקח לכם זמן שאתם צריכים להשקיע בפתרון באגים? גם הקוד שלנו מכיל חטאים כאלה.&lt;br /&gt;
&lt;br /&gt;
מהפכני ככל שזה ישמע, החלטתי לעשות שינוי.&lt;br /&gt;
&lt;br /&gt;
השינוי לא יהיה רוחבי, כי זה קשה מידי, לוקח יותר מידי זמן ולא ריאלי במציאות היומיומית שלי. השינוי יהיה הדרגתי ויתבצע כך: בכל קובץ שאני נוגע במסגרת תיקון, שינוי או כתיבה פיצ&#39;ר חדש אני אדאג להעלים את ה warnings ואת התלויות הלא רצויות, אבדוק אילו includes אפשר להעביר לקובץ המימוש ולהוציא מתוך ה header על ידי שימוש ב forward declarations ואמחק תלויות לא נחוצות שנשכחו במרוצת הזמן. בתקווה להגיע לקוד שמתקמפל מהר יותר ונקי יותר.&lt;br /&gt;
&lt;br /&gt;
מעניין איך קריאת מאמר ב CodeGuru מניעה מהפיכות :)&lt;br /&gt;
&lt;br /&gt;
נסיים כרגיל בשיר בנושא.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/fm1-jPEAe9s?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sagym.blogspot.com/feeds/5155374427534622487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sagym.blogspot.com/2011/06/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/5155374427534622487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/5155374427534622487'/><link rel='alternate' type='text/html' href='http://sagym.blogspot.com/2011/06/blog-post.html' title='תלויות או לא להיות'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11967638511237903271</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5947584971613873961.post-4684296822505842670</id><published>2011-06-01T14:17:00.000+03:00</published><updated>2011-06-01T14:17:32.591+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MFC"/><category scheme="http://www.blogger.com/atom/ns#" term="WTL"/><category scheme="http://www.blogger.com/atom/ns#" term="מייקרוסופט"/><title type='text'>למה שמישהו עדיין ישתמש ב MFC?</title><content type='html'>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;עולם האנשים שיצא להם להתעסק ב MFC בחייהם מתחלק לשניים - אלה ששונאים MFC ואלה שממש שונאים אותו. יחד עם זאת, השימוש בטכנולוגיה זו עדיין קיים ואף נרחב יותר ממה שחושבים. מדהים ש MFC הוצג לראשונה כבר ב 1992 ועדיין מתכנתים מוצאים את עצמם פותחים פרוייקט MFC כשהם צריכים לעשות ממשק לתוכנית.&lt;br /&gt;
&lt;br /&gt;
מהו ה MFC? זוהי למעשה תשתית של מייקרוסופט שמהווה מסגרת לכתיבת מנשקי משתמש בוינדואוס. MFC עוטפת את מחלקות ה C++ ואת הממשקים של וינדואוס ומאפשרת למתכנת להשתמש ולשלוט על חלונות ופקדים עבור התוכנית שלו. MFC הוצגה על ידי מייקרוסופט כבר ב 1992 כדוגמא ליכולות של C++ בוינדואוס, אך למעשה הועתקה, או הייתה בהשראת, ה TCL של אפל.&lt;br /&gt;
&lt;br /&gt;
כיום, מייקרוסופט כבר פיתחה סביבות טובות ומתקדמות יותר מ MFC לפיתוח GUI. בראשן כמובן תשתית הדוט נט, הנוחה כל כך לשימוש בהשוואה ל MFC, שמאפשרת פיתוח גוי בצורה נוחה, מהירה ויעילה. אז מדוע שמישהו בכלל יפזול לכיוון ה MFC היום? הרי כל דבר שרוצים לשנות שם, צריך להבין לעומק את הסביבה, איך היא עובדת ומה בדיוק רץ אחרי מה וכל שינוי כזה הופך לעבודה מתסכלת של חפירה אינסופית באינטרנט, בפורומים וב MSDN. הרבה שעות שרפתי על להבין תהליכים ב MFC, הרבה שעות של יאוש מוחלט, של דפיקת הראש בשולחן וקריאה לעזרה למלאכי שמיים, אשר גם הם לא שפכו אור על מה לעזאזל גורם לחלון לצייר את הפקד לא כמו שאני (חשבתי ש) ביקשתי ממנו.&lt;br /&gt;
&lt;br /&gt;
לדוגמא, קחו קטע קוד שכל תפקידו הוא להפוך את הפונט של פקד טקסט לפונט מודגש:&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;code&gt;&lt;br /&gt;
// get the font of the static text control&lt;br /&gt;
HFONT hFont = (HFONT)::SendMessage( GetDlgItem(hwndDlg,  IDC_MESSAGETEXT), WM_GETFONT, 0, 0 );&lt;/code&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;code&gt;&lt;/code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;// get LOGFONT struct from HFONT handle&lt;/span&gt;&lt;br /&gt;
&lt;code&gt;&lt;/code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; white-space: pre;&quot;&gt;LOGFONT lf;&lt;/span&gt;&lt;br /&gt;
&lt;code&gt; ::GetObject(hFont, sizeof(lf),  &amp;amp;lf);&lt;br /&gt;
&lt;br /&gt;
// make it bold&lt;br /&gt;
lf.lfWeight = FW_BOLD;&lt;/code&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;code&gt;&lt;/code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;// recreate the HFONT handle&lt;/span&gt;&lt;br /&gt;
&lt;code&gt; hFont = CreateFontIndirect(&amp;amp;lf);&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;/code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;// set the font&lt;/span&gt;&lt;br /&gt;
&lt;code&gt; ::SendMessage(  GetDlgItem(hwndDlg,  IDC_MESSAGETEXT), WM_SETFONT, (WPARAM) hFont,&amp;nbsp;MAKELPARAM(false, 0) ); &lt;/code&gt;&lt;/div&gt;&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
וכל זה צריך לזכור לעשות ב OnInitDialog כי אחרת צריך להוסיף פקודות נוספות שירפרשו את החלון. בקיצור, סיוט.&lt;br /&gt;
&lt;br /&gt;
ובכל זאת, במוצר מסויים אשר מפותח על ידי, הייתי צריך לבחור באיזו טכנולוגיה לכתוב את ה GUI ובכל זאת בחרתי ב MFC. כאשר בדקתי אופציות לטכנולוגיות GUI, הדבר שעמד לנגד עיני היה איך אני מונע מהיוזר את ההכרח להתקין את כל החבילה של דוט נט על המחשב שלו. לכל מפתח תוכנה בימינו, שעובד עם הטכנולוגיות של מייקרוסופט, דוט נט חייב להיות מותקן על המחשב. אנחנו עובדים עם ויז&#39;ואל סטודיו וכלים אחרים של מייקרוסופט אשר מחייבים זאת. אבל המשתמש הפשוט, הפקידה בבנק, העו&quot;ד במשרד? למה שאני אחייב אותו להתקין יותר מ 100 מגה על המחשב האישי שלו בשביל תוכנה קטנה שבה ה GUI הוא דבר זניח ו 99% מהזמן שלה היא רצה ברקע? אופציית דוט נט בוטלה בו במקום.&lt;br /&gt;
&lt;br /&gt;
ישנן טכנולוגיות נוספות אשר לקחתי בחשבון כמו למשל QT. זהו פריימוורק לפיתוח אפליקציות עם GUI והוא יחסית נפוץ בעולם, אל כאשר בדקתי אופציית שימוש בו הבנתי שאני אצטרך להתחיל לחבר את קוד ה C++ שלי עם טכנולוגיה אחרת והבנתי שכנראה אני לא אצא מזה בשלום.&lt;br /&gt;
&lt;br /&gt;
אחרי שהבנתי שהאופציה הכי סבירה שלי היא עדיין לחזור ל MFC הישנה והלא נוחה, לפחות השארתי לעצמי את האופציה להשתמש ב WTL. זוהי ספריית טמפלייטים המתלבשת על MFC ונותן לו יכולות נוספות שמתקרבות ליכולות של הכלים המודרניים ויחד עם זאת עדיין משאירות את ה MFC הרחק מאחור. WTL הקל את העבודה במידה ניכרת אבל על כך בפוסט אחר.&lt;br /&gt;
&lt;br /&gt;
וכמו בפוסט הפתיחה, גם פה אסיים בשיר. שיר מהדיסק החדש והמצויין של ACCEPT:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/8gtLNssNaOw?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sagym.blogspot.com/feeds/4684296822505842670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sagym.blogspot.com/2011/06/mfc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/4684296822505842670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/4684296822505842670'/><link rel='alternate' type='text/html' href='http://sagym.blogspot.com/2011/06/mfc.html' title='למה שמישהו עדיין ישתמש ב MFC?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11967638511237903271</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5947584971613873961.post-1313709542431488520</id><published>2011-05-29T19:25:00.000+03:00</published><updated>2011-05-29T19:25:49.196+03:00</updated><title type='text'>פוסט ראשון</title><content type='html'>&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right;&quot; trbidi=&quot;on&quot;&gt;זהו הפוסט הראשון של הבלוג שלי.&lt;br /&gt;
&lt;br /&gt;
מעניין אם מישהו אי פעם יקרא את הדברים שאני הולך להעלות פה על הכתב (הוירטואלי) או שהבלוג הזה יעלם מתישהו בתהומות הנשייה של האיטרנט ואיש לעולם לא ידע על קיומו? הזמן יגיד. מילא אם הייתה לי מטרה ברורה לשמה אני פותח את הבלוג, עוד הייתי יכול לקוות שמישהו יתעניין בזה פעם, אבל כיוון שזו כרגע תעלומה בעיניי, נשאיר גם את זה בידי הזמן.&lt;br /&gt;
&lt;br /&gt;
אני אכתוב כאן על הדברים שמעניינים אותי, הדברים המקצועיים בהם אני מתעסק בחיים, דברים שאני עושה בזמני הפנוי ותקוותי שמישהו ימצא בזה עיניין ושימוש.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;ברייקפוינט&lt;/u&gt;&lt;br /&gt;
השם שנתתי לבלוג הוא &quot;ברייקפוינט&quot;. למה דווקא ברייקפוינט? אני מתכנת למחייתי ולכן הייתי צריך מושג מהעולם שלי שמצד אחד יהיה קליט ומגניב ומצד שני לא חנוני מידי :). אחרי שהבנתי שברייקפוינט הוא שם מצויין לבלוג על תכנות, נזכרתי בשיר של להקת מגאדת&#39; בשם הזה ולכן אל תתפלאו אם הבלוג הזה יגלוש גם לכיוונים מוזיקאליים. אני שומע מוזיקה כל זמן שאני לא ישן (לפעמים גם תוך כדי שינה) ולכן טבעי שהבלוג שלי יעסוק גם בתחום הזה.&lt;br /&gt;
&lt;br /&gt;
נסיים בשיר הנושא את השם של הבלוג, או בבלוג הנושא את השם של השיר...&lt;br /&gt;
&lt;br /&gt;
לא משנה...&lt;br /&gt;
&lt;br /&gt;
הנה זה:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/tSTI8J4tJq0?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sagym.blogspot.com/feeds/1313709542431488520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sagym.blogspot.com/2011/05/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/1313709542431488520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5947584971613873961/posts/default/1313709542431488520'/><link rel='alternate' type='text/html' href='http://sagym.blogspot.com/2011/05/blog-post.html' title='פוסט ראשון'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11967638511237903271</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>