<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Eli Ofek's Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/eliofek/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/eliofek/feed.xml</link>
    <description>Microsoft Israel</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:05:51 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Why do we get “The function evaluation requires all threads to run”</title>
      <link>https://docs.microsoft.com/archive/blogs/eliofek/why-do-we-get-the-function-evaluation-requires-all-threads-to-run</link>
      <pubDate>Wed, 12 Dec 2012 13:18:00 GMT</pubDate>
      <dc:creator><![CDATA[Eli Ofek]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/eliofek/2012/12/12/why-do-we-get-the-function-evaluation-requires-all-threads-to-run/</guid>
      <description><![CDATA[Some of you might have ran into this situation where you try to evaluate a property or a method...]]></description>
      <content:encoded><![CDATA[<font style="font-size: 12pt;"></font>  <p style="margin: 16px 0in; list-style-type: disc;"><span><font style="font-size: 10pt;">Some of you might have ran into this situation where you try to evaluate a property or a method        <br />during debug time, and get this message in the value cell of the watch:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br /></font></span><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/33/56/metablogapi/5811.image_6846FA2D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-56-metablogapi/5811.image_5F00_6846FA2D.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/33/56/metablogapi/2337.image_thumb_3FC81819.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-56-metablogapi/2337.image_5F00_thumb_5F00_3FC81819.png" width="672" height="71" /></a><a style="cursor: auto;" href="file:///C:\Users\elio\AppData\Local\Temp\WindowsLiveWriter1286139640\supfiles20A33050\image3.png"><span style="mso-no-proof: yes; text-underline: none;"><span style="mso-ignore: vglayout;"></span></span></a></p> <font style="font-size: 12pt;"></font>  <p style="margin: 16px 0in; list-style-type: disc;"><span><font style="font-size: 10pt;">There is a quick “workaround” to this issue.        <br />If you look carefully, you will see a small round icon after the message:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br /></font></span><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/33/56/metablogapi/5074.image_32EDC1FB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-56-metablogapi/5074.image_5F00_32EDC1FB.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/33/56/metablogapi/3733.image_thumb_0A6EDFE7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-56-metablogapi/3733.image_5F00_thumb_5F00_0A6EDFE7.png" width="667" height="62" /></a><a style="cursor: auto;" href="file:///C:\Users\elio\AppData\Local\Temp\WindowsLiveWriter1286139640\supfiles20A33050\image7.png"><span style="mso-no-proof: yes; text-underline: none;"><span style="mso-ignore: vglayout;"></span></span></a></p> <font style="font-size: 12pt;"></font>  <p style="margin: 16px 0in; list-style-type: disc;"><span><font style="font-size: 10pt;">Pressing on this icon will force the evaluation to continue,        <br />which most likely will give you the result you were after:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br /></font></span><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/33/56/metablogapi/0184.image_21B9E458.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-56-metablogapi/0184.image_5F00_21B9E458.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/33/56/metablogapi/3806.image_thumb_272854FC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-56-metablogapi/3806.image_5F00_thumb_5F00_272854FC.png" width="666" height="62" /></a><a style="cursor: auto;" href="file:///C:\Users\elio\AppData\Local\Temp\WindowsLiveWriter1286139640\supfiles20A33050\image11.png"><span style="mso-no-proof: yes; text-underline: none;"><span style="mso-ignore: vglayout;"></span></span></a></p> <font style="font-size: 12pt;"></font>  <p style="margin: 16px 0in; list-style-type: disc;"><span><font style="font-size: 10pt;">Now, let’s dive into the technical details… Why is this happening?        <br />        <br />By default, we tell Visual Studio debugger to try and evaluate properties implicitly.         <br />This of course requires <strong>running code</strong> while we are braked, and not only display memory content.         <br />Running code, might potentially change the state of the system, which is not always what we want.         <br />For example, I might be increasing a counter every time the property is accessed,         <br />which means that when the debugger will try to evaluate the property, my code will run,         <br />the counter will be incremented, and my system state is changed, even though I am braked.         <br />        <br />As the default is to implicitly evaluate, the debugger will always try to do that,         <br />risking a system state change.         <br />If you want to <strong>disable</strong> the implicit evaluation, <strong>remove</strong> the checkbox from the settings:         <br /></font></span><a style="cursor: auto;" href="file:///C:\Users\elio\AppData\Local\Temp\WindowsLiveWriter1286139640\supfiles20A33050\image15.png"><span style="mso-no-proof: yes; text-underline: none;"><span style="mso-ignore: vglayout;"></span></span></a><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/33/56/metablogapi/4477.clip_image004_055C7C6B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-56-metablogapi/4477.clip_5F00_image004_5F00_055C7C6B.png"><img title="clip_image004" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="clip_image004" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/33/56/metablogapi/2311.clip_image004_thumb_5B990177.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-56-metablogapi/2311.clip_5F00_image004_5F00_thumb_5F00_5B990177.png" width="459" height="271" /></a>&#160;&#160;&#160;&#160; <br /><font style="font-size: 12pt;"></font><span><font style="font-size: 10pt;">Without the checkbox, by default, properties will not be evaluated, and you will have to manually request evaluation each time:        <br /></font></span><a style="cursor: auto;" href="file:///C:\Users\elio\AppData\Local\Temp\WindowsLiveWriter1286139640\supfiles20A33050\image19.png"><span style="mso-no-proof: yes; text-underline: none;"><span style="mso-ignore: vglayout;"></span></span></a><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/33/56/metablogapi/6518.clip_image005_2DCB38B2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-56-metablogapi/6518.clip_5F00_image005_5F00_2DCB38B2.png"><img title="clip_image005" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="clip_image005" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/33/56/metablogapi/7288.clip_image005_thumb_3743F728.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-56-metablogapi/7288.clip_5F00_image005_5F00_thumb_5F00_3743F728.png" width="640" height="57" /></a></p> <font style="font-size: 12pt;"></font>  <p style="margin: 16px 0in; list-style-type: disc;"><span><font style="font-size: 10pt;">Getting back to our initial error message… where does it come from?        <br />We just said that by default the debugger will try to evaluate implicitly, so what’s stopping it?         <br />        <br />When we break the debugger and try to evaluate a property which requires running code,         <br />we can only run code in the current thread. All other threads are frozen to minimize the system state impact…         <br />But, what if my property requires another thread to run in order to complete evaluation?         <br />For example, if I am doing a remote call, I will most likely need the ThreadPool threads for that...         <br />But all other threads are frozen… which will result in a “deadlock”.         <br />The debugger has a protection measure against that, which gives a max of 5 seconds to the evaluation code to run.         <br />If the code did not finish to run within the time limit,         <br />For example, when we are blocked due to a frozen thread,         <br />the watch will be “hanged” for 5 seconds, and after that evaluation will be aborted.         <br />We will get this message to notify us of the problem:         <br /></font></span><a style="cursor: auto;" href="file:///C:\Users\elio\AppData\Local\Temp\WindowsLiveWriter1286139640\supfiles20A33050\image23.png"><span style="mso-no-proof: yes; text-underline: none;"><span style="mso-ignore: vglayout;"></span></span></a><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/33/56/metablogapi/8750.clip_image006_75C944CE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-56-metablogapi/8750.clip_5F00_image006_5F00_75C944CE.png"><img title="clip_image006" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="clip_image006" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/33/56/metablogapi/5826.clip_image006_thumb_494014E8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-56-metablogapi/5826.clip_5F00_image006_5F00_thumb_5F00_494014E8.png" width="649" height="47" /></a>     <br /><font style="font-size: 12pt;">     <br /></font><span><font style="font-size: 10pt;">This of course is not a comfortable user experience…        <br />For this reason, the .Net Framework gives us the method:         <br />        <br /></font></span><font style="font-size: 10pt;"><span><a href="https://msdn.microsoft.com/en-us/library/system.diagnostics.debugger.notifyofcrossthreaddependency.aspx" target="_blank">System.Diagnostics.Debugger<strong>.NotifyOfCrossThreadDependency</strong></a></span><span>()        <br />        <br /></span><span style="mso-bidi-font-family: consolas;">This method should be used by the code developer who wrote the property we are trying to evaluate.        <br />If this property (or method…) knows that in order to complete evaluation,         <br />we need to do a cross thread operation, we can call this method inside the property code.         <br />        <br />The method will have effect only if a debugger is attached, and the code is running         <br />for evaluation purposes, in which case the code will immediately abort         <br />and notify the debugger via exception that we need other threads to evaluate.         <br />        <br />The debugger will not allow it automatically, to avoid state changes, and instead,         <br />will give the user the “The function evaluation requires all threads to run” message.         <br />If the user decides it’s OK to let all threads run, he can push the icon next to the message,         <br />which will cause the debugger to run the property code a second time,         <br />this time with all threads running, and not aborting on the </span><a href="https://msdn.microsoft.com/en-us/library/system.diagnostics.debugger.notifyofcrossthreaddependency.aspx" target="_blank">NotifyOfCrossThreadDependency</a><span style="mso-bidi-font-family: consolas;"></span><span style="mso-bidi-font-family: consolas;"> method.        <br />        <br />On next evaluation, if the code is getting to </span><a href="https://msdn.microsoft.com/en-us/library/system.diagnostics.debugger.notifyofcrossthreaddependency.aspx" target="_blank">NotifyOfCrossThreadDependency</a><span style="mso-bidi-font-family: consolas;"></span><span style="mso-bidi-font-family: consolas;"> again,        <br />we will need to do this again.         <br />        <br /><u>Important note:          <br /></u>Since each evaluation attempt will run the code, it means that all the code that was running up         <br />to the <span style="mso-bidi-font-family: consolas;"></span><a href="https://msdn.microsoft.com/en-us/library/system.diagnostics.debugger.notifyofcrossthreaddependency.aspx" target="_blank">NotifyOfCrossThreadDependency</a> method call will be running as well until aborted, so we need to make sure         <br />we avoid making state changes up to this method, as we might not be able to complete the code         <br />beyond this method call!         <br />        <br /><strong><span style="mso-bidi-font-family: consolas;">What if you see this message although you never called this method yourself??? </span></strong><b>         <br /></b>This could happen, and it means you called 3rd code         <br />(that could be part of the framework for example), that in turn called this method.         <br /></span><a style="cursor: auto;" href="file:///C:\Users\elio\AppData\Local\Temp\WindowsLiveWriter1286139640\supfiles20A33050\image27.png"><span style="mso-no-proof: yes; text-underline: none; mso-bidi-font-family: consolas;"><span style="mso-ignore: vglayout;"></span></span></a><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/33/56/metablogapi/7635.clip_image007_20C132D4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-56-metablogapi/7635.clip_5F00_image007_5F00_20C132D4.png"><img title="clip_image007" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="clip_image007" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/33/56/metablogapi/3835.clip_image007_thumb_05A863C6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-56-metablogapi/3835.clip_5F00_image007_5F00_thumb_5F00_05A863C6.png" width="480" height="125" /></a></font><span style="mso-bidi-font-family: consolas;"><font style="font-size: 10pt;">        <br />        <br />You can even run into situations where it only happens in specific breakpoints,         <br />or you might need to approve the cross dependency only once during the debug session.         <br />This could happen if the 3rd code is not calling the <span style="mso-bidi-font-family: consolas;"></span><a href="https://msdn.microsoft.com/en-us/library/system.diagnostics.debugger.notifyofcrossthreaddependency.aspx" target="_blank">NotifyOfCrossThreadDependency</a> method every time,         <br />but only in specific cases, usually in initialization code…         <br />        <br />One of the popular examples for this are classes that use the </font></span><span><font style="font-size: 12pt;">Lazy</font></span><span><font style="font-size: 12pt;">&lt;T&gt;</font></span><span><font style="font-size: 10pt;">        <br /></font></span><font style="font-size: 10pt;"><span style="mso-bidi-font-family: consolas;">initialization, and then use the Value property to get the instance.        <br />This is because the Value property of Lazy is calling the notify method!</span><span>        <br />        <br /></span><a style="cursor: auto;" href="file:///C:\Users\elio\AppData\Local\Temp\WindowsLiveWriter1286139640\supfiles20A33050\image32.png"><span style="mso-no-proof: yes; text-underline: none;"><span style="mso-ignore: vglayout;"></span></span></a><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/33/56/metablogapi/2746.clip_image008_038B64FD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-56-metablogapi/2746.clip_5F00_image008_5F00_038B64FD.png"><img title="clip_image008" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="clip_image008" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/33/56/metablogapi/7142.clip_image008_thumb_5314E086.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-56-metablogapi/7142.clip_5F00_image008_5F00_thumb_5F00_5314E086.png" width="412" height="227" /></a><span>        <br />        <br /></span></font><span style="mso-bidi-font-family: consolas;"><font style="font-size: 10pt;">One of the ways to work around that is to make sure your code “warms up” these classes        <br />before it’s time to evaluate them via the debugger.         <br />        <br />The usage of Lazy might be common on Web scenarios and more..         <br />        <br />Another common scenario is Task.Wait() which will also call the notify method         <br />internally.&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br /></font></span><font size="2">If you are writing your own custom watch visualizer and run into a similar state,&#160; you will get an exception      <br />and can only notify the user that you can’t evaluate without the threads running…&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br /></font><span style="mso-bidi-font-family: consolas;"><font style="font-size: 10pt;">       <br />Currently I have not found a way to work around this issue (besides code warm-up).         <br />        <br />        <br />Eli. </font></span></p> <font style="font-size: 12pt;"></font>  <p style="margin: 16px 0in 12pt; list-style-type: disc;"><span><font style="font-size: 12pt;">       <br />        <br />        <br style="mso-special-character: line-break;" />        <br style="mso-special-character: line-break;" /></font></span></p> <font style="font-size: 12pt;"></font>  <p class="MsoNormal" style="margin: 0in 0in 10pt; line-height: 13pt; list-style-type: disc;"><font style="font-size: 12pt;">&#160;</font></p> <font style="font-size: 12pt;"></font>]]></content:encoded>
    </item>
    <item>
      <title>Creating your own Internet Explorer 8 Accelerator</title>
      <link>https://docs.microsoft.com/archive/blogs/eliofek/creating-your-own-internet-explorer-8-accelerator</link>
      <pubDate>Tue, 11 May 2010 14:39:59 GMT</pubDate>
      <dc:creator><![CDATA[Eli Ofek]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/eliofek/2010/05/11/creating-your-own-internet-explorer-8-accelerator/</guid>
      <description><![CDATA[&#160; I recently installed the new RC1 version of IE 8.     Yes, it’s not release yet, and not...]]></description>
      <content:encoded><![CDATA[&#160; <p>I recently installed the new <a href="https://www.microsoft.com/windows/internet-explorer/beta/worldwide-sites.aspx" target="_blank">RC1</a> version of IE 8. <a href="https://blogs.microsoft.co.il/blogs/eliofek/image_282AC5E8.png"><img title="image" style="border-width: 0px; margin-right: 0px; margin-left: 0px; display: inline;" border="0" alt="image" align="right" src="https://blogs.microsoft.co.il/blogs/eliofek/image_thumb_001F52F1.png" width="278" height="188" /></a>    <br />Yes, it’s not release yet, and not perfect yet,     <br />but don’t mind me saying – It’s already better then IE 7.     <br />It works faster, and got great <a href="https://www.microsoft.com/windows/products/winfamily/ie/features.mspx" target="_blank">new features</a>.     <br />    <br />One of the new features is Accelerators.     <br />There are plenty you can <a href="https://www.ieaddons.com/en/accelerators/" target="_blank">find here</a>. </p>  <p>Personally I like using <a href="https://www.morfix.co.il/" target="_blank">Morfix</a> to translate text to Hebrew     <br />But could not find a proper translation accelerator for Morfix just yet…     <br />    <br />So I decided to check what does it take to built one for myself.</p>  <p align="right">by <a href="https://www.flickr.com/photos/nigelpepper/"><b>nigelpepper</b></a></p>  <p align="left">Searching the web quickly popped up this <a href="https://msdn.microsoft.com/en-us/library/cc289775(VS.85,printer).aspx" target="_blank">nice guide</a>.     <br />    <br />It turns out that it’s pretty simple and hardly needs “developer skills”.     <br />All you need is 2 simple files.     <br />1. An XML file for the accelerator definitions.     <br />2. An html file for the installation phase.     <br />    <br />In my case, I created Morfix.xml this way:     <br />    <br /><span style="color: rgb(43, 145, 175);">&#160;&#160;&#160; 1</span>&#160;<span style="color: blue;">&lt;?</span><span style="color: rgb(163, 21, 21);">xml</span><span style="color: blue;"> </span><span style="color: red;">version</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">1.0</span>&quot;<span style="color: blue;"> </span><span style="color: red;">encoding</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">UTF-8</span>&quot;<span style="color: blue;">?&gt;</span></p>  <div style="background: white; color: black; font-family: courier new; font-size: 10pt;">   <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160;&#160; 2</span>&#160;<span style="color: blue;">&lt;</span><span style="color: rgb(163, 21, 21);">openServiceDescription</span></p>    <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160;&#160; 3</span>&#160;<span style="color: blue;">&#160;&#160;&#160; </span><span style="color: red;">xmlns</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">https://www.microsoft.com/schemas/openservicedescription/1.0</span>&quot;<span style="color: blue;">&gt;</span></p>    <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160;&#160; 4</span>&#160;<span style="color: blue;">&#160; &lt;</span><span style="color: rgb(163, 21, 21);">homepageUrl</span><span style="color: blue;">&gt;</span><span lang="EN" style="background: yellow; color: black; font-family: &quot;Courier New&quot;; font-size: 10pt; mso-highlight: yellow; mso-ansi-language: en;">https://www.morfix.co.il</span><span style="color: blue;">&lt;/</span><span style="color: rgb(163, 21, 21);">homepageUrl</span><span style="color: blue;">&gt;</span></p>    <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160;&#160; 5</span>&#160;<span style="color: blue;">&#160; &lt;</span><span style="color: rgb(163, 21, 21);">display</span><span style="color: blue;">&gt;</span></p>    <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160;&#160; 6</span>&#160;<span style="color: blue;">&#160;&#160;&#160; &lt;</span><span style="color: rgb(163, 21, 21);">name</span><span style="color: blue;">&gt;</span><span style="background: yellow; mso-highlight: yellow;">Translate using Morfix</span><span style="color: blue;">&lt;/</span><span style="color: rgb(163, 21, 21);">name</span><span style="color: blue;">&gt;</span></p>    <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160;&#160; 7</span>&#160;<span style="color: blue;">&#160;&#160;&#160; &lt;</span><span style="color: rgb(163, 21, 21);">icon</span><span style="color: blue;">&gt;</span><span lang="EN" style="background: yellow; color: black; font-family: &quot;Courier New&quot;; font-size: 10pt; mso-highlight: yellow; mso-ansi-language: en;"><a href="https://www.morfix.co.il/favicon.ico">https://www.morfix.co.il/favicon.ico</a></span><span style="color: blue;">&lt;/</span><span style="color: rgb(163, 21, 21);">icon</span><span style="color: blue;">&gt;</span></p>    <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160;&#160; 8</span>&#160;<span style="color: blue;">&#160; &lt;/</span><span style="color: rgb(163, 21, 21);">display</span><span style="color: blue;">&gt;</span></p>    <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160;&#160; 9</span>&#160;<span style="color: blue;">&#160; &lt;</span><span style="color: rgb(163, 21, 21);">activity</span><span style="color: blue;"> </span><span style="color: red;">category</span><span style="color: blue;">=</span>&quot;<span style="color: blue;"><span style="background: yellow; mso-highlight: yellow;"><span style="color: blue;">Translation</span></span></span>&quot;<span style="color: blue;">&gt;</span></p>    <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160; 10</span>&#160;<span style="color: blue;">&#160;&#160;&#160; &lt;</span><span style="color: rgb(163, 21, 21);">activityAction</span><span style="color: blue;"> </span><span style="color: red;">context</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">selection</span>&quot;<span style="color: blue;"> &gt;</span></p>    <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160; 11</span>&#160;<span style="color: blue;">&#160;&#160;&#160;&#160;&#160; &lt;</span><span style="color: rgb(163, 21, 21);">execute</span><span style="color: blue;"> </span><span style="color: red;">action</span><span style="color: blue;">=</span>&quot;<span lang="EN" style="background: yellow; color: blue; font-family: &quot;Courier New&quot;; font-size: 10pt; mso-highlight: yellow; mso-ansi-language: en; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: en-us; mso-bidi-language: he;"><a href="https://milon.morfix.co.il/?q">https://milon.morfix.co.il/?q</a>=</span>&quot;<span style="color: blue;">&gt;</span></p>    <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160; 12</span>&#160;<span style="color: blue;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;</span><span style="color: rgb(163, 21, 21);">parameter</span><span style="color: blue;"> </span><span style="color: red;">name</span><span style="color: blue;">=</span>&quot;<span lang="EN" style="background: yellow; color: blue; font-family: &quot;Courier New&quot;; font-size: 10pt; mso-highlight: yellow; mso-ansi-language: en; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: en-us; mso-bidi-language: he;">q</span>&quot;<span style="color: blue;"> </span><span style="color: red;">value</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">{selection}</span>&quot;<span style="color: blue;"> </span><span style="color: red;">type</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">text</span>&quot;<span style="color: blue;"> /&gt;</span></p>    <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160; 13</span>&#160;<span style="color: blue;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;</span><span style="color: rgb(163, 21, 21);">parameter</span><span style="color: blue;"> </span><span style="color: red;">name</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">sourceid</span>&quot;<span style="color: blue;"> </span><span style="color: red;">value</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">ie8-accelerator</span>&quot;<span style="color: blue;"> </span><span style="color: red;">type</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">text</span>&quot;<span style="color: blue;"> /&gt;</span></p>    <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160; 14</span>&#160;<span style="color: blue;">&#160;&#160;&#160;&#160;&#160; &lt;/</span><span style="color: rgb(163, 21, 21);">execute</span><span style="color: blue;">&gt;</span></p>    <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160; 15</span>&#160;<span style="color: blue;">&#160;&#160;&#160; &lt;/</span><span style="color: rgb(163, 21, 21);">activityAction</span><span style="color: blue;">&gt;</span></p>    <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160; 16</span>&#160;<span style="color: blue;">&#160; &lt;/</span><span style="color: rgb(163, 21, 21);">activity</span><span style="color: blue;">&gt;</span></p>    <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160; 17</span>&#160;<span style="color: blue;">&lt;/</span><span style="color: rgb(163, 21, 21);">openServiceDescription</span><span style="color: blue;">&gt;</span></p>    <p style="margin: 0px;"><span style="color: rgb(43, 145, 175);">&#160;&#160; 18</span>&#160;</p> </div>  <p align="left">All I needed to change in the “basic template” are the highlighted values:    <br />1. Morfix homepage URL.     <br />2. The name of the accelerator that will appear on the context menu.     <br />3. Morfix icon for the context menu. I just used the one on their one site, I think it’s nice.     <br />4. The category under which to install the accelerator.     <br />&#160;&#160;&#160; It would normally be “Translate” but you can have only one default on each category,     <br />&#160;&#160;&#160; and I didn’t want to lose my current default, so I added it as “Translation”.     <br />5. This is the most important value. this is the Query string form Morfix query.     <br />&#160;&#160;&#160; You can simply get it by running a translation on the site:</p>  <blockquote>   <p align="left">     <br /><a href="https://blogs.microsoft.co.il/blogs/eliofek/image_233BD62F.png"><img title="image" style="border-width: 0px; display: inline;" border="0" alt="image" src="https://blogs.microsoft.co.il/blogs/eliofek/image_thumb_4D97E17F.png" width="244" height="117" /></a> <a href="https://blogs.microsoft.co.il/blogs/eliofek/image_17561D96.png"><img title="image" style="border-width: 0px; display: inline;" border="0" alt="image" src="https://blogs.microsoft.co.il/blogs/eliofek/image_thumb_7FCB4397.png" width="363" height="53" /></a></p>    <p align="left"></p> </blockquote>      <p>5. The last value is just the query string variable, which normally can be extracted from the previous values    <br />&#160;&#160;&#160;&#160; between the ? and the = chars.</p>  <p>Now we should create the HTML file for the installation. In my case I called it AddMorfix.htm :</p>  <div class="csharpcode">   <pre><pre class="code"><span style="color: blue;">&lt;!</span><span style="color: rgb(163, 21, 21);">DOCTYPE </span><span style="color: red;">HTML PUBLIC </span><span style="color: blue;">&quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;</span><span style="color: rgb(163, 21, 21);">html</span><span style="color: blue;">&gt;
&lt;</span><span style="color: rgb(163, 21, 21);">head</span><span style="color: blue;">&gt;
    &lt;</span><span style="color: rgb(163, 21, 21);">title</span><span style="color: blue;">&gt;</span><span style="background: yellow; mso-highlight: yellow;">Add Morfix Accelerator</span><span style="color: blue;">&lt;/</span><span style="color: rgb(163, 21, 21);">title</span><span style="color: blue;">&gt;
    &lt;</span><span style="color: rgb(163, 21, 21);">meta </span><span style="color: red;">content</span><span style="color: blue;">=&quot;text/html; charset=windows-1255&quot; </span><span style="color: red;">http-equiv</span><span style="color: blue;">=&quot;Content-Type&quot;/&gt;
    &lt;</span><span style="color: rgb(163, 21, 21);">meta </span><span style="color: red;">name</span><span style="color: blue;">=&quot;GENERATOR&quot; </span><span style="color: red;">content</span><span style="color: blue;">=&quot;MSHTML 8.00.6001.18372&quot;/&gt;
&lt;/</span><span style="color: rgb(163, 21, 21);">head</span><span style="color: blue;">&gt;
&lt;</span><span style="color: rgb(163, 21, 21);">body</span><span style="color: blue;">&gt;
    &lt;</span><span style="color: rgb(163, 21, 21);">button </span><span style="color: red;">id</span><span style="color: blue;">=&quot;myButton&quot;<br />   <span style="color: red;">onclick</span><span style="color: blue;">=&quot;window.external.AddService(<span style="background: yellow; mso-highlight: yellow;">'<font size="1">https://www.ofeks.info/Download/Accelerators/Morfix/Morfix.xml</font></span>')&quot;&gt; </span><br />                </span><span style="color: blue;">        </span><span style="background: yellow; mso-highlight: yellow;">Press to add Morfix IE8 Accelerator Add-On</span><span style="color: blue;">&lt;/</span><span style="color: rgb(163, 21, 21);">button</span><span style="color: blue;">&gt;
&lt;/</span><span style="color: rgb(163, 21, 21);">body</span><span style="color: blue;">&gt;
&lt;/</span><span style="color: rgb(163, 21, 21);">html</span><span style="color: blue;">&gt;
</span></pre><style type="text/css">


</style></pre>
</div>

<p>Again, all I needed to change in the “basic template” are the highlighted values: 
  <br />1. A nice title for the page. 

  <br />2. The location of the previous xml file hosted on any web server… 

  <br />3. Nice text for the installation button. 

  <br />

  <br />Now, simply host this html file on any web server, and browse to it.</p>

<p>This is how it looks like: 
  <br /><a href="https://blogs.microsoft.co.il/blogs/eliofek/image_35DC961A.png"><img title="image" style="border-width: 0px; display: inline;" border="0" alt="image" src="https://blogs.microsoft.co.il/blogs/eliofek/image_thumb_77B3559B.png" width="329" height="69" /></a> </p>

<p>You can mark the accelerator as default in IE’s&#160; “Manage Add-ons” Dialog.</p>

<p>This would be the final result: 
  <br /><a href="https://blogs.microsoft.co.il/blogs/eliofek/image_3DB3ECE2.png"><img title="image" style="border-width: 0px; display: inline;" border="0" alt="image" src="https://blogs.microsoft.co.il/blogs/eliofek/image_thumb_360831DB.png" width="295" height="225" /></a> </p>

<p>You can test drive the accelerator by installing it from here: 
  <br /><a title="https://www.ofeks.info/Download/Accelerators/Morfix/AddMorfix.htm" href="https://www.ofeks.info/Download/Accelerators/Morfix/AddMorfix.htm" target="_blank">https://www.ofeks.info/Download/Accelerators/Morfix/AddMorfix.htm</a></p>

<p>
  <br />Have fun,</p>

<p>Eli. </p>]]></content:encoded>
    </item>
    <item>
      <title>Welcome to my blog</title>
      <link>https://docs.microsoft.com/archive/blogs/eliofek/welcome-to-my-blog</link>
      <pubDate>Tue, 11 May 2010 14:39:01 GMT</pubDate>
      <dc:creator><![CDATA[Eli Ofek]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/eliofek/2010/05/11/welcome-to-my-blog/</guid>
      <description><![CDATA[Hi Readers!   My name is Eli Ofek, and I am an Application Development Consultant (ADC) At Microsoft...]]></description>
      <content:encoded><![CDATA[<p align="left">Hi Readers! <br></p> <p><img style="display: inline; margin-left: 0px; margin-right: 0px" title="beginnings.. by Sir Mervs." alt="beginnings.. by Sir Mervs." align="right" src="https://farm4.static.flickr.com/3196/2804845277_4b8ec0942c.jpg?v=0" width="240" height="160" mce_src="https://farm4.static.flickr.com/3196/2804845277_4b8ec0942c.jpg?v=0"></p> <p>My name is Eli Ofek, and I am an Application Development Consultant (ADC) <br>At Microsoft Israel Services.&nbsp; <br>&nbsp; <br>If you would like to learn more about my history, <br>you can check out <a href="https://www.linkedin.com/in/eliofek" target="_blank" mce_href="https://www.linkedin.com/in/eliofek">my profile here</a>.</p> <p>&nbsp;<a href="https://blogs.microsoft.co.il/members/Guy-Burstein.aspx" target="_blank" mce_href="https://blogs.microsoft.co.il/members/Guy-Burstein.aspx">Guy Burstein</a> suggested that I should open this blog. <br></p> <p align="right"><br><br><br>by <a href="https://www.flickr.com/photos/sir_mervs/" mce_href="https://www.flickr.com/photos/sir_mervs/"><b>Sir Mervs</b></a></p> <p>I intend to mainly post about interesting technical&nbsp; experiences I had during my work, <br>Hopefully it will be interesting and beneficial to some of you.</p> <p>Have fun, <br><br>Eli.</p>]]></content:encoded>
    </item>
  </channel>
</rss>