For the complete article and hyperlinks, please visit my blog at http://JesseLiberty.com
Playing A Sound, Simplified
January 27th, 2012 — silverlighters.org (Syndicated Content)
For the complete article and hyperlinks, please visit my blog at http://JesseLiberty.com
Leveraging SQL Azure in SharePoint Online
January 27th, 2012 — silverlighters.org (Syndicated Content)
Register today for the March 6, 2012 Session of Leveraging SQL Azure in SharePoint Online here!
SharePoint Online is the portal/collaboration platform of Microsoft’s Office 365 cloud service. SQL Azure provides a highly available and scalable cloud database service as part of Microsoft’s Azure cloud platform. Can these two be used together? This session will investigate scenarios combining both SharePoint Online and SQL Azure. The session will be primarily be demonstration based with several code walkthroughs. An understanding of basic SharePoint development and SQL Server is preferred.
Speakers:
Dr. Zhiming Xue “Z" is a senior Microsoft Architect Evangelist, based in the Washington DC area. He focuses on the Windows Azure platform while continuing to evangelize Microsoft technologies such as Windows Phone, SharePoint, Silverlight, ASP.NET and the web platform. Prior to his current role, he played lead developer and architect roles at Microsoft Services to support enterprise customers in both private sector and public sector. His blog is blogs.msdn.com/zxue.
Ed Hild is the Technology Architect at the Microsoft Technology Center in Reston, VA specializing in Portal and Collaboration solutions. At the MTC, he meets daily with both commercial- and public-sector customer to discuss business requirements and map them to the Microsoft platform. He helps customers understand product features, best practices, and necessary customizations for them to realize SharePoint’s full potential. Ed is a dynamic speaker and has previously presented at Microsoft Dev Days, Tech Ed, and Microsoft SharePoint Conference events as well as many local area user groups. He has published SharePoint developer books including Pro SharePoint 2010 Solution Development and Expert SharePoint 2010 Best Practices. Ed’s previous experiences include a high school teacher, government contractor, and lead developer at a Microsoft partner.
FAQ: Microsoft Open Government + Open Data (Part III)
January 26th, 2012 — silverlighters.org (Syndicated Content)
Credits go to Mark Gayle (CSI) – Field Marketing Manager for updating this FAQ
Check Part I Here. and Part II Here.
1. Are There Any Open Data Applications Available for Windows Phone 7?
Yes, VanGuide was developed as an open data application using City of Vancouver open data and showcasing use of Windows Azure, Bing Maps, Silverlight, social integration with Twitter, plus a mobile client app that runs on iPhone and Windows Phone 7.
- VanGuide on YouTube - http://www.youtube.com/watch?v=bZUHVQT24Is
- VanGuide Web UI (on Azure) – http://vanguide.cloudapp.net
- VanGuide code on Codeplex (Open Data Application Framework ODAF) – http://odaf.codeplex.com
- VanGuide Windows Phone 7 Code on Codeplex - http://vanguidewp7.codeplex.com
2. Do Open Government or Open Data Technology Projects Require Open Source Software (OSS)?
No – open source software is not required for Open Government. Open Government and Open Data technology projects can be built with the same mixture of tools and technology as with any other IT project (both proprietary and open source). There are no particular advantages of open source software (OSS) in Open Government or Open Data initiatives. Government organizations should select technology based on ‘fit for purpose’ and taxpayer value.
Microsoft offers both commercial and open source solutions for Open Government and Open Data projects.
3. What Costs/Resources Does a Typical Startup Open Data Catalog Require?
Microsoft OGDI = Free download from Codeplex.
Windows Azure Subscription Cost = <$500 per month (budgetary, depends on volume of data and # transactions). Windows Azure and MSDN often have developer incentives and Starter Offers e.g. first 6 months Free. See www.microsoft.com/windowsazure/pricing
Time to Setup Open Data Catalog (Customer/Partner) = 1 - 2 persons up to 3-4 weeks
4. What Alternative Technologies Exist in the Open Data Arena?
There are no strong vendors or technologies that dominate Open Government or Open Data projects as yet. We are seeing many open data projects developed using technologies such as Drupal, Google Maps, PHP, and WebKit for iPhone.
For Open Data Catalogs and Portals, the primary alternative technologies we are seeing typically use Drupal, Google Maps, CKAN (open source), and/or Socrata (Commercial).
5. Can Microsoft and Alternative Solutions be Combined?
Yes.
We sometimes find the BEST solution for Government customers is to combine different (even competitive) technologies for a richer, hybrid solution e.g. Drupal with CKAN with OGDI/Azure. This has been done successfully in the following projects:
UK Data.gov.uk - http://data.gov.uk/metoffice-data-archive - UK Meteorological data hosted on data.gov.uk using Windows Azure DataMarket
http://www.emitter.ca – Provides localized tracking of environmental data. Uses Drupal combined with OGDI and Windows Azure for data storage.
http://datadotgc.ca – A catalog of Canadian Federal open data. Uses CKAN open source solution combined with OGDI and Windows Azure.
In particular, we often find that CKAN and OGDI are complementary technologies. CKAN is strong at data-publishing and self-service, whereas OGDI provides robust Cloud-based storage combined with an Open API for developers.
There is even a Drupal/OGDI integration module available at http://ogdifield.codeplex.com.
6. What Tools and Frameworks Are Available to Enable Development of Customized Solutions?
There are many demos, tools and framework projects available to help build customized solutions. These are some examples:
- http://govdata.eu - European Open Government portal – EU datasets and application demos on here.
- http://ogdifrance.cloudapp.net/ - Multi-Lingual OGDI with full support for FRENCH (MSFT France OGDI Starter Kit).
- http://ogdifrancerdf.cloudapp.net/v1/data/museesfrance?format=rdf – France OGDI/RDF demo
- http://www.microsoft.com/downloads/fr-fr/details.aspx?FamilyID=420837f8-25ec-47ba-b558-b6a7f64b3348 –French OGDI v3 fork.
- http://openturf.cloudapp.net/ - Multi-City/ Multi-Region Open Data Application Framework (evolution of VanGuide) --Web, iPhone, WP7 Mobile, iPad, Android (in development).
- http://vanguide.cloudapp.net - VanGuide/Open Data App Framework for interacting with open data sets --Web, iPhone, WP7 Mobile.
- http://mapway2.cloudapp.net - Web/BING Ajax framework for visualizing/plotting geographic open data feeds including OGDI.
- http://www.vanpark2010.ca/ - Silverlight-based Parking Application using OGDI and Vancouver open data sources.
- http://www.microsofttownhall.com/ - Citizen engagement Platform based on Azure/SQL Azure.
- http://openlab.ca/foodtree - Museum of Vancouver open data / crowdsourcing data site for the Harvest Story Exhibit (precursor to bhangra.me) --Web, Desktop, WP7 Mobile
- http://openhalton.ca/vanpark/ - JavaScript OSS Framework (Simile Exhibit) using OGDI JSON data feed for visualizing Vancouver Parks data
- http://openhalton.ca/vancouver/ - PivotViewer Framework (Silverlight) using Open Data set for visualizing Council expenses.
- http://culturafrance.cloudapp.net/ - Art and Culture mashup from France using OGDI/Azure
- https://github.com/openlab/DataLab/ - MS Canada Open DataLab project on GitHub includes auto-loader for Drupal, OGDI, Azure, etc.
- http://ogdifield.codeplex.com – Drupal OGDI Field Module
7. Are there Any Partner Solutions for Open Government and Open Data Projects?
Yes, there are several examples of Open Government solutions from Partners:
- http://heygov.com - ISC’s 311 customer services platform powered by Azure/SQL Azure, Dynamics CRM, Silverlight, .NET.
- · Miami311 using HeyGov! - http://www.heygov.com/default.aspx?MapID=Miami311V2
- · San Francisco Open311 using HeyGov! - http://www.heygov.com/default.aspx?MapID=SanFran311
- http://openintel.cloudapp.net/oi.aspx - ISC’s Open Source platform for geospatial/GIS data dissemination on Azure/SQL Azure
- IDV Solutions produce Visual Fusion which is a data visualization technology that can be used with Open Government projects - http://www.idvsolutions.com/Demos/
8. What Are the Partner Opportunities for Open Government and Open Data Projects?
There are many opportunities for partners to develop products and services to service Open Government initiatives. For Open Data projects, these opportunities fall broadly into 3 categories:
Hope you find this FAQ series useful. Open and Mobile is the way of the now and tomorrow… it all starts here http://aka.ms/infokit.
FAQ: Microsoft Open Government + Open Data (Part II)
January 25th, 2012 — silverlighters.org (Syndicated Content)
Credits go to Mark Gayle (CSI) – Field Marketing Manager for updating this FAQ
Check Part I Here.
1. What Licensing is Required for Open Government Projects?
Before making any Government data open to the public, it is essential that licensing terms are defined and published. Many Government organizations re-use licensing terms from existing Open Government projects, e.g.
UK Government – http://www.nationalarchives.gov.uk/information-management/uk-gov-licensing-framework.htm
2. What Applications Have Been Developed Using Open Data?
Good examples of applications that use Open Data would include the following (these are generic examples – none use MS technologies specifically):
- Fix My Street – http://www.fixmystreet.com This is a site developed by MySociety.org and enables citizens to report local problems that need fixing similar to 311 e.g. broken streetlight, graffiti, etc. This site enables the citizen to upload both the location of the problem and a photo to illustrate it.
- EveryBlock – http://www.everyblock.com Enables citizens to find Government information such as projects, budget in any Zip Code for 78 Cities across USA.
- Stumble Safely – http://www.stumblesafely.com Enables residents and visitors in Washington DC to find safest route home based on latest Transit and Law Enforcement data.
3. Why Do Governments Hold Competitions for Open Data Projects?
Once Open Data is released to the public, the intention is to generate interest, awareness and stimulate citizens and communities to build new applications and services with this data. This is also seen as a useful way to encourage participation and collaboration between the Government and citizens.
Good examples of Open Application Contests include:
- Washington DC - http://www.appsfordemocracy.com – the first Open Apps competition generated 47 apps in 30 days at an estimated value of USD$2.3M (cost of only USD$50K)
- BC Government – http://apps4climateaction.gov.bc.ca/ - 2010 Apps contest to raise public awareness and understanding of environmental issues, co-sponsored by Microsoft.
- Italian Government - http://www.appsforitaly.org/ - 2011 Apps contest co-sponsored by Microsoft.
4. How Does the Cloud Benefit Open Data Projects?
The Cloud is a highly effective way to publish large amounts of Open Data quickly and inexpensively without having to invest in additional Server infrastructure.
Windows Azure, Microsoft’s Cloud operating system, provides interfaces enabling data to be loaded, stored, and accessed easily and cost effectively. Azure provides a highly scalable and reliable platform for storage and access to open data sources which are managed by the Government organization.
5. What Tools Does Microsoft Provide to Help Start an Open Data Project?
Microsoft provides the Open Government Data Initiative (OGDI) which is a free, open-source solution for Government organizations to load and store open data into the Microsoft Cloud – combined with an Open API enabling developers to utilize a wide variety of development languages e.g. .NET, PHP, Ruby, Python etc.
http://ogdisdk.cloudapp.net (OGDI data is available… no new updates – see Azure DataMarket)
Microsoft also provides the ‘DataMarket for Government’ managed service solution which is another way of storing and publishing large data sets in the Cloud for public and commercial consumption – http://www.microsoft.com/windowsazure/government/default.aspx
The UK Data.gov.uk is a good example of DataMarket being used to host open data - http://data.gov.uk/metoffice-data-archive - UK Meteorological data hosted on data.gov.uk using Windows Azure DataMarket
In general terms, think of OGDI as an ‘entry-level’ customizable solution for open data, whereas DataMarket is a managed Enterprise solution for open data.
6. Where Can I Find More Information on Microsoft’s Open Government Data Initiative (OGDI)?
(OGDI data is available… no new updates – see Azure DataMarket)
- Open Government Data Initiative – http://ogdisdk.cloudapp.net
- OGDI Source Code on Codeplex – http://ogdi.codeplex.com
7. Are there any OGDI Projects in French language? (OGDI data is available… no new updates – see Azure DataMarket)
Yes, go here for the download from Microsoft France - http://www.microsoft.com/downloads/fr-fr/details.aspx?FamilyID=420837f8-25ec-47ba-b558-b6a7f64b3348
8. What Open Data Projects Have Been Developed Using Microsoft Technologies?
- Eye on Earth – http://www.eyeonearth.eu Utilizes Windows Azure, Silverlight, Bing Maps
- City of Medicine Hat – http://data.medicinehat.ca – one of the first Open Data Catalogs to run on Windows Azure and MS OGDI.
- Ward Rep - http://wardrep.ca and http://govsocial.ca “Find your Local Representative” App built on OGDI and running on PHP / Windows and BING --Web, WP7 Mobile
- Museum of Vancouver - http://bhangra.me/ - Museum of Vancouver open data / crowdsourcing data site for Vancouver Cultural Exhibit (Drupal/ Silverlight) --Web, Desktop, WP7 Mobile
- Open Halton - http://openhalton.ca/splash - Ontario solution with Jquery - Jquery-ui-map plugin for finding water spots
- Sweden Open Data - http://www.offentligadata.se/Apps.aspx – Swedish Open Data project using Azure and MS Pivot visualization
- VanGuide – http://vanguide.cloudapp.net - VanGuide utilizes Windows Azure, OGDI, Bing Maps, Silverlight, Windows Phone 7
- Edmonton Find-A-Home – http://findahome.cloudapp.net - Utilizes Bing Maps, Windows Azure, OGDI using Edmonton open data sources.
- EU Govdata – http://govdata.eu Utilizes Windows Azure, OGDI and contains NL, FR, and UK open data. There are more European open data application examples on http://govdata.eu
9. Are any National Governments Using Microsoft Technologies for their Open Data Portals?
Yes, the following are examples of National Governments using MS technologies for their open data portals:
- Colombia - http://datos.gov.co – Colombia Gov Open Data portal using OGDI/Azure
- Portugal - http://www.dados.gov.pt/pt/catalogodados/catalogodados.aspx - Portugal Open Data project using OGDI/Azure
10. Are There Any Microsoft Open Data Applications Available for iPhone?
Yes, VanGuide was developed as an open data application using City of Vancouver open data and showcasing use of Windows Azure, Bing Maps, Silverlight, social integration with Twitter, plus a mobile client app that runs on iPhone and Windows Phone 7.
- VanGuide on YouTube - http://www.youtube.com/watch?v=bZUHVQT24Is
- VanGuide Web UI (on Azure) – http://vanguide.cloudapp.net
- VanGuide code on Codeplex (Open Data Application Framework ODAF) – http://odaf.codeplex.com
- VanGuide iPhone App – http://itunes.com/apps/vanguide
for more on this download the Windows Phone Infokit (http://aka.ms/infokit)
Part III coming Friday 1/27…
FAQ: Microsoft Open Government + Open Data (Part I)
January 25th, 2012 — silverlighters.org (Syndicated Content)
Credits go to Mark Gayle (CSI) – Field Marketing Manager for updating this FAQ
What is Open Government?
Open Government refers to a wave of transformation within Government organizations across the globe aimed at better connection with citizens and communities. The common principles of Open Government initiatives are:
· Transparency – to enable greater accountability, efficiency, and economic opportunity by making government data and operations more open.
· Participation – to create early and effective opportunities to drive greater and more diverse expertise into government decision making.
· Collaboration – to generate new ideas for solving problems by fostering cooperation across government departments, across levels of government, and with the public.
What Countries Have Open Government Initiatives?
Many countries around the World are launching Open Government initiatives. The US is driving many Open Government programs directly sponsored by the White House - http://www.whitehouse.gov/Open/
Other countries and regions actively involved in Open Government include UK, Canada, Germany, Netherlands, Australia, New Zealand, and other parts of European Union.
UK – http://data.gov.uk – UK Open Data site.
Australia – http://data.gov.au – Open Data site.
Is Open Government the Same as Gov 2.0?
‘Gov 2.0’ (also referred to as e-Government) typically refers to the use of Internet, Digital Media, and Web technologies to enable Open Government initiatives and improve connections with citizens.
What is Open Data?
Open Government initiatives usually contain 3 pillars – Open Data, Open Standards, and Open Technology. One of the first objectives of global Open Government initiatives is to publish Government data for public use. It is generally considered that government data is public property anyway and so the government has an obligation to make this raw source data available for public use.
Does Open Government or Open Data Require Open Source?
No. Open source software is not a prerequisite for Open Government or Open Data projects. Commercial, proprietary and open source technologies can all be considered for Open Government initiatives. Government organizations should make technology decisions based on ‘fit for purpose’ and taxpayer value.
What Can Open Data Be Used For?
Open Data is typically used for public awareness, analysis and research, data-journalism, citizen engagement and to stimulate the development of citizen-centric applications by communities. Open Data should be shared such that it is ‘machine readable’ e.g. it can be accessed independently of a device or technology, can be easily searched and indexed, and can easily be reused within an external application. Sharing of information in PDFs or Zip files, for example, is NOT considered true Open Data.
Does Open Data Contain Personal or Private Information?
Open Data typically does not contain personal or identifiable information about private citizens that is not otherwise available through existing Government services.
This generally means that Open Data projects are often able to take advantage of cross-border Online and Cloud technology platforms that may have restrictions for other Government initiatives.
Why Have So Many Cities Launched Open Data Initiatives?
Government data becomes even more useful when it has local relevance to the citizen. Many Cities and Municipalities have rich data about local transportation, construction projects, budgeting, projects, civic facilities, etc.
What Cities Have Launched Open Data Catalogs?
Notable projects include:
City of Washington DC – http://data.dc.gov – the first Open Data Catalog making City datasets public.
City of Nanaimo – http://data.nanaimo.ca – the first Open Data Catalog in Canada with focus on GIS data. Powered by a DERIVATIVE project (OSS) using OGDI code on Windows Server / SQL Server
City of Medicine Hat – http://data.vancouver.ca – Open Data Catalog launched as part of Open3 Council Motion.
What Terms of Use are Required for Open Data?
Before making any Government data open to the public, it is essential that Terms of Use are defined and published. Terms of Use can be remarkably simple. Many Government organizations re-use Terms of Use from existing Government open data projects, e.g.
Part II and III coming Thursday 1/26 and Friday 1/27…
Windows Azure App Helps Americans Living Abroad Vote in U. S. Elections
January 24th, 2012 — silverlighters.org (Syndicated Content)
According to TechFlash, Democracy Live is using the Windows Azure platform to host LiveBallot, a service that makes it easier for US military personnel and other citizens living abroad to vote in elections in the United States.
Democracy Live helps make ballots and election materials available electronically for all American citizens, including military and overseas voters and voters with disabilities. After initially building its LiveBallot software on the Amazon Elastic Compute Cloud platform, Democracy Live switched to Windows Azure from Microsoft. The company found that Windows Azure programming is well supported by the robust Microsoft Visual Studio 2010 development system, and Windows Azure offers security and stability features that simplify development. In the 2010 elections, 250 local jurisdictions used LiveBallot, and they were able to markedly increase the participation of voters who live overseas or who have disabilities, while simultaneously reducing the cost of distributing voter materials and conducting elections. To find more info, read the case study “Electronic Balloting Experts Switch to Windows Azure to Improve Election Efficiency” here.
Developer Resources: Windows Azure SDK, Free Trial Account, InfoKit, Windows Phone SDK
“I never did mind about the little things…” [Free HideShowDesktopButtonOnTaskbar utility hides the “Show desktop” button on the Windows taskbar]
January 24th, 2012 — silverlighters.org (Syndicated Content)
Over the holidays, a relative emailed me the following rant:
Most of my conversation with technical support was to find out how to turn off the "Show desktop" icon in the lower right corner of the screen. This icon can be engaged by clicking on it or hovering over it (if you select Peek). On a desktop or a laptop this is NO PROBLEM. But on a tablet, there is no difference between clicking and hovering so Peek is meaningless. VERY OFTEN when using and holding the slate/tablet the heel of my thumb ever so gently touches the "Show desktop" icon and I am taken to the desktop in the middle of what I am doing. As I work, I am in constant fear of touching this icon. I know that everything on my hard drive will not be erased if I do, but it is very annoying. I went on the internet and found a program that turns the icon off and it worked (so it can be done), but then my antivirus program said that it was a THREAT AND ADVISED ME TO PUT IT IN A VAULT WHERE IT COULD NOT HARM MY COMPUTER. I agreed and the program was deleted. <!-- How Microsoft and Samsung could not see this as a problem is beyond my comprehension. --> I'm not the only one with this problem. The internet has many complaining about the "Show desktop" icon. MS allows me to turn the Clock and Volume icon off; why not the "Show Desktop" icon?????
If you want a somewhat more positive spin, "Aero Peek" and the "Show desktop" button are described in this article about new Windows 7 taskbar features. I don't use either myself, but a bit of internet searching confirmed some people really don't like these features.
The best way to disable a feature is to use an officially supported mechanism - and the good news is that disabling Aero Peek is easy to do by following the directions "To turn off desktop previews" near the bottom of this article. However, I was not able to find similar support for disabling the "Show desktop" button, so I resorted to looking for the next best thing: a group policy setting or documented registry key. Unfortunately, I struck out there, too. But I did find this snippet from a Channel 9 video where Gov Maharaj confirms there's no built-in way to disable the button.
Aside: The relevant discussion is interesting, so maybe have a look even if you're not opposed to the feature itself!
Well, if there's no official way to remove the "Show desktop" button and enough people want to do it, then it's time to start considering other solutions. According to the original rant (and the video discussion), there already are third-party utilities for this purpose - although they're not supported by Microsoft. But it sounds like at least one of these tools might be malware, so I'm not super enthusiastic about trying them out...
Fortunately, I have a rudimentary understanding of both Windows and programming [ :) ], so I wondered if the simplest, most obvious trick would work here. I coded it up one night while waiting for something to compile and was pleased to find that it worked! So I've gone ahead and prettied the code up and am sharing a simple utility to get rid of the Windows 7 taskbar's "Show desktop" button:
[Click here to download the HideShowDesktopButtonOnTaskbar utility and its complete source code.]
Of course, HideShowDesktopButtonOnTaskbar is just as unsupported and unofficial as the other utilities out there - so why choose it?
-
I've included the complete source code for HideShowDesktopButtonOnTaskbar, so you can review everything and re-compile it yourself if you're paranoid. Also, you can be pretty confident I'm not a 1337 *** trying to root your box. :)
-
HideShowDesktopButtonOnTaskbar makes no persistent changes to the machine, so there are no lingering effects and a simple logoff is all it takes to restore everything to the way it was.
-
HideShowDesktopButtonOnTaskbar is simple, small, unobtrusive, and easy to use - just add it to your Startup group to have it run every time you log into Windows!
Okay, enough with the goofy sales pitch... how about some developer notes?
-
As I mentioned, HideShowDesktopButtonOnTaskbar works the simplest way you can imagine: it finds the window corresponding to the "Show desktop" button and hides it. Obviously, hidden windows aren't visible - but they also don't receive input (clicks or hover status), so although the taskbar is still listening for input messages, they don't get sent. Running HideShowDesktopButtonOnTaskbar a second time finds and unhides the "Show desktop" button, restoring things back to how they started. Logging off disposes of the entire taskbar and logging back on creates a new one from scratch, so HideShowDesktopButtonOnTaskbar's changes don't persist.
I figured out the right window class to target by using the handy-dandy Spy++ Windows development tool. Specifically, I ran Spy++, clicked the "Find Window" tool, dragged the crosshairs over the "Show desktop" button, and hit OK. That showed the window hierarchy to the right beginning with the desktop window at the top and going down to the "Show desktop" button. Translating that into three nested calls to FindWindowEx was trivial, as was adding a call to ShowWindow to hide the window. Using IsWindowVisible to unhide the button when it was already hidden was just icing on the cake. :)
Aside: If the window hierarchy changes or if any of the hard-coded class names is different in a newer version of Windows, this will stop working... Yep, that's how it is with simple hacks like this - if it matters to anyone, I can always tweak things to accommodate.
-
Because HideShowDesktopButtonOnTaskbar ended up being easy to write, I was looking for a bit more challenge and set out to make it small. Specifically, the executable is just 11,776 bytes - and 7,015 bytes of that is due to the icon! While I could have squeezed a few more bytes out if I felt like it, the big win was by not linking to the standard C Run-Time library (the use of which results in a 41,472 byte file assuming static linking (i.e., /MT) is used to remove the dependency on MSVCR100.dll). Eschewing the CRT is an advanced scenario, but it was easy to do for HideShowDesktopButtonOnTaskbar because it's so small and simple.
Aside: This is why the code's entry point is named
WinMainCRTStartupinstead of the usualWinMain. And by the way: if you're interested in reading more about what it means to get rid of the default CRT, Matt Pietrek's classic "Reduce EXE and DLL Size with LIBCTINY.LIB" is a good place to start. -
Of course, everything has a price, and I needed to make two other changes as a result of omitting the default CRT. Both are found in Visual Studio's project Properties, Configuration Properties, C/C++, Code Generation settings: changing Basic Runtime Checks (known as
<BasicRuntimeChecks>in the.vcxprojfile) to Default (i.e., no /RTC? option) and changing Buffer Security Check (<BufferSecurityCheck>) to false (i.e., /GS-). Disabling these checks isn't something you should do in general (especially the latter), but HideShowDesktopButtonOnTaskbar takes no input, has no buffers, and is so simple that I'm (tentatively!) okay sacrificing these two security/resiliency measures. -
The call to HeapSetInformation / HeapEnableTerminationOnCorruption is almost definitely overkill - but it's good practice and so easy to add that I did so anyway (FYI that the default CRT call this automatically). Plus, doing this made me feel a little better about losing /GS. :)
If you're bothered by Windows 7's "Show desktop" button and are looking for a solution, maybe HideShowDesktopButtonOnTaskbar is the answer. If you're curious how a hack like this works or are looking to dabble with replacing the CRT in your own programs, there might be something of interest here. Either way, HideShowDesktopButtonOnTaskbar was a fun side project - I hope you like it! :)
The code:
// Include system headers (at warning level 3 because they're not /Wall-friendly) #pragma warning(push, 3)
#include <windows.h> #pragma warning(pop)
// Disable harmless /Wall warning C4514 "unreferenced inline function has been removed" #pragma warning(disable: 4514)
// Default entry point function int __stdcall WinMainCRTStartup()
{
// Enable "terminate-on-corruption"
(void)HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);
// Find the "Show desktop" button/window (starting from the Desktop window) const HWND hwndTaskbar = FindWindowEx(NULL, NULL, TEXT("Shell_TrayWnd"), NULL);
if (NULL != hwndTaskbar)
{
const HWND hwndNotify = FindWindowEx(hwndTaskbar, NULL, TEXT("TrayNotifyWnd"), NULL);
if (NULL != hwndNotify)
{
const HWND hwndShowDesktopButton = FindWindowEx(hwndNotify, NULL, TEXT("TrayShowDesktopButtonWClass"), NULL);
if (NULL != hwndShowDesktopButton)
{
// Toggle the visibility of the button const int nCmdShow = IsWindowVisible(hwndShowDesktopButton) ? SW_HIDE : SW_SHOW;
(void)ShowWindow(hwndShowDesktopButton, nCmdShow);
}
}
}
// Return 0 because a message loop wasn't entered return 0;
}
Free Developer Training - Leverage your SA Benefits
January 23rd, 2012 — silverlighters.org (Syndicated Content)
Yet Another Podcast #57–Kendo UI
January 23rd, 2012 — silverlighters.org (Syndicated Content)
For the complete article and hyperlinks, please visit my blog at http://JesseLiberty.com
Microsoft CRM and Visual Studio: Better Together
January 23rd, 2012 — silverlighters.org (Syndicated Content)
Register here TODAY!
Location: Microsoft Tempe Office
Product(s): Microsoft Office, Microsoft SQL Server and Microsoft Visual Studio.
Audience(s): Architect, Designer and Pro Dev/Programmer.
Faced with a difficult choice between packaged software and custom development, IT organizations are forced to compromise on capabilities, budget, and delivery time for LOB applications. Microsoft Dynamics CRM is designed to help your enterprise get the best of both worlds with a flexible platform that rapidly accelerates application delivery. Whether you have custom LOB applications built on .NET or need to get a handle on the Access-based applications which have proliferated in your organization, the time to consider Microsoft Dynamics is now.
Here are just a few of the solutions which Microsoft Dynamics supports:
- Case Management
- Contact Center / 311
- Correspondence Tracking
- Field Inspections
- Funds & Grant Management
- Task Management
- License / Certification Tracking
The morning sessions will provide an overview of the Dynamics application architecture and demonstrate integration with other familiar Microsoft technologies such as the Office system, Visual Studio, Microsoft .NET Framework and SQL Server. You’ll hear about and see examples of Government solutions build on the CRM platform.
The afternoon will consist of a deeper dive into Dynamics CRM development and help you understand how to build applications using Microsoft Dynamics CRM 2011 and CRM Online. Microsoft Dynamics CRM uses familiar components such as WCF & OData web service endpoints, JavaScript, Silverlight, .NET 4, Workflow Foundation 4, SQL reporting and more; making it a general purpose framework for line-of-business applications. We will drill into the details of such development and explains how developers can connect, extend, and embed their applications with Microsoft Dynamics CRM. You will gain an understanding of the Application Lifecycle Management (ALM) of Dynamics CRM Development using Visual Studio and Team Foundation Server 2010. We’ll cover concepts like build automation, automated testing, and handling environments (dev, test, prod).
Don’t miss the chance to help your agency solve the biggest request of the economic downturn: “How can your team do more with less and do it quicker?” Microsoft Dynamics CRM can help.
