¿ØÖÆ̨³ÌÐòCtrl +C Í˳ö
[DllImport("kernel32.dll",SetLastError=true)]
[return: MarshalAs( UnmanagedType.Bool )]
static extern bool AllocConsole();
[DllImport("kernel32.dll",SetLastError=true)]
[return: MarshalAs( UnmanagedType.Bool )]
static extern bool FreeConsole();
// Delegate type to be used as the Handler Routine for SCCH
delegate bool ConsoleCtrlDelegate(CtrlTypes CtrlType);
// Enumerated type for the control messages sent to the handler routine
enum CtrlTypes: uint
{
CTRL_C_EVENT=0,
CTRL_BREAK_EVENT,
CTRL_CLOSE_EVENT,
CTRL_LOGOFF_EVENT=5,
CTRL_SHUTDOWN_EVENT
}
[DllImport("kernel32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SetConsoleCtrlHandler(ConsoleCtrlDelegate HandlerRoutine, bool Add);
private static bool ctrlHandler(CtrlTypes CtrlType)
{
if ((CtrlType == CtrlTypes.CTRL_C_EVENT) || (CtrlType == CtrlTypes.CTRL_BREAK_EVENT))
{
FreeConsole();
return true;
}
if (CtrlType == CtrlTypes.CTRL_CLOSE_EVENT)
return true;
return false;
}
Ïà¹ØÎĵµ£º
c±ä³ÉµÄ¶ÔÏó´ó¶àÊǹ²ÏíÄÚ´æÖÐÉêÇ룬±È½ÏÉÙÓÃmallocÖ±½ÓÀ´ÉêÇ룬ËùÒÔÁ´±íÉè¼ÆÒ»°ãÊÇÏÂÃæ2Öнṹ£º
¶ÔÏó --> ¶ÔÏó --> ¶ÔÏó
¶ÔÏó -->Á´±í¶ÔÏó-->¶ÔÏó -->Á´±í¶ÔÏó
£¨1£©¶ÔÓÚµÚÒ»ÖÖ£¬Á´±íÖ±½Ó¹ØÁªµ½¶ÔÏó±¾Éí£¬ËùÒÔÈç¹ûÒ»¸ö¶ÔÏóÔÚÏûÍöʱ£¬Ã»Óм°Ê±ÇåÀíµôÁ´±í¹Øϵ£¬Ôò»áµ¼ÖÂÁ´±íµôÁ´¡£
£¨2£©Á´±í¶ÔÏó±¾ÉíÊÇÒ» ......
ΪʲôÐèҪʹÓÃextern "C"ÄØ£¿C++Ö®¸¸ÔÚÉè¼ÆC++֮ʱ£¬¿¼Âǵ½µ±Ê±ÒѾ´æÔÚÁË´óÁ¿µÄC´úÂ룬ΪÁËÖ§³ÖÔÀ´µÄC´úÂëºÍÒѾдºÃC¿â£¬ÐèÒªÔÚC++Öо¡¿ÉÄܵÄÖ§³ÖC£¬¶øextern "C"¾ÍÊÇÆäÖеÄÒ»¸ö²ßÂÔ¡£
¡¡¡¡ÊÔÏëÕâÑùµÄÇé¿ö:Ò»¸ö¿âÎļþÒѾÓÃCдºÃÁ˶øÇÒÔËÐеúÜÁ¼ºÃ£¬Õâ¸öʱºòÎÒÃÇÐèҪʹÓÃÕâ¸ö¿âÎļþ£ ......
ASA¾ÖÓòÍøC/S¼Ü¹¹ÅäÖÃ×îÖÕÍêÃÀ³¬Ç¿°æ............
¾ßÌåʵÏÖÓÐÁ½ÖÖ£¬ÈçÏ£º
Ò»¡¢·þÎñÆ÷¶Ë°²×°ASA£¬ÒòΪҪʹÓÃASAÖÐ×Ô´øµÄSybase Central¹¤¾ß¡£
·þÎñÆ÷¶Ë¿ªÆô£ºscjview.exe£¨¼´£ºSybase Central£¬×¢Òâ²»ÊÇSybase Central-Sybase Central¡£½çÃæÈçͼ£º£©
1¡¢ÉèÖÃÈçÏ£ºfile£new£server
·þÎñÆ÷Ãû×ÖËæ±ãÆ𣨱ãÓÚÕâ¸ö¹¤¾ß ......
ÔÎĵØÖ·£ºhttp://westsoftware.blog.163.com/blog/static/2609410920091953456841/
×î½üÒ»Ö±ÔÚ¿´Andrew KoeningдµÄÊé¼®£¬¿ÉÒÔ˵ѧϰC/C++»òÕß´ÓÊÂÕâ·½ÃæµÄ¿ª·¢µÄÈËÔ±·Ç³£ÖµµÃÒ»¿´µÄÊé¼®£¬ÕâÀïÎÒÍƼö¿´¿´¡¶CÏÝÚåÓëȱÏÝ¡·Ó롶C/C++³Á˼¼¡·¡£
ÕâÀïÏÈÀ´¿´¿ ......
<script>
a=62;
function encode() {
var code = document.getElementById('code').value;
code = code.replace(/[\r\n]+/g, '');
code = code.replace(/'/g, "\\'
");
var tmp = code.match(/\b(\w+)\b/g);
tmp.sort();
var dict = [];
var i, t = '';
for(var i=0; i<tmp.length ......