windows

Where are the C header files in Windows?

I'm new to Windows development, having messed around in Linux for a while. I need to access console functions and am having trouble getting a comprehensive list of console text attributes off the web. I would like to read wincon.h and windows.h to get the info, but I can't figure out how to get at them. Help please! ...

How do I communicate with an RNDIS attached device on Windows (.Net)?

I have a device that implements the RNDIS driver protocol for connection over USB. When this device is attached to the system, Windows recognizes it as an RNDIS device and creates a network adapter to represent it. My question: How do I communicate with a service running on the device at this point? What libraries in .Net would allow ...

virtual memory allocation

what are my options when i need to allocate virtual memory beyond the limits of system memory? paging file is unlimited(limited by available disk space) so why could not i use it to allocate memory beyond the limits of physical memory limit or OS memory limits? why did they limit the virtual memory with the boundaries of address space? ...

Example showing how to add a button/menu to the glass part of a Vista window frame like Opera/Firefox 4

I'd like to add a menu to the glass part of the frame in a C++ application which is using WTL and Win32++. Those libraries are probably largely as this is something I'd need to do from Win32. The latest versions of Opera and the upcoming Firefox are going to be doing this but I haven't been able to find a code example. Has anyone got e...

Command Line - how to extract a file name only when using a for command loop.

What I need to do is extract the filename from %%f so I can create the correct dll name. for %%f in (*.asmx.cs) do ( echo %%f cmd /c C:\windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /t:library /r:%assemblies% %compileoptions% /out:bin/%%f.dll %%f ) ...

Hide Port Numbers after redirect from IIS to Apache

Hello All, I am running IIS 6.0 and Apache 2.2 on a Windows Server 2003 (dedicated) I have a default website on IIS which is required on port 80 (default). Apache has been setup to listen on 8080. I need IIS for one sytem and Apache for another. I have setup an IIS redirect to URL to forward any request to www.myotherdomain.com to www...

How to write modern Windows software in C++?

Hello everyone, I am very interested in how modern Windows software is written in C++ nowadays? I asked my friend who had worked on Windows software and he told that last things he worked with were MFC and then WTL. He said that MFC is no longer anything modern but WTL is still used but he didn't know much more. He also said that WTL wa...

How to get VBO working

I tried to use this tutorial http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=45 I load it in my visual studio 2008, compile it, and it says missing file: "GLES/glplatform.h" so i google the file... then it whines missing file: "KHR/khrplatform.h", so i google that too... then it whines everything possible, "GLDouble undeclared id...

How has Windows API changed in the last 10 years?

Hello everyone I am interested in how Windows API has changed in the last 10 years since Windows 98 and Windows 2000? What interesting API calls have been added that you know? Also do people still write anything in API? I am now learning everything I can about Windows programming and I am really curious about this. Because books don't ...

How do I hook into other programs in Windows?

Can anyone explain how does one program hook into and modify behavior of other programs in Windows? How is it even possible? Don't windows programs protect themselves from other programs going into their memory, etc? (I don't know the internals how it works so I just said "into their memory" -- I bet it's more complex than that.) Also...

Is there a function like asctime_s() that works for SYSTEMTIME structures in windows?

I know I can do this if I have a struct tm structure, but what if I want to do the same thing with a SYSTEMTIME. I could do this manually but just wondering if there's function that does this already. Thanks void PrintTimeSCII(struct tm *time) { char timebuf[26] = {0}; asctime_s(timebuf, 26, time); printf("%s\n", time...

Prevent C# app from process kill

How can I protect my C# app from someone killing its process via taskman or programmatically? Here is my scenario: App A is an MFC app developed by another team. It has an unpublished text-based remote interface that is enabled via a backdoor. I'm developing app B, a C# WinForms app which interacts with A. B enables A's backdoor when ...

System wide Windows CBT hook not working properly

I'm trying to hook a CBT hook on Windows OSes. I'm currently using Windows 7 x64. I've read many threads talking about this issue, but none has solved my problem. The application runs well; the hook is installed and I can see some notifications coming. Actually the problems arised is that the application is not notified about CBT hook...

How to retrieve a file from Internet via HTTP?

I want to download a file from Internet and InternetReadFile seem a good and easy solution at the first glance. Actually, too good to be true. Indeed, digging a bit I have started to see that actually there are a lot of issues with it. People are complaining about all kinds of problems when using this code. Problems could appear becaus...

Cannont add domain name XN--12C7B7AM4F0D.COM to Windows Server 2008

Hello everyone, I got domain name in Thai "ไทยลีก.com" (pronounce thaileague.com). and this name is encode to XN--12C7B7AM4F0D.COM when it need to use. In fact, I rent shared hosting server and give server administrator XN--12C7B7AM4F0D.COM as domain name to add for my website. However, he told me there error when he tried to add XN--...

How can I get mod_rewrite and mod_alias to work together?

I have a Windows/Apache/PHP environment set up to imitate a shared hosting account but cannot get mod_alias and mod_rewrite to play nicely with one another. Both are definitely enabled at the server level and on a per-site basis. I have d:\web\public_html\ set up as DocumentRoot. But generally speaking it will be empty. I have d:\web\s...

How do I convert a 24-bit colour image to binary image using MFC?

how to convert a bitmap image in binary image? ...

c++ get PID using system

im running a file using system, but i dont know how to get the pid of that process, does anybody know it? thnx! ...

What hardware interrupts are actually interrupt?

Possible Duplicate: How do interrupts in multicore/multicpu machines work? what is interrupted by a hardware interrupt? one particular CPU core execution or all CPUs in the system? The CPU is i7 or Xeon X3450 ...

WOW64 woes (.lnk shortcuts)

I'm using Windows 7 (x64) and Delphi 2010. I'm writing a component that will emulate the start menu. However, I've run into the following problems: If I attempt to open a shortcut (.lnk file) with ShellExecute, this will fail whenever %ProgramFiles% is part of the target path of the shortcut (it will then look at the C:\Program Files ...