GMap.NET.WindowsMobile/GMap.NET.Internals/Native.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace GMap.NET.Internals
{
using System;
using System.Runtime.InteropServices;
public class Native
{
static readonly IntPtr INVALID_HANDLE_VALUE = (IntPtr) (-1);
// The CharSet must match the CharSet of the corresponding PInvoke signature
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]
struct WIN32_FIND_DATA
{
public int dwFileAttributes;
public FILETIME ftCreationTime;
public FILETIME ftLastAccessTime;
public FILETIME ftLastWriteTime;
public int nFileSizeHigh;
public int nFileSizeLow;
public int dwOID;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=260)]
public string cFileName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=14)]
public string cAlternateFileName;
}
[StructLayout(LayoutKind.Sequential)]
struct FILETIME
{
public int dwLowDateTime;
public int dwHighDateTime;
};
[DllImport("note_prj", EntryPoint="FindFirstFlashCard")]
extern static IntPtr FindFirstFlashCard(ref WIN32_FIND_DATA findData);
[DllImport("note_prj", EntryPoint="FindNextFlashCard")]
[return: MarshalAs(UnmanagedType.Bool)]
extern static bool FindNextFlashCard(IntPtr hFlashCard, ref WIN32_FIND_DATA findData);
[DllImport("coredll")]
static extern bool FindClose(IntPtr hFindFile);
public static string GetRemovableStorageDirectory()
{
string removableStorageDirectory = null;
IntPtr handle = IntPtr.Zero;
try
{
WIN32_FIND_DATA findData = new WIN32_FIND_DATA();
handle = FindFirstFlashCard(ref findData);
if(handle != INVALID_HANDLE_VALUE)
{
do
{
if(!string.IsNullOrEmpty(findData.cFileName))
{
后面还有 53 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
