Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Writing a Parental Control Software for Windows

, 8 Jul 2010
Writing a parental control software: The beginning of the adventure
////////////////////////////////////////////////////////////////////////////////
//
// Provider.cpp prototypes
//
////////////////////////////////////////////////////////////////////////////////

BOOL
FindLspEntries(
        PROVIDER  **lspProviders,
        int        *lspProviderCount,
        int        *lpErrno
        );

PROVIDER *
FindMatchingLspEntryForProtocolInfo(
        WSAPROTOCOL_INFOW *inInfo,
        PROVIDER          *lspProviders,
        int                lspCount,
        BOOL               fromStartup = FALSE
        );

// Initialize the given provider by calling its WSPStartup
int
InitializeProvider(
        PROVIDER *provider,
        WORD wVersion,
        WSAPROTOCOL_INFOW *lpProtocolInfo,
        WSPUPCALLTABLE UpCallTable,
        int *Error
        );

BOOL
LoadProviderPath(
        PROVIDER    *loadProvider,
        int         *lpErrno
        );

// Verifies all the function pointers in the proc table are non-NULL
int 
VerifyProcTable(
        LPWSPPROC_TABLE lpProcTable
        );

// Returns an array of protocol entries from the given Winsock catalog
LPWSAPROTOCOL_INFOW 
EnumerateProviders(
        WINSOCK_CATALOG Catalog, 
        LPINT           TotalProtocols
        );

// Enumerates the given Winsock catalog into the already allocated buffer
int
EnumerateProvidersExisting(
        WINSOCK_CATALOG     Catalog, 
        WSAPROTOCOL_INFOW  *ProtocolInfo,
        LPDWORD             ProtocolInfoSize
        );

// Free the array of protocol entries returned from EnumerateProviders
void 
FreeProviders(
        LPWSAPROTOCOL_INFOW ProtocolInfo
        );

// Prints a protocol entry to the console in a readable, formatted form
void 
PrintProtocolInfo(
        WSAPROTOCOL_INFOW  *ProtocolInfo
        );

// Allocates a buffer from the LSP private heap
void *
LspAlloc(
        SIZE_T  size,
        int    *lpErrno
        );

// Frees a buffer previously allocated by LspAlloc
void
LspFree(
        LPVOID  buf
       );

// Creates the private heap used by the LSP and installer
int
LspCreateHeap(
        int    *lpErrno
        );

// Destroys the private heap
void
LspDestroyHeap(
        );

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

Share

About the Author

Pascal Ganaye
Software Developer (Senior)
United Kingdom United Kingdom
I am a French programmer.
These days I spend most of my time with the .NET framework, JavaScript and html.

| Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 8 Jul 2010
Article Copyright 2010 by Pascal Ganaye
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid