private void installDelegates() { _hThis = GCHandle.Alloc(this); _ptrThis = (IntPtr)_hThis; #if USE_LIBCURLSHIM _pDelLock = LockDelegate; _pDelUnlock = UnlockDelegate; NativeMethods.curl_shim_install_share_delegates(_pShare, _ptrThis, _pDelLock, _pDelUnlock); #endif }