internal override int CallISAPI(UnsafeNativeMethods.CallISAPIFunc iFunction, byte[] bufIn, byte[] bufOut) { if (base._ecb == IntPtr.Zero) { return 0; } return UnsafeNativeMethods.EcbCallISAPI(base._ecb, iFunction, bufIn, bufIn.Length, bufOut, bufOut.Length); }
internal FindFileData(ref UnsafeNativeMethods.WIN32_FIND_DATA wfd) { this._fileAttributesData = new System.Web.Util.FileAttributesData(ref wfd); this._fileNameLong = wfd.cFileName; if (((wfd.cAlternateFileName != null) && (wfd.cAlternateFileName.Length > 0)) && !StringUtil.EqualsIgnoreCase(wfd.cFileName, wfd.cAlternateFileName)) { this._fileNameShort = wfd.cAlternateFileName; } }
internal StateHttpWorkerRequest(IntPtr tracker, UnsafeNativeMethods.StateProtocolVerb methodIndex, string uri, UnsafeNativeMethods.StateProtocolExclusive exclusive, int extraFlags, int timeout, int lockCookieExists, int lockCookie, int contentLength, IntPtr content) { this._tracker = tracker; this._methodIndex = methodIndex; switch (this._methodIndex) { case UnsafeNativeMethods.StateProtocolVerb.GET: this._method = "GET"; break; case UnsafeNativeMethods.StateProtocolVerb.PUT: this._method = "PUT"; break; case UnsafeNativeMethods.StateProtocolVerb.DELETE: this._method = "DELETE"; break; case UnsafeNativeMethods.StateProtocolVerb.HEAD: this._method = "HEAD"; break; } this._uri = uri; if (this._uri.StartsWith("//", StringComparison.Ordinal)) { this._uri = this._uri.Substring(1); } this._exclusive = exclusive; this._extraFlags = extraFlags; this._timeout = timeout; this._lockCookie = lockCookie; this._lockCookieExists = lockCookieExists != 0; this._contentLength = contentLength; if (contentLength != 0) { uint num = (uint) ((int) content); this._content = new byte[] { (byte) (num & 0xff), (byte) ((num & 0xff00) >> 8), (byte) ((num & 0xff0000) >> 0x10), (byte) ((num & -16777216) >> 0x18) }; } this._status = new StringBuilder(0x100); this._headers = new StringBuilder(0x100); }
internal static extern int EcbCallISAPI(IntPtr pECB, UnsafeNativeMethods.CallISAPIFunc iFunction, byte[] bufferIn, int sizeIn, byte[] bufferOut, int sizeOut);
internal abstract int CallISAPI(UnsafeNativeMethods.CallISAPIFunc iFunction, byte[] bufIn, byte[] bufOut);
internal StateHttpWorkerRequest( IntPtr tracker, UnsafeNativeMethods.StateProtocolVerb methodIndex, string uri, UnsafeNativeMethods.StateProtocolExclusive exclusive, int extraFlags, int timeout, int lockCookieExists, int lockCookie, int contentLength, IntPtr content ) { _tracker = tracker; _methodIndex = methodIndex; switch (_methodIndex) { case UnsafeNativeMethods.StateProtocolVerb.GET: _method = "GET"; break; case UnsafeNativeMethods.StateProtocolVerb.PUT: _method = "PUT"; break; case UnsafeNativeMethods.StateProtocolVerb.HEAD: _method = "HEAD"; break; case UnsafeNativeMethods.StateProtocolVerb.DELETE: _method = "DELETE"; break; default: Debug.Assert(false, "Shouldn't get here!"); break; } _uri = uri; // Handle the ASP1.1 case which prepends an extra / to the URI if (_uri.StartsWith("//", StringComparison.Ordinal)) { _uri = _uri.Substring(1); } _exclusive = exclusive; _extraFlags = extraFlags; _timeout = timeout; _lockCookie = lockCookie; _lockCookieExists = lockCookieExists != 0; _contentLength = contentLength; if (contentLength != 0) { Debug.Assert(_contentLength == IntPtr.Size); // Need to convert 'content', which is a ptr to native StateItem, // into a byte array because that's what GetPreloadedEntityBody // must return, and GetPreloadedEntityBody is what the pipeline uses // to read the body of the request, which in our case is just a pointer // to a native StateItem object. #if WIN64 ulong p = (ulong) content; _content = new byte[8] { (byte) ((p & 0x00000000000000ff)), (byte) ((p & 0x000000000000ff00) >> 8), (byte) ((p & 0x0000000000ff0000) >> 16), (byte) ((p & 0x00000000ff000000) >> 24), (byte) ((p & 0x000000ff00000000) >> 32), (byte) ((p & 0x0000ff0000000000) >> 40), (byte) ((p & 0x00ff000000000000) >> 48), (byte) ((p & 0xff00000000000000) >> 56), }; #else uint p = (uint) content; _content = new byte[4] { (byte) ((p & 0x000000ff)), (byte) ((p & 0x0000ff00) >> 8), (byte) ((p & 0x00ff0000) >> 16), (byte) ((p & 0xff000000) >> 24), }; #endif } _status = new StringBuilder(256); _headers = new StringBuilder(256); }