Beispiel #1
0
        public int ReadFileProxy(IntPtr rawFileName, IntPtr rawBuffer, uint rawBufferLength, ref uint rawReadLength, long rawOffset, ref DOKAN_FILE_INFO rawFileInfo)
        {
            try
            {
                string file = GetFileName(rawFileName);

                // Need to reduce memory footprint from Dokan to .Net !!
                // http://code.google.com/p/dokan/issues/detail?id=174
                return(operations.ReadFileNative(file, rawBuffer, rawBufferLength, ref rawReadLength, rawOffset, ConvertFileInfo(ref rawFileInfo)));
            }
            catch (Exception ex)
            {
                Log.ErrorException("ReadFileProxy threw: ", ex);
                return(-1);
            }
        }