extern "C" int acedGetEnv(const ACHAR * sym,ACHAR * var); sym | Input environment variable name to get, which is case sensitive in all environments (Visual LISP, ObjectARX, and VB/ActiveX) | var | Output preallocated buffer to be filled in with environment variable value (a buffer size of 1024 bytes should be sufficient) |
Retrieves the value of an environment variable. Looks first in the AutoCAD-specific FixedProfile/General section of the registry:
HKEY_CURRENT_USER
Software
Autodesk
AutoCAD
R15.0
<Install ID>
FixedProfile
General If an entry is not found in the registry, retrieves the value from the Windows system environment table. Note This function will not work for AutoCAD sysvars. For AutoCAD sysvars, use MSITStore:C:\ObjectARX%202008\docs\arxref.chm::/Globals/AcEd/acedGetVar.htm">acedGetVar(). If acedGetEnv() succeeds, it returns RTNORM; otherwise it returns RTERROR. This function is the complement of the MSITStore:C:\ObjectARX%202008\docs\arxref.chm::/Globals/AcEd/acedSetEnv.htm">acedSetEnv() function. Include Fileacedads.h
这段是帮助文档的话,说的很清楚了,这是得对应注册表的键值。如果要得系统变量用acedGetVar,不清楚你为什么要用这个函数,肯定是实现了的,不可能没实现。 |