windows

Has anyone compiled PCRE for Windows x64 - if so, how?

I'm trying to compile PCRE (v8.02) for Windows x64, using Vs2008. The "NON-UNIX-USE" file tells me to use cmake to generate a .sln fle. That works. When I run the build it succeeds, with 91 warnings. All appear to be size conversion warnings. Am I doing something wrong? Should I expect all these warnings? Has anyone else built PCR...

Why a different SHA-1 for the same file under windows or linux?

Why on the same machine computing the SHA-1 hash of the same file produces two completely different SHA-1 hashes in windows and inside a msysgit Git bash? Doesn't the SHA-1 algorithm was intended to produce the same hash for the same file in all OSes? On windows (with HashCheck): File hello.txt 22596363b3de40b06f981fb85d82312e8c0ed511...

Which header files are necessary to run this code snippet?

It's from here,but fails when compiling: int main(int argc, char **argv) { struct hostent { char *h_name; // main name char **h_aliases; // alternative names (aliases) int h_addrtype; // address type (usually AF_INET) int h_length; // length of address (in octets) char **h_addr_list; // altern...

get active window of other programs using java

i am trying to make java application that can get the information from other active window program ...such as information bar or even screenshot of other active window is JNI the only option in this case? thanks ...

How to do packet mangling with winsock2 in windows?

I'm following examples here, but none of them provides an example on how to modify packets(previously I used winpcap only to found that it can ONLY read packets!). Can someone give me some clue even which function can actually modify incoming/outgoing packets?? ...

2D polygon triangulation

The code below is my attempt at triangulation. It outputs the wrong angles (it read a square's angles as 90, 90. 90, 176) and draws the wrong shapes. What am I doing wrong? //use earclipping to generate a list of triangles to draw std::vector<vec> calcTriDraw(std::vector<vec> poly) { std::vector<double> polyAngles; //get angles ...

Are there any difference between windows NT and windows XP driver development?

I found this tutorial on windows NT driver development, but not sure whether it can be applied for windows XP without modification. Anyone knows? UPDATE BTW, is it a MUST to use cdecl calling convention(int _cdecl main) to communicate with a driver? ...

Is it possible to unpage all memory in Windows?

I have plenty of RAM, however, after starting and finishing a large number of processes, it seems that most of the applications' virtual memory has been paged to disk, and switching to any of the older processes requires a very long time to load the memory back into RAM. Is there a way, either via Windows API or via kernel call, to get ...

Accelerometer API for Laptops

Most IBM (and some Dell) laptops have built-in accelerometers to stop any moving parts during a sudden fall, but I was unable to find a standardised Windows API to access this data. I assume that each manufacturer would provide a driver to interface with the sensor. Which popular laptop brands come standard with accelerometers accessib...

How to capture data from camera NOT using DirectShow?

How to capture data from camera with out using DirectShow? (in C# on windows ) ...

How to treat RAM data as if it was a real file?

So I have some temp data in my program (in RAM). I want to somehow make it seem as it is a file (for example for sending it into another program which takes a file link as argument)? Is it possible? How to do such thing? ...

How can I know if a window belongs to my program? Using win32 only.

How can I know if a window belongs to my program? I guess I can use the window handle to get the executable name but that seems like a lot of work and I have to do this repeatedly so I think it might be a performance issue. Is there a simple way to know if a given window handle is from ones own program with win32 or some OS construct? Ca...

Validate xml against xsd using c++

Hi , i am very new to xml and c++. i want to validate xml against xsd using c++ api.can any one gimme any tutorial link? or sample program.i don want to do using msxml as its works in windows and visual studio. i tried to use xerces and libxml but i have failed.now i am trying using tinyxml. please help me to validate xml against xml...

How To Prevent Processes From Starting?

I'm toying around with a very simplistic sort of process-monitor. Currently, it gets a list of the running processes and attempts to kill any process that is not white-listed. What I'm looking for is a way to prevent a process from starting that isn't on the white-list. If that's possible. My knowledge level in this area is pretty ...

Using Qt with custom MinGW

Hi, I don't know if this question would fit better on superuser.com, but since it's rather compiler related, I give it a try here. I have to use Qt with a specific version of gcc (4.5). I downloaded the last official Qt release for Windows (Vista, 32 bits version) and didn't install the shipped MinGW version; I just installed the Qt li...

Deploying without installer

I'm doing a very small windows application consisting of just a single executable. As the program will reside on a SD card I want the application to be as self contained as possible, and I'd rather not have an installer. I'd want the user to be able to simply copy the executable to the SD card and be able to run it straight away without ...

Sleep thread 100.8564 milisecond in c++ under window plateform

I there any method to sleep the thread upto 100.8564 millisecond under window OS. I am using multimedia timer but its resolution is minimum 1 second. Kindly guide me so that I can handle the fractional part of the milisecond. ...

"Correct" Dialog / UI font on Windows

When creating a control (e.g. an edit control) on the fly using CreateWindow, it usually starts out with an ugly (boldish sans serif) font. Usually I wok around that by grabbing the parent dialog's font, and setting it to the control - I can't even say if this is a good idea. How do I "legally" fetch the right font? ...

How is executed a SendMessage from a different thread?

When we send a message, "if the specified window was created by the calling thread, the window procedure is called immediately as a subroutine". But "if the specified window was created by a different thread, the system switches to that thread and calls the appropriate window procedure. Messages sent between threads are processed only wh...

How does the LPtoDP function work?

I have a book about programming under Windows, and the author uses a function called LPtoDP (MSDN). But I can't see the difference between code that uses this function and code that doesn't. I use this function in this way, which seems to me to be a proper way. POINT po; po.x = -50; po.y = 100; pDC->LPtoDP(&po); pDC->LineTo(po); P...