Hi,
For 32-bit Windows, following declaration of _SYSTEM_PROCESSES structure ( System Information Class 5 ) with ZwQuerySystemInformation works fine for my purpose to construct process tree.
typedef struct _SYSTEM_PROCESSES
{ // System Information Class 5
ULONG NextEntryDelta;
ULONG ThreadCount;
ULONG ...
#include "stdafx.h"
#include "string.h"
#include "windows.h"
bool SCS_GetAgentInfo(char name[32],char version[32], char description[256], const char * dwAppVersion)
{
strcpy(name,gName);
strcpy(version,gVersion);
strcpy(description,gDescription);
notify(dwAppVersion);
return true;
}
void notify(const char * msg)
{
...
I'm developing some C++ code that can do some fancy 3D transition effects between two images, for which I thought OpenGL would be the best option.
I start with a DIB section and set it up for OpenGL, and I create two textures from input images.
Then for each frame I draw just two OpenGL quads, with the corresponding image texture.
The ...
Hi,
To construct a process tree in Windows "C" given a PID, which one is a good approach to go for Win2k, XP, Windows Server 2008, Windows 7.
ZwQuerySystemInformation
NtQuerySystemInformation
CreateToolhelp32Snapshot
I remember ToolHelp had issue in leaking memory for win2k. Please correct me if I am wrong.
And using ZwQuerySystemI...
I have an NSIS script that pulls other installers from a local share. Some of these update very often. Rather than push out a new NSIS script every time, I'd like the script to look for the most recent installer matching a pattern in a certain directory. Is there a plugin or a Windows API that I can call from NSIS to do this?
...
I am making a protocol, client and server which provide file transfer functionality similar to FTP (among other features). One difference between my protocol and FTP is that I would like to store a copy of the remote server's directory structure in a local cache. The server will only be running on Windows (written in C++) so any applic...
If a window is closed (like with sending WM_CLOSE), are the destructors of objects called?
I followed my source code with a break point in that situation, but the compiler doesn't seem to pass through my destructor.
Is the program closed without calling any destructors?
...
Hi,
Does windows have specific interface by which I can send a specific scsi command such Inquiry to scsi device ? I searched the net, found passing reference to SCSI Pass Through interface. But Its very Vague.
Is there any documentation for that API on how to use it??
...
GetVolumePathName() API failed and GetLastError() returned ERROR 158: ERROR_NOT_LOCKED.
What is the reason for this error and how to overcome it?
...
Hi all,
i've to develop a stack trace walk to our win32 API plattform support to catch any exception with a behaviour of a JAVA stacktrace. Actually we got a full functional implementation for Linux plattforms.
First i've tried to implement a stackwalk using the win32 CaptureStackBackTrace API
mechanism. But this method is not integrat...
I suspect the answer is "no", since when I go to include the header, the "T" macros will be defined to use (wchar_t *), but the DLL is expecting (char *). However, I was wondering whether Windows did any on-the-fly transcoding between modules that would make this magically work (assuming simple ASCII characters).
...
Here is a quick and dirty GLUT based C++ program for windows that draws two rectangles, blue and green on a flat red background. Pressing 'a' or 'z' makes them orbit along the X axis in either direction. My problem is that if I enable GL_DEPTH_TEST, it sometimes draws one rectangle, sometimes two or sometimes just the background but ne...
Hey,
I ordered Programming Windows Fifth Edition a few days ago, and started working with it.
I'm starting to learn the win32 api, however, I got a question. The windows do not look modern winxp/win vista/win 7 style at all. How do I fix this?
It currently looks like this, crap font and all.
Thanks in advance!
Machiel
...
Can it be moved by Window Title as well as exe name?
Other info on moving it in another language could be helpful.
Update: some Perl sample can be found in Win32::GuiTest but there seems to be no resize or move functions.
...
Hi !
What I'ld like to do is similar to what VS does in its output window or other editors in their tool windows: Start another process B from my process A and capture its stdout/stderr output.
So far, I got it working with CreatePipe(), but for some reason, the output of B doesn't arrive at B right when it gets written. It behaves mor...
How can I get the information from a Process handle acquired using OpenProcess whether a Process is 32 or 64 Bit?
...
The code below calls SHGetSetSettings function to hide desktop icons
but it just unchecked "Show desktop icons" from the view menu.
I called SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_FLUSHNOWAIT, nil, nil);
to update the desktop but that doesn't work?
var
lpss: SHELLSTATE;
begin
lpss.Data := High(cardinal);
lpss.Data2 := Low(cardi...
Possible Duplicate:
Equivalent to GetTickCount() on Linux
What is the Linux version of GetTickCount?
http://msdn.microsoft.com/en-us/library/ms724408(VS.85).aspx
...
In some documentation, Ruby's Win32API has 'L' and 'N' to specify a "number"... and in some documentation, 'L' is "long". Is 'N' deprecated, and isn't 'L' the same as 'I' actually? A "number" is somewhat not so specific.
In
http://rubyforge.org/docman/view.php/85/3463/API.html#M000001
There is no specifying a boolean parameter as '...
I was using Ruby's Win32API to MoveWindow to move a window and resize it.
But if the window is minimized, it won't show.
SetWindowPos works too, and has a flag to hide or show the window, but it is to only make a window visible or invisible, not about minimizing or normalizing.
I also tried SetForegroundWindow and SetActiveWindow and ...