TA的每日心情![](source/plugin/dsu_paulsign/img/emot/kx.gif) | 开心 昨天 15:23 |
---|
签到天数: 69 天 [LV.6]常住居民II
管理员
- 积分
- 2704
|
.......
int getWinSysFolder (resbuf *rb)
{
int retCode, nSize = MAX_PATH + 1;
char *lpBuffer = new char[nSize];
if (lpBuffer == NULL)
return reportError(ERR_NO_MEM);
if (GetSystemDirectory(lpBuffer, nSize) != 0)
retCode = acedRetStr(lpBuffer);
else
retCode = RTFAIL;
delete lpBuffer;
return retCode;
}
int getWinFolder (resbuf *rb)
{
int retCode, nSize = MAX_PATH + 1;
char *lpBuffer = new char[nSize];
if (lpBuffer == NULL)
return reportError(ERR_NO_MEM);
if (GetWindowsDirectory(lpBuffer, MAX_PATH + 1) != 0)
retCode = acedRetStr(lpBuffer);
else
retCode = RTFAIL;
delete lpBuffer;
return retCode;
}
int getTempFolder (resbuf *rb)
{
int retCode, nSize = MAX_PATH + 1;
char *lpBuffer = new char[nSize];
if (lpBuffer == NULL)
return reportError(ERR_NO_MEM);
if (GetTempPath(nSize, lpBuffer) != 0)
retCode = acedRetStr(lpBuffer);
else
retCode = RTFAIL;
delete lpBuffer;
return retCode;
}
int getCursorPosition (resbuf *rb)
{
int retCode;
POINT pt;
if (GetCursorPos(&pt) != 0)
{
struct resbuf *pRb = acutBuildList(RTLONG, pt.x, RTLONG, pt.y, RTNONE);
retCode = acedRetList(pRb);
acutRelRb(pRb);
}
else
retCode = RTFAIL;
return retCode;
}
....... |
|