syntax error : missing ';' before identifier 'WINAPI'
От: rosigma Украина http://rosigma.com/
Дата: 19.08.03 11:38
Оценка:
Не запускаются примеры из книги Рихтера "Программирование под Windows для профессоналов. Вот ошибка:

syntax error : missing ';' before identifier 'WINAPI'

Код:

/******************************************************************************
Module:  SchedLab.cpp
Notices: Copyright (c) 2000 Jeffrey Richter
******************************************************************************/


#include "..\\CmnHdr.h"     /* See Appendix A. */
#include <windowsx.h>
#include <tchar.h>
#include <process.h>       // For _beginthreadex
#include "Resource.h"


///////////////////////////////////////////////////////////////////////////////

// !!! В следующей строке ошибка !!! **********************
DWORD WINAPI ThreadFunc(PVOID pvParam) { 

   HANDLE hThreadPrimary = (HANDLE) pvParam;
   SuspendThread(hThreadPrimary);
   chMB(
      "The Primary thread is suspended.\n"
      "It no longer responds to input and produces no output.\n"
      "Press OK to resume the primary thread & exit this secondary thread.\n");
   ResumeThread(hThreadPrimary);
   CloseHandle(hThreadPrimary);

   // To avoid deadlock, call EnableWindow after ResumeThread.
   EnableWindow(
      GetDlgItem(FindWindow(NULL, TEXT("Scheduling Lab")), IDC_SUSPEND), 
      TRUE);
   return(0);
}


///////////////////////////////////////////////////////////////////////////////
Roman Yakhymets, http://rosigma.com/, All inside you, ICQ #214741007
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.