<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[2gb problem bekomme - pos]]></title><description><![CDATA[<p>hallo habe ein problem<br />
ich extrahiere aus einer großen datei</p>
<p>wenn die datei größer als 2gb ist gibt mir das programm einen</p>
<p>- wert</p>
<p>hier der source</p>
<pre><code class="language-cpp">void CextrrebDlg::OnBnClickedButton1()

{

 char filename[100],filename2[100],filename3[100],path[100],Temp3[300],Temp[200],lba[100];

  unsigned char Byte1[2048];

  FILE *file_ptr;
  FILE *LBATXT;
  FILE *output_ptr;

 long indx,z;
 unsigned long  DEB,LG;

  CWnd* pWnd = GetDlgItem(PATH);
  CWnd* pT1 = GetDlgItem(T1);
  CWnd* pT2 = GetDlgItem(T2);
  CWnd* pT3 = GetDlgItem(T3);
  CWnd* pLBA = GetDlgItem(LBA);

  pWnd-&gt;GetWindowText(path,100);
  pLBA-&gt;GetWindowText(lba,100);
  pT2-&gt;SetWindowText(_T(&quot;Extracting LBA, please Wait&quot;));

  sprintf(filename,&quot;%s%s&quot;,path,lba) ;
  sprintf(filename2,&quot;%sWork\\worktbl.TXT&quot;,path) ;

 if((file_ptr=fopen(filename,&quot;rb&quot;))==NULL)
  {
    sprintf(Temp,&quot;Level [2] - Error Opening %s&quot;, filename);
	MessageBox(Temp);
    exit(0);
  }

  if((LBATXT=fopen(filename2, &quot;rt&quot;))==NULL)
  {
    sprintf(Temp,&quot;Level [2] - Error Opening %s&quot;, filename2);
	MessageBox(Temp);
    exit(0);
  }

int  StepIt();                      

      CProgressCtrl* pBar=(CProgressCtrl*)GetDlgItem(IDC_PROGRESS1); 
pBar-&gt;SetRange(0,435); 
pBar-&gt;SetPos(0);
pBar-&gt;SetStep(1);

 do

 {

   UpdateWindow();
   bool ReloadWindow();

   fgets(Temp, 200, LBATXT);
    for(indx=0;indx&lt;200;indx++)
	{
      if(Temp[indx]=='\n') Temp[indx]='\0';
	};

    for(indx=0;indx&lt;8;indx++)
	{
      ps2conv[indx]= Temp[indx];
	};
    DEB = hex2dec();

    sprintf(Temp3,&quot;%d&quot;,DEB);
    pT3-&gt;SetWindowText(Temp3);

	for(indx=0;indx&lt;8;indx++)
	{
      ps2conv[indx]= Temp[indx+9];
	};
    LG = hex2dec();

	z = strlen(Temp)-18;

	for(indx=0;indx&lt;z;indx++)
	{
      filename3[indx] = Temp[indx+18];
	};
    filename3[indx]='\0';
	if (indx ==0) break;

	sprintf(Temp,&quot;%sWork\\%s&quot;,path,filename3);
    pT2-&gt;SetWindowText(_T(filename3));
    UpdateWindow();
    if((output_ptr=fopen(Temp,&quot;wb&quot;))==NULL)
	{
       sprintf(Temp,&quot;Level[3] - Error Opening [%s]&quot;, filename3);
	   MessageBox(Temp);
       exit(0);
	}

	fseek(file_ptr,DEB,SEEK_SET);
</code></pre>
<p>DEB = Start position</p>
<p>hab es schon mit unsigned long probiert<br />
bekomme aber trotz dem einen - wert<br />
wens über die 2gb geht</p>
<p>kann mir einer helfen ?</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/65640/2gb-problem-bekomme-pos</link><generator>RSS for Node</generator><lastBuildDate>Fri, 05 Jun 2026 13:17:26 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/65640.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 20 Feb 2004 16:06:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 2gb problem bekomme - pos on Fri, 20 Feb 2004 16:06:33 GMT]]></title><description><![CDATA[<p>hallo habe ein problem<br />
ich extrahiere aus einer großen datei</p>
<p>wenn die datei größer als 2gb ist gibt mir das programm einen</p>
<p>- wert</p>
<p>hier der source</p>
<pre><code class="language-cpp">void CextrrebDlg::OnBnClickedButton1()

{

 char filename[100],filename2[100],filename3[100],path[100],Temp3[300],Temp[200],lba[100];

  unsigned char Byte1[2048];

  FILE *file_ptr;
  FILE *LBATXT;
  FILE *output_ptr;

 long indx,z;
 unsigned long  DEB,LG;

  CWnd* pWnd = GetDlgItem(PATH);
  CWnd* pT1 = GetDlgItem(T1);
  CWnd* pT2 = GetDlgItem(T2);
  CWnd* pT3 = GetDlgItem(T3);
  CWnd* pLBA = GetDlgItem(LBA);

  pWnd-&gt;GetWindowText(path,100);
  pLBA-&gt;GetWindowText(lba,100);
  pT2-&gt;SetWindowText(_T(&quot;Extracting LBA, please Wait&quot;));

  sprintf(filename,&quot;%s%s&quot;,path,lba) ;
  sprintf(filename2,&quot;%sWork\\worktbl.TXT&quot;,path) ;

 if((file_ptr=fopen(filename,&quot;rb&quot;))==NULL)
  {
    sprintf(Temp,&quot;Level [2] - Error Opening %s&quot;, filename);
	MessageBox(Temp);
    exit(0);
  }

  if((LBATXT=fopen(filename2, &quot;rt&quot;))==NULL)
  {
    sprintf(Temp,&quot;Level [2] - Error Opening %s&quot;, filename2);
	MessageBox(Temp);
    exit(0);
  }

int  StepIt();                      

      CProgressCtrl* pBar=(CProgressCtrl*)GetDlgItem(IDC_PROGRESS1); 
pBar-&gt;SetRange(0,435); 
pBar-&gt;SetPos(0);
pBar-&gt;SetStep(1);

 do

 {

   UpdateWindow();
   bool ReloadWindow();

   fgets(Temp, 200, LBATXT);
    for(indx=0;indx&lt;200;indx++)
	{
      if(Temp[indx]=='\n') Temp[indx]='\0';
	};

    for(indx=0;indx&lt;8;indx++)
	{
      ps2conv[indx]= Temp[indx];
	};
    DEB = hex2dec();

    sprintf(Temp3,&quot;%d&quot;,DEB);
    pT3-&gt;SetWindowText(Temp3);

	for(indx=0;indx&lt;8;indx++)
	{
      ps2conv[indx]= Temp[indx+9];
	};
    LG = hex2dec();

	z = strlen(Temp)-18;

	for(indx=0;indx&lt;z;indx++)
	{
      filename3[indx] = Temp[indx+18];
	};
    filename3[indx]='\0';
	if (indx ==0) break;

	sprintf(Temp,&quot;%sWork\\%s&quot;,path,filename3);
    pT2-&gt;SetWindowText(_T(filename3));
    UpdateWindow();
    if((output_ptr=fopen(Temp,&quot;wb&quot;))==NULL)
	{
       sprintf(Temp,&quot;Level[3] - Error Opening [%s]&quot;, filename3);
	   MessageBox(Temp);
       exit(0);
	}

	fseek(file_ptr,DEB,SEEK_SET);
</code></pre>
<p>DEB = Start position</p>
<p>hab es schon mit unsigned long probiert<br />
bekomme aber trotz dem einen - wert<br />
wens über die 2gb geht</p>
<p>kann mir einer helfen ?</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/464196</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/464196</guid><dc:creator><![CDATA[sonix]]></dc:creator><pubDate>Fri, 20 Feb 2004 16:06:33 GMT</pubDate></item><item><title><![CDATA[Reply to 2gb problem bekomme - pos on Fri, 20 Feb 2004 17:02:21 GMT]]></title><description><![CDATA[<p>Die C Funktion die du da verwendest kannst für den Fall wieder vergessen. die verwenden long als fileoffset und das geht bis +2147483647 hoch was 2GB sind, mehr geht net. Wirst wohl oder über auf die Win32 funktionen ausweichen müssen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/464218</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/464218</guid><dc:creator><![CDATA[CMatt]]></dc:creator><pubDate>Fri, 20 Feb 2004 17:02:21 GMT</pubDate></item></channel></rss>