home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.win32
- Path: sparky!uunet!utcsri!torn!maccs!beame
- From: beame@maccs.dcss.mcmaster.ca (Carl Beame)
- Subject: Re: DuplicateHandle -- passing handles to other processes
- Message-ID: <1992Nov11.012854.16455@maccs.dcss.mcmaster.ca>
- Organization: Department of Computer Science, McMaster University
- References: <BxGL9D.Ks9@unx.sas.com> <1992Nov10.060432.4835@maccs.dcss.mcmaster.ca> <BxI8o0.6K@unx.sas.com>
- Date: Wed, 11 Nov 1992 01:28:54 GMT
- Lines: 49
-
- In article <BxI8o0.6K@unx.sas.com> sasdxk@skyhawk.unx.sas.com (Dave Kolb) writes:
-
- Stuff delete
- >
- >My questions/suggestions are two:
- >
- >- Does the pipe that CreateFile is opening already exist? If not you
- > don't have a valid handle to pass.
-
- The pipe named in the CreateFile already exists, and communication has
- already taken place between this process and the pipe creator.
-
- >
- >- You need to set the inherit flag in the lpsa security attributes
- > data structure when creating the remote handle.
-
- I do actually call the CreateFile with the following security attributes:
-
- SECURITY_ATTRIBUTES sa;
-
- sa.nLength=sizeof(sa);
- sa.bInheritHandle=TRUE;
- sa.lpSecurityDescriptor=NULL;
- >
- >P.S. How does the created process open the local pipe if the remote# is part of
- >the pipe name and that's what you're trying to pass it? And why pass it if it
- >already knows it? Or why not just have the created process open up the remote pipe?
-
- I am passing the name of the local pipe in the command line to the
- remote process so it can connect back to the creator process to receive
- the value of the newly created handle.
-
- >
- >I guess this is a contrived fragment???
-
- Not really, I just changed the name of the pipes used.
-
- >
- >Let us know...
- >
- >--
- >Dave Kolb Opinions are mine not SAS'
- >SAS Institute, Inc. EMAIL: sasdxk@unx.sas.com
- >SAS Campus Drive - J206 Phone: (919) 677-8000 x6827
- >Cary, NC 27513-2414 USA FAX: (919) 677-8123
- >
-
- - Carl Beame
-
-