Hi
I know the prototype of ZwAllocateVirtualMemory :
NTSYSAPI NTSTATUS NTAPI
ZwAllocateVirtualMemory(
IN HANDLE ProcessHandle,
IN OUT PVOID *BaseAddress,
IN ULONG ZeroBits,
IN OUT PULONG RegionSize,
IN ULONG AllocationType,
IN ULONG Protect
);
but when i use it , an error occured in win2000 ddk at linking :
: error LNK2001: unresolved external symbol “__declspec(dllimport) long
__stdcall ZwAllocateVirtualMemory(void *,void * *,unsigned long,unsigned
long *,unsigned long,unsigned long)”
(_imp?ZwAllocateVirtualMemory@@YGJPAXPAPAXKPAKK
K@Z)
and i include ntoskrnl.lib in my driver.
and is returned pointer available for use or i must do more?
please help me.
Are you using .cpp file or .c file?
-Srin.
-----Original Message-----
From: Mohammad Tarhsaz [mailto:xxxxx@yahoo.com]
Sent: Friday, August 08, 2003 10:51 AM
To: Windows System Software Developers Interest List
Subject: [ntdev] Allocating Memory
Hi
I know the prototype of ZwAllocateVirtualMemory :
NTSYSAPI NTSTATUS NTAPI
ZwAllocateVirtualMemory(
IN HANDLE ProcessHandle,
IN OUT PVOID *BaseAddress,
IN ULONG ZeroBits,
IN OUT PULONG RegionSize,
IN ULONG AllocationType,
IN ULONG Protect
);
but when i use it , an error occured in win2000 ddk at linking :
: error LNK2001: unresolved external symbol “__declspec(dllimport)
long
__stdcall ZwAllocateVirtualMemory(void *,void * *,unsigned
long,unsigned
long *,unsigned long,unsigned long)”
(_imp?ZwAllocateVirtualMemory@@YGJPAXPAPAXKPAKK
K@Z)
and i include ntoskrnl.lib in my driver.
and is returned pointer available for use or i must do more?
please help me.
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@nai.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
I’m using cpp do you mean :
extern “C”
{
}
Hi
My problem still exist in allocating huge Memory
Mark Roddy told me
“You might consider allocating paged pool instead and locking down
areas of this allocation as needed.”
But how.
Thanks.