Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /WinCS/Macros.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11 - (hide annotations) (download) (as text)
Wed Feb 10 18:21:00 2010 UTC (14 years, 2 months ago) by sho1get
File MIME type: text/x-chdr
File size: 744 byte(s)


1 sho1get 11 #pragma once
2    
3     typedef unsigned (__stdcall *PTHREAD_START)(void *); // Thread
4    
5     //////////////////////////////////////////////////////////////////////////
6    
7     // Array size
8     #define MC_ARYSIZE(x) \
9     (sizeof(x) / sizeof(x[0]))
10    
11     // Cast
12     #define MC_CStoSTR(str) \
13     const_cast<LPTSTR>(static_cast<LPCTSTR>(str))
14    
15     // Thread
16     #define MC_BEGINTHREADEX(psa, cbStack, pfnStartAddr, \
17     pvParam, fdwCreate, pdwThreadId) \
18     ((HANDLE)_beginthreadex( \
19     (void *) (psa), \
20     (unsigned) (cbStack), \
21     (PTHREAD_START) (pfnStartAddr), \
22     (void *) (pvParam), \
23     (unsigned) (fdwCreate), \
24     (unsigned *) (pdwThreadId)))
25    
26    
27     //////////////////////////////////////////////////////////////////////////

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26