From dce7e85fb66b00f02c690fd320d63faff840bf88 Mon Sep 17 00:00:00 2001 From: David Hall Date: Wed, 6 Jun 2018 10:01:08 -0600 Subject: [PATCH] Removed Interlocked... functions as they are only referenced by Kernel32 --- PInvoke/Kernel32/InterlockedApi.cs | 83 -------------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 PInvoke/Kernel32/InterlockedApi.cs diff --git a/PInvoke/Kernel32/InterlockedApi.cs b/PInvoke/Kernel32/InterlockedApi.cs deleted file mode 100644 index d2bad232..00000000 --- a/PInvoke/Kernel32/InterlockedApi.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace Vanara.PInvoke -{ - public static partial class Kernel32 - { - /// Initializes the head of a singly linked list. - /// - /// A pointer to an SLIST_HEADER structure that represents the head of a singly linked list. This structure is for system use only. - /// - /// This function does not return a value. - // void WINAPI InitializeSListHead( _Inout_ PSLIST_HEADER ListHead); https://msdn.microsoft.com/en-us/library/windows/desktop/ms683482(v=vs.85).aspx - [DllImport(Lib.Kernel32, SetLastError = false, ExactSpelling = true)] - [PInvokeData("WinBase.h", MSDNShortId = "ms683482")] - public static extern void InitializeSListHead(IntPtr ListHead); - - /// Removes all items from a singly linked list. Access to the list is synchronized on a multiprocessor system. - /// - /// Pointer to an SLIST_HEADER structure that represents the head of the singly linked list. This structure is for system use only. - /// - /// The return value is a pointer to the items removed from the list. If the list is empty, the return value is NULL. - // PSLIST_ENTRY WINAPI InterlockedFlushSList( _Inout_ PSLIST_HEADER ListHead); https://msdn.microsoft.com/en-us/library/windows/desktop/ms683612(v=vs.85).aspx - [DllImport(Lib.Kernel32, SetLastError = false, ExactSpelling = true)] - [PInvokeData("WinBase.h", MSDNShortId = "ms683612")] - public static extern IntPtr InterlockedFlushSList(IntPtr ListHead); - - /// Removes an item from the front of a singly linked list. Access to the list is synchronized on a multiprocessor system. - /// Pointer to an SLIST_HEADER structure that represents the head of a singly linked list. - /// The return value is a pointer to the item removed from the list. If the list is empty, the return value is NULL. - // PSLIST_ENTRY WINAPI InterlockedPopEntrySList( _Inout_ PSLIST_HEADER ListHead); https://msdn.microsoft.com/en-us/library/windows/desktop/ms683648(v=vs.85).aspx - [DllImport(Lib.Kernel32, SetLastError = false, ExactSpelling = true)] - [PInvokeData("WinBase.h", MSDNShortId = "ms683648")] - public static extern IntPtr InterlockedPopEntrySList(IntPtr ListHead); - - /// Inserts an item at the front of a singly linked list. Access to the list is synchronized on a multiprocessor system. - /// Pointer to an SLIST_HEADER structure that represents the head of a singly linked list. - /// Pointer to an SLIST_ENTRY structure that represents an item in a singly linked list. - /// The return value is the previous first item in the list. If the list was previously empty, the return value is NULL. - // PSLIST_ENTRY WINAPI InterlockedPushEntrySList( _Inout_ PSLIST_HEADER ListHead, _Inout_ PSLIST_ENTRY ListEntry); https://msdn.microsoft.com/en-us/library/windows/desktop/ms684020(v=vs.85).aspx - [DllImport(Lib.Kernel32, SetLastError = false, ExactSpelling = true)] - [PInvokeData("WinBase.h", MSDNShortId = "ms684020")] - public static extern IntPtr InterlockedPushEntrySList(IntPtr ListHead, IntPtr ListEntry); - - /// - /// Inserts a singly-linked list at the front of another singly linked list. Access to the lists is synchronized on a multiprocessor system. This version - /// of the method does not use the __fastcall calling convention. - /// - /// - /// Pointer to an SLIST_HEADER structure that represents the head of a singly linked list. The list specified by the List and ListEnd parameters - /// is inserted at the front of this list. - /// - /// Pointer to an SLIST_ENTRY structure that represents the first item in the list to be inserted. - /// Pointer to an SLIST_ENTRY structure that represents the last item in the list to be inserted. - /// The number of items in the list to be inserted. - /// - /// The return value is the previous first item in the list specified by the ListHead parameter. If the list was previously empty, the return value is NULL. - /// - // PSLIST_ENTRY WINAPI InterlockedPushListSListEx( _Inout_ PSLIST_HEADER ListHead, _Inout_ PSLIST_ENTRY List, _Inout_ PSLIST_ENTRY ListEnd, _In_ ULONG - // Count); https://msdn.microsoft.com/en-us/library/windows/desktop/hh972673(v=vs.85).aspx - [DllImport(Lib.Kernel32, SetLastError = false, ExactSpelling = true)] - [PInvokeData("Interlockedapi.h", MSDNShortId = "hh972673")] - public static extern IntPtr InterlockedPushListSListEx(IntPtr ListHead, IntPtr List, IntPtr ListEnd, uint Count); - - /// Retrieves the number of entries in the specified singly linked list. - /// - /// A pointer to an SLIST_HEADER structure that represents the head of a singly linked list. This structure is for system use only. - /// The list must be previously initialized with the InitializeSListHead function. - /// - /// The function returns the number of entries in the list, up to a maximum value of 65535. - // USHORT WINAPI QueryDepthSList( _In_ PSLIST_HEADER ListHead);// https://msdn.microsoft.com/en-us/library/windows/desktop/ms684916(v=vs.85).aspx - [DllImport(Lib.Kernel32, SetLastError = false, ExactSpelling = true)] - [PInvokeData("WinBase.h", MSDNShortId = "ms684916")] - public static extern ushort QueryDepthSList(IntPtr ListHead); - - /*[StructLayout(LayoutKind.Sequential)] - public struct SLIST_HEADER - { - private IntPtr Alignment; - private IntPtr Next; - }*/ - } -} \ No newline at end of file