高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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
|