<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум Guardant &mdash; Unity3d + Guardant]]></title>
	<link rel="self" href="https://forum.guardant.ru/feed/atom/topic/397" />
	<updated>2021-04-02T10:57:08Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.guardant.ru/topic/397/</id>
		<entry>
			<title type="html"><![CDATA[Re: Unity3d + Guardant]]></title>
			<link rel="alternate" href="https://forum.guardant.ru/post/4483/#p4483" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>zeblong пишет:</cite><blockquote><p>Нынче все работает. <br />GrdApi.GrdStartup(GrdFMR.Local) - если делать All - не может создать какой то файл</p></blockquote></div><p>Здравствуйте!</p><p>Насколько я понял, при вызове метода GrdApi.GrdStartup с параметром GrdFMR.Local, все нормально отрабатывает и с ключом работать получается, верно?</p><p>Насчет параметра <strong>All</strong> — API может быть проинициализировано в трех режимах:</p><ul><li><p>локальный — GrdFMR.Local</p></li><li><p>сетевой — GrdFMR.Remote</p></li><li><p>комбинированный — GrdFMR.All</p></li></ul><p>В сетевом режиме API всегда пытается сгенерировать файл-конфиг (gnclient.ini), который заполняется по результатам широковещательного поиска сервера (GLDS.exe) с ключом.</p><p>В комбинированном режиме API тоже может пытаться создавать этот конфиг, если локально не смогло найти ключ на той же машине, где оно само работает.</p><p>Если приложение, инициализирующее Guardant API, запущено из директории, куда у него нет прав на запись, то в таком случае будет возвращаться ошибка. Вероятно, это как раз такой кейс.</p>]]></content>
			<author>
				<name><![CDATA[Антон Тихиенко]]></name>
				<uri>https://forum.guardant.ru/user/31/</uri>
			</author>
			<updated>2021-04-02T10:57:08Z</updated>
			<id>https://forum.guardant.ru/post/4483/#p4483</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Unity3d + Guardant]]></title>
			<link rel="alternate" href="https://forum.guardant.ru/post/4481/#p4481" />
			<content type="html"><![CDATA[<p>Нынче все работает. <br />GrdApi.GrdStartup(GrdFMR.Local) - если делать All - не может создать какой то файл</p>]]></content>
			<author>
				<name><![CDATA[zeblong]]></name>
				<uri>https://forum.guardant.ru/user/1923/</uri>
			</author>
			<updated>2021-03-31T14:37:36Z</updated>
			<id>https://forum.guardant.ru/post/4481/#p4481</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Unity3d + Guardant]]></title>
			<link rel="alternate" href="https://forum.guardant.ru/post/1934/#p1934" />
			<content type="html"><![CDATA[<p>Здравствуйте, DrMcKay.</p><p>Для указанной среды разработки тестирование наших ключей не проводилось и сейчас не совсем понятно насколько совместимо наше .Net-API с указанным средством разработки.</p><p>В целях дальнейшей диагностики пришлите нам (на e-mail: hotline@guardant.ru ) проект тестового приложения, где наблюдается описанное поведение, а также укажите версию комплекта разработчика, используемого Вами.</p>]]></content>
			<author>
				<name><![CDATA[Антон Тихиенко]]></name>
				<uri>https://forum.guardant.ru/user/31/</uri>
			</author>
			<updated>2014-03-17T10:06:34Z</updated>
			<id>https://forum.guardant.ru/post/1934/#p1934</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Unity3d + Guardant]]></title>
			<link rel="alternate" href="https://forum.guardant.ru/post/1923/#p1923" />
			<content type="html"><![CDATA[<p>Добрый день.<br />Пытаемся подружить Unity3d с ключами Guardant, но возникла следующая проблема.<br />Вот скрипт из Unity, который вешается на простой Cube:</p><p>&nbsp; &nbsp; void Start () {<br />&nbsp; &nbsp; &nbsp; &nbsp; ProgramNumber = 0; <br />&nbsp; &nbsp; &nbsp; &nbsp; Version = 1; <br />&nbsp; &nbsp; &nbsp; &nbsp; DongleID = 0; <br />&nbsp; &nbsp; &nbsp; &nbsp; SerialNumber = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; BitMask = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; DongleID = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; RemoteMode = GrdFMR.Local;<br />&nbsp; &nbsp; &nbsp; &nbsp; DongleFlags = GrdFM.Mask;<br />&nbsp; &nbsp; &nbsp; &nbsp; DongleType = GrdDT.ALL;<br />&nbsp; &nbsp; &nbsp; &nbsp; DongleModel = GrdFMM.ALL;<br />&nbsp; &nbsp; &nbsp; &nbsp; DongleInterface = GrdFMI.USB;<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; void Awake()<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; Handle GrdHandle = new Handle();</p><p>&nbsp; &nbsp; &nbsp; &nbsp; RetCode = (uint) GrdApi.GrdStartup (GrdFMR.Local);<br />&nbsp; &nbsp; &nbsp; &nbsp; ErrorHandling (GrdHandle, RetCode);<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; GrdHandle = GrdApi.GrdCreateHandle (GrdCHM.MultiThread);<br />&nbsp; &nbsp; &nbsp; &nbsp; if (GrdHandle.Address == IntPtr.Zero) <br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ErrorHandling (new Handle(IntPtr.Zero), (uint)GrdE.MemoryAllocation);<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; RetCode = (uint)GrdApi.GrdSetAccessCodes (GrdHandle, PublicCode + CryptPU, ReadCode + CryptRD, WriteCode + CryptWR, MasterCode + CryptMS);<br />&nbsp; &nbsp; &nbsp; &nbsp; ErrorHandling (GrdHandle, RetCode);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; RetCode = (uint)GrdApi.GrdSetFindMode (GrdHandle, RemoteMode, DongleFlags, ProgramNumber, DongleID, SerialNumber, Version, BitMask, DongleType, DongleModel, DongleInterface);<br />&nbsp; &nbsp; &nbsp; &nbsp; ErrorHandling (GrdHandle, RetCode);<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; int LMS = -1;<br />&nbsp; &nbsp; &nbsp; &nbsp; RetCode = (uint)GrdApi.GrdLogin (GrdHandle, LMS, GrdLM.PerStation);<br />&nbsp; &nbsp; &nbsp; &nbsp; ErrorHandling (GrdHandle, RetCode);<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; GrdApi.GrdCloseHandle (GrdHandle);<br />&nbsp; &nbsp; &nbsp; &nbsp; GrdApi.GrdCleanup();<br />&nbsp; &nbsp; }</p><p>При работе с функцией GrdSetFindMode вылетает ошибка:</p><p>NullReferenceException: Object reference not set to an instance of an object<br />PlatformInvoker.Invoke (System.Object[] args)<br />(wrapper remoting-invoke-with-check) PlatformInvoker:Invoke (object[])<br />Guardant.GrdApi.GrdSetFindMode (Handle grdHandle, GrdFMR remoteMode, GrdFM flags, UInt32 prog, UInt32 id, UInt32 sn, UInt32 ver, UInt32 mask, GrdDT type, GrdFMM models, GrdFMI interfaces)<br />GuardantScript.Awake () </p><p>Заранее, спасибо)</p>]]></content>
			<author>
				<name><![CDATA[DrMcKay]]></name>
				<uri>https://forum.guardant.ru/user/773/</uri>
			</author>
			<updated>2014-03-13T13:20:42Z</updated>
			<id>https://forum.guardant.ru/post/1923/#p1923</id>
		</entry>
</feed>
