Guide to New Vista Features [closed] - mfc

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm an MFC programmer. I just had my first taste of Vista (on a VPC... Yup, I'm late). I should be evaluating things in depth in the coming days. On taking a casual look, I noticed two major changes:
The shell is new
User Access Control
Event Viewer has changed (would like more info on this)
What other new features should I look out for from a programmer's point of view?

There's a significant set of changes depending on what sort of software you write.
It's never a bad idea to check out the Windows Logo Certification (for Vista). There's a link to the Software technical requirements here. It always gives you a bit of an idea what to avoid doing (and what to design for).
In my opinion, Vista mostly started to enforce [existing] Logo certification requirements, in particular:
Don't write to HKLM
Don't save application data under the Program Files directory
Don't assume administrative permissions
Do save data to the user's application data directory
Regarding User Access Control (new to Vista), It's also a good idea to get across Manifest files. The best thing I could find on them is this blog entry here.
Windows Drivers are under higher scrutiny under Windows Vista and pretty much require certification IMHO.
The TCP/IP stack was rewritten and so too the audio subsystem (and multimedia streaming etc). Obviously advances in graphics, plus the inclusion of DirectX 10 and usual rollout of an updated Media Player, etc.
Sorry, I also forgot to mention that Microsoft replaced ActiveSync (for Windows Mobile) with a completely new framework in Vista.

Vista is much more strict about enforcing rules that you were supposed to follow for XP anyway.
For example, you're not supposed to do anything that requires write access to your program's install folder. In XP a lot of programmers got away with breaking that because so many users run as adminstrator, but Vista will actually enforce it. A bunch of folders did move around ("Users" instead of "Documents and Settings", my Documents is different, etc), but if you're using the correct methods to retrieve those paths rather than assuming they're always in the same place you'll be fine.

Perhaps wikipedia's Features new to Windows Vista and possibly Features removed from Windows Vista will be of use to you.

Processes and resources have "integrity levels". A process is only able to access resources at or under its own integrity level.
If you ever do any work with IE extensions this will become a PITA when you want to access something and discover that everything has a higher integrity level than IE in protected mode (default).

Well, from a programmer's point of view, WPF is "built in" to the system. That means that if you target an app to the 3.0 version of the .NET Framework, it should be able to install on Vista without a .NET Framework Install.
DirectX 10 is also new in Vista, but I assume if you didn't know that, you probably won't be programming against it.
Search is pervasive. Numerous kernel improvements. SuperFetch (friggin' awesome if you have enough RAM). IMO Vista goes to sleep and wakes up a LOT easier and more reliably than XP ever did. I/O priority -- now apps like AntiVirus and search indexers can request lower priority for disk access than they did in XP or before. That makes the user experience much more enjoyable when something's indexing the drive or a scan is running. All in all, Vista is good stuff IF you have gobs and gobs of memory to throw at it. I run Vista x64 with 4GB of RAM, and I actually like it.

The audio subsystem has been redeveloped, so if you do anything audio related it is worth checking very carefully if everything still works.
Although many of the older API calls still work, some may not work as expected.
As a simple example, sound devices have much longer and more descriptive names than in XP, but if you continue to use the older APIs then you may find these longer names are truncated.

Oh, yeah. There's a completely different driver model where much of the code is kicked out of kernel space and back into userland, to prevent poor drivers from trampling over the system. So if you do any driver work it's almost like starting over from scratch.

1- Machine with Vista have usually more Ram, this is a good news for you :)
2- Path to "Program files" are splitted in 2 : \Program Files (x86)\ and \Program Files\
3- My Document has changed

VIRTUALIZATION is also an interesting and necessary feature of vista.

Related

Creating a File System "Driver"

I'm looking to create a "driver" I guess for a custom file system on physical disk for Windows. I don't exactly know the best way to explain it, but the device already has proper drivers and everything like that for Windows to communicate with it, but what I want to happen is for the user to be able to plug the device in to their PC, have it show up in My Computer, and give them full support for browsing the device.
I realize it's probably a little scary thinking about someone who doesn't know the basics of doing something like this even asking the question, but I already have classes and everything constructed for reading it within my own app... I just want everything to be more centralized and without more work from the end user. Does anyone have a good guide for creating a project like this?
The closest thing I know of to what I understand from your description is an installable file system, like the Ext2 installable file system that allows Windows computers to work with
Linux originating ext2 (and to a certain degree ext3) filesystems.
Maybe that can serve as a starting point for your investigations.
As an alternative approach there's the Shell extension which is a lot less complicated than the IFS. The now-defunct GMail shell extension used that approach, and even though it's become nonfunctional due to changes in GMail, it can still serve as inspiration.
Your options are:
Create a kernel mode file system driver. 9-12 months of work for experienced developer.
Use a framework and do everything in user mode. A couple of weeks of work to get the prototype working. The only drawback of this approach is that it's slower, than kernel-mode driver. You can play with Dokan mentioned above, or you can use our Callback File System for commercial-grade development.
I think you need to look through the Windows Driver Kit documentation (and related subjects) to figure out exactly what you're looking to create.
If you're intending to rely on the drivers that already exist, i.e. you don't need to actually execute your code in kernel land to communicate with it, I would recommend you take a look at FUSE for windows Dokan
If you indeed need to run in kernel space, and communicate directly with the hardware, you probably want to download windows DDK (driver development kit). Keep in mind that drivers for communicating with a block device and filesystems are separated, and it sound like you're talking about the filesystem itself. I believe that anything you run in kernel space will not have access to the c++ runtime, which means you can only use a subset of c++ for kernel drivers.

Windows phone 7 native code support

2 questions:
Can someone tell me if unmanaged c++ code will
be supported in future versions of Phone 7 OS for all developers?
What are MS reasons for not
supporting unmanaged c++ code?
This answer is purely speculative, but I feel that most others who have answered this question miss the point by a long shot. Let's for a moment assume that this is not a vindictive decision by Microsoft, but instead actually a very well thought out engineering decision that has absolutely nothing to do with content restrictions or otherwise. Those issues are just a bonus for MS
Microsoft is entering into the mobile market, this time for real it seems. Pretty soon there will be tens of millions of Nokia phone being shipped using Windows Phone and whatever they get on top of that will just be gravy. Windows Phone though still hasn't really found its home.
In the next year or two, phones, tablets and laptops will finally start converging into a single device. People will carry their phone in their pockets, but that phone will also be the CPU unit of their PC. That means that by simply sitting near a wireless HDMI monitor and connecting a keyboard and mouse via wireless USB (or bluetooth if we're all unlucky), the user will have their entire PC with them at all times. Tablets will become just a battery powered touch screen which interfaces to the PC in your pocket.
So, all software written for Windows Phone should be able to run unmodified on a PC, a tablet and/or a phone. This is because there's a huge chance that the PC you're running will be either x86 or ARM based running Windows 8. When the PC is in your pocket, the user interface you'll see will be the Windows Phone GUI. When you're hooked up to a monitor, you'll see the ribbon interface. But the underlying OS will most likely be Windows 8, not the Windows CE that is currently used.
Based on all this, the only way Microsoft can insure that developers who invest in producing apps for the Windows Mobile market will not be screwed and that users of Windows Mobile devices won't be shorted when the newer platform comes around is to ensure there is a standard system for running apps on all these processors.
Even now, writing for Honeycomb is a nightmare since if you develop native code, you have to support both ARM and x86 and there's no real support mechanism for it. The only solution is to develop, package and ship two versions. Writing apps for iDevices are a little easier since there's no overlap. x86 on desktop, ARM on device. If you have to use native code on device, ARM is all you need. Even then, there is fat binary support on both device and desktop, so this won't be a problem except when optimizing.
In the end, the decision by Microsoft to stick strictly to .NET is probably a good one. Once they have a gazillion Nokia phones on the market and things have settled a bit, native code could be a real possibility.
These answers are for the application development perspective. OEMs can write native code today, as that's how they create drivers, but that's not open or available to most developers and therefore of no use to most.
For #1 Microsoft has made no announcements, so only Microsoft knows the answer and they're not saying.
For #2 it's all about code security and overall platfrom stability It's very tough to sandbox native code and they don't want your app being able to affect other apps or the platform itself. The general idea is that you should be using Silverlight or XNA for application development, so that's what they expose.
Windows phones will go nowhere with native support. Games and other more intensive apps are driving sales. Android was forced to blow the lid off of its NDK to support the games industry. As far as supporting multiple processors, etc., those of us doing this kind of work have been doing it for a long time, so its no problem. Already handling Intel and ARM without a problems with our systems.
EDIT, finally: for WP7 unmanaged code won't ever be supported, but in Windows Phone 8 - yes it will! They've just announced it. Native apps, C/C++, iOS/Android portability and code sharing, DirectX. You'll need Visual Studio 2012 and Windows 8 for WP8 development, though. Looks like VS2010 is not getting the requisite WinRT SDK.
The nongame UI, however, will still be XAML-based. Win32 API will not be supported. They're pushing a model with managed UI layer and a native middleware beneath it.
SDK will be available later this summer.
For the sake of posterity, here's the pre-06/20/2012 answer:
Microsoft probably can.
To ensure platform closeness, as a means for attaining stability and UI consistency. To enforce app isolation. Also, to make jailbreaking/rooting harder.
EDIT: if you want a native SDK on WP7, like I do, please go sign this petition and/or that petition. Thank you!
EDIT: see this.
EDIT: also this. Still not official, but this rumor moves the timeframe for native app support even closer - to the upcoming Tango release.
I believe MS will support native development like C/C++. Really. Seriously.
Because, for end users, one of the killer app is game. And Most of game codes are based on C/C++. JS or C# based codes are exist, but meaningless from industrial perspective. Consider big players in game field like Unreal or EA. They made huge investment on C/C++ codebase. They won't give it up. In other words, MS has no power to force them to spend money for .NET. Even Xbox360 development offers C/C++ development. Because of that.
And leading platforms like iOS/Android all supports native development. WP can't bear up the situation without any game from big players. MS really wants 3rd path games, and offering native code is the only way to get them.
Of course, this can be applied to other apps which are not game, but games are biggest one. When C#/XNA just came out, there's no library. People had to make everything themselves. Now there're a little more, but still meaningless for professional games.
If MS won't offer native environment, just don't go there. MS wants to make developers to use managed .NET code, but .NET has too many limitations can be solved with only unmanaged code.
The only question is just when will MS support native development.

What to use when building a desktop application? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I'm making desktop application for my own use.
I can't decide on whcih language/toolkit/framework to use.
I would like a good User experience and a not so bad Performance.
The choices in my mind are:
wxPython
Titanium
Adobe AIR
any other suggestions that would fit
-- EDIT
I would also like it to be cross-platform
Experience, I've got some experience in Java, Python, HTML/JS. (Haven't done much .net stuff).
I would live to learn if needed.
There are a lot of other considerations.
What platform? What OS? What level of backward compatibility? What runtimes are on the clients?
What sort of graphics support do you need? 3D? 2D?
What kind of interoperability do you need?
What are your deployment scenarios?
What languages do you want to write this in?
There are literally hundreds of technologies out there. You can only come up with a design when you have specified what your main constraints are.
The first thing I'll say is that I would favour Web applications where possible. Of course for many things you can't—Web browsers for example. :) But where you can you should. Sure you have cross-browser issues but the OS/library cost of a desktop app is really high now.
That being said, if what you're doing needs to be done as a desktop app or you simply want to do it that way as a personal preference I would choose:
.Net (C# or VB.NET) if you only need to run on Windows or
Java (Swing, SWT, etc) if you want to run on non-Windows platforms.
I would choose from these two for no other reason than they're the most proven. Sure there are other options Adobe Air, Python, etc. Python in particular has real apps written in it so it would be my third choice. Overall though, these stacks are just less proven for this particular task.
depending on your desktop OS. For Windows, you may get Microsoft Visual Studio Express Edition of C# or VB.Net. For Mac computer intel based computer, you have free XCODE available to do it or use JavaScript to build widget applications.
Another option to look at would be QT. It's a cross platform C++ framework with Java & Python Bindings. It really does boil down to what type of application you want to build though and which platform(s) you want to target it at. If you're aiming at Windows specifically, you might want to consider using .NET and C# to take advantage of native support, on OSX, Objective-C and Cocoa, or on Linux C/C++ & whichever API set your targeted distro uses. And for cross-platform, which platforms would you like to target? Windows? OSX? Linux (Ubuntu, OpenSuse, Fedora etc.)? That will also dictate your choice.
Try Flexonrails
then convert with adobeAir
:)
it will be good
im doing my desktop application with that
Depending on what skills and tools you have available to you, as others have pointed out.
If you're on windows one simple accessable option is HTA applications.
http://msdn.microsoft.com/en-us/library/ms536496(VS.85).aspx
if you're on a mac, dashcode is a similar option for, not just authoring widgets, but also full on web applications.
both options give you access to many more api's than typical javascript has access to, such as filesystem access, or the ability to execute system commands.
There's a zillion others, but those options come for for free with their respective operating systems.
Dependes on what kind of application you would like to build, but you definitely should put in your list of tools to evaluate (at least) Delphi.
It compiles to native win32, is a rapid application development tool and has support for a lot of areas like databases, internet, com and many many others. Also, is built into Object Pascal, a very simple to learn language.
Up to some point, you can make it's applications cross platform using others IDEs like Lazarus in Linux.
As of 20 march-2018 almost everything has shifted to javascript. Have a look at Electron.js . Its usefull to build cross platform desktop apps in javascript , html and css.

Restrict functionality to a certain computer

I have a program that is using a configuration file.
I would like to tie the configuration file to the PC, so copying the file on another PC with the same configuration won't work.
I know that Windows Activation Mecanism is monitoring hardware to detect changes and that it can tolerates some minor changes to the hardware.
Is there any library that can help me doing that?
My other option is to use WMI to get Hardware configuration and to program my own tolerance mecanism.
Thanks a lot,
Nicolas
Microsoft Software Licensing and Protection Services has functionality to bind a license to hardware. It might be worth looking into. Here's a blog posting that might be of interest to you as well.
If you wish to restrict the use of data to a particular PC you'll have to implement this yourself, or find a third-party solution that can do this. There are no general Windows API's that offer this functionality.
You'll need to define what you currently call a "machine."
If I replace the CPU, memory, and hard drive, is it still the same computer? Network adaptor, video card?
What defines a machine?
There are many, many licensing libraries out there to do this for you, but almost all are for pay (because, ostensibly, you'd only ever want to protect commercial software this way). Check out what RSA, Verisign, and even microsoft have to offer. The windows API does not expose this, ostensibly to prevent hacking.
Alternately, do it yourself. It's not hard to do, the difficult part is defining what you believe a machine to be.
If you decide to track 5 things (HD, Network card, Video card, motherboard, memory sticks) and you allow 3 changes before requiring a new license, then users can duplicate the hard drive, take out two of the above, put them in a new machine, replace them with new parts in the old machine and run your program on the two separate PCs.
So it does require some thought.
-Adam
If the machine has a network card you could always check its mac address. This is supposed to be unique and checking it as part of the program's startup routine should guarantee that it only works in one machine at a time... even if you remove the network card and put it another machine it will then only work in that machine. This will prevent network card upgrades though.
Maybe you could just keep something in the registry? Like the last modification timestamp for this file - if there's no entry in the registry or the timestamps do not match then fall back to defaults - would that work? (there's more then one way to skin a cat ;) )

Best shortcut management tool for development machine?

As a developer I had a slew of shortcuts and applications used daily. Visual Studio 6, 2003, 2005, 2008, SQL Client tools, WinMerge, Notepad++, Synergy, VMware (and lots and lots of VMs, multiple browsers, and on top of all that about 20 shortcuts to important directories, servers, test environments etc...
The Vista start menu is a lifesaver for getting to many of them quickly. However there are plenty of daily tasks that still require a relatively large amount of work to access (open a folder, jump through a few sub-folders, find a specific file and fire it off.
What tools/applications/utilities do you find to be the most beneficial to providing organized and fast access to all of your most frequently visited tools?
What are some tools that can be embedded on the task bar of Windows that provide similar functionality to drawers in Linux or stacks in OS X? My current quick-launch bar (and other folders added to the task bar) eat up tons of real estate and insist on opening new explorer windows to display sub-directories, which suffices but is still slow and polutes my desktop.
...can't wait for tomorrow to get the Win 7 RC and its finally improved task bar
Launchy. I first heard about it from Scott Hanselman.
Not sure if this is what you're looking for, but I'm a big fan of SlickRun. It's basically a command launcher tool, but it's how I launch almost everything.
Check out Fences from Stardock. It's very clever, and lets you keep your desktop clean and organized, even with lots of shortcuts. Oh, and it's free.
I love Humanized Enso.
Their product is free now, although it is no longer developed by the original authors.
There is also a Google Code project that builds on a Enso prototype, which allows you to easily extend it using Python.
Short summary:
Allows you to teach shortcuts to the program
Has nice features like:
Integrated translation...
Integrated Google Maps...
Integrated dictionary
Integrated Google search
etc...
Developed by the same people that are now working on Mozilla Ubiquity
I'm pretty fond of SlickRun
I use HotKeyboard
I think Virtual Desktop Manager is a good solution if you are using XP. I dont know there is a simillar microsoft product for windows Vista or not.. :(
Quicksilver style launchers are quite common to accomplish this task.
You press a keyboard shortcut or click on an icon in the tray, that pops up a window where you can search for your programs, documents, shortcuts, bookmarks, etc.
Check out Launchy, its simple, clean and free.