/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
#include <winsock.h>

FARPROC WSASetBlockingHook(FARPROC lpBlockFunc) {
    void *fptr;
    FARPROC retval;

    fptr = dlsym(_ChSysSocket_handle, "WSASetBlockingHook_chdl");
    if(fptr == NULL)  {
        printf("Error: %s(): dlsym(): %s\n", __func__, dlerror());
        return  NULL;
    }
    dlrunfun(fptr, &retval, WSASetBlockingHook, lpBlockFunc); 
    return retval;
}
