Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit aa2bd78

Browse files
committedMay 11, 2025
Remove unused methods
1 parent cb0b47b commit aa2bd78

File tree

1 file changed

+0
-121
lines changed

1 file changed

+0
-121
lines changed
 

‎src/Files.App/Helpers/Win32/Win32PInvoke.Methods.cs

Lines changed: 0 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,6 @@ public static extern int RmGetList(
5656
ref uint lpdwRebootReasons
5757
);
5858

59-
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
60-
public static extern bool SetPropW(
61-
IntPtr hWnd,
62-
string lpString,
63-
IntPtr hData
64-
);
65-
6659
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
6760
public static extern IntPtr CreateEvent(
6861
IntPtr lpEventAttributes,
@@ -107,39 +100,12 @@ public static extern bool CloseHandle(
107100
IntPtr hObject
108101
);
109102

110-
[DllImport("api-ms-win-core-io-l1-1-1.dll")]
111-
public static extern bool GetOverlappedResult(
112-
IntPtr hFile,
113-
OVERLAPPED lpOverlapped,
114-
out int lpNumberOfBytesTransferred,
115-
bool bWait
116-
);
117-
118-
[DllImport("api-ms-win-core-io-l1-1-1.dll")]
119-
public static extern bool CancelIo(
120-
IntPtr hFile
121-
);
122-
123103
[DllImport("api-ms-win-core-io-l1-1-1.dll")]
124104
public static extern bool CancelIoEx(
125105
IntPtr hFile,
126106
IntPtr lpOverlapped
127107
);
128108

129-
[DllImport("api-ms-win-core-synch-l1-2-0.dll")]
130-
public static extern uint WaitForMultipleObjectsEx(
131-
uint nCount,
132-
IntPtr[] lpHandles,
133-
bool bWaitAll,
134-
uint dwMilliseconds,
135-
bool bAlertable
136-
);
137-
138-
[DllImport("api-ms-win-core-synch-l1-2-0.dll", SetLastError = true)]
139-
public static extern bool ResetEvent(
140-
IntPtr hEvent
141-
);
142-
143109
[DllImport("api-ms-win-core-synch-l1-2-0.dll", SetLastError = true)]
144110
public static extern uint WaitForSingleObjectEx(
145111
IntPtr hHandle,
@@ -207,16 +173,6 @@ public static extern bool DeviceIoControl(
207173
out uint lpBytesReturned,
208174
IntPtr lpOverlapped);
209175

210-
[DllImport("user32.dll")]
211-
public static extern int ToUnicode(
212-
uint virtualKeyCode,
213-
uint scanCode,
214-
byte[] keyboardState,
215-
[Out, MarshalAs(UnmanagedType.LPWStr, SizeConst = 64)] StringBuilder receivingBuffer,
216-
int bufferSize,
217-
uint flags
218-
);
219-
220176
[DllImport("user32.dll", CharSet = CharSet.Auto)]
221177
public static extern int ToUnicodeEx(
222178
uint virtualKeyCode,
@@ -245,11 +201,6 @@ public static extern uint MapVirtualKey(
245201
uint mapType
246202
);
247203

248-
[DllImport("user32.dll")]
249-
public static extern bool TranslateMessage(
250-
ref MSG lpMsg
251-
);
252-
253204
[DllImport("api-ms-win-core-file-fromapp-l1-1-0.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
254205
public static extern IntPtr CreateFileFromApp(
255206
string lpFileName,
@@ -274,14 +225,6 @@ public static extern bool SetFileAttributesFromApp(
274225
string lpFileName,
275226
FileAttributes dwFileAttributes);
276227

277-
[DllImport("api-ms-win-core-file-l1-2-1.dll", ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
278-
public static extern uint SetFilePointer(
279-
IntPtr hFile,
280-
long lDistanceToMove,
281-
IntPtr lpDistanceToMoveHigh,
282-
uint dwMoveMethod
283-
);
284-
285228
[DllImport("api-ms-win-core-file-l1-2-1.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
286229
public unsafe static extern bool ReadFile(
287230
IntPtr hFile,
@@ -332,14 +275,6 @@ public static extern bool GetFileInformationByHandleEx(
332275
uint dwBufferSize
333276
);
334277

335-
[DllImport("api-ms-win-core-file-l2-1-1.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
336-
public static extern bool GetFileInformationByHandleEx(
337-
IntPtr hFile,
338-
FILE_INFO_BY_HANDLE_CLASS infoClass,
339-
IntPtr dirInfo,
340-
uint dwBufferSize
341-
);
342-
343278
[DllImport("kernel32.dll", ExactSpelling = true, CharSet = CharSet.Auto, SetLastError = true)]
344279
public static extern IntPtr FindFirstStreamW(
345280
string lpFileName,
@@ -355,49 +290,6 @@ public static extern bool FindNextStreamW(
355290
[In, Out, MarshalAs(UnmanagedType.LPStruct)] WIN32_FIND_STREAM_DATA lpFindStreamData
356291
);
357292

358-
[DllImport("Shcore.dll", SetLastError = true)]
359-
public static extern int GetDpiForMonitor(
360-
IntPtr hmonitor,
361-
uint dpiType,
362-
out uint dpiX,
363-
out uint dpiY
364-
);
365-
366-
[DllImport("api-ms-win-core-processthreads-l1-1-0.dll", SetLastError = true, ExactSpelling = true)]
367-
[return: MarshalAs(UnmanagedType.Bool)]
368-
public static extern bool OpenProcessToken(
369-
[In] IntPtr ProcessHandle, TokenAccess DesiredAccess, out IntPtr TokenHandle);
370-
371-
[DllImport("api-ms-win-core-processthreads-l1-1-2.dll", SetLastError = true, ExactSpelling = true)]
372-
public static extern IntPtr GetCurrentProcess();
373-
374-
[DllImport("api-ms-win-security-base-l1-1-0.dll", SetLastError = true, ExactSpelling = true)]
375-
[return: MarshalAs(UnmanagedType.Bool)]
376-
public static extern bool GetTokenInformation(
377-
IntPtr hObject,
378-
TOKEN_INFORMATION_CLASS tokenInfoClass,
379-
IntPtr pTokenInfo,
380-
int tokenInfoLength,
381-
out int returnLength
382-
);
383-
384-
[DllImport("api-ms-win-security-base-l1-1-0.dll", ExactSpelling = true, SetLastError = true)]
385-
public static extern int GetLengthSid(
386-
IntPtr pSid
387-
);
388-
389-
[DllImport("crypt32.dll", SetLastError = true, CharSet = CharSet.Auto)]
390-
[return: MarshalAs(UnmanagedType.Bool)]
391-
public static extern bool CryptUnprotectData(
392-
in CRYPTOAPI_BLOB pDataIn,
393-
StringBuilder szDataDescr,
394-
in CRYPTOAPI_BLOB pOptionalEntropy,
395-
IntPtr pvReserved,
396-
IntPtr pPromptStruct,
397-
CryptProtectFlags dwFlags,
398-
out CRYPTOAPI_BLOB pDataOut
399-
);
400-
401293
[DllImport("api-ms-win-core-wow64-l1-1-1.dll", SetLastError = true)]
402294
public static extern bool IsWow64Process2(
403295
IntPtr process,
@@ -432,19 +324,6 @@ public static extern IntPtr FindFirstFileExFromApp(
432324
int dwAdditionalFlags
433325
);
434326

435-
[DllImport("api-ms-win-core-string-l1-1-0.dll", CharSet = CharSet.Unicode)]
436-
public static extern int CompareStringEx(
437-
string localeName,
438-
int flags,
439-
string str1,
440-
int count1,
441-
string str2,
442-
int count2,
443-
IntPtr versionInformation,
444-
IntPtr reserved,
445-
int param
446-
);
447-
448327
[LibraryImport("shell32.dll", EntryPoint = "#865", SetLastError = true)]
449328
[return: MarshalAs(UnmanagedType.Bool)]
450329
public static partial bool IsElevationRequired(

0 commit comments

Comments
 (0)
Please sign in to comment.