Hi,
     See from Charles Petzold' s Book << programming windows>> ,chapter 22 multithreading,
    He use a pair of  functions :
hThread = _beginthread (ThreadProc, uiStackSize, pParam)
          void __cdecl ThreadProc (void * pParam)

 
    And he said it a "C RUNTIME FUNCTION" ,declared in "Proccess.h",
   
   Well , I look it in the MASM32\INCLUDE directory and do not find the "  process.inc  " file there.
     
   And also I query from MSDN ,It says that the multithreaded C RUTTIME LIBRARY are the following:

LIBCPMT.LIB     Multithreaded, static link
MSVCPRT.LIB    Multithreaded, dynamic link
LIBCPMTD.LIB   Multithreaded, static link
MSVCPRTD.LIB  Multithreaded, dynamic link

     And I find the directory of masm32\include and masm32\lib, does not find "MSVCRT.inc" ,nor "MSVCPRT.LIB"

To prove this, I test in one project:
      include \masm32\include\windows.inc 
      include \masm32\include\masm32.inc
      include \masm32\include\gdi32.inc
      include \masm32\include\user32.inc
      include \masm32\include\kernel32.inc
      include \masm32\include\Comctl32.inc
      include \masm32\include\comdlg32.inc
      include \masm32\include\shell32.inc
      include \masm32\include\oleaut32.inc
      include \masm32\include\dialogs.inc
      include \masm32\macros\macros.asm
      include \masm32\include\debug.inc ;added 2005-11-05
      include  winio.inc   
      include \masm32\include\msvcrt.inc
;     include \masm32\include\process.inc
     
      includelib \masm32\lib\masm32.lib
      includelib \masm32\lib\gdi32.lib
      includelib \masm32\lib\user32.lib
      includelib \masm32\lib\kernel32.lib
      includelib \masm32\lib\Comctl32.lib
      includelib \masm32\lib\comdlg32.lib
      includelib \masm32\lib\shell32.lib
      includelib \masm32\lib\oleaut32.lib
      includelib \masm32\lib\debug.lib     
      includelib WinIo.lib  ;added 2005-11-16
      includelib \masm32\lib\msvcrt.lib


   The compiled error is:
C:\RADASM\Masm32\Bin\ML.EXE /c /coff /Cp /nologo /I"C:\RADASM\Masm32\Include,C:\Program Files\Microsoft Visual Studio\VC98\Lib" "BARREL CHECKER.asm"
Assembling: BARREL CHECKER.asm
BARREL CHECKER.INC(17) : fatal error A1000: cannot open file : \masm32\include\msvcrt.inc



   
   Any comments?

   And also, if I need to use this more simple function instead of "CreateThread" ,which should I include ?
  Could Anyone telll me HTD?

  Thanks in advance.
With BST RGS!
Posted on 2005-11-29 21:09:34 by Luckrock
Why don't you simply use "CreateThread" ? :|
Posted on 2005-11-29 23:19:22 by ti_mo_n
Hi,ti_mo_n
      I would like to use _beginthread rather than CreateThread: the former has only 3 params,latter has 6 .
      And the same time ,I would like to know where are  the C RUNTIME LIBRARY and its include file locating in MASM?
      Thanks.
      RGS???
Posted on 2005-11-29 23:57:11 by Luckrock
I don't know about MASM, but when I used TASM, I could use a tool to convert c++ .h files to TASM's .inc files. TASM also has a tool to make .lib's and .def's from .dll's.  Try looking for such tools for MASM.

BTW: CreateThread has 6 params, but 3 of them are 0s in most cases ;)
Posted on 2005-11-30 00:30:16 by ti_mo_n
Posted on 2005-11-30 00:31:17 by Greg
Hi, ti_mo_n
          Thanks, do you mean the tool " H2INC"?
           Yes, I 'm trying on this,but what I am feeling weird is MASM lack of Process.inc and C RUNTIME library include files.
         
          The "CreateThread" function does has 3 mostly NULL params, but the problem is "ExitThread" function need to call exitcode,this is more trival than "_beginthread".

          Best RGS!
Posted on 2005-11-30 01:54:24 by Luckrock
Hi, Greg
    Thanks for your affording link.
    But,..., what else could I say?
    I forget to tell U that
    we CAN'T access Http://www.masmforum.com,only I guess it's because the Chinese Internat' provicy. 
    The words like "forum","nation","policy","free..." ,etc .  most sensistive ,related with Chinese Goverment'  key word and website is blocked from us.
  Unfortunately, the "MASMFORUM" is combined with "MASM" +" FORUM ", and "FORUM" is an forbidden word of Chinese.

  I think that if "www.masmforum.com" is renamed with "www.masmbbs.com",or "www.masm32community.com", may be accessed by us. ( Joke,not real,:grin:)
 
  O.K. finally , would you do me a favor of posting what you just linked ,right here?
  Many thanks.

  With BST RGS!
Posted on 2005-11-30 02:08:36 by Luckrock
Luckrock,

Unzip this on the same partition as you have MASM32 installed and run the batch file and it should create for you a MSVCRT library and include file. Use the following Microsoft URL for reference material for it.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/vclrfAlphabeticalFunctionReference.asp

If the library and include file build OK, put them in their respective INCLUDE and LIB directories in the MASM32 installation. This will give you almost all of the C runtime function built into MSVCRT.DLL.
Attachments:
Posted on 2005-11-30 07:29:12 by hutch--
Hi, Hutch
      Thank,with any word.
      It works.
      Well, come on ,would you do us all a favor to include the "msvcrt.inc" and "msvcrt.lib" in your next release version of MASM32 ,instead of hide this secret weapon for  yourself, if it does not disobey the so-called American patent law? (a Joke)
     ...
     And, if I  use the create thread function in MASM32,it looks like:

     invoke crt_beginthread,param1,param2,param3
and works fine.
     Butl, the prefix "crt_" make me feel uncomfortable ,for its not so simple and pure.Would U improve your tool "makecimp.exe" to remove the prefix" crt_" for us MASM32 users? I know this would trouble you,but
    I would like  it  this:
  
    invoke beginthread param1,param2,param3


     Thanks again for your kind help.
     With My BST RGS!
Posted on 2005-11-30 10:16:04 by Luckrock
msvcrt.inc and msvcrt.lib are included in the latest masm32 release.
Too bad the Chinese government is too afraid of letting its people have access to information,
knowledge is a dangerous thing. :mrgreen:, JOKE
Posted on 2005-11-30 11:40:35 by rags
An allegory in chinese
if the Devil is high about one scale, then a Taoismer will be ten scale.
searching the proxy server.
Posted on 2005-11-30 11:55:39 by dcskm4200
LuckRock,

Butl, the prefix "crt_" make me feel uncomfortable ,for its not so simple and pure.Would U improve your tool "makecimp.exe" to remove the prefix" crt_" for us MASM32 users? I know this would trouble you,but
    I would like  it  this:
invoke beginthread param1,param2,param3


The 'crt_' prefix was added so that some of the C Run-time library functions that have the same name as functions in the MASM32 library would not conflict. This way you can use both libraries together. Otherwise you would get many redefinition errors. Get over it.  :D


Posted on 2005-11-30 14:15:26 by Greg
Hi,
        Thanks for all of your gays .You're so kind. You remind me of the difference of C RUNTIME LIBRARY and general library.
        These days I spend a lot of time seeking for a free Proxy server in US to access the MASMFORUM website,and finally give it up for most of these proxy server are expired .
      Well ,would you please tell me the direct IP address of MASMFORUM , I would try it in the Address column,I think may be  the Chinese Domain Name Service may forgive these numbers: such 69.200.255.255.  :lol:
Posted on 2005-11-30 18:33:35 by Luckrock
www.masmforum.com is 66.152.98.201
Posted on 2005-11-30 19:21:24 by ti_mo_n
Hi,
  unfortunately, it  still  can't be accessible.
  Faint...
Posted on 2005-11-30 23:10:08 by Luckrock
http://search.yahoo.com/search?p=freeproxy&prssweb=Search&ei=UTF-8&fl=0&pstart=1&fr=FP-tab-web-t&b=11
you can't see www.masmforum.com;
but you can see freeproxy, and freeproxy can see www.masmforum.com;
so you can see www.masmforum.com with the freeproxy
Posted on 2005-12-01 00:04:32 by dcskm4200
Hi, ti_mo_n
      I'm now using  my office's computer, can't change the LAN Settings and IP address ,for my Boss'  monitor software("INCOPS3")will record everything you done
    About 2 hours later ,when I back to home,I will test this link and post the result.
    I hope it will work.
    Thanks.
Posted on 2005-12-01 01:54:40 by Luckrock
Hi,
   Faint, really faint...I still can't manage it.
   Any Chinese programmer here could visit the www.masmforum.com ?
  And if could,pls share your experience.
   Posted on 2005-12-03 08:20:18 by Luckrock

the connection needs setup in IE.
proxy:
addr :64.9.37.68 port: 80

the address of every area isn't same and changing every hour. I tesed the addr is ok now.

Posted on 2005-12-03 21:04:38 by dcskm4200
Hi, dcskm4200
          Thanks ,you are really so kind.
          Although it's sooooo slow ,I need loooooong time to open the forum.
        But it does work.
        With BST RGS!
Posted on 2005-12-03 23:53:50 by Luckrock