<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум Guardant &mdash; Ограничение в драйверах/SDK ?]]></title>
	<link rel="self" href="https://forum.guardant.ru/feed/atom/topic/230" />
	<updated>2012-10-25T18:15:03Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.guardant.ru/topic/230/</id>
		<entry>
			<title type="html"><![CDATA[Re: Ограничение в драйверах/SDK ?]]></title>
			<link rel="alternate" href="https://forum.guardant.ru/post/1092/#p1092" />
			<content type="html"><![CDATA[<p>Развивая тему. Такая программа падает на 10 шаге:<br /></p><div class="codebox"><pre><code>int X = 10000;
int Y = 4000;
for (i = 0; i &lt; 100; ++i) {
    VERIFY_GRD(GrdLock(guardant_handle, 0, X, GrdLM_All));
    Sleep(Y);
}</code></pre></div><p>Если взять равные X и Y, (например 50 и 50) - цикл исполнится полностью.<br />В алгоритме, который я пытаюсь реализовать, важно что X в 1,5... 2 раза больше Y, тоесть поток постоянно держит ключ в блокированном состоянии.</p><p>PS: Забыл указать - использую GuardantAPI 6.1, работаю с ключиками GuardantCode, но ведб модель ключа не принципиальна для функций GrdLock и GrdUnlock?</p>]]></content>
			<author>
				<name><![CDATA[Ираклий]]></name>
				<uri>https://forum.guardant.ru/user/412/</uri>
			</author>
			<updated>2012-10-25T18:15:03Z</updated>
			<id>https://forum.guardant.ru/post/1092/#p1092</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Ограничение в драйверах/SDK ?]]></title>
			<link rel="alternate" href="https://forum.guardant.ru/post/1091/#p1091" />
			<content type="html"><![CDATA[<p>Исследую GrdLock() с установленным dwTimeoutAutoUnlock, наблюдаю интересный эффект, не отраженный в документации. Если выполнять вот такой код:</p><div class="codebox"><pre><code>    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All)); // здесь падаем
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));
    VERIFY_GRD(GrdLock(guardant_handle, 100, 2000, GrdLM_All));</code></pre></div><p>То, вне зависимости от выбора dwTimeoutWaitForUnlock / dwTimeoutAutoUnlock падаем на одной и той же строке с ошибкой 23: &quot;Guardant dongle locked by another copy of protected application&quot;. <br />Это зашитое ограничение?</p>]]></content>
			<author>
				<name><![CDATA[Ираклий]]></name>
				<uri>https://forum.guardant.ru/user/412/</uri>
			</author>
			<updated>2012-10-25T17:10:54Z</updated>
			<id>https://forum.guardant.ru/post/1091/#p1091</id>
		</entry>
</feed>
