CreateProcess无法正确处理SetDllDirectory [英] CreateProcess does not handle SetDllDirectory properly

查看:124
本文介绍了CreateProcess无法正确处理SetDllDirectory的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用CreateProcess创建一个新进程.在创建过程之前,我使用SetDllDirectory更改搜索顺序.我的程序是用unicode编写的.

I use CreateProcess to create a new process. Before creating a process I use the SetDllDirectory to alter the search order. my program is written in unicode.

问题在于,在子进程中,当我检查GetDllDirectory的值时,我得到的字符串恰好是原始字符串的一半.所以我想也许我应该使用  CREATE_UNICODE_ENVIRONMENT标志,尽管dll目录是 不是环境标志.这并不能解决问题.

The problem is that in my child process when I examine the value of GetDllDirectory then I get a string that is exactly half of the original string. so I thought maybe I should use the CREATE_UNICODE_ENVIRONMENT flag although the dlldirectory is not an environment flag. This did not solve the problem. 

子进程也完全是用unicode编写的.有什么想法吗?

The child process is also entirely written in unicode.  any ideas what is going on here?

谢谢

推荐答案

请在此处发布代码的最小版本,以便在此处重现该问题,以供其他人检查.

Please post a minimal version of your code here that reproduces the problem here for others to examine.

-Shoaib.


这篇关于CreateProcess无法正确处理SetDllDirectory的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆