Can't use a handle to object
-
When I pass a handle of file (or bitmap) to the server ,which has been opened from the client , the server can't access the file.When the server reads from the file , the operation don't return an error code but the information that has been read is wrong(or the bitmap can't be selected in any device context).I tried lots of things , but nothing helped me.Please help me.
-
When I pass a handle of file (or bitmap) to the server ,which has been opened from the client , the server can't access the file.When the server reads from the file , the operation don't return an error code but the information that has been read is wrong(or the bitmap can't be selected in any device context).I tried lots of things , but nothing helped me.Please help me.
hey Joe, You can not use HANDLE's between processes. You need to call DuplicateHandle to have your second process have its own handle to the same resource. Watch out for the first arguement to DuplicateHandle as it is a HANDLE to the process that created it, the way to get that is to call OpenProcess with the ProcessId. Jules