开发者

Using named pipe to communicate between unicode and non-unicode processes on windows

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 passi开发者_运维百科ng 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜