?
Solved

Delphi compressbuf

Posted on 2011-02-14
6
Medium Priority
?
1,507 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
Independent Software Vendors: 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 2000 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month11 days, 10 hours left to enroll

752 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