부모글 보이기/감추기 AD BLOCK 해제 요청 이 글에는 광고가 많이 들어가 있지 않습니다. adblock을 해제하셔도 글을 읽는데 그다지 부담이 없으니 해제를 부탁드립니다. EmptyWorkingSet Win32 API를 사용하는 C# 예제 그냥... 아래의 질문에 대한 답으로 작성한 간단한 예제입니다. [c#] EmptyWorkingSet 사용 중 에러 ; http://social.msdn.microsoft.com/Forums/ko-KR/6dff23f4-ece9-43a4-8f6b-3528cca5b4c4/c-emptyworkingset-?forum=dotnetko 참고로, 아래의 코드는 자신의 프로세스에 대한 메모리를 조정하는 것이므로 관리자 권한으로 승격된 프로세스가 아니어도 잘 동작합니다. using System; using System.Diagnostics; using System.Runtime.InteropServices; namespace ConsoleApplication1 { class Program { [DllImport("psapi.dll")] public static extern int EmptyWorkingSet(IntPtr hProcess); static void Main(string[] args) { IntPtr processHandle = Process.GetCurrentProcess().Handle; Console.WriteLine("WorkingSet Mem Size: " + Process.GetCurrentProcess().WorkingSet64); Console.ReadLine(); int result = EmptyWorkingSet(processHandle); Console.WriteLine("Result: " + ((result != 0) ? "Success" : "Failed")); Console.WriteLine("WorkingSet Mem Size: " + Process.GetCurrentProcess().WorkingSet64); } } } 예제 코드는 첨부 파일로 넣어두었습니다. [이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.] [다음 글] 오류 유형: 237. Windows Media Player cannot access the file. The file might be in use, you might not have access to the computer where the file is stored, or your proxy settings might not be correct.[이전 글] Windows: 99. INetCache 폴더가 다르게 보이는 이유 [최초 등록일: 8/13/2014] [최종 수정일: 8/14/2014] 이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다. by SeongTae Jeong, mailto:techsharer at outlook.com 비밀번호 댓글 작성자 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 15 ... NoWriterDateCnt.TitleFile(s) 13616정성태5/3/20248655닷넷: 2256. ASP.NET Core 웹 사이트의 HTTP/HTTPS + Dual mode Socket (IPv4/IPv6) 지원 방법113615정성태5/3/20249545닷넷: 2255. C# 배열을 Numpy ndarray 배열과 상호 변환13614정성태5/2/20249232닷넷: 2254. C# - COM 인터페이스의 상속 시 중복으로 메서드를 선언13613정성태5/1/20248943닷넷: 2253. C# - Video Capture 장치(Camera) 열거 및 지원 포맷 조회113612정성태4/30/20249257오류 유형: 902. Visual Studio - error MSB3021: Unable to copy file13611정성태4/29/20248595닷넷: 2252. C# - GUID 타입 전용의 UnmanagedType.LPStruct - 두 번째 이야기113610정성태4/28/20249005닷넷: 2251. C# - 제네릭 인자를 가진 타입을 생성하는 방법 - 두 번째 이야기13609정성태4/27/20249199닷넷: 2250. PInvoke 호출 시 참조 타입(class)을 마샬링하는 [IN], [OUT] 특성113608정성태4/26/20249526닷넷: 2249. C# - 부모의 필드/프로퍼티에 대해 서로 다른 자식 클래스 간에 Reflection 접근이 동작할까요?113607정성태4/25/20249536닷넷: 2248. C# - 인터페이스 타입의 다중 포인터를 인자로 갖는 C/C++ 함수 연동13606정성태4/24/20249389닷넷: 2247. C# - tensorflow 연동 (MNIST 예제)113605정성태4/23/202410734닷넷: 2246. C# - Python.NET을 이용한 파이썬 소스코드 연동113604정성태4/22/20248443오류 유형: 901. Visual Studio - Unable to set the next statement. Set next statement cannot be used in '[Exception]' call stack frames.13603정성태4/21/20249696닷넷: 2245. C# - IronPython을 이용한 파이썬 소스코드 연동113602정성태4/20/20248986닷넷: 2244. C# - PCM 오디오 데이터를 연속(Streaming) 재생 (Windows Multimedia)113601정성태4/19/20249093닷넷: 2243. C# - PCM 사운드 재생(NAudio)113600정성태4/18/20249715닷넷: 2242. C# - 관리 스레드와 비관리 스레드13599정성태4/17/20249543닷넷: 2241. C# - WAV 파일의 PCM 사운드 재생(Windows Multimedia)113598정성태4/16/202410762닷넷: 2240. C# - WAV 파일 포맷 + LIST 헤더213597정성태4/15/20249133닷넷: 2239. C# - WAV 파일의 PCM 데이터 생성 및 출력113596정성태4/14/20249769닷넷: 2238. C# - WAV 기본 파일 포맷113595정성태4/13/20249911닷넷: 2237. C# - Audio 장치 열기 (Windows Multimedia, NAudio)113594정성태4/12/20249790닷넷: 2236. C# - Audio 장치 열람 (Windows Multimedia, NAudio)113593정성태4/8/20249007닷넷: 2235. MSBuild - AccelerateBuildsInVisualStudio 옵션13592정성태4/2/202411328C/C++: 165. CLion으로 만든 Rust Win32 DLL을 C#과 연동 [1]13591정성태4/2/20249459닷넷: 2234. C# - WPF 응용 프로그램에 Blazor App 통합1 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 15 ...