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

¹ØÓÚ delphi д·þÎñÆ÷³ÌÐòµÄÒÉÎÊ

delphi °ïÖúÎĵµ ¹ØÓÚ Service threads(·þÎñÏß³Ì) ÏÂÃæÁ½¶ÎÄÚÈÝ

Each service has its own thread (TServiceThread), so if your service application implements more than one service you must ensure that the implementation of your services is thread-safe. TServiceThread is designed so that you can implement the service in the TService OnExecute event handler. The service thread has its own Execute method which contains a loop that calls the service's OnStart and OnExecute handlers before processing new requests.

Because service requests can take a long time to process and the service application can receive simultaneous requests from more than one client, it is more efficient to spawn a new thread (derived from TThread, not TServiceThread) for each request and move the implementation of that service to the new thread's Execute method. This allows the service thread's Execute loop to process new requests continually without having to wait for the service's OnExecute handler to finish. The following example demonstrates.

Õâ¶Î»°µÄ´ó¸ÅÒâ˼ÊÇ˵:

ÿ¸ö·þÎñ¶¼ÓÐËü×Ô¼ºµÄÏß³Ì(TServiceThread),ËùÒÔÈç¹ûÒ»¸ö·þÎñÆ÷³ÌÐòʵÏÖÁ˶àÓÚÁ½¸ö·þÎñµÄ»°,¾ÍÒª¿¼ÂÇḬ̈߳²È«ÁË.service thread ÓÐ×Ô¼ºµÄExecute·½·¨,Ôڸ÷½·¨ÖÐÓÐÒ»¸öÑ­»·,ÒÔÖØ¸´µ÷Ó÷þÎñµÄOnStartºÍOnExecuteÁ½Ê¼þµÄ´¦Àí³ÌÐò,ÕâÑù,ͨ¹ýÔÚOnStartºÍOnExecuteÁ½Ê¼þµÄ´¦Àí³ÌÐòÖÐд´úÂë¾Í¿ÉÒÔʵÏÖÕâ¸ö³ÌÐò.

ÒòΪ·þÎñÆ÷³ÌÐò¿ÉÄܽÓÊܵ½ºÜ¶à·þÎñÇëÇó,²¢ÇÒ´¦Àíÿ¸öÇëÇóµÄʱ¼ä¿ÉÄܺܳ¤,ËùÒÔ¶ÔÓ


Ïà¹ØÎÊ´ð£º

PythonÖеÄUnicodeÔÚDelphiÈçºÎ»¹Ô­³ÉGb2312£¿

ÒÑÖªPython ÖУº
s = unicode("²âÊÔ", "gb2312")
s = u'\u6d4b\u8bd5'
print s
²âÊÔ

ÔÚDelphiÀïÃæÈçºÎ½«\u6d4b\u8bd5ÕâÑùµÄ»¹Ô­³ÉGb2312µÄºº×ÖÄØ£¿
ÕÒµ½¸ö·½·¨
......

DELPHIÕâÖÖÇé¿öÔõô°ì£¿ - Delphi / Windows SDK/API

¾ÍÊÇÒ»¸ö·þÎñ¶ËºÍÒ»¸ö¿Í»§¶Ë£¬Àï±ßÓÐһЩ¹²Óõ¥Ôª £¬ÎÒÔÚ ¹¤³ÌµÄSEARCH PATHÀïÉèÖõÄ·¾¶£¬
Àï±ßÓиö½á¹¹Ì壬ÎÒÔÚ·þÎñ¶Ë´ò¿ª£¬¼ÓÁ˳ÉÔ±£¬µ«ÊÇÎÒÔÚ¿Í»§¶ËÆäËûµ¥Ôª·ÃÎʲ»µ½ÎÒмӵģ¬ÎÒÔÚ¿Í»§¶Ë´ò¿ªÄǸöµ¥Ôª£¬È·Êµ¼ÓÁ ......

delphi ÔõÑù½«ucs2±àÂëת»»³ÉÖÐÎÄ

½ÓÊÕµ½µÄÎı¾ÄÚÈÝÊÇucs2±àÂë¸ñʽ£¬ÇëÎÊÔõÑùת»»³ÉÖÐÎÄ
°´ÎÒµÄÀí½â£¬UCS-2ÊÇ×Ö·û¼¯£¬¾ßÌåµÄ±àÂëÓÐUTF-8£¬UTF-16 (LE/BE)µÈ¡£
Èç¹ûÄãÓÃDelphi 2009¼°ÒÔÉϰ汾£¬¿ÉÒÔ¿´¿´TEncodingÀà¡£
btw. Äã˵µÄת»»³ÉÖÐÎÄÊÇɶÒâË ......

Ç¿ÁÒ½¨ÒéDELPHI°æ¸ü»»´ó°æ - Delphi / ·Ç¼¼ÊõÇø

hongqi162¡¢windindance
´Ë2È˳¤ÆÚ²»ÔÚÏߣ¬ÌرðÊÇwindindance
¸ü»»ÓÐÄÜÁ¦µÄÈËÉÏ
hongqi162»¹ÊǾ­³£ÉÏÀ´×ª×ªµÄ

ÒýÓÃ
¸ü»»ÓÐÄÜÁ¦µÄÈËÉÏ
ÆäʵҲ²»ÊÇʲôÄÜÁ¦µÄÔ­Òò£¬Ö÷Òª¿ÉÄÜÊÇʱ¼äÎÊÌâ°É
¹¤×÷µÄ»¹ÒªÉÏ°à£¬Ñ§Ï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ