Thread: Compiled error?

  1. #1
    Registered User
    Join Date
    Jun 2004
    Posts
    6

    Compiled error?

    why does it do that?

    error C2143: syntax error : missing ';' before 'constant'

    line : bool GetProcessOf(char exename[], PROCESSENTRY32 *process);

    function :

    bool GetProcessOf(char exename[], PROCESSENTRY32 *process)
    {
    HANDLE handle;
    process->dwSize = sizeof(PROCESSENTRY32);
    handle = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);

    if(Process32First(handle, process))
    {
    do
    {
    if(strcmp(process->szExeFile, exename) == 0)
    {
    return true;
    }
    }while(Process32Next(handle, process));
    }

    return false;
    }

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Are you including Tlhelp32.h?

    gg

  3. #3
    Registered User
    Join Date
    Jun 2004
    Posts
    6
    no i dont

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do you resolve this error?
    By -EquinoX- in forum C Programming
    Replies: 32
    Last Post: 11-05-2008, 04:35 PM
  2. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM
  5. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM