Created
March 15, 2021 12:58
-
-
Save rakisaionji/7a0b00aff4fd4cd2e71d9d7301a1d9b9 to your computer and use it in GitHub Desktop.
Testing a native DLL with C#.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.InteropServices; | |
namespace CakeTest | |
{ | |
class Program | |
{ | |
[DllImport("Cake")] | |
private static extern IntPtr GetHttpEncryptHeader(); | |
[DllImport("Cake")] | |
private static extern IntPtr GetHttpEncryptVersion(); | |
static void Main(string[] args) | |
{ | |
var EncryptHeader = Marshal.PtrToStringAnsi(GetHttpEncryptHeader()); | |
var EncryptVersion = Marshal.PtrToStringAnsi(GetHttpEncryptVersion()); | |
Console.WriteLine("EncryptHeader = {0}", EncryptHeader); | |
Console.WriteLine("EncryptVersion = {0}", EncryptVersion); | |
Console.ReadLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ChiffreTest.cs