查看单个帖子
旧 2009-05-06, 09:43 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】password protected dwg under windows 98

password protected dwg under windows 98
password protected dwg under windows 98
can dwgdirect read password protected dwg under windows 98 using standard cryptapi?
cryptography classes in winntcrypt.h use unicode api functions. win98 doesn't support it.
best regards,
ivan obraztsov
hi,
to read a password protected dwg file dwgdirect uses "odcrypt" service. winntcrypt is an example of such service and correspondingly you can modify it or use your own service.
to avoid using unicode modify initialize() method:
code:
#ifdef unicode
odwstring provname = secparams.provname;
#else
odstring provname(secparams.provname);
#endif
if(!cryptacquirecontext(
&m_hcryptprov,
null,
provname.c_str(),
secparams.nprovtype,
crypt_verifycontext))
{
dword nerr = getlasterror();
oda_trace1("error during cryptacquirecontext! %lx", nerr);
return false;
}
winntcrypt in ddt 1.12 will contain these changes.
regards,
sergey vishnevetsky
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)