<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=283364&amp;view=findpost&amp;p=2383256</guid>
        <pubDate>Wed, 30 Sep 2009 06:07:40 +0000</pubDate>
        <title>CommandLineToArgvW ????</title>
        <link>https://forum.sources.ru/index.php?showtopic=283364&amp;view=findpost&amp;p=2383256</link>
        <description><![CDATA[Palladin: <strong class='tag-b'>alex_sporik</strong><br>
Да как не работает... у меня работает все... единственное что кавычки двойные ушли...]]></description>
        <author>Palladin</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=283364&amp;view=findpost&amp;p=2383244</guid>
        <pubDate>Wed, 30 Sep 2009 05:56:31 +0000</pubDate>
        <title>CommandLineToArgvW ????</title>
        <link>https://forum.sources.ru/index.php?showtopic=283364&amp;view=findpost&amp;p=2383244</link>
        <description><![CDATA[alex_sporik: 2 Palladin = не работает...возвращает пустые аргументы.<br>
<br>
Зы, я дурак...сорри. Просмотрел что это двойной указатель. Кому интересно - вот так<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">var arrParams,pp:PPWideChar;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;i,c:integer;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;cl:array of WideString;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;arrParams:=CommandLineToArgvW(GetCommandLineW,c);</div><div class="code_line">&nbsp;if Assigned(arrParams) then</div><div class="code_line">&nbsp;&nbsp;begin</div><div class="code_line">&nbsp;&nbsp; SetLength(cl,c);</div><div class="code_line">&nbsp;&nbsp; pp:=arrParams;</div><div class="code_line">&nbsp;&nbsp; for i:=0 to c-1 do</div><div class="code_line">&nbsp;&nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; cl[i]:=WideString(PWideChar(pp^));</div><div class="code_line">&nbsp;&nbsp; &nbsp; inc(pp);</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; LocalFree(THandle(arrParams));</div><div class="code_line">&nbsp;&nbsp;end;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>alex_sporik</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=283364&amp;view=findpost&amp;p=2383238</guid>
        <pubDate>Wed, 30 Sep 2009 05:50:50 +0000</pubDate>
        <title>CommandLineToArgvW ????</title>
        <link>https://forum.sources.ru/index.php?showtopic=283364&amp;view=findpost&amp;p=2383238</link>
        <description><![CDATA[Palladin: А чем ParamStr не угодило?]]></description>
        <author>Palladin</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=283364&amp;view=findpost&amp;p=2383227</guid>
        <pubDate>Wed, 30 Sep 2009 05:42:43 +0000</pubDate>
        <title>CommandLineToArgvW ????</title>
        <link>https://forum.sources.ru/index.php?showtopic=283364&amp;view=findpost&amp;p=2383227</link>
        <description><![CDATA[alex_sporik: Уважаемый Аll,<br>
<br>
Функция CommandLineToArgvW что то засадила меня. Не получается правильно отпарсить путь вида<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&quot;debug\program.exe&quot; &#39;/state:1 /state_tag:0 /state_file:&quot;C:\Users\XXX\AppData\Local\TempC9.data&quot;&#39;</div></ol></div></div></div></div><br>
<br>
Почему то возвращает мне количество аргументов 4 а доступен только 0.<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function CommandLineToArgvW(lpCmdLine:LPCWSTR;var pNumArgs:Integer):PPWideChar;stdcall;external &#39;shell32.dll&#39;;</div><div class="code_line">&nbsp;</div><div class="code_line">var arrParams:PPWideChar;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;i:integer;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;arrParams:=CommandLineToArgvW(GetCommandLineW,i);</div><div class="code_line">&nbsp;if arrParams&#60;&#62;nil then</div><div class="code_line">&nbsp;&nbsp;begin</div><div class="code_line">&nbsp;&nbsp; arrParams^[0] - тут работает но с другими индексами нет.</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; LocalFree(THandle(arrParams));</div><div class="code_line">&nbsp;&nbsp;end;</div></ol></div></div></div></div><br>
<br>
Help pls. <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2009-09-30T05:43:55+00:00">30.09.09, 05:43</time></span></span><br>
ЗЫ под Вынь7 64 бит... под хрю таких путей не бывает.]]></description>
        <author>alex_sporik</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      </channel>
      </rss>
	