Tuesday, October 19, 2010

Thread contact mechanism


The main thread to create a package in the activities of the Vice-thread object class, smoothly written, 141 421.

/ / MyActive.h
class CMyActive: public CActive
(
public:
void DownloadL (const TDesC & aUrl); / /

protected:
void DoCancel ();
void RunL ();
private:
static TInt ThreadFunction (TAny * aArg);

private:
RThread iThread;
);

/ / MyActive.cpp
void CMyActive: DownloadL (const TDesC & aUrl)
(
/ / Create thread
iThread.Logon (iStatus); / / request to notify the Vice-thread exit the main thread.
SetActive ();
/ / ...
)

void CMyActive:: RunL ()
(
if (iStatus.Int () == KErrNone)
(
/ / Associate thread has been the normal exit
)
)

TInt CMyActive:: ThreadFunction (TAny * aArg)
(
/ / Download
)






Recommended links:



Digital Cable AND IPTV play against Shanghai, "the Eleventh TV Festival"



evaluation HTML Tools



Alibaba CEO Wei Zhe: mergers and acquisitions in the domestic launch



Anti-Virus Tools comments



Chkdsk tool can not fix damaged fat32 boot sector



Six APPLIANCES giant collective diving below 37-inch LCD TV million related



VOB to FLV



Premier Education



Infringement Play TV "Ugly Wudi" has been indicted potatoes cool 6



DAT To MPEG



Complementary to IPSec VPN SSL VPN



Recommend Reference Tools



Navigation car, continued TO be the leading share of a firm business plan



DV To AVI



Watch cool Mechanical picture production process



No comments:

Post a Comment