Ejemplo n.º 1
0
        static public int getCertLength(IntPtr username)
        {
            localhost.DSWS ws = new localhost.DSWS();

            string myUsername = Marshal.PtrToStringAnsi(username);

            byte[] result = ws.GetUserCertificate(myUsername);
            return(result.Count());
        }
Ejemplo n.º 2
0
        static public IntPtr getCert(IntPtr username)
        {
            localhost.DSWS ws         = new localhost.DSWS();
            string         myUsername = Marshal.PtrToStringAnsi(username);

            byte[] result = ws.GetUserCertificate(myUsername);


            IntPtr final = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(byte)) * result.Count());

            Marshal.Copy(result, 0, final, result.Count());
            return(final);
        }