extern “C” char** environ - Windows - C++/CLI

丶灬走出姿态 提交于 2019-12-08 16:26:26

That holds the environment variables (PATH, etc, etc). The C standard (if i recall correctly) requires environ to point to an array of these variables. They're also passed as the 3rd argument to the main entry point function.

Apparently, for some reason, the C++/CLI doesn't initialize that.

To fix that, you can allocate it yourself and fill with either either getenv (C) or Environment.GetEnvironmentVariables (Managed C++). I don't know of any in-place fix, but it shouldn't be too hard.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!