Browse by Tags
All Tags »
P/Invoke (RSS)
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...