Welcome to MSDN Blogs Sign in | Join | Help

Decrypt my World

Cryptography, Security, Debugging and more!

News

  • Any of my posts is supported under any Microsoft standard support program or service. They are provided "AS IS" without warranty of any kind, and confer no rights.

Where are my readers?

Locations of visitors to this page

Favorite Posts

Browse by Tags

All Tags » P/Invoke   (RSS)
How to call InternetErrorDlg to deal with certificate issues on SSL connections (C#)
Hi all, The following C# sample shows how to call WinInet APIs to make an SSL request and deal with possible certificate issues with InternetErrorDlg (which will show the same standard dialogs that Internet Explorer shows when something is wrong with Read More...
How to get information from a CRL (.NET)
Hi all, The following C# sample uses CryptoAPI to read the info of a CRL ( Certificate Revocation List ) stored in a file: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; Read More...
How to view a certificate programatically (C#)
Hi all, The following C# sample shows a dialog to view a certificate and its properties . This is the same dialog that appears when we double-click on the cert file in Explorer. I'll use CryptUIDlgViewCertificate API and its CRYPTUI_VIEWCERTIFICATE_STRUCT Read More...
How to sign EXE files with an Authenticode certificate (part 2)
Hi all, welcome back, The other day a customer of mine was having an issue with SignTool.exe when signing an EXE file. The EXE file was getting corrupted /unusable after signing it. When troubleshooting this issue, I had the chance to play a bit more Read More...
How to change Windows Theme programmatically in XP
Hi all, You may know already that there is no i.e. COM object or .NET class we can use to change the Windows Theme programmatically on Windows XP . You may also know the following VBScript which can be used to do this change without user intervention: Read More...
How to sign a message and verify a message signature (C#)
Hi all, welcome back, Today we'll do some more P/Invoke with CryptoAPI and C# . The following sample is a conversion to C# of the C++ sample in Example C Program: Signing a Message and Verifying a Message Signature : <SAMPLE file="Class1.cs"> using Read More...
How to sign EXE files with an Authenticode certificate (VB.NET)
Hi, welcome back, Sorry it took me so long to write a new post. I'm visiting my colleagues at Milano, and I'm horribly busy these days. For Windows platforms, below are the only supported methods we can use to digitally sign Authenticode executables: Read More...
How to call CreateProcessWithLogonW & CreateProcessAsUser in .NET
Hi, welcome back, Sometimes .NET 's System.Diagnostics.Process class and its Start method are not enough for our purposes and we need to call Win32 API directly from .NET ( P/Invoke mechanism) to be able to create a process the way we need. Here you have Read More...
P/Invoking CryptoAPI in .NET (VB.NET version)
Hi, welcome back, This is a continuation of my previous post, P/Invoking CryptoAPI in .NET (C# version) . Here you have the most common P/Invoke CryptoAPI declarations I've successfully used in the past, but this time for VB.NET ( Note: I've included Read More...
P/Invoking CryptoAPI in .NET (C# version)
Hi, welcome back, Sometimes we need to call CryptoAPI from .NET because classes in System.Security.Cryptography namespace have their limitations. For instance, we can't create a temporary key container with RSACryptoServiceProvider, but we can do it with Read More...
Page view tracker