<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум компьютерной помощи &mdash; Library CriptoGSS_GUI v2]]></title>
	<link rel="self" href="http://itpmr.ru/extern.php?action=feed&amp;tid=1101&amp;type=atom" />
	<updated>2021-04-01T12:59:00Z</updated>
	<generator>PunBB</generator>
	<id>http://itpmr.ru/viewtopic.php?id=1101</id>
		<entry>
			<title type="html"><![CDATA[Library CriptoGSS_GUI v2]]></title>
			<link rel="alternate" href="http://itpmr.ru/viewtopic.php?pid=124806#p124806" />
			<content type="html"><![CDATA[<p>%REM<br />&nbsp; &nbsp; Library CriptoGSS_GUI <br />&nbsp; &nbsp; Created 22.03.2021 by Andrew Mirkin/Justice<br />&nbsp; &nbsp; Description: Умеет рабоать с версией &gt;3.6<br />%END REM<br />Option Public<br />Option Declare</p><p>%REM<br />&nbsp; &nbsp; Function SignXMLfile<br />&nbsp; &nbsp; ver 2.0<br />&nbsp; &nbsp; Description: Вызывает CryptoGSS для подписания infile, возвращает true если подписан outfile.<br />%END REM<br />Function SignXMLfile (infile As String, outfile As String) As Boolean<br />&nbsp; &nbsp; SignXMLfile=false<br />&nbsp; &nbsp; Dim cmd, CryptoGSS, FName As String<br />&nbsp; &nbsp; Dim WShell, WshExec As Variant<br />&#039;Ищем CryptoPath<br />&nbsp; &nbsp; If Environ(&quot;CryptoPath&quot;)=&quot;&quot; Then<br />&nbsp; &nbsp; &nbsp; &nbsp; CryptoGSS=Environ(&quot;APPDATA&quot;)+|\GSS PMR\CryptoGSS\CryptoGSS.exe| &#039;путь к проге в профиле &lt;3.6<br />&nbsp; &nbsp; Else<br />&nbsp; &nbsp; &nbsp; &nbsp; CryptoGSS=Environ(&quot;CryptoPath&quot;)+|CryptoGSS.exe| &#039;путь к новой версии &gt; 3.6<br />&nbsp; &nbsp; End If</p><p>&nbsp; &nbsp; FName = Dir$(CryptoGSS, 0) &#039;проверяем есть ли CryptoGSS<br />&nbsp; &nbsp; If FName = &quot;&quot; Then<br />&nbsp; &nbsp; &nbsp; &nbsp; Print CryptoGSS<br />&nbsp; &nbsp; &nbsp; &nbsp; Print &quot;Не найден CryptoGSS! Установите его!!!&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; Exit function<br />&nbsp; &nbsp; End If<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; cmd = |&quot;|+CryptoGSS+|&quot; &quot;| + infile + |&quot; &quot;| + outfile +|&quot;| &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; Set WShell=Nothing<br />&nbsp; &nbsp; Set WshExec=Nothing<br />&nbsp; &nbsp; Set WShell = CreateObject(&quot;WScript.Shell&quot;)<br />&nbsp; &nbsp; Set WshExec = WShell.Exec(cmd)&nbsp; &nbsp; &#039;запускаем прогу&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; While WshExec.Status=0 &#039;ждем закрытия проги<br />&nbsp; &nbsp; &nbsp; &nbsp; Sleep 1<br />&nbsp; &nbsp; &nbsp; &nbsp; FName = Dir$(outfile, 0) <br />&nbsp; &nbsp; &nbsp; &nbsp; If FName &lt;&gt; &quot;&quot; Then <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Print &quot;найден файл: &quot;+FName<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SignXMLfile=True<br />&nbsp; &nbsp; &nbsp; &nbsp; Else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Print &quot;жду файл секундочку...&quot;&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; End If<br />&nbsp; &nbsp; Wend<br />&nbsp; &nbsp; Set WShell=Nothing<br />&nbsp; &nbsp; Set WshExec=Nothing<br />&nbsp; &nbsp; <br />End Function</p>]]></content>
			<author>
				<name><![CDATA[mirkin]]></name>
				<uri>http://itpmr.ru/profile.php?id=2392</uri>
			</author>
			<updated>2021-04-01T12:59:00Z</updated>
			<id>http://itpmr.ru/viewtopic.php?pid=124806#p124806</id>
		</entry>
</feed>
