<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; Использование в PHP dll написанной на Делфи]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=6980&amp;type=atom" />
	<updated>2012-03-22T12:32:56Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=6980</id>
		<entry>
			<title type="html"><![CDATA[Re: Использование в PHP dll написанной на Делфи]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=58241#p58241" />
			<content type="html"><![CDATA[<p><span style="color: Green"><strong>Randomav</strong>, код на форуме оформляется <a href="http://forum.script-coding.com/help.php#bbcode">тэгом «code»</a>.</span></p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-03-22T12:32:56Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=58241#p58241</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Использование в PHP dll написанной на Делфи]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=58236#p58236" />
			<content type="html"><![CDATA[<p>Действительно все заработало, без вас бы никак:)<br />Спасибо большое за помощь!!!</p>]]></content>
			<author>
				<name><![CDATA[Randomav]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27750</uri>
			</author>
			<updated>2012-03-22T11:54:42Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=58236#p58236</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Использование в PHP dll написанной на Делфи]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=58235#p58235" />
			<content type="html"><![CDATA[<p>А, теперь понятно. Не находит DLL. Где она лежит? Попробуйте полный путь указать. Либо положите её в папку, которая указана в переменной окружения PATH. Апишные DLL находятся без пути, т.к. они в системной папке лежат. Перекодировать не нужно.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2012-03-22T11:44:04Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=58235#p58235</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Использование в PHP dll написанной на Делфи]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=58230#p58230" />
			<content type="html"><![CDATA[<p>Пробую делать так: <br />$com = new COM(&quot;DynamicWrapperX&quot;);<br />$com-&gt;Register(&quot;Project2.dll&quot;, &quot;mydiv2&quot;, &quot;i=l&quot; , &quot;r=l&quot;)<br />и так<br />$com-&gt;Register(UTF16(&quot;Project2.dll&quot;), UTF16(&quot;mydiv2&quot;), UTF16(&quot;i=l&quot;) , UTF16(&quot;r=l&quot;))</p><p>выходит Fatal error: Uncaught exception &#039;com_exception&#039; with message &#039;Error [0x80070006] Неверный дескриптор. &#039; in Z:\home\localhost\www\POS\tstcom.php:18 Stack trace: #0 Z:\home\localhost\www\POS\tstcom.php(18): com-&gt;Register(&#039;???P?r?o?j?e?c?...&#039;, &#039;???m?y?d?i?v?2&#039;, &#039;???i?=?l&#039;, &#039;???r?=?l&#039;) #1</p><p>Возможно я неправильно ANSI в UTF-16 перекодирую<br />iconv(&#039;Windows-1251&#039;,&#039;UTF-16&#039;, $str)<br />пробовал также<br />iconv(&#039;ISO8859-5&#039;,&#039;UTF-16&#039;, $str)</p>]]></content>
			<author>
				<name><![CDATA[Randomav]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27750</uri>
			</author>
			<updated>2012-03-22T11:06:23Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=58230#p58230</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Использование в PHP dll написанной на Делфи]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=58228#p58228" />
			<content type="html"><![CDATA[<p>Можно было и для пользователя зарегить, в хелпе описано как.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2012-03-22T10:44:05Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=58228#p58228</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Использование в PHP dll написанной на Делфи]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=58225#p58225" />
			<content type="html"><![CDATA[<p>Скачал архивчик dynwrapx1_00 внутри dll-ка и help.<br />При регистрации(вашей) COM-dll выдается сообщение &quot;модуль загружен но не удается выполнить вызов DllRegisterServer&quot;<br />И как следствие Fatal error: Uncaught exception &#039;com_exception&#039; with message &#039;Failed to create COM object `DynamicWrapperX&#039;:)</p><p>П.С. решил проблему установки запустил &quot;от имени администратора&quot;</p>]]></content>
			<author>
				<name><![CDATA[Randomav]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27750</uri>
			</author>
			<updated>2012-03-22T10:33:06Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=58225#p58225</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Использование в PHP dll написанной на Делфи]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=58224#p58224" />
			<content type="html"><![CDATA[<p>А кто же их знает, почему они вызываются? <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /> Насчёт кодировки была всего лишь догадка, да и то при условии (не подтвердившемся), что вы использовали DynwrapX. Когда эту ошибку выводит Dynwrap, я не знаю. Попробуйте DynamicWrapperX — что он выдаст.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2012-03-22T10:18:25Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=58224#p58224</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Использование в PHP dll написанной на Делфи]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=58222#p58222" />
			<content type="html"><![CDATA[<p>Пишу в простом Notepad++ у меня стоит кодировка ANSI, UTF-16 там нет.<br />Пробую перекодировать так:</p><p>function UTF16($str)<br />{<br />&nbsp; //return mb_convert_encoding ($str , &quot;UTF-8&quot;, &quot;Windows-1251&quot;);<br />&nbsp; return iconv(&#039;Windows-1251&#039;,&#039;UTF-16&#039;, $str); <br />}</p><p>$com = new COM(&quot;DynamicWrapper&quot;);<br />$com-&gt;Register(&quot;kernel32&quot;, &quot;Beep&quot;, &quot;i=uu&quot;);<br />$com-&gt;Register(&quot;kernel32&quot;, &quot;GetLastError&quot;, &quot;r=u&quot;);<br />$com-&gt;Register(UTF16(&quot;Project2.dll&quot;), UTF16(&quot;mydiv2&quot;), UTF16(&quot;i=l&quot;) , UTF16(&quot;f=s&quot;) , UTF16(&quot;r=l&quot;));</p><p>После перекодировки ошибка не пропала.</p><p>И еще вопрос, почему функции из WInAPI (Beep) вызываются без перекодировки?:)</p>]]></content>
			<author>
				<name><![CDATA[Randomav]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27750</uri>
			</author>
			<updated>2012-03-22T10:05:06Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=58222#p58222</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Использование в PHP dll написанной на Делфи]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=58217#p58217" />
			<content type="html"><![CDATA[<p><strong>Randomav</strong><br /></p><div class="quotebox"><blockquote><p>Т.е. мне надо предварительно переводить параметры-строки в UTF-16?</p></blockquote></div><p>Если они точно не в нём, то да.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2012-03-22T09:34:25Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=58217#p58217</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Использование в PHP dll написанной на Делфи]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=58216#p58216" />
			<content type="html"><![CDATA[<p>На VBScript работает и с DynamicWrapper.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2012-03-22T09:32:16Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=58216#p58216</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Использование в PHP dll написанной на Делфи]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=58212#p58212" />
			<content type="html"><![CDATA[<p>На DynamicWrapperX все работает.</p><p>Wrap.Register(&quot;c:\Temp\Project2.dll&quot;,	&quot;mydiv2&quot; , &quot;i=l&quot; , &quot;r=l&quot;);</p>]]></content>
			<author>
				<name><![CDATA[chessman]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25359</uri>
			</author>
			<updated>2012-03-22T09:26:35Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=58212#p58212</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Использование в PHP dll написанной на Делфи]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=58210#p58210" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>YMP пишет:</cite><blockquote><p><strong>Randomav</strong><br /></p><div class="quotebox"><blockquote><p>В других языках не пробовал пока что, использую DynamicWrapper.</p></blockquote></div><p>А, ну тогда &quot;f=&quot; не игнорируется. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p><p>Ошибка у вас происходит ещё на этапе регистрации функции, т.е. неверным является параметр, переданный методу Register, а у него все 5 параметров — строки. До вызова функции из вашей DLL дело даже не доходит.</p></blockquote></div><p>Вот оно даже как.<br />Т.е. мне надо предварительно переводить параметры-строки в UTF-16?</p><p>Как на форум файл загрузить не нашел, но в правилах вроде тоже не запрещено.<br />Файл: http://rghost.ru/37156356</p>]]></content>
			<author>
				<name><![CDATA[Randomav]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27750</uri>
			</author>
			<updated>2012-03-22T08:56:34Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=58210#p58210</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Использование в PHP dll написанной на Делфи]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=58207#p58207" />
			<content type="html"><![CDATA[<p><strong>Randomav</strong><br /></p><div class="quotebox"><blockquote><p>В других языках не пробовал пока что, использую DynamicWrapper.</p></blockquote></div><p>А, ну тогда &quot;f=&quot; не игнорируется. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p><p>Ошибка у вас происходит ещё на этапе регистрации функции, т.е. неверным является параметр, переданный методу Register, а у него все 5 параметров — строки. До вызова функции из вашей DLL дело даже не доходит.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2012-03-22T08:33:07Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=58207#p58207</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Использование в PHP dll написанной на Делфи]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=58206#p58206" />
			<content type="html"><![CDATA[<p>Выложи Project2.dll</p>]]></content>
			<author>
				<name><![CDATA[chessman]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25359</uri>
			</author>
			<updated>2012-03-22T08:29:35Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=58206#p58206</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Использование в PHP dll написанной на Делфи]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=58205#p58205" />
			<content type="html"><![CDATA[<p>В других языках не пробовал пока что, использую DynamicWrapper.<br />Но параметры у меня же целого типа INT(long, 4 байта), или речь идет о внутренней работе DynamicWrapper с функциями?</p><p>Использовал вот это руководство http://www.script-coding.com/dynwrap.html</p>]]></content>
			<author>
				<name><![CDATA[Randomav]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27750</uri>
			</author>
			<updated>2012-03-22T08:23:27Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=58205#p58205</id>
		</entry>
</feed>
