Solved

Delphi compressbuf

Posted on 2011-02-14
6
1,475 Views
Last Modified: 2012-05-11
Hi i try to compile one component and i get error:

[DCC Error] EGGFuncts.pas(179): E2003 Undeclared identifier: 'CompressBuf'

(delphi xe)
 what could i do?
please help

code:
function Deflate(s: String): String;
var
  pIn, pOut: Pointer;
  i: Integer;
begin
  pIn := nil;
  pOut := nil;
  try
    GetMem(pIn, Length(s)); // zaalokowanie pamieci o wielkosci s
    Move(s[1], pIn^, Length(s)); // skopiowanie zmiennej s do pamieci
    CompressBuf(pIn, Length(s), pOut, i); // kompresja
    SetLength(Result, i); // ustanowienie dlugosci zmiennej wynikowej
    Move(pOut^, Result[1], i); // skopiowanie danych do wyniku
  finally // zwolnienie pamieci
    if pIn <> nil then FreeMem(pIn, Length(s));
    if pOut <> nil then FreeMem(pOut, i);
  end;
end;

Open in new window

0
Comment
Question by:l3m0n
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 

Author Comment

by:l3m0n
ID: 34892529
i changed it for:
ZCompress(pIn, Length(s), pOut, i); // kompresja
and it works but i get next error when i try to log into server:
http://img707.imageshack.us/i/easygg.jpg/

english: requested name is valid but the requested type was not found.( ONApi ASync Lookup)
0
 
LVL 24

Expert Comment

by:jimyX
ID: 34894372
This error occurs when the host is unknown. Check the host name, it seems you used a wrong host name.
0
 
LVL 19

Expert Comment

by:Thommy
ID: 34894451
Delphi Troubleshooting
Undeclared identifier: 'XXXX'
http://www.cryer.co.uk/brian/delphi/error_undeclared_identifier.htm
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Expert Comment

by:Thommy
ID: 34894476
CompressBuf and DecompressBuf are GONE...

Thread: what happened to CompressBuf and DecompressBuf?
https://forums.embarcadero.com/message.jspa?messageID=205048

Re: what happened to CompressBuf and DecompressBuf?
http://embarcadero.newsgroups.archived.at/public.delphi.rtl/201001/1001253157.html

This is from http://stackoverflow.com/questions/943867/zlib-in-delphi-2009...

CompressBuf and DecompressBuf are GONE.
I also have a project that compiles just fine in D7, but fails to compile in D2010 because it can't find "CompressBuf" or "DecompressBuf".
A search using D7's very pleasant find command locates the routines at c:\Program Files\Borland\Delphi7\Source\Rtl\Common\ZLib.pas
But searching with D2010's (awkward separate) "Find in Files" command fails to locate CompressBuf or DecompressBuf anywhere.
It's very disturbing that upgrading the IDE causes routines used and needed in projects to disappear!

0
 
LVL 19

Expert Comment

by:Thommy
ID: 34894725
Description of Windows Sockets Error Codes...
http://msdn.microsoft.com/en-us/library/ms740668(v=vs.85).aspx

WSANO_DATA
11004  

Valid name, no data record of requested type.
The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for. The usual example for this is a host name-to-address translation attempt (using gethostbyname or WSAAsyncGetHostByName) which uses the DNS (Domain Name Server). An MX record is returned but no A record—indicating the host itself exists, but is not directly reachable.
0
 
LVL 19

Accepted Solution

by:
Thommy earned 500 total points
ID: 34894753
Already asked before in EE..

Winsock error 11004 how to solve it ?
http://www.experts-exchange.com/Programming/System/Windows__Programming/MFC/Q_20298382.html
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question