C# rapi dll 引用方式,pda数据传输用
internal static extern int CeCloseHandle(IntPtr hObject); internal static extern int CeCopyFile(string lpExistingFileName, string lpNewFileName, int bFailIfExists); internal static extern int CeCreateDirectory(string lpPathName, uint lpSecurityAttributes); internal static extern IntPtr CeCreateFile(string lpFileName, uint dwDesiredAccess, int dwShareMode, int lpSecurityAttributes, int dwCreationDisposition, int dwFlagsAndAttributes, int hTemplateFile); internal static extern int CeCreateProcess(string pszImageName, IntPtr pszCmdLine, IntPtr psaProcess, IntPtr psaThread, int fInheritHandles, int fdwCreate, IntPtr pvEnvironment, IntPtr pszCurDir, IntPtr psiStartInfo, out PROCESS_INFORMATION pi); internal static extern int CeCreateProcess(string pszImageName, string pszCmdLine, IntPtr psaProcess, IntPtr psaThread, int fInheritHandles, int fdwCreate, IntPtr pvEnvironment, IntPtr pszCurDir, IntPtr psiStartInfo, out PROCESS_INFORMATION pi); internal static extern int CeDeleteFile(string lpFileName); internal static extern int CeFindClose(IntPtr hFindFile); internal static extern IntPtr CeFindFirstFile(string lpFileName, byte[] lpFindFileData); internal static extern int CeFindNextFile(IntPtr hFindFile, byte[] lpFindFileData); internal static extern int CeGetDesktopDeviceCaps(int nIndex); internal static extern uint CeGetFileAttributes(string lpFileName); internal static extern uint CeGetFileSize(IntPtr hFile, ref uint lpFileSizeHigh); internal static extern int CeGetFileTime(IntPtr hFile, ref long lpCreationTime, ref long lpLastAccessTime, ref long lpLastWriteTime); internal static extern int CeGetLastError(); internal static extern int CeGetSpecialFolderPath(int nFolder, uint nBufferLength, StringBuilder lpBuffer); internal static extern int CeGetStoreInformation(out STORE_INFORMATION lpsi); internal static extern int CeGetSystemInfo(out SYSTEM_INFO pSI); internal static extern bool CeGetSystemPowerStatusEx(out SYSTEM_POWER_STATUS_EX pStatus, bool fUpdate); internal static extern bool CeGetVersionEx(out OSVERSIONINFO lpVersionInformation); internal static extern void CeGlobalMemoryStatus(out MEMORYSTATUS msce); internal static extern int CeMoveFile(string lpExistingFileName, string lpNewFileName); internal static extern int CeRapiGetError(); internal static extern int CeRapiInit(); internal static extern int CeRapiInitEx( ref RAPIINIT pRapiInit); internal static extern int CeRapiInvoke(string pDllPath, string pFunctionName, uint cbInput, IntPtr pInput, out uint pcbOutput, out IntPtr ppOutput, IntPtr ppIRAPIStream, uint dwReserved); internal static extern int CeRapiUninit(); internal static extern int CeReadFile(IntPtr hFile, byte[] lpBuffer, int nNumberOfbytesToRead, ref int lpNumberOfbytesRead, int lpOverlapped); internal static extern int CeRemoveDirectory(string lpPathName); internal static extern int CeSetEndOfFile(int hFile); internal static extern int CeSetFileAttributes(string lpFileName, uint dwFileAttributes); internal static extern int CeSetFileTime(IntPtr hFile, ref long lpCreationTime, ref long lpLastAccessTime, ref long lpLastWriteTime); internal static extern int CeSHCreateShortcut(string pShortcutName, string pTarget); internal static extern int CeSHGetShortcutTarget(string lpszShortcut, string lpszTarget, int cbMax); internal static extern int CeWriteFile(IntPtr hFile, byte[] lpBuffer, int nNumberOfbytesToWrite, ref int lpNumberOfbytesWritten, int lpOverlapped);
页:
[1]