Programming:C++/Windows Specific

From WhyAskWhy.org Wiki
Jump to: navigation, search


This is a collection of Windows-Specific C++ Programming resources, ranging from online guides to compilers and utilities to aid in troubleshooting applications.


Data Types


DLLs


Active Directory


Audio

I am hoping to create a volume limiter for use at work and after some light research I'll use WinAPI functions from the Winmm library.

I had looked at these for ideas ...

but this article gave me what i was looking for:

Of interest is this forum posting:

To workaround this issue, do not link your application with WINMM, but instead use LoadLibrary to import the function at runtime. An application does this by calling the LoadLibrary function to load the DLL and then calling the GetProcAddress function to retrieve the address of the required function. The application should check the values returned from LoadLibrary and from GetProcAddress to ensure that these functions succeed. If the DLL is not found or does not export the desired function, one of these calls fails, and the application can handle the error gracefully.

APIs

Multimedia Functions

I won't need these however:

Note sure about this one:

  1. Handles sound levels also


LDAP


Keyboard/Mouse


Registry

APIs


IDEs and Compilers

The descriptions are borrowed from the tool websites

DJGPP

DJGPP is a complete 32-bit C/C++ development system for Intel 80386 (and higher) PCs running DOS. It includes ports of many GNU development utilities. The development tools require a 80386 or newer computer to run, as do the programs they produce. In most cases, the programs it produces can be sold commercially without license or royalties.

Digital Mars

Digital Mars C and C++ Compilers] for Win32, Win16, DOS32 and DOS. Fastest compile/link times, powerful optimization technology, Design by Contract, complete library source, HTML browsable documentation, disassembler, librarian, resource compiler, make, etc., command line and GUI versions, tutorials, sample code, online updates, Standard Template Library, and much more.

MinGW

MinGW is a collection of freely available and freely distributable Windows specific header files and import libraries, augmenting the GNU Compiler Collection, (GCC), and its associated tools, (GNU binutils). MinGW provides a complete Open Source programming tool set which is suitable for the development of native Windows programs that do not depend on any 3rd-party C runtime DLLs.

Configuration

If you installed it in the default location, add this to your path:

C:\MinGW\bin;C:\MinGW\msys\1.0\bin

Upgrading

To move from one version of MinGW to the next, run mingw-get upgrade. That's all there is to it.

Microsoft Visual Studio

Microsoft Visual C++ Express 2005

  1. wikipedia:Microsoft_Visual_Studio_Express From Wikipedia.org entry

Visual Studio 2010

Specific Installation/Patch Order

FIXME: Fix the heading level here. I just went with the same as the previous one for simplicity.

During the installation of Visual Studio 2010 SP1, the Visual C++ compilers and libraries may have been removed. In order to prevent this, Microsoft Visual Studio 2010, Microsoft Windows SDK for Windows 7 and .NET Framework 4 (Windows SDK 7.1) and Visual Studio 2010 SP1 must be installed in a certain order. More info here and here.


  1. Visual Studio 2010
  2. Windows SDK 7.1
  3. Visual Studio 2010 SP1
  4. Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1

Qt

Generating Visual Studio Project files

  1. cd PROJECT_DIR
  2. qmake -project -tp vc
  3. qmake

Compiler lists

Cool tools

  • Dependency Walker is a free utility that scans any 32-bit or 64-bit Windows module (exe, dll, ocx, sys, etc.) and builds a hierarchical tree diagram of all dependent modules.
  • ResEdit is a resource editor for Windows programs. The original purpose was to help C++ developers to create resource scripts. Now it can also be used to modify any resource in PE files (exe, dll, ...) and compiled resource scripts (res files).