PageRenderTime 60ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/FreeTranslator/TextExtractors/Native/NativeMethods.cs

#
C# | 50 lines | 16 code | 5 blank | 29 comment | 0 complexity | 1817b1bb3aa9a11b256aedc8e2c78b73 MD5 | raw file
  1. #region Copyright (c) 2006-2008 Cellbi
  2. /*
  3. Cellbi Software Component Product
  4. Copyright (c) 2006-2008 Cellbi
  5. www.cellbi.com
  6. Redistribution and use in source and binary forms, with or without modification,
  7. are permitted provided that the following conditions are met:
  8. 1. Redistributions of source code must retain the above copyright notice,
  9. this list of conditions and the following disclaimer.
  10. 2. Redistributions in binary form must reproduce the above copyright notice,
  11. this list of conditions and the following disclaimer in the documentation
  12. and/or other materials provided with the distribution.
  13. 3. The names of the authors may not be used to endorse or promote products derived
  14. from this software without specific prior written permission.
  15. THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  16. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  17. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CELLBI
  18. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  19. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  20. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  21. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  22. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  23. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  24. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  25. */
  26. #endregion
  27. using System;
  28. using System.Runtime.InteropServices;
  29. namespace GetDocText.Native
  30. {
  31. internal class NativeMethods
  32. {
  33. private NativeMethods(){}
  34. const string Ole32Dll = "ole32.dll";
  35. [DllImport(Ole32Dll, CharSet = CharSet.Unicode)]
  36. public static extern int StgOpenStorage(string pwcsName, IStorage pstgPriority, int grfMode, IntPtr snbExclude, int reserved, out IStorage ppstgOpen);
  37. [DllImport(Ole32Dll, CharSet = CharSet.Unicode)]
  38. public static extern int StgIsStorageFile(string pwcsName);
  39. }
  40. }