Archive

Posts Tagged ‘SDK’

Windows Runtime (WinRT)

September 16th, 2011 No comments

Windows Runtime, or shortly WinRT, is a new runtime (siting on top of the Windows kernel) that allows developers to write Metro style applications for Windows 8, using a variety of languages including C/C++, C#, VB.NET or JavaScript/HTML5.

WinRT is a native layer (written in C++ and being COM-based) that is intended as a replacement, or alternative, to Win32, and enables development of “immersive” applications, using the Metro style. Its API is object oriented and can be consumed both from native or managed languages, as well as JavaScript. At the same time the old Win32 applications will continue to run just as before and you can still (and most certainly will) develop Win32 applications.

Microsoft has created a new language called C++ Component Extension, or simply C++/CX. While the syntax is very similar to C++/CLI, the language is not managed, it’s still native. WinRT components built in C++/CX do not compile to managed code, but to 100% native code. A good news for C++ developers is that they can use XAML now to build the UI for immersive applications. However, this is not available for classical, Win32 applications.

Before you start here are several additional articles that you might want to read:

Windows Runtime reference

 


API Mapping tool – iPhone iOS

May 9th, 2011 No comments

The iPhone/iOS to Windows Phone 7 API mapping tool helps developers find their way around when they discover the Windows Phone platform.

If you have been developing iPhone applications and are interested in building your applications for Windows Phone 7, this guide is for you.

The guide will cover what you need to know to add Windows Phone 7 development to your skill set, while leveraging what you have already learned building iPhone applications.

Is process a member of the Administrators local group

January 29th, 2011 No comments

The CheckTokenMembership function determines whether a specified security identifier (SID) is enabled in an access token.

/*
Routine Description: This routine returns TRUE if the caller's
process is a member of the Administrators local group. Caller is NOT
expected to be impersonating anyone and is expected to be able to
open its own process and process token.
Arguments: None.
Return Value:
TRUE - Caller has Administrators local group.
FALSE - Caller does not have Administrators local group.
*/
BOOL IsUserAdmin(void)
{
 BOOL bResult;
 SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
 PSID AdministratorsGroup;
 bResult = AllocateAndInitializeSid(&NtAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID,
                                    DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0,
                                    &AdministratorsGroup);
 if(bResult)
 {
  if(!CheckTokenMembership(NULL, AdministratorsGroup, &bResult))
  {
   bResult = FALSE;
  }
  FreeSid(AdministratorsGroup);
 }
 return(bResult);
}

MSDN

QtService

June 22nd, 2010 No comments

The QtService component is useful for developing Windows services and Unix daemons.

The project provides a QtService template class that can be used to implement service applications, and a QtServiceController class to control a service.

On Windows systems the implementation uses the Service Control Manager.

On Unix systems services are implemented as daemons.

Homepage

Single Application

June 19th, 2010 No comments

The QtSingleApplication component provides support for applications that can be only started once per user.

For some applications it is useful or even critical that they are started only once by any user. Future attempts to start the application should activate any already running instance, and possibly perform requested actions, e.g. loading a file, in that instance.

The QtSingleApplication class provides an interface to detect a running instance, and to send command strings to that instance.

For console (non-GUI) applications, the QtSingleCoreApplication variant is provided, which avoids dependency on QtGui.

Documentation

Download Open Source Edition (LGPL): qtsingleapplication-2.6_1-opensource.zip

Google Native Client

May 14th, 2010 No comments

Native Client is an open-source technology for running native code in web applications, with the goal of maintaining the browser neutrality, OS portability, and safety that people expect from web apps. We’ve released this project at an early stage to get feedback from the open-source community. We believe that Native Client technology will help web developers to create richer and more dynamic browser-based applications.

Native Client runs on 32-bit x86 systems that use Windows, Vista, Mac OS X, or Linux. Some ARM and x86-64 support is implemented in the source base, and we hope to make it available for application developers later this year.

With Native Client SDK and a Windows, Mac OS X, or Linux computer, you can build web apps that seamlessly use native C/C++ code to perform high-performance computation, render 2D/3D graphics, play audio, and respond to mouse and keyboard events — all without requiring users to install a plugin.

The Native Client SDK preview, in contrast, includes just the basics you need to get started writing an app in minutes: a GCC-based compiler for creating x86-32 or x86-64 binaries from C or C++ source code, ports of popular open source projects like zlib, Lua, and libjpeg, and a few samples that will help you get you started developing with theNPAPI Pepper Extensions. Taken together, the SDK lets you write C/C++ code that works seamlessly in Chromium and gives you access to powerful APIs to build your web app.

Boost compilation with Visual Studio

November 17th, 2009 No comments

build bjam

  • go to %BOOST%/tools/jam/src folder
  • run build.bat file
  • copy bjam.exe file to %BOOST%/bin folder from %BOOST%/tools/jam/src/bin.ntx86 folder

build boost

  • go to %BOOST% folder
  • compile Boost using bjam.exe:

bin\bjam.exe –build-dir=”C:\Dev\Libs\boost\build-boost” –toolset=msvc –build-type=complete stage

Bin2Cpp

November 12th, 2009 No comments

bin2cpp” is a little Tool for converting binary files in a C/C++ header file, so it can be used in other C++/C Programms (i.e. for putting a programm into another!).

Tags: , , ,

Windows 7 Goodies in C++: Taskbar Progress and Status Indicators

September 16th, 2009 No comments

An intro to using Taskbar progress bars and overlay icons with your Windows 7 applications

Introduction

One of the major changes to how the Windows 7 Taskbar operates is in an area that Microsoft calls peripheral status. This covers two types of status indicators: progress for long operations, and icons for important notifications. Apps can continue to use progress dialogs during long operations, but the Windows 7 Taskbar lets the app show a progress bar in its Taskbar button as well, so the user can see the progress indicator at a glance, without having to switch to the app.

Many apps also use the notification area to convey important status information. For example, Outlook shows an icon when you have new email. However, in Windows 7, notification area icons are hidden by default, so the notification area is no longer useful for displaying this kind of status. The Taskbar lets an app display a 16×16 icon that is overlaid on the existing icon in its Taskbar button. This prevents the notification area from getting too crowded, and keeps the status icon visually associated with the app that created it.

This article’s sample app is a re-write of the file downloader from my article Using Internet Explorer to download files for you. The app shows the download progress in its Taskbar button, in addition to a traditional progress bar in the dialog. This app didn’t have a notification area icon before, but for the purposes of demonstrating the API calls involved, it has commands for showing a status icon as well.

The sample code for this article was built with Visual Studio 2008, WTL 8.0, and the Windows 7 RC SDK.

Codeproject

Tags: , , , ,

Desktop Window Manager

September 15th, 2009 No comments

The desktop composition feature, introduced in Windows Vista, fundamentally changes the way applications display pixels on the screen. When desktop composition is enabled, individual windows no longer draw directly to the screen or primary display device as they did in previous versions of Microsoft Windows. Instead, their drawing is redirected to off-screen surfaces in video memory, which are then rendered into a desktop image and presented on the display.

Desktop composition is performed by the Desktop Window Manager (DWM). Through desktop composition, DWM enables visual effects on the desktop as well as various features such as glass window frames, 3-D window transition animations, Windows Flip and Windows Flip3D , and high resolution support. For more information about the user experience features enabled by the DWM visit the Windows Vista: Features user experience page.

Many of the DWM features can be controlled or accessed by an application through the DWM APIs . The following documentation describes some of the features and requirements of the DWM APIs.