几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】password protected dwg under windows 98 (http://www.dimcax.com/hust/showthread.php?t=17857)

yang686526 2009-05-06 09:43 PM

【转帖】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


所有的时间均为北京时间。 现在的时间是 04:19 PM.