home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / mswindo / programm / win32 / 2052 < prev    next >
Encoding:
Text File  |  1992-11-18  |  1.3 KB  |  42 lines

  1. Newsgroups: comp.os.ms-windows.programmer.win32
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!malgudi.oar.net!caen!sol.ctr.columbia.edu!ira.uka.de!rz.uni-karlsruhe.de!insu1.etec.uni-karlsruhe.de!walter
  3. From: walter@insu1.etec.uni-karlsruhe.de (Reiner Walter)
  4. Subject: problems with "pipe"-call
  5. Message-ID: <1992Nov19.110355.15662@rz.uni-karlsruhe.de>
  6. Sender: usenet@rz.uni-karlsruhe.de (USENET 'No news is bad news' News System)
  7. Organization: Institut fuer Nachrichtensysteme, Uni Karlsruhe
  8. Date: Thu, 19 Nov 1992 11:03:55 GMT
  9. Lines: 31
  10.  
  11.  
  12. Hi !!!
  13.  
  14. When I run the executable file resulting of the following source code,
  15. I am getting the message "call _pipe" on the screen and then a dialog box
  16. appears: << Application error. The instruction at "0x004110a2" referenced memory
  17. at "0x0012fa 84". The memory could not be written. >>
  18.  
  19.  
  20. #include <fcntl.h>
  21. #include <stdio.h>
  22. #include <io.h>
  23. #include <stdlib.h>
  24.  
  25. void main(void)
  26. {
  27. int *phandle[1], handle_write, handle_read;
  28.  
  29.         printf("call _pipe\n");
  30.     if(_pipe(*phandle, 1024, O_BINARY) != 0) perror("pipecreation error");
  31.     printf("readhandle:  %d\n",handle_read = *phandle[0]);
  32.     printf("writehandle: %d\n",handle_write = *phandle[1]);
  33.     close(handle_read);
  34.     close(handle_write);
  35.     printf("handles closed\n");
  36.     return;
  37. }
  38.  
  39. If anybody can help me, please send me an e-mail, thanks.
  40.  
  41. Bye, Uli.
  42.