Anything related to MS Windows Kernel API (part of Windows API), residing in the `kernel32.dll` library. This library provides basic kernel services to user code, e.g. copying or locking a file, creating a mutex or a process, allocating memory, etc. This library is used by both 32-bit and 64-bit Windows, despite the name.
Questions tagged [kernel32]
307 questions
-1
votes
1 answer
error lnk1104 cannot open file 'kernel32.lib'
I'm using Visual Studio 2013 and Windows7 64bit.
When I try to build a simple cpp-project I get this error:
error lnk1104 cannot open file 'kernel32.lib'

Netanel Stern
- 149
- 3
- 16
-1
votes
1 answer
The address of struct PEB_LDR_DATA
Is there a struct PEB_LDR_DATA in the PEB of every process? What is the offset address of this struct in PEB? How can I find the list of loaded modules(such as kernel32.dll) from the base address of this struct?
Thanks!

Richard D.
- 37
- 4
-1
votes
2 answers
PInvoke ReadFile kernel32: Attempted to read or write protected memory. This is often an indication that other memory is corrupt
I'm trying to make kernel32's ReadFile work since native c# alternatives are slow as...
The following code was working a couple of times, then suddenly only gives "Attempted to read or write protected memory. This is often an indication that other…

CeeRo
- 1,142
- 3
- 12
- 21
-1
votes
1 answer
Combine FindFirstFile with GetFileSize / GetFileSizeEx to increase performance (kernel32)
I'm using FindFirstFile and FindNextFile (kernel32) to get folders and files (c# Pinvoke).
System.IO is too slow and does not support path over 250 chars.
Is it possible to use the handle - in any way - returned by FindNextFile to get the byte…

DerAbt
- 337
- 1
- 5
- 14
-1
votes
2 answers
kernel32.lib accidentally deleted - VS 2012 Fix
I recently installed VS2012 on my home laptop to write some software for fun in my spare time. Here's the order in which the mishap happened:
Accidentally installed VS2012 for Windows 8 Apps. Realized that I actually wanted the Windows Desktop…

TonyRo
- 207
- 1
- 5
- 13
-2
votes
2 answers
cannot find pinvoke dll 'kernel32'
i want to use ini file in my program using windows CE device.
and i got the exception "cannot find pinvoke dll 'kernel32'"
what should I do to solve this? please help me!
string Path = "c:\\Settings.ini";
[DllImport("kernel32")]
…

남윤환
- 1
- 1
-3
votes
1 answer
Hooking a kernel32 function with EasyHook
To hook a kernel function with EasyHook, do you need your own DLL that you made to be injected?

The Empire Strikes Back
- 149
- 1
- 13