Hi,
I want to know if there is an Entry point for kernel32.dll , that is related to any processor data (ID , Serial , etc ... )
and I tried to Google it but I didn't find good results .
Note: I already know WMI , but I need something related to Kernel !
Would somebody please tell me whats wrong with this code
I am just calling a Sleep function from the kernel32.dll
What's wrong?
I am using Visual Studio 2008.
Any help would be grateful.
Thank you very much.
__asm
{
mov eax, 77e2ef66h
push 9999
call eax
}
I am working with a legacy file format.
The file is created using unmanaged C++ that utilizes the WinBase.h CreateFile() & WriteFile() functions (found in the kernel32.dll).
I have been using P/Invoke interop to access these native functions like so:
[DllImport("kernel32.dll")]
public static extern bool WriteFile(
IntPtr…
I get this error when trying to run a program on a Windows computer:
Because it's a Dutch Windows version it is in Dutch, but in English it would be something like "Procedure entry point EncodePointer could not be located in kernel32.dll".
I've been looking for a solution on the net and I think it has something to do with SP's of Windows.…
Hello.
I'm working on an NSIS installer, and trying to check if a certain application is running before uninstalling. So, I use kernel32::CreateMutexA call. Here is the chunk:
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "cmd.exe") i .r1 ?e'
Pop $R0
StrCmp $R0 0 +3
MessageBox MB_USERICON "The application is already running."
Abort
…
I Had VS2010 installed but found that intellisense wasn't working. I looked on the web and found that I wasn't the only one who had that issue. So, I installed VS2008 and everything was fine. Then I decided to clean up my computer and removed VS2010 and immediately started getting this error on my programs (new and old). Even a simple…
If a thread sets a shutdown hook using
Runtime.getRuntime().addShutdownHook();
calls via jna the method:
kernel32.CreateToolhelp32Snapshot (0x00000002, 0)
it crashes the VM.
If I call the same method in the
WindowListener.windowClosing()
hook, the call does not crashes the VM.
Any idea why?
I can post part of the VM crash…
I'm trying to use kernel32.dll's lstrcpy to get a string from a pointer in C#, but it isn't working. lstrlenA IS working, it gives me the length of the string, so I'm hitting the kernel32.dll at least. lstrcpy is working in the VB6 app I'm converting, so I know it CAN work, but I don't have a clue why it isn't here.
The string s never…
Please don't get scared but the following code, if you are familiar with ctypes or C it should be easy to read.
I have been trying to get my ReadProcessMemory() and WriteProcessMemory() functions to be working for so long and have tried almost every possibility but the right one.
It launches the target program, returns its PID and…
Hi,
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 and others server applications (for processing tasks on database, etc...). There are differents servers scenarios (~30), with…
I am trying to set Thread Affinity using SetThreadAffinityMask function imported from kernel32.dll in C # code of mine.
This is how I import SetThreadAffinityMask function from "kernel32.dll" in my C# .net code
[DllImport("kernel32.dll")]
static extern IntPtr SetThreadAffinityMask(IntPtr hThread, IntPtr…
I'm trying to code for a Point Of Sale system which allows for a "Cash Drawer" attachment. Code is provided in the manual for opening the cash drawer (in C++ using IOCTL). Since I am coding in C# .NET, is it possible to perform something similar from within C# or will I have to write some unmanaged code?
…
I want to send data to a printer on LPT1 and i trying exactly this but my CreateFile returns -1 (The system cannot find the file specified.Exception from HRESULT:0x80070002).
How to open LPT1 port and send data to?
I am trying this on XP and after that in win7 64 bit because from what i've read working…
hello all,I'am trying to work-out the LdrLoadDll function and am having no luck with that..i also googled for some examples there is no much documentation or correct example about this.I know what it exactly does..Please check the code below.
//declaration function pointer for LdrLoadDll
typedef…
ZWOpenFile and NtOpenFile are both the functions of nt dll..ZwOpenFile is implemented as same as NtopenFile..but I dont understand why ZWopenFile is included in nt dll function.Can anyone please explain me the difference?
I'm using Visual Studio 2008 Team Suite and I'm unable to run tests and display the Test/Windows/Test Result Window.
The result is a dialog box with the following content : "Exception has been thrown by the target of an invocation".
Team Explorer has been installed after Visual Studio 2008 SP1. So…
I have tried installing age of empires 2 using PlayOnLinux, the installation appeared to go fine but when I try and open the game it says there is a serious fault.
The error report is below, unfortunately this doesn't mean alot to me, I was wondering if you could help, a) By…
I'm using chromebook, dual booting xfce(ubuntu) and cr os. The ebook I bought on amazon is not supported on kindle cloud reader. (Under xfce)I downloaded wine and tried installing kindle for pc under wine, and after couples of times of trials, it always said installation…
Hi, I'm having a hard time getting SetSystemTime working in my C# code. SetSystemtime is a kernel32.dll function. I'm using P/invoke (interop) to call it. SetSystemtime returns false and the error is "Invalid Parameter". I've posted the code below. I stress that…
We have developed a custom Windows service in C# as part of a large Enterprise application. Our QA department tests multiple versions of this service.
The QA lab has several (over 20) copies of this service installed on one Windows 2003 test box. Each copy is in…
I have an application build with VS2008 SP1a (9.0.30729.4148) on Windows 7 x64 that does not want to start under XP.
The message is The application failed to initialize properly (0x80000003). Click on OK to terminate the application.. I checked with depends.exe…
Hi ,
I built an application in c# vs2005 .net .
Everything works fine when i run the application in win 32 bit, But
when running the application in win 64 it crashes while trying to call
the pinvoke interlockedexchange(which is within the kernel32.dll)…
I am trying to make my FASM application add itself to the system start up by adding an entry in "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
I am using the following API's:
RegOpenKeyExA
RegSetValueExA
RegCloseKey
In advapi32.dll
When my code is…