home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / os2 / programm / 4675 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  2.0 KB

  1. Path: sparky!uunet!ogicse!uwm.edu!cs.utexas.edu!natinst.com!uma
  2. From: uma@natinst.com (Uma Arunkumar)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: 16bit to 32 bit conversion problem
  5. Message-ID: <1992Sep2.170616.24100@natinst.com>
  6. Date: 2 Sep 92 17:06:16 GMT
  7. Article-I.D.: natinst.1992Sep2.170616.24100
  8. Sender: news@natinst.com
  9. Organization: National Instruments, Austin, TX
  10. Lines: 49
  11. Nntp-Posting-Host: falcon.natinst.com
  12.  
  13.  
  14.  
  15. ****************** Mixed 16 bit application Question ************************
  16. (i)  Prog16.c is compiled with Microsoft C 6.0 compiler.
  17. (ii) It uses 16 bit C runtime libraries.
  18. (iii) It uses 16 bit OS2 API.
  19. (iv) Prog32.c is 32 bit code and compiled with CSet/2 compiler.
  20. (v)  Prog16.c and Prog32.c are linked with 16 bit version of os2.lib called os2286.lib.
  21. (vi) They are linked with 32 bit linker, LINK386.
  22.  
  23. The command file prog32.cmd looks like this:
  24.            icc /c /w3 /Q /Gd- prog32.c
  25.            link386 /NOI prog32.obj,prog16.obj,,,os2286;
  26.  
  27. The command file for compiling 16 bit code looks like this:
  28.           prog16.obj : prog16.c
  29.           cl /c /Al /NDDATA16 /NTTEXT16 /NTCODE16 /Gs /ZI /0x prog16.c 
  30. ***************************************************************
  31.  
  32. I changed the wherever it is necessary, 
  33.      pointers to _Seg16 and functions to _cdecl.
  34.  
  35. (1) What should be done about the global variables defined in 16 bit code
  36. but to be used in 32 bit code using extern preprocessor directive?
  37.  
  38. *********************************************************
  39.   
  40. When I run the program, it gives the error message given below:
  41.      SYS3171 :
  42.      A program caused an exception c0000005 at 1a050670.
  43.      Due to insufficient stack space, the exception was not dispatched.
  44.      The process was terminated.
  45.      DOSCALL1.DLL 0005
  46.      .....................................information on registers follows.......................
  47.  
  48. (2) What is the cause of the above error?
  49.  
  50.  
  51. I WOULD HIGHLY APPRECIATE SOME HELP.
  52.  
  53. Thanks in advance.
  54.  
  55. My Email address is uma@natinst.com.
  56.  
  57. uma.
  58.  
  59.  
  60.        
  61.    
  62.