Changeset 23 in cheroxy for trunk


Ignore:
Timestamp:
11/08/12 17:50:27 (12 years ago)
Author:
cheese
Message:

#1 use _beginthreadex

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/CRXProxy.cpp

    r22 r23  
    1414# include <iostream>
    1515using namespace std;
    16 # define PRINT_ERROR        cout
     16# define PRINT_ERROR        cerr
    1717#else
    1818# define PRINT_ERROR
     
    2020
    2121#ifdef _WIN32
    22 # include <Windows.h>
     22# include <process.h>
    2323# define THREAD_TYPE                            void *
    24 # define THREAD_FUNCTION_RETURN                 DWORD
     24# define THREAD_FUNCTION_RETURN                 unsigned int
    2525# define THREAD_FUNCTION_CALLING_CONVENTION     WINAPI
    2626#else
     
    6464    /*----------------------------------------------------------------*/
    6565#ifdef _WIN32
    66     aThreadID = CreateThread (0, 0, CRXProxyWrapper, this, 0, 0);
     66    aThreadID = reinterpret_cast<void *> (_beginthreadex (0, 0, CRXProxyWrapper, this, 0, 0));
    6767    if (aThreadID == NULL)
    6868    {
    6969        return -1;
    7070    }
     71
     72    CloseHandle (aThreadID);
    7173
    7274    return 0;
Note: See TracChangeset for help on using the changeset viewer.