本文整理汇总了C#中DWORD类的典型用法代码示例。如果您正苦于以下问题:C# DWORD类的具体用法?C# DWORD怎么用?C# DWORD使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DWORD类属于命名空间,在下文中一共展示了DWORD类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegGetKeySecurity
public static extern LONG RegGetKeySecurity(
HKEY hKey, // handle to key
SECURITY_INFORMATION SecurityInformation, // request
PSECURITY_DESCRIPTOR pSecurityDescriptor, // SD
ref DWORD lpcbSecurityDescriptor // buffer size
);
示例2: DwmGetWindowAttribute
unsafe public static extern HRESULT DwmGetWindowAttribute(HWND hwnd, DwmWindowAttribute dwAttribute, void* pvAttribute, DWORD cbAttribute);
示例3: EnumDisplaySettingsEx
public static extern BOOL EnumDisplaySettingsEx([MarshalAs(UnmanagedType.LPTStr)] LPCTSTR lpszDeviceName, DWORD iModeNum,
[In, Out] DeviceMode lpDevMode, DWORD dwFlags);
示例4: SHGetFileInfo
public static extern DWORD_PTR SHGetFileInfo(LPCTSTR pszPath, DWORD dwFileAttributes, ref SHFILEINFO psfi, UINT cbFileInfo, ShGetFileIconFlags uFlags);
示例5: RegGetValue
internal static extern int RegGetValue(
HKEY hkey,
[MarshalAs(UnmanagedType.LPTStr)] LPCTSTR lpSubKey,
[MarshalAs(UnmanagedType.LPTStr)] LPCTSTR lpValue,
DWORD dwFlags,
out DWORD pdwType,
StringBuilder pvData,
ref DWORD pcbData);
示例6: GetFinalPathNameByHandle
public static string GetFinalPathNameByHandle(SafeFileHandle safeHandle, DWORD dwFlags)
{
Contract.Requires(safeHandle != null);
var rawHandle = safeHandle.DangerousGetHandle();
if (safeHandle.IsClosed || safeHandle.IsInvalid) throw new ArgumentException();
var pathLength = GetFinalPathNameByHandle(rawHandle, null, 0, dwFlags);
NativeMethods.CheckWin32(pathLength > 0);
var pathBuilder = new StringBuilder((int)pathLength);
pathBuilder.Length = (int)pathLength;
NativeMethods.CheckWin32(GetFinalPathNameByHandle(rawHandle, pathBuilder, pathLength, dwFlags) > 0);
return pathBuilder.ToString();
}
示例7: AdjustTokenPrivileges
public static extern BOOL AdjustTokenPrivileges(HANDLE TokenHandle,
[MarshalAs(UnmanagedType.Bool)] BOOL DisableAllPrivileges, ref TOKEN_PRIVILEGES NewState, DWORD BufferLength,
IntPtr PreviousState = default(IntPtr), IntPtr ReturnLength = default(IntPtr));
示例8: MapViewOfFile
public static extern LPVOID MapViewOfFile(
HANDLE hFileMappingObject, DWORD dwDesiredAccess, uint dwFileOffsetHigh,
uint dwFileOffsetLow, IntPtr dwNumBytesToMap);
示例9: OpenFileMapping
public static extern HANDLE OpenFileMapping(DWORD dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, string lpName);
示例10: GetQueuedCompletionStatus
public static extern unsafe Boolean GetQueuedCompletionStatus(HANDLE CompletionPort, out DWORD lpNumberOfBytes, out ULONG_PTR lpCompletionKey, out OVERLAPPED* lpOverlapped, DWORD dwMilliseconds);
示例11: VirtualFree
internal static extern unsafe Boolean VirtualFree([In] void* lpAddress, [In] SIZE_T dwSize, DWORD dwFreeType);
示例12: GetHelpContext
virtual HRESULT STDMETHODCALLTYPE GetHelpContext(
/* [out] */ DWORD *pdwHelpContext) = 0;
示例13: AddErrorRecord
virtual /* [local] */ HRESULT STDMETHODCALLTYPE AddErrorRecord(
/* [in] */ ERRORINFO *pErrorInfo,
/* [in] */ DWORD dwLookupID,
/* [in] */ DISPPARAMS *pdispparams,
/* [in] */ IUnknown *punkCustomError,
/* [in] */ DWORD dwDynamicErrorID) = 0;
示例14: GetKernelObjectSecurity
public static extern BOOL GetKernelObjectSecurity(
HANDLE Handle, // handle to object
SECURITY_INFORMATION RequestedInformation, // request
PSECURITY_DESCRIPTOR pSecurityDescriptor, // SD
DWORD nLength, // size of SD
out DWORD lpnLengthNeeded // required size of buffer
);
示例15: WaitForDebugEventEx
public static extern BOOL WaitForDebugEventEx(out DEBUG_EVENT @event, DWORD milliseconds);