![]() |
ModifyBuffer() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Private Function |
Declared in: WhoisSocket.h |
void ModifyBuffer( char* pBuffer, int iBufferSize) const;
Modify the buffer
try { //Allocate a big buffer char* pNewBuffer; pNewBuffer=new char[iBufferSize*2]; //Buffer pos int iBufferPos; iBufferPos=0; //Start iterating it for (int iCounter=0;iCounter<iBufferSize;++iCounter) { //Copy the data pNewBuffer[iBufferPos++]=pBuffer[iCounter]; //Check it if (pBuffer[iCounter]==10) pNewBuffer[iBufferPos++]=13; } //Copy it back memcpy(pBuffer,pNewBuffer,iBufferPos); //Delete it delete [] pNewBuffer; } ERROR_HANDLER("ModifyBuffer")
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |