| CSocketThreadManager:: DecreaseSocketCount() |

Public Function | Declared in: SocketThreadManager.h

## Declaration

    void DecreaseSocketCount(
        HWND hWindowHandle,
        BOOL bFreeze=FALSE);

## Description

Less socket in the system

## Function Body

    try
    {
        //First find the window handle
        int iIndex;
        iIndex=GetIndexByHWND(hWindowHandle);

        //Check it's valid
        if (!iIndex)
            return;

        //Enter the critical section
        m_pCSection->Enter();

            //Decrement the socket count
            if (m_pThreadData[iIndex-1].iSocketCount>0)
            {
                --m_pThreadData[iIndex-1].iSocketCount;
                m_pThreadData[iIndex-1].bFreeze=bFreeze;
            }

        //Leave the critical section
        m_pCSection->Exit();

        return;
    }
    ERROR_HANDLER("DecreaseSocketCount")

    //Error, release the critical section
    m_pCSection->Exit();

## See Also

Class Overview | CSpoofBase | Hierarchy Chart

This web site was generated using Surveyor V4.50.811.1. Click here for more information. | Site content copyright © 2001 Barak Weichselbaum. See the About page for additional notices. This page last updated: 27 Jun 2001.