home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / mswindo / programm / misc / 1424 < prev    next >
Encoding:
Internet Message Format  |  1992-08-20  |  1.2 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!mips!decwrl!decwrl!infopiz!lupine!motcsd!udc!mcdphx!ennews!intertel!boyd_m
  2. From: boyd_m@inter-tel.com (Mark Boyd)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Re: Where is the executable?
  5. Message-ID: <1992Aug20.003734.12504@inter-tel.com>
  6. Date: 20 Aug 92 00:37:34 GMT
  7. References: <157930002@hpcvra.cv.hp.com>
  8. Organization: Inter-Tel, Inc. (Chandler, AZ)
  9. Lines: 17
  10.  
  11. In <157930002@hpcvra.cv.hp.com> daveo@hpcvra.cv.hp.com (Dave Ochs) writes:
  12.  
  13. >This is probably something simple I have overlooked, but is there a way
  14. >to tell exactly where a program is executing from ... I am not talking
  15. >about the "current directory," but where the executable is?
  16.  
  17. GetModuleFileName fills a "string" with the fully quailifed path of your
  18. executable.  Here's the C prototype:
  19.  
  20.    int GetModuleFileName (HINSTANCE hInst, LPSTR lpszFilename,
  21.               int cbFileName);
  22.  
  23. -- 
  24. +-----------------------------------------------------------------------------+
  25. | Mark Boyd              | Internet: boyd_m@inter-tel.com                     |
  26. | Inter-Tel, Inc.        | "Is anybody home...Mary" - Queensryche OMC         |
  27. +-----------------------------------------------------------------------------+
  28.