views:

50

answers:

1

If a process with unicode enabled creates a named pipe, it must pass a LPCTSTR for the pipe name, in this case a LPCWSTR. Will a second process wihtout unicode be able to open that pipe by passing a LPCSTR for the pipe name?

Also, can I call CreateNamedPipeW or CreateNamedPipeA and ignore whether unicode is enabled, or do I have to call the appropriate one?

Many thanks!

+4  A: 

Processes aren't Unicode or non-Unicode, they're just processes. The Unicode/non-Unicode distinction applies only to windows and window-related objects.

You can call either of the two functions. The A version merely converts the string to UTF-16 and passes it to the W function.

avakar
Thanks, I think that clears it up. By unicode- or non-unicode-process I mean a program that was compiled with UNICODE defined or not.
David
+1. Internally the kernel keeps pipe names in UNICODE.
John Knoeller