http://www.tianya.cn/publicforum/content/funinfo/1/2273888.shtml

嘿您瞧,里面还有线程呢。XD

DWORD WINAPI ThreadCoupleSleepProc(LPVOID lpParameter);
DWORD WINAPI ThreadPoliceSearchProc(LPVOID lpParameter)

void CMainFrame::StartService() {
    this->ThreadCoupleSleep = CreateThread(
                                  NULL,0,ThreadCoupleSleepProc,&dwT
                                  hrdParam,0,&dwThreadId);
    this->ThreadPoliceSearch = CreateThread(
                                   NULL,0,ThreadPoliceSearchProc,&d
                                   wThrdParam,0,&dwThreadId);
}

DWORD WINAPI ThreadCoupleSleepProc(LPVOID lpParameter) {
    char MaleThink[200], FeMaleThink[200];
    memset(MaleThink,0,200);
    memset(FeMaleThink,0,200);
    strcpy(MaleThink,"开房嘿休");
    if("脱衣服"==true && "发现手机"==true)
        strcpy(MaleThink,"关机");
    if(MaleThink=="关机" && "脱衣服"==true )
        strcpy(FeMaleThink,"关机");
    while(strcmp(MaleThink,"关机")==true && strcmp(FeMaleThink,"关机")==true ) {
        strcpy(FeMaleThink,"嘿休");
        strcpy(MaleThink,"嘿休");
        if(strcmp(MaleThink,"力尽")==true || strcmp(FeMaleThink,"力尽")==true)
            break;
    }
    strcpy(FeMaleThink,"开机");
    strcpy(MaleThink,"开机");
}

DWORD WINAPI ThreadPoliceSearchProc(LPVOID lpParameter) {
    bool MaleMiss=true;
    bool FeMaleMiss=ture;
    PoliceThink[200];
    memset(PoliceThink,0,200);
    strcpy(PoliceThink,"今天可以休息了");
    while(MaleMiss && FeMaleMiss) {
        strcpy(PoliceThink,"我靠");
        if(MaleMiss==False || FeMaleMiss==False)
            break;
    }
    strcpy(PoliceThink,"唉!-_-!");
}