Skip to content

Instantly share code, notes, and snippets.


Oleg Yamnikov yamnikov-oleg

View GitHub Profile
yamnikov-oleg / Program.cs
Last active Mar 12, 2018
Пример получения списка сертификатов КриптоПро CSP
View Program.cs
var hStore = Libcapi.CertOpenSystemStoreA(IntPtr.Zero, "MY");
Console.WriteLine("hStore = {0}", hStore);
Console.WriteLine("GetLastError: {0}", Librdrsup.GetLastError());
var pCtx = Libcapi.CertEnumCertificatesInStore(hStore, IntPtr.Zero);
while (pCtx.ToInt32() != 0)
var ctx = Marshal.PtrToStructure<Libcapi.CertContext>(pCtx);
var info = Marshal.PtrToStructure<Libcapi.CertInfo>(ctx.pCertInfo);
yamnikov-oleg / LICENSE
Last active Apr 13, 2021
Shared (interprocess) mutexes on Linux
MIT License
Copyright (c) 2018 Oleg Yamnikov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

Source: man syscall

Architecture calling conventions

Every architecture has its own way of invoking and passing arguments to the kernel. The details for various architectures are listed in the two tables below.

The first table lists the instruction used to transition to kernel mode, (which might not be the fastest or best way to transition to