public int nabtoRpcInvoke(IntPtr session, string nabtoUrl, out string resultJson)
        {
            IntPtr nativeResult;

            var status = Win32NativeMethods.nabtoRpcInvoke(session, nabtoUrl, out nativeResult);

            if (status == NABTO_OK || status == NABTO_FAILED_WITH_JSON_MESSAGE)
            {
                resultJson = MoveString(nativeResult);
            }
            else
            {
                resultJson = null;
            }

            return(status);
        }