kernel32 Questions

2

How can you capture a DLL's stdout and/or stderr in Python on Windows? For example, this prints "hello" to stderr, but it should be possible to capture the "hello" as a string i...
Octave asked 22/2 at 1:3

9

I have installed VS2013 and VS2015 on Windows 7. I have an existing C++ Dll project that was building fine but now all of a sudden it wont build using VS2015 and gives me the error: LINK : fatal ...
Scrutineer asked 15/9, 2016 at 15:13

2

Solved

In my file transfer application (WinSCP), I use SetThreadExecutionState(ES_SYSTEM_REQUIRED) to prevent the system from going into sleep mode while a file transfer is in progress. But this does not ...
Chaille asked 30/5, 2022 at 15:17

3

Solved

I'm running the following snippet of code in my user-mode process that starts up when a Windows user account logs in to the workstation. Or, in other words, its path is placed in the HKEY_LOCAL_MAC...
Ming asked 1/7, 2015 at 1:25

1

Solved

I am trying to use the GetConsoleScreenBufferInfo(HANDLE, PCONSOLE_SCREEN_BUFFER_INFO) function from the Windows API using Perl 6 and (of course) NativeCall. I think I have set up the CONSOLE_SCR...
Amar asked 21/8, 2019 at 21:20

5

I'm trying to get an understandable "Process Name" for Windows 10 apps. Currently, all of them use ApplicationFrameHost, so I thought I could use either the ModelId or the PackageName, but it seems...
Nefertiti asked 14/8, 2015 at 3:0

1

This is the first time I try to hook windows API. My goal is to monitor all files that a process is going to create/open/read/write. In order to be the most verbose possible, I decided to hook the...
Name asked 15/11, 2013 at 8:53

3

Solved

I'm trying to call DeviceIoControl(IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS) API, as shown here, but I need it to first "tell me" how much memory it needs (unlike the code I linked to.) So I call it a...
Dinger asked 25/10, 2015 at 7:14

2

Solved

On Windows the declared function RtlMoveMemory provides a way to copy a block of bytes from one address to another: Private Declare PtrSafe Sub RtlMoveMemory Lib "kernel32" ( _ ByVal dest As Long...
Tanguy asked 18/8, 2017 at 12:0

6

Solved

Is there a way to call CreateProcess such that killing the parent process automatically kills the child process? Perhaps using Create Process Flags? Edit The solution is to create a job object, p...
Skantze asked 6/6, 2011 at 23:13

2

Solved

This error: jmeter log, appears everytime I run a testscript in Jmeter. But everything works... It is just this error that appears everytime in log after the actual script had run. Can I ...
Pileous asked 22/7, 2015 at 12:19

2

Solved

I need to set windows clock in my Asp.net website (Written in C#) I found a solution in stackoverflow at: How do I set the Windows system clock to the correct local time using C#? But when I use...
Kolnos asked 5/8, 2015 at 18:5

5

Solved

So I am trying to compile legacy app from 32 bit to 64 bit.. I re-compiled all of the libs it used and made it look into WIN SDK6.0A x64 bit for libs.. I am using: Visual Studio Professional Edi...
Lucilelucilia asked 30/6, 2010 at 17:21

1

I am writing some kernel side code for Windows7 to access shared memory created in user mode, as suggested here. The shared memory is created in user space with name: "MySharedMem" Opening the ...
Filament asked 15/9, 2015 at 21:25

0

I'm trying to measure the execution time of processes within C#. This is the code I'm using to do this: private static double TimeProcess(string name, string workingDirectory, string arguments) { ...
Irrefragable asked 31/5, 2015 at 10:9

1

Solved

I have the following code: Public Class SetSystemTime Structure SYSTEMTIME Public wYear As Short Public wMonth As Short Public wDayOfWeek As Short Public wDay As Short Public wHour As Short ...
Dressingdown asked 7/8, 2014 at 9:10

1

Solved

I'm analyzing various modules loaded by the process. Unfortunately I'm not able to create the kernel32.dll memory snapshot although the function works properly with other modules (e.g. ntddl.dll). ...
Odontoblast asked 30/11, 2013 at 17:30

2

Solved

I'm loading a MFC dll with dependencies (let's say I'm loading D.dll, which depends on C.dll, B.dll and A.dll) in C#. Here's my code: [DllImport( "kernel32.dll", CharSet = CharSet.Auto, SetLastErr...
Mousetrap asked 15/5, 2013 at 12:47

4

Solved

I need to rename my computer via .net application. I have tried this code: public static bool SetMachineName(string newName) { MessageBox.Show(String.Format("Setting Machine Name to '{0}'...", ne...
Knife asked 4/10, 2011 at 10:44

2

Solved

I try to read all commited pages of a process (Win7-64). On most pages it works but it fails for a few pages. I cannot explain why. Here is my test programme (compiled x32, tested in Win7-64): #in...
Ineffective asked 25/8, 2012 at 13:20

3

I am calling CopyFileEx from a C# application with an anonymous delegate being passed into the LPPROGRESS_ROUTINE parameter in order to get notifications on the file copy progress. My question is,...
Fredra asked 28/3, 2011 at 21:3

1

Solved

I am trying to use the following code to get the MBR from PhysicalDrive0: private static byte[] ReadMbr(string lpFileName) { byte[] mbr = new byte[512]; using (SafeFileHandle drive = CreateFile...
Singularity asked 26/11, 2010 at 19:24

1

Solved

I have one windows application built using C# and .net framework 2.0 and its installed on Windows Server 2003. I have tested application on my machine and it works perfectly on my machine. Only di...
Grooved asked 7/10, 2010 at 11:24

4

Solved

For some reason, whenever my C# .NET 2.0 application makes a call to GetProcAddress it always returns zero. public class MyClass { internal static class UnsafeNativeMethods { [DllImport("kernel...
Cirillo asked 20/9, 2010 at 18:24

1

Solved

I need some "light" to get a solution. Probably there are tons of things that cause this problem, but maybe somebody could help me. Scenario: a Windows server running 24/7 a PostgreSQL database an...
Molotov asked 14/6, 2010 at 19:42

© 2022 - 2024 — McMap. All rights reserved.