Microsoft Office primary interop assemblies give us the ability to create and modify Excel Spreadsheets from a .NET application. Office applications like Excel are written in unmanaged code. The primary interop assembly provides wrappers to call unmanaged COM objects from our managed .NET application.
By default, when you reference an Office primary interop assembly, the interop types are embedded into your application to avoid having to deploy extra assemblies. When applying protection, we must preserve some of these embedded types and methods to maintain COM interoperability.
Please consider the following example. This simple C# application uses Excel Interop to create a spreadsheet and populate cells:
When applying for full protection with Dotfuscator, I experience a TypeLoadException at runtime:
To avoid this error, I will configure a rename exclusion for the embedded interop types. All the embedded Interop types are in the Microsoft.Office.Interop.Excel namespace. The specific types I need to preserve are interfaces, most of which contain placeholder methods of the form “_VtblGapX_XX” that also must be preserved.
Based on these patterns, I can leverage custom rules to simplify the Renaming configuration. From my DotfuscatorConfig.xml:
After configuring this rule, the protected output runs properly, and my spreadsheet is created.
The above pattern is general enough to work if the Office primary interop assembly is used for creating any type of Office document: Excel spreadsheet, PowerPoint presentation, Word document, etc.
We asked our top Software Engineers what they’re reading and listening to lately to stay up to date on software development. Here are their recommendations on top accounts to follow:
Google Developers The Google Developers channel features talks from events, educational series, best practices and tips, and the latest updates across Google products, platforms, and services including Android, Firebase, TensorFlow, Flutter, Google Assistant, and more.
CSharp Digest This newsletter is great for busy techs who want the news delivered right to their inbox. You’ll receive weekly updates, interesting stories, and more in the .NET and C# space.
Scott Hanselman Blog As a prominent web developer for the Web Platform Team at Microsoft, Scott Hanselman has been blogging for the past decade on his personal web development experience. Topics range from technology, culture, gadgets, diversity, code, the web, and more. He also has three podcasts, a YouTube channel, and a Twitter account, which you can subscribe to as well.
Microsoft Developer Blogs Just like it sounds, these series of blogs have the inside scoop on the latest information, insights, announcements, and news from Microsoft, specifically written about Visual Studio, Xamarin, Azure, .NET, and various other development languages. There’s also an option to pull the RSS feed so you can have the news and announcements delivered to you.
Hackaday Get lost in mountains of fresh, playful hacks on the Hackaday blog written by developers all around the Internet where new ideas and information are exchanged daily. The term “hacking” tends to have a negative connotation to the public, but Hackaday embraces the act as an art that is highly creative, technical, and clever. When used for good intent, it can positively promote the exchange of new ideas and information. So, if you have any projects you’re proud of and want to show them off, you can document your work on their hosting site, hackaday.io.
Adafruit With Adafruit blog, you’ll get the latest trends, news, and resources on open-source hardware, electronics, gadgets, kits, and more to help you get the machine build of your dreams.
Bald Bearded Builder This year, PreEmptive sponsored this channel and PreEmptive’s JSDefender was implemented in various live coding projects. For software development and clever banter, tune in. With nearly 20 years of experience designing and developing software, Michael Jolley (aka the Bald Bearded Builder) loves sharing his knowledge with others and watching them excel. While still building custom applications for clients today, Jolley spends considerable time pouring into others via his live-coding sessions on Twitch and talks at conferences and meet-ups.
The Hacker News (@TheHackerNews) This widely read account has daily news and technical coverage on cybersecurity, information security, and hacking to make sure you’re one step ahead of trending malicious attacks.
Mobile Security (@mobilesecurity_) Are you a mobile app developer? This is a must-follow account. Stay informed on mobile security trends, specifically with Android and iOS platforms, and how you better adapt to safeguard your applications.
David Heinemeier Hansson (@DHH) If you haven’t heard of David Heinemeier Hansson, you should. As the creator of Ruby on Rails and co-founder and CTO at Basecamp, Hansson is a must-follow leader in the technology space. With a slew of perspectives and opinions, his tweets offer great insight on software development for developers who want to grow professionally.
Kelly Sommers (@kellabyte) Given away by the name of her Twitter handle, Kelly Sommers has a witty personality. She’s also a highly influential developer with over 43K followers to date with an impressive background as a four-times Windows Azure MVP and former two times DataStax MVP for Apache. You’ll get a combination of playful and insightful development tweets.
Sara Ownbey Chipps (@sarajchipps) As a developer at Stack Overflow, Sara Ownbey Chipps is a prominent influential developer in the space. While some of her tweets feature development news and personal opinions, she also engages in a mix of current events she feels worthy of a mention.
Nick Quaranto (@qrush) Nick Quaranto is the developer you’ll instantly feel like a friend. Quaranto has a more laid-back feed where he talks about development news, in addition to worldwide events he feels deeply passionate about.
Jared Parson (@jaredpar) Meet the creator of VsVim, Jared Parson. Parson is also a C# compiler team developer lead at Microsoft working on a language and operating system incubation project. Give him a follow and he won’t disappoint.
Inventa, a Wireless Technology Company, Protects their Android Application with DashO
The Beginnings of Inventa
Having worked in the wireless mobile technology domain in the US, Anand Virani, became intrigued by the growing tech and wireless trends and wanted to explore the field more for himself. He noticed a boom in the Internet of Things (IoT) and that smartphones were becoming more central to how people interacted with each other at home, in the office, and in public places. What if there was a way phones could connect with each other without the need for Internet or cloud access?
Surgical Theater Protects their Medical Applications with Dotfuscator
How It All Started
How is flying a fighter plane similar to performing neurosurgery? They have more in common than you’d think. In 2005, Monty Avisar and Alon Geri, two Israeli fighter pilots were assigned to work with Lockheed Martin to build a $50 million F-16 Flight Simulator program for the Israeli Air Force to improve hand-eye coordination skills for their pilots during combat. Avisar took on the role of project manager and Geri served as senior engineer; the project was a success.