Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

c±àÒë¹ý³Ì

±àÒëµÄ¸ÅÄ±àÒë³ÌÐò¶ÁÈ¡Ô´³ÌÐò£¨×Ö·ûÁ÷£©£¬¶ÔÖ®½øÐдʷ¨ºÍÓï·¨µÄ·ÖÎö£¬½«¸ß¼¶ÓïÑÔÖ¸Áîת»»Îª¹¦ÄܵÈЧµÄ»ã±à´úÂ룬ÔÙÓÉ»ã±à³ÌÐòת»»Îª»úÆ÷ÓïÑÔ£¬²¢ÇÒ°´ÕÕ²Ù×÷ϵͳ¶Ô¿ÉÖ´ÐÐÎļþ¸ñʽµÄÒªÇóÁ´½ÓÉú³É¿ÉÖ´ÐгÌÐò¡£
    ±àÒëµÄÍêÕû¹ý³Ì£ºCÔ´³ÌÐò£­£­>Ô¤±àÒë´¦Àí(.c)£­£­>±àÒë¡¢ÓÅ»¯³ÌÐò£¨.s¡¢.asm£©£­£­>»ã±à³ÌÐò(.obj¡¢.o¡¢.a¡¢.ko)£­£­>Á´½Ó³ÌÐò£¨.exe¡¢.elf¡¢.axfµÈ£©
1. ±àÒëÔ¤´¦Àí
    ¶ÁÈ¡cÔ´³ÌÐò£¬¶ÔÆäÖеÄαָÁÒÔ#¿ªÍ·µÄÖ¸ÁºÍÌØÊâ·ûºÅ½øÐд¦Àí
αָÁîÖ÷Òª°üÀ¨ÒÔÏÂËĸö·½Ã棺
£¨1£©ºê¶¨ÒåÖ¸ÁÈç#define Name TokenString£¬#undefµÈ¡£
¶ÔÓÚÇ°Ò»¸öαָÁԤ±àÒëËùÒª×öµÄÊǽ«³ÌÐòÖеÄËùÓÐNameÓÃTokenStringÌæ»»£¬µ«×÷Ϊ×Ö·û´®³£Á¿µÄ NameÔò²»±»Ìæ»»¡£¶ÔÓÚºóÕߣ¬Ôò½«È¡Ïû¶Ôij¸öºêµÄ¶¨Ò壬ʹÒÔºó¸Ã´®µÄ³öÏÖ²»ÔÙ±»Ìæ»»¡£
£¨2£©Ìõ¼þ±àÒëÖ¸ÁÈç#ifdef£¬#ifndef£¬#else£¬#elif£¬#endifµÈ¡£
ÕâЩαָÁîµÄÒýÈëʹµÃ³ÌÐòÔ±¿ÉÒÔͨ¹ý¶¨Ò岻ͬµÄºêÀ´¾ö¶¨±àÒë³ÌÐò¶ÔÄÄЩ´úÂë½øÐд¦Àí¡£Ô¤±àÒë³ÌÐò½«¸ù¾ÝÓйصÄÎļþ£¬½«ÄÇЩ²»±ØÒªµÄ´úÂë¹ýÂ˵ô
£¨3£© Í·Îļþ°üº¬Ö¸ÁÈç#include "FileName"»òÕß#include FileName>µÈ¡£
ÔÚÍ·ÎļþÖÐÒ»°ãÓÃαָÁî#define¶¨ÒåÁË´óÁ¿µÄºê£¨×î³£¼ûµÄÊÇ×Ö·û³£Á¿£©£¬Í¬Ê±°üº¬Óи÷ÖÖÍⲿ·ûºÅµÄÉùÃ÷¡£
    ²ÉÓÃÍ·ÎļþµÄÄ¿µÄÖ÷ÒªÊÇΪÁËʹijЩ¶¨Òå¿ÉÒÔ¹©¶à¸ö²»Í¬µÄCÔ´³ÌÐòʹÓá£ÒòΪÔÚÐèÒªÓõ½ÕâЩ¶¨ÒåµÄCÔ´³ÌÐòÖУ¬Ö»Ðè¼ÓÉÏÒ»Ìõ#includeÓï¾ä¼´¿É£¬¶ø²»±ØÔÙÔÚ´ËÎļþÖн«ÕâЩ¶¨ÒåÖظ´Ò»±é¡£Ô¤±àÒë³ÌÐò½«°ÑÍ·ÎļþÖеĶ¨Òåͳͳ¶¼¼ÓÈëµ½ËüËù²úÉúµÄÊä³öÎļþÖУ¬ÒÔ¹©±àÒë³ÌÐò¶ÔÖ®½øÐд¦Àí¡£
    °üº¬µ½cÔ´³ÌÐòÖеÄÍ·Îļþ¿ÉÒÔÊÇϵͳÌṩµÄ£¬ÕâЩͷÎļþÒ»°ã±»·ÅÔÚ/usr/includeĿ¼Ï¡£ÔÚ³ÌÐòÖÐ#includeËüÃÇҪʹÓüâÀ¨ºÅ£¨ >£©¡£ÁíÍ⿪·¢ÈËÔ±Ò²¿ÉÒÔ¶¨Òå×Ô¼ºµÄÍ·Îļþ£¬ÕâЩÎļþÒ»°ãÓëcÔ´³ÌÐò·ÅÔÚͬһĿ¼Ï£¬´ËʱÔÚ#includeÖÐÒªÓÃË«ÒýºÅ£¨""£©¡£
£¨4£©ÌØÊâ·ûºÅ£¬Ô¤±àÒë³ÌÐò¿ÉÒÔʶ±ðһЩÌØÊâµÄ·ûºÅ¡£
ÀýÈçÔÚÔ´³ÌÐòÖгöÏÖµÄLINE±êʶ½«±»½âÊÍΪµ±Ç°Ðкţ¨Ê®½øÖÆÊý£©£¬FILEÔò±»½âÊÍΪµ±Ç°±»±àÒëµÄCÔ´³ÌÐòµÄÃû³Æ¡£Ô¤±àÒë³ÌÐò¶ÔÓÚÔÚÔ´³ÌÐòÖгöÏÖµÄÕâЩ´®½«ÓúÏÊʵÄÖµ½øÐÐÌæ»»¡£
   Ô¤±àÒë³ÌÐòËùÍê³ÉµÄ»ù±¾ÉÏÊǶÔÔ´³ÌÐòµÄ“Ìæ´ú”¹¤×÷¡£¾­¹ý´ËÖÖÌæ´ú£¬Éú³ÉÒ»¸öûÓк궨Ò塢ûÓÐÌõ¼þ±àÒëÖ¸ÁûÓÐÌØÊâ·ûºÅµÄÊä³öÎļþ¡£Õâ¸öÎļþµÄº¬ÒåͬûÓо­¹ýÔ¤´¦ÀíµÄÔ´Î


Ïà¹ØÎĵµ£º

[ת]C/C++ HOOK API£¨Ô­ÀíÉîÈëÆÊÎöÖ® LoadLibraryA£©

9Ô¶¼¿ì½áÊøÁË£¬Ö®Ç°Ò»Ö±Ã¦µ½Ð´×Ô¼ºµÄ¶«Î÷¼ÓÉÏÉÏ°à¡£»ù±¾Ã»ÓÐʱ¼äÑо¿Ï»ã±àºÍC C++·½ÃæµÄ¸ÐÐËȤµÄ¶«Î÷¡£ÔÙÔõô˵Â9Ô»¹ÊǵÃдһƪÈö£¬ÒÔºóÿÔÂÖÁÉÙһƪ°É¡£¸ø×Ô¼º¶¨ÁË£¬Ï£Íû´ó¼Ò¼à¶½¡£ºÙºÙ£¡
ÕâƪÎÄÕ¾ÍÀ´Ì¸Ì¸Æ½³£ºÜ³£¼ûµÄHOOK¼¼Êõ£¬ÕâÀïÄØ¡£Ð´µÃ±È½Ï¼òµ¥£¬·½·¨ºÜ¶à¡£Ö»½²Ô­Àí£¡Ï£Íû´óÄñÃDZðÍÂÎÒ¿ÚË®¹þ - -¡£ºÃ£¡ÇÐÈëÕ ......

CÓïÑÔÁ¬½ÓMySQLÊý¾Ý¿â

Ç°¼¸Ì칫˾ÈÃÎÒ×öCÓïÑÔºÍMySQLÊý¾Ý¿âµÄ½»»¥²Ù×÷£¬·ÑÁ˾ÅÅ£¶þ»¢Ö®Á¦Ö®ºó×ÜËã×ö³öÀ´ÁË£¬½ñÌìÌصذÑÔ´´úÂëÌù³öÀ´¹©´ó¼Òѧϰ£»ÈçÓÐÈËÏëÒª´ò°üÏîÄ¿¿ÉÒÔ¼ÓÎÒQQ260990509,×¢Ã÷¼¼Êõ½»Á÷£¬¼´¿É»ñµÃ´ò°üÖ®ºóµÄÏîÄ¿£¡
#if defined(_WIN32) || defined(_WIN64)  //ΪÁËÖ§³Öwindowsƽ̨ÉϵıàÒë
#include <windows.h>
#end ......

CµÄscanf()

ºÃ¾ÃûÉÏÀ´ÁË...Óеã¶Ô²»Æð×Ô¼ºµÄÁ¼ÐÄ...
»°ËµÕâ¶Îʱ¼ä¿ì¸øÕâ¸öº¯Êý¸ãËÀÁË...
ÎÒÕÒÕÒ...ÎÒÕÒÎÒÕÒ...ÎÒ¾ÍÊÇÒª°ÑËü¸ø¸ãÃ÷°×ÁË...
»°ËµÇ°¶Îʱ¼äÄǸöËÀÈËËÄÔòÔËËãÒ²°Ñ×Ô¼º¸ãµÃ°ëËÀÁË...¶î...ÏÖÔÚ»¹ÔÚÍ£¹¤×´Ì¬...ÔÎËÀ....
ÔÙ˵scanf(),ÉÏÍøÊÇ¿ÉÒÔÕÒµ½Ð©¶«Î÷....µ«ÊǶ¼²»ÔõôÃ÷°×...´òËã×Ô¼º¸ãÃ÷°×ÁËÔÙÉÏÀ´Ð´¸öÏêϸµãµÄ°É... ......

dm642 cÔËÐпâµÄmalloc·ÖÎö

cÔËÐпâmalloc·ÖÅäµÄÄÚ´æÔÚÄÄÀïÄØ£¬Ê×ÏÈÉÏ´úÂ룺
//ÄÚ´æ´óСÁ¬½ÓÆ÷½«ÆäµØÖ·Ö¸Ïò-heapÑ¡Ïî
extern _DATA_ACCESS int _SYSMEM_SIZE;
//ÄÚ´æÇøÓò
#pragma DATA_SECTION(_sys_memory, ".sysmem")
far PACKET _sys_memory[1] = { ((size_t)&_SYSMEM_SIZE) - sizeof(PACKET), 0 };
    
   ......

LINUXÏÂI2C×ÜÏßÊÊÅäÆ÷³õʼ»¯µ÷ÓÃÁ´

ÒÔ i2c-mpc.c Çý¶¯Ä£¿éΪÀý
fsl_i2c_init -> of_register_platform_driver -> of_register_driver -> driver_register -> bus_add_driver -> driver_attach
-> bus_for_each_dev -> __driver_attach -> driver_probe_device -> really_probe -> drv->probe(dev); ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ