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