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

windowsÏÂCд·þÎñ»ù±¾¿ò¼Ü

ÎÒ½«ÒµÎñ´úÂëÈ¥µôÁË£¬Ö»ÊÇÓÃÀ´´î¸ö»ù±¾¿ò¼Ü£¬Óõ½µÄʱºòÖ±½ÓÄÃÀ´ÓþͿÉÒÔÁË¡£(ÎÒÕâ¸öÊÇÆðÒ»¸ösocket)Èç¹ûÓÐʲô½¨ÒéÇëÁªÏµÎÒ¡£ChuangshengGuan@Gmail.com
main.c
Code:
#include "Services.h"
int main(int argc, char *argv[])
{
  SERVICE_TABLE_ENTRY ServiceTable[2];
 
  /* Ö¸Ïò±íʾ·þÎñÃû³Æ×Ö·û´®µÄÖ¸Õë,µ±¶¨ÒåÁ˶à¸ö·þÎñʱ£¬ÄÇôÕâ¸öÓò±ØÐëÖ¸¶¨ */
  ServiceTable[0].lpServiceName = "SoftTokenAuth";
 
  /* Ö¸Ïò·þÎñÖ÷º¯ÊýµÄÖ¸Õë(·þÎñÈë¿Úµã) */
  ServiceTable[0].lpServiceProc = (LPSERVICE_MAIN_FUNCTION)service_main;
  ServiceTable[1].lpServiceName = NULL;
  ServiceTable[1].lpServiceProc = NULL;
 
  /* Æô¶¯·þÎñµÄ¿ØÖÆ·ÖÅÉ»úÏß³Ì */
  StartServiceCtrlDispatcher(ServiceTable);
  return 0;
}
services.c
Code:
SERVICE_STATUS ServiceStatus;
SERVICE_STATUS_HANDLE hStatus;
/* ¿ØÖƾä±ú */
void control_handler(DWORD request)
{
   switch(request)
   {
      case SERVICE_CONTROL_STOP:
         /* ÔÚÕâÀïÖ´ÐÐÍ£Ö¹¶¯×÷ ....*/
         ServiceStatus.dwWin32ExitCode = 0;
         ServiceStatus.dwCurrentState = SERVICE_STOPPED;
         SetServiceStatus (hStatus, &ServiceStatus);
         return;
      case SERVICE_CONTROL_SHUTDOWN:
         /* ÔÚÕâÀïÖ´Ðйرն¯×÷.... */
         ServiceStatus.dwWin32ExitCode = 0;
         ServiceStatus.dwCurrentState = SERVICE_STOPPED;
         SetServiceStatus (hStatus, &ServiceStatus);
         return;
       
      default:
         break;
    }
    /* ±¨¸æµ±Ç°×´Ì¬ */
    SetServiceStatus (hStatus, &ServiceStatus);
   


Ïà¹ØÎĵµ£º

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); ......

C³ÌÐòÉè¼ÆµÄ³£ÓÃËã·¨


¡¡¡¡Ëã·¨£¨Algorithm£©£º¼ÆËã»ú½âÌâµÄ»ù±¾Ë¼Ïë·½·¨ºÍ²½Öè¡£Ëã·¨µÄÃèÊö£ºÊǶÔÒª½â¾öÒ»¸öÎÊÌâ»òÒªÍê³ÉÒ»ÏîÈÎÎñËù²ÉÈ¡µÄ·½·¨ºÍ²½ÖèµÄÃèÊö£¬°üÀ¨ÐèҪʲôÊý¾Ý£¨ÊäÈëʲôÊý¾Ý¡¢Êä³öʲô½á¹û£©¡¢²ÉÓÃʲô½á¹¹¡¢Ê¹ÓÃʲôÓï¾äÒÔ¼°ÈçºÎ°²ÅÅÕâЩÓï¾äµÈ¡£Í¨³£Ê¹ÓÃ×ÔÈ»ÓïÑÔ¡¢½á¹¹»¯Á÷³Ìͼ¡¢Î±´úÂëµÈÀ´ÃèÊöËã·¨¡£
¡¡¡¡Ò»¡¢¼ÆÊý¡¢ÇóºÍ¡ ......

C/C++ÔËÐÐÖеÄһЩÎÊÌâ¼°Æä½â¾ö

±¾ÈËÔÚ×ö±ÏÉèµÄʱºòÓöµ½µÄһЩÎÊÌ⣬ÔÚÕâÀï×ܽáһϣ¬Ï£Íû»á¶Ô´ó¼ÒÓÐЩ°ïÖú~Óв»×ãÖ®´¦»¹ÍûÖ¸³ö£¬´ó¼Ò¹²Í¬½ø²½^_^
 Ò»¡¢»ù±¾½éÉÜ£º
1.ÔËÐл·¾³VC6.0£¨Microsoft Visual C++ 6.0£©£¨http://40.duote.org/microsoft_visualc6.zip£©
2.¿ÎÌâÏà¹ØÄÚÈÝ£ºAVSÊÓƵ±àÂë
¶þ¡¢³öÏÖµÄÎÊÌâ¼°½â¾ö·½·¨£º
1.ÎÊÌ⣺
fatal er ......

½ÌÄãÀí½â¸´ÔÓµÄC/C++ÉùÃ÷[ת]

Ô­ÎÄ£º
http://www.codeproject.com/cpp/complex_declarations.asp
×÷ÕߣºVikram A Punathambekar
½éÉÜ
Ôø¾­Åöµ½¹ýÈÃÄãÃԻ󲻽⡢ÀàËÆÓÚint * (* (*fp1) (int) ) [10];ÕâÑùµÄ±äÁ¿ÉùÃ÷Â𣿱¾ÎĽ«ÓÉÒ×µ½ÄÑ£¬Ò»²½Ò»²½½Ì»áÄãÈçºÎÀí½âÕâÖÖ¸´ÔÓµÄC/C++ÉùÃ÷£ºÎÒÃǽ«´ÓÿÌ춼ÄÜÅöµ½µÄ½Ï¼òµ¥µÄÉùÃ÷ÈëÊÖ£¬È»ºóÖð²½¼ÓÈëconstÐÞ ......

cÏÝÚåÓëȱÏÝÔĶÁ±Ê¼Ç

¡¾1¡¿ “ = ”µÄÓÅÏȼ¶µÍÓÚ  “ || ” ÇÒ “ = ” ΪÓÒ½áºÏÐÔ£¬×¢ÒâһϴúÂëΪËÀÑ­»·£ºwhile(c=' '||c=='\t'||c=='\n')

³ÌÐò±¾ÒâÊÇÌø¹ý¿Õ¸ñ£¬ÖƱí·û£¬»»Ðзû£¬µ«ÓÉÓÚ²»Ð¡ÐĽ«c=='  'д³ÉÁËc= '  'µ¼Ö³ÌÐò½øÈëËÀÑ­»·
¡¾2¡¿a=-1 ÔÚºÜÀϵÄC°æ±¾ÀïÀí½âΪ a =-  1
¡¾3 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ