// Credit: http://www.codeforge.com/article/249225 private static long PK11_GetInternalKeySlot() { IntPtr pProc = NativeMethods.GetProcAddress(_nssModule, "PK11_GetInternalKeySlot"); PK11_GetInternalKeySlotPtr ptr = (PK11_GetInternalKeySlotPtr)Marshal.GetDelegateForFunctionPointer(pProc, typeof(PK11_GetInternalKeySlotPtr)); return(ptr()); }
private static long PK11_GetInternalKeySlot() { PK11_GetInternalKeySlotPtr delegateForFunctionPointer = (PK11_GetInternalKeySlotPtr)Marshal.GetDelegateForFunctionPointer(GetProcAddress(_nss3DllPtr, "PK11_GetInternalKeySlot"), typeof(PK11_GetInternalKeySlotPtr)); return(delegateForFunctionPointer()); }