Recently there are some troubleshooting records, want to update the process, the original although using live writer to write the log, but are used by other tools, feeling is not too convenient, and recently found a call snipped image plug-in (wrote for a long time), Can be used in Win7 and subsequent versions of the Snippingtool. Project address here, after installing with a compiled DLL, always prompt for no content on the Clipboard. But fortunately there is source code to provide, read the next source found its principle is to call Snippingtool, and then wait for the program to end, and then find out from the Clipboard whether there is a picture, if there is inserted into live Writer's blog content, no error.
But there's nothing wrong with the code?
650) this.width=650; "title=" Captures "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" capture "src=" http://s3.51cto.com/wyfs02/M02/71/33/ Wkiom1xiagfws1gtaafzbryzj5g559.jpg "" 601 "height=" 407 "/>
Then I added two lines of code to test whether the Snippingtool.exe exists, the result of testing returned false, very confused, Google search, the result stackoverflow.com has an article and my question a bit like, I'm searching for an explanation of the sysnative directory, because this directory is not found on the x64 bit? What the hell is this?
650) this.width=650; "title=" Captures "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" capture "src=" http://s3.51cto.com/wyfs02/M00/71/2F/ Wkiol1xiamictqh0aahirex4csq009.jpg "" 870 "height=" 340 "/>
https://msdn.microsoft.com/en-us/library/aa384187 (vs.85). aspx gives an explanation that when a 32-bit application accesses the%windir%\system32 directory, the X64 system is redirected to The%WINDIR%\SYSWOW64 directory requires access to%windir%\sysnative if you want to access%windir%\system32 without being redirected. We know that the plugin of live writer is also compiled with a 32-bit DLL on the X64 system (after compiling by 64 bits, the plugin cannot be loaded)
Let's verify the following:
650) this.width=650; "title=" Captures "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" capture "src=" http://s3.51cto.com/wyfs02/M02/71/2F/ Wkiol1xiamizn3sdaaegubajtha882.jpg "" 488 "height=" 397 "/>
OK, to solve the problem now, simply modify the code to make the plugin suitable for x64 and X86 systems.
Https://github.com/yoke88/LiveWriterSnippingPluginSource
Windows Live writer snipped Image Plugin on X64 system