Windows 7 and security

One of the big issues with Windows Vista was that the system was too strict on security, and always popped up with notifications regarding security issues. This became a big problem, because a big part of the Windows Vista users chose to completely turn off the notification feature, leaving the system vulnerable.  To address this problem, Windows 7 introduces 2 new security levels (see figure bellow) in the User Account Control Settings (UACS). The first - which is default in Windows 7 - is called: Notify me only when programs try to make changes to my computer, which is a level where you no longer see notifications regarding you messing with the settings in the Control panel, but only if a third-party program tries to. The second is called: Notify me only when programs try to make changes to my computer (do not dim desktop). This level will further stop the UACS from utilizing the "safe desktop" and the desktop light will not dim, and you will be able to run other programs while UACS messages pop up. It is no longer possible to turn off the UACS completely, but you can tell the UACS to never ever inform you of anything. 
 
 
 
 
In Windows 7, the Security center has been replaced with the Action Center, which now contains the functionality of Computer Maintenance and Security. Here you are now able to adjust the notifications according to a given subject, e.g. if you no longer wish to see information regarding virus protection or network firewall, you just uncheck the subject from the list. Off course this doesn't improve security, but it removes the hassle of administrating the system. In fact, Windows 7 has pushed even more security settings in, when compared to Windows Vista, but it also introduces problem solving tools, which is problem solving wizards which check your program and security settings for problems, and tell you what they find. 
 
AppLocker is a new feature to Windows 7, which easily lets you which programs different users are allowed to run. E.g. You can tell AppLocker to trust all software coming from Microsoft (or others) and AppLocker will run all software signed by Microsoft, and you can stretch this into also telling AppLocker that newer version of a give piece of software is trusted, and these will also run without problems. This feature though is only provided with the Windows 7 Ultimate edition.
PC Safe Guard - or as I like to call it; Annoy-Your-Teen - is essentially a kind of sandbox account. It lets you create a user account and set it up with the software you want, and then activate PC Safe Guard. PC Safe Guard then makes sure that all software (and spyware or viruses) installed after activations is deleted when the user logs out, and this way the user account returns to the state of first-install. Files created in an PC Safe Guard activated User Account, must be saved on another partition of the hard drive, where PC Safe Guard will not touch them. 
 
BitLocker is a feature that was also present in Windows XP and Windows Vista. In these versions though it was not always easy to find, but all this has changed in Windows 7. Now all you have to do, is right-click the hard drive and select "turn on BitLocker", and an easy guide will follow you through the process. This feature is only available in Windows 7 Ultimate, which I find rather disturbing. Microsoft has a portal called MSDNAA where students from around the world (if the university they attend to has signed up for MSDNAA) can download Microsoft products for free (while being students). This portal gives the Windows 7 pro. Version to students and faculty teachers. With this in mind, there is lots of research going on at these universities, where encrypting of hard drives could be a nice feature. So why not make BitLocker available to lower versions of Windows 7?

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: AllanJP
Posted on: 8/31/2009 at 8:12 AM
Tags: ,
Categories: Windows 7
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

IronPython is TechTalk

Get an introduction to Python on the .NET Platform, from Harry Pierson.

At the Microsoft development center copenhagen... (sorry guys, this one is in Denmark)

About Harry Pierson
Harry Pierson is a Senior Program Manager on the Visual Studio Languages team, primarily focused on IronPython. A ten year Microsoft veteran, Harry has worked all over the company from Microsoft Consulting Services and Architecture Evangelism in the field to being an architect in Microsoft IT. He has been writing his blog DevHawk (http://devhawk.net) for just over six years and has written articles for MSDN and CoDe Magazines.

He will be talking at variuos universities around Denmark, I just don't have the dates yet, but for more information look here http://www.computerworld.dk/blog/studblog/1931?cid=6&a=cid&i=6&o=1&pos=2

 

 

 

Currently rated 3.0 by 1 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: AllanJP
Posted on: 8/24/2009 at 7:04 AM
Tags:
Categories: Programming
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (1) | Post RSSRSS comment feed

P/Invoke, InteropServices, C# and FMOD

Making music with C#, P/Invoke, InteropServices and FMOD

I've been trying to give a glimse of how one could make a media player, but I'm not the kind of person who gives the whole answer until the absolute end. This post will be no different from the others. I'm going to present an outline as to making a media player using the FMOD library. The beaty of this library is that you can use it cross-platform so this code will also work for Linux in Mono (Linux version of C#)

Download the FMOD Library for Win32, for Windows CE, Windows CE small, Linux or MacOS

And inside you will find the reference manual, which is the place to start to get familiar with the functionallity of the library. In this little post I will focus on using C#, but as you might have guessed one can utilize every known language to programme against the FMOD library. On a quick notice; the FMOD library is primarily used in game development, but works just fine as a mediaplayer library. It is legal to use the FMOD library, without paying anything, just as long as you don't start selling your code as a product.

Now, the FMOD library is written in C++, and this means that it is written in unmanaged code contra the C# language which is a mannaged language. Therefore we need to have a look at the C# - System.Runtime.InteropServices; where we will find the DllImport attribute, which will call the unmanaged code from the C++ FMOD library (There is very much more going on in the CLI to call unmanaged code, but I will leave this for later post). As far as managed code is concerned, unmanaged code is invoked merely by invoking a method with an associated DllImport attribute.

[DllImport("My_CPP_Library.dll", EntryPoint="Function_in_CPP_Library", CallingConvention=CallingConvention.Winapi)]
public static extern Boolean Self_chosen_function_name(The parameters from the Function_in_CPP_Library);

Here's what I did to get the functionallity up and running:

[DllImport("fmod.dll", EntryPoint="FSOUND_Init",
CallingConvention=CallingConvention.Winapi)]
public static extern Boolean fmod_Init(int mixRate, int maxSoftwareChannel, int flags);

[DllImport("fmod.dll", EntryPoint="FSOUND_Stream_Open",
CallingConvention=CallingConvention.Winapi)]
public static extern IntPtr fmod_Open(string data, int mode, int offset, int lenght);

[DllImport("fmod.dll", EntryPoint="FSOUND_Stream_Play",
CallingConvention=CallingConvention.Winapi)]
public static extern int fmod_Play(int channel, IntPtr fstream);

[DllImport("fmod.dll", EntryPoint="FSOUND_SetVolume",
CallingConvention=CallingConvention.Winapi)]
public static extern int fmod_Setvolume(IntPtr fstream, int volume);

[DllImport("fmod.dll", EntryPoint="FSOUND_Stream_GetLength",
CallingConvention=CallingConvention.Winapi)]
public static extern int fmod_getLenght(IntPtr fstream);

[DllImport("fmod.dll", EntryPoint="FSOUND_Stream_GetPosition",
CallingConvention=CallingConvention.Winapi)]
public static extern UInt32 fmod_getPos(IntPtr fstream);

[DllImport("fmod.dll", EntryPoint="FSOUND_Stream_SetPosition",
CallingConvention=CallingConvention.Winapi)]
public static extern Boolean fmod_setPos(IntPtr fstream, UInt32 pos);

[DllImport("fmod.dll", EntryPoint="FSOUND_Stream_Stop",
CallingConvention=CallingConvention.Winapi)]
public static extern Boolean fmod_stop(IntPtr fstream);

[DllImport("fmod.dll", EntryPoint="FSOUND_Close",
CallingConvention=CallingConvention.Winapi)]
public static extern void fmod_close();


Function (and therefore names) defined in the FMOD library.

The function names that I define, and the names that I will use in my C# code.

And now off to test if it works!

public static void Main()
{
//initialize
fmod_Init(44100, 16, 0);
//load the mp3 into a soundhandle that we can use
IntPtr soundHandle = fmod_Open("C:\\Path\\To\\Song\\gone.mp3", 0 , 0, 0);
//Set the volume on the song fmod_Setvolume(soundHandle, 255);
//Play the song
fmod_Play(0, soundHandle);

Application.Init();
//Create the Window
Window myWin = new Window("My Player");
myWin.Resize(200,200);
Button playButton = new Button("Play");
myWin.Add(playButton);
//Show Everything
myWin.ShowAll();
myWin.DeleteEvent += new DeleteEventHandler(myWin_DeleteEvent);
Application.Run();
//Stop the song
fmod_stop(soundHandle);
//Close the stream
fmod_close();
}
public static void myWin_DeleteEvent(object o, DeleteEventArgs args)
{
Application.Quit();
args.RetVal = true;
}

And that's actually about it! In this example I've tried to use GTK+ so that the GUI part will work for both Windows and Linux.

I'll let you fiddle around with it a while before showing the full code including the ID3Tag etc. You're more than welcome to send me a mail or comment and I will respond as soon as possible.

Currently rated 3.4 by 5 people

  • Currently 3.4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: AllanJP
Posted on: 8/16/2009 at 6:25 AM
Categories: C# | FMOD
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (2) | Post RSSRSS comment feed