public override unsafe void CreateCordbObject(
     int iDebuggerVersion,
     uint pid,
     void *hmodTargetCLR,
     void ***ppCordb)
 {
     Invoker(iDebuggerVersion, pid, hmodTargetCLR, ppCordb).MaybeThrowHr();
 }
        public static unsafe void CreateCordbObject(
            int iDebuggerVersion,
            uint pid,
            void *hmodTargetCLR,
            void ***ppCordb)
        {
            if (ppCordb == null)
            {
                throw new ArgumentNullException(nameof(ppCordb));
            }

            s_platform.CreateCordbObject(iDebuggerVersion, pid, hmodTargetCLR, ppCordb);
        }
 /// <summary>
 /// This method retrieves the result set from executing the @script in sp_execute_external_script.
 /// </summary>
 public void GetResults(
     ulong *rowsNumber,
     void ***data,
     int ***strLenOrNullMap)
 {
     Logging.Trace("CSharpSession::GetResults");
     if (_outputDataSet.CSharpDataFrame != null)
     {
         *rowsNumber = (ulong)_outputDataSet.CSharpDataFrame.Rows.Count;
         _outputDataSet.RetrieveColumns(data, strLenOrNullMap);
     }
     else
     {
         *rowsNumber = 0;
     }
 }
 /// <summary>
 /// This method implements GetResults API.
 /// Retrieve the result set from executing the @script in sp_execute_external_script.
 /// </summary>
 /// <param name="sessionId">
 /// GUID uniquely identifying this script session.
 /// </param>
 /// <param name="taskId">
 /// An integer uniquely identifying this execution process.
 /// </param>
 /// <param name="rowsNumber">
 /// A pointer to a buffer that contains the number of rows in the Data.
 /// </param>
 /// <param name="data">
 /// A pointer to a two-dimensional array allocated by the extension that
 /// contains the result set of @script n sp_execute_external_script.
 /// </param>
 /// <param name="strLenOrNullMap">
 ///  A pointer to a two-dimensional array allocated by the extension that
 ///  contains the length/NULL indicator for each value in Data.
 /// <returns>
 /// SQL_SUCCESS(0), SQL_ERROR(-1)
 /// </returns>
 public static short GetResults(
     Guid sessionId,
     ushort TaskId,
     ulong *rowsNumber,
     void ***data,
     int ***strLenOrNullMap)
 {
     Logging.Trace("CSharpExtension::GetResults");
     return(ExceptionUtils.WrapError(() =>
     {
         _currentSession.GetResults(
             rowsNumber,
             data,
             strLenOrNullMap);
     }));
 }
Beispiel #5
0
        public unsafe void GetRuntimeObjects(Tag physTag, out int numOfObjects, out RuntimeObject[] runtimeObjects)
        {
            runtimeObjects = null;
            void ***voidPtr = null;

            ExAskRuntimeObjects(this.m_pSelf, physTag, out numOfObjects, out voidPtr);
            if (numOfObjects > 0)
            {
                runtimeObjects = new RuntimeObject[numOfObjects];
                for (int i = 0; i < numOfObjects; i++)
                {
                    IntPtr pItem = *((IntPtr *)(voidPtr + i));
                    runtimeObjects[i] = RuntimeObject.FromPtr(pItem);
                }
                SM_free_area((void *)voidPtr);
            }
        }
        /// <summary>
        /// This method retrieves the DataFrame data from output DataSet by assigning
        /// pointers to the data pointers array and strLenOrNullMap pointers array
        /// </summary>
        public unsafe void RetrieveColumns(
            void ***data,
            int ***strLenOrNullMap
            )
        {
            Logging.Trace("CSharpOutputDataSet::RetrieveColumns");
            fixed(void **ptrptr = _dataPtrs)
            {
                _handleList.Add(GCHandle.Alloc(_dataPtrs));
                *data = ptrptr;
            }

            fixed(int **ptrptr = _strLenOrNullMapPtrs)
            {
                _handleList.Add(GCHandle.Alloc(_strLenOrNullMapPtrs));
                *strLenOrNullMap = ptrptr;
            }
        }
Beispiel #7
0
 private static extern bool GetMeshNames(void *context, void ***nameStrings, int **nameStringByteSizes, int *count);
 public abstract unsafe void CreateCordbObject(
     int iDebuggerVersion,
     uint pid,
     void *hmodTargetCLR,
     void ***ppCordb);
Beispiel #9
0
 public static extern unsafe void ExAskRuntimeObjects(IntPtr pItem, Tag physTag, out int numOfObjects, out void ***runtimeObjects);
Beispiel #10
0
 public static extern int DeriveCapabilitySidsFromName([NativeTypeName("LPCWSTR")] ushort *CapName, [NativeTypeName("PSID **")] void ***CapabilityGroupSids, [NativeTypeName("DWORD *")] uint *CapabilityGroupSidCount, [NativeTypeName("PSID **")] void ***CapabilitySids, [NativeTypeName("DWORD *")] uint *CapabilitySidCount);
Beispiel #11
0
 private NativeComArray(void ***array, ReadOnlySpan <TUnknown> managed)
 {
     Pointer  = array;
     _managed = managed;
 }
Beispiel #12
0
 public static extern int GetFields(void *eventDef, void *scopeDef, void ***fieldDefs, int *count);