示例#1
0
        private int HandleTrackProcessMessage(IntPtr pinnedMemory)
        {
            var response  = new MSG_TrackProcess_Response();
            var writeSize = Marshal.SizeOf(typeof(MSG_TrackProcess_Response));

            try
            {
                var request = _marshalWrapper.PtrToStructure <MSG_TrackProcess_Request>(pinnedMemory);
                response.track = _profilerCommunication.TrackProcess(request.processPath);
            }
            catch (Exception ex)
            {
                DebugLogger.ErrorFormat("HandleTrackProcessMessage => {0}:{1}", ex.GetType(), ex);
                response.track = false;
            }
            finally
            {
                _marshalWrapper.StructureToPtr(response, pinnedMemory, false);
            }
            return(writeSize);
        }
示例#2
0
 private int HandleTrackProcessMessage(IntPtr pinnedMemory)
 {
     var response = new MSG_TrackProcess_Response();
     var writeSize = Marshal.SizeOf(typeof(MSG_TrackProcess_Response));
     try
     {
         var request = _marshalWrapper.PtrToStructure<MSG_TrackProcess_Request>(pinnedMemory);
         response.track = _profilerCommunication.TrackProcess(request.processName);
     }
     catch (Exception ex)
     {
         DebugLogger.ErrorFormat("HandleTrackProcessMessage => {0}:{1}", ex.GetType(), ex.Message);
         response.track = false;
     }
     finally
     {
         _marshalWrapper.StructureToPtr(response, pinnedMemory, false);
     }
     return writeSize;
 }