torch 发表于 2005-10-4 16:11:00

怎样将以下代码转入VB中要做怎样修改

<P>&nbsp;&nbsp;&nbsp; Dim acad As New AcadApplication<BR>&nbsp;&nbsp;&nbsp; Dim sp As New AcadSecurityParams<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; acad.Visible = True<BR>&nbsp;&nbsp;&nbsp; sp.Action = AcadSecurityParamsType.ACADSECURITYPARAMS_ENCRYPT_DATA<BR>&nbsp;&nbsp;&nbsp; sp.Algorithm = AcadSecurityParamsConstants.ACADSECURITYPARAMS_ALGID_RC4<BR>&nbsp;&nbsp;&nbsp; sp.KeyLength = 40<BR>&nbsp;&nbsp;&nbsp; sp.Password = UCase("mypassword") 'AutoCAD converts all passwords to uppercase before applying them<BR>&nbsp;&nbsp;&nbsp; sp.ProviderName = "Microsoft Base Cryptographic Provider v1.0"<BR>&nbsp;&nbsp;&nbsp; sp.ProviderType = 1<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; acad.ActiveDocument.SaveAs "C:\MyDrawing.dwg", , sp</P>
<P>请大侠指点迷津</P>

wmz 发表于 2005-10-4 20:50:00

<DIV>&nbsp;&nbsp;把第二句改成这样:&nbsp;</DIV>
<DIV>&nbsp; &nbsp; Dim sp As AcadSecurityParams<BR>&nbsp;&nbsp;&nbsp; Set sp = GetInterfaceObject("AutoCAD.SecurityParams.16")</DIV>
页: [1]
查看完整版本: 怎样将以下代码转入VB中要做怎样修改