﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-yangjun890416</title><link>http://www.cppblog.com/yangjun890416/</link><description /><language>zh-cn</language><lastBuildDate>Mon, 06 Apr 2026 22:39:36 GMT</lastBuildDate><pubDate>Mon, 06 Apr 2026 22:39:36 GMT</pubDate><ttl>60</ttl><item><title>C++图片信息转base64编码</title><link>http://www.cppblog.com/yangjun890416/archive/2012/08/07/186602.html</link><dc:creator>杨俊</dc:creator><author>杨俊</author><pubDate>Tue, 07 Aug 2012 13:43:00 GMT</pubDate><guid>http://www.cppblog.com/yangjun890416/archive/2012/08/07/186602.html</guid><wfw:comment>http://www.cppblog.com/yangjun890416/comments/186602.html</wfw:comment><comments>http://www.cppblog.com/yangjun890416/archive/2012/08/07/186602.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/yangjun890416/comments/commentRss/186602.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/yangjun890416/services/trackbacks/186602.html</trackback:ping><description><![CDATA[<div><font style="background-color: #cce8d1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++通过webservices将转成base64编码的图片数据发送给java，可是java那边显示出来的图片是全绿色的，后来寻找大牛帮忙才发现C++转的base64图片信息是包含&#8220;+&#8221;的，而UTF-8编码的java工程是不识别&#8220;+&#8221;的，需要转成%2B，将转码后的信息用%2B转化&#8220;+&#8221;果然解决问题。</font></div><img src ="http://www.cppblog.com/yangjun890416/aggbug/186602.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/yangjun890416/" target="_blank">杨俊</a> 2012-08-07 21:43 <a href="http://www.cppblog.com/yangjun890416/archive/2012/08/07/186602.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>危险的pluseEvent</title><link>http://www.cppblog.com/yangjun890416/archive/2012/07/13/183275.html</link><dc:creator>杨俊</dc:creator><author>杨俊</author><pubDate>Fri, 13 Jul 2012 15:55:00 GMT</pubDate><guid>http://www.cppblog.com/yangjun890416/archive/2012/07/13/183275.html</guid><wfw:comment>http://www.cppblog.com/yangjun890416/comments/183275.html</wfw:comment><comments>http://www.cppblog.com/yangjun890416/archive/2012/07/13/183275.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/yangjun890416/comments/commentRss/183275.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/yangjun890416/services/trackbacks/183275.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PulseEvent是将指定的事件设为有信号状态，如果是一个人工重设事件，正在等候事件的、被挂起的所有线程都会进入活动状态，函数随后将事件设回，并返回；如果是一个自动重设事件，则正在等候事件的、被挂起的单个线程会进入活动状态，事件随后设回无信号，并且函数返回。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 但是等待线程必须在PulseEvent的一个脉冲时正在等待才能被激活。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;While the thread is sitting waiting for the event, a device driver or part of the kernel itself might ask to borrow the thread to do some processing (by means of a "kernel-mode APC"). During that time, the thread is <strong>not</strong> in the wait state. (It's being used by the device driver.) If the PulseEvent happens while the thread is being "borrowed", then it will <strong>not</strong> be woken from the wait, because the PulseEvent function wakes only threads that were waiting <strong>at the time the PulseEvent occurs</strong>.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 一个线程处于等待状态的过程中，会有一些瞬间其状态并不为&#8220;等待状态&#8221;。这就造成PulseEvent()不能激活应该被激活的等待线程。<br />&nbsp;&nbsp;&nbsp;&nbsp; 这些瞬间包括什么呢？比如发生了系统调用，缺页中断，硬件中断......等等。<br /><img src ="http://www.cppblog.com/yangjun890416/aggbug/183275.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/yangjun890416/" target="_blank">杨俊</a> 2012-07-13 23:55 <a href="http://www.cppblog.com/yangjun890416/archive/2012/07/13/183275.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>