|
Heh!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
joined me in the derby???
|
|
|
|
|
It's all about the fish[^]!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have coded application to retrieve any running process's arguments and worked very well in Win32, but falied in 64 bit Windows(x64).
The approache is to use NtQueryInformationProcess to get PROCESS_BASIC_INFORMATION which has the data structure like:
typedef struct _PROCESS_BASIC_INFORMATION {
PVOID Reserved1;
PPEB PebBaseAddress;
PVOID Reserved2[2];
ULONG_PTR UniqueProcessId;
PVOID Reserved3;
} PROCESS_BASIC_INFORMATION;
and then use ReadProcessMemory() to get dwInfoBlockAddress in PEB2, like
struct _PEB2
{
DWORD dwFiller[4];
DWORD dwInfoBlockAddress;
} PEB2;
and so on
Here is the partial sample code:
NtQueryInformationProcess)(hProcess, ProcessBasicInformation,
&pbi, sizeof(pbi), &dwSize);
ReadProcessMemory(hProcess, (LPCVOID)pbi.PebBaseAddress,
&PEB2, sizeof(PEB2), &dwSize);
ReadProcessMemory(hProcess, (LPCVOID) PEB2.dwInfoBlockAddress,
&Block, sizeof(Block), &dwSize);
cmdLine = (TCHAR *) malloc (Block.wMaxLength+10);
ReadProcessMemory(hProcess, (LPCVOID) Block.dwCmdLineAddress,
cmdLine, Block.wMaxLength+10, &dwSize);
It failed in getting dwInfoBlockAddress of PEB2. Can any of you provide some hints/helps. Maybe the memory structures/address are totally different between 32 and 64 bit data models....??? The problem is there is no useful documents I could look at.
Thanks a lot.
Jack Rong
|
|
|
|
|
I am new to device drivers.Can anybody tell me from where it is possible to download
Windows Driver Kit
Windows Logo kit
Windows Driver Framework
I have tried this to download from microsoft websites.But it seems that the link is not there.
https://connect.microsoft.com/directory/
http://www.microsoft.com/whdc/devtools/wdk/wdkpkg.mspx
I tried these.But was unable to find.
With regards
Deepu
|
|
|
|
|
AFAIK there is no longer a separate DDK for Windows driver development. Look for Windows Development Kit 6.1 . That's supposed to have everything you need in it.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Thanks for the reply.can u tell me the link to download it
With regards
Deepu.
|
|
|
|
|
|
Windows SDK for Windows Server 2008 and .NET Framework 3.5
Is this i should download.It is about 1.2GB
|
|
|
|
|
AFAIK Microsoft have combined the DDK into the SDK and this is the latest SDK. Yes it's HUGE, that's why it starts off by downloading a special tool for downloading the rest of it. If you're serious about wanting to develop software then the ~$10 worth of bandwidth is probably worth it. The last time I downloaded an SDK over 56K it was 400+MB and took a week to download. Such is life.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
I started downloading..Thank u
|
|
|
|
|
|
|
And your point is?
-Saurabh
|
|
|
|
|
I'm useing MFC and got a problem in finding focused control within my dalog box...
Thank you masters!
|
|
|
|
|
GetFocus() may be?
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Rajesh R Subramanian wrote: GetFocus() may be?
Wow! And how did you find it?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I ask Robert.
Every time there is a question in the C++ board, I ask Robert. Robert answers all the questions. He has to. I beat him with a calfskin leather belt until he does.
His Mondays are brutal, when queries pile up over the weekend.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Oh, well, poor Bob, just another THHB's victim.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Rajesh R Subramanian wrote: I beat him with a calfskin leather belt...
Please leave your personal stuff at home.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Balanced the ugly troll's vote.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks pal.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Why the hell does all your arguments, always, take place in my section?
Getfocus()? how many times have you tried it before in a dialog box?
|
|
|
|
|
continue like this, you're in the good path...
|
|
|
|
|
Maybe this[^]thread will help.
|
|
|
|