Kimono.KLockFile.GetLockInfo C# (CSharp) 메소드

GetLockInfo() 공개 메소드

Returns the pid, hostname and appname of the process holding the lock after the lock functon has returned with LockStale.
public GetLockInfo ( int &pid, StringBuilder hostname, StringBuilder appname ) : bool
pid int
hostname StringBuilder
appname StringBuilder
리턴 bool
        public bool GetLockInfo(ref int pid, StringBuilder hostname, StringBuilder appname)
        {
            StackItem[] stack = new StackItem[4];
            stack[1].s_int = pid;
            #if DEBUG
            stack[2].s_class = (IntPtr) DebugGCHandle.Alloc(hostname);
            #else
            stack[2].s_class = (IntPtr) GCHandle.Alloc(hostname);
            #endif
            #if DEBUG
            stack[3].s_class = (IntPtr) DebugGCHandle.Alloc(appname);
            #else
            stack[3].s_class = (IntPtr) GCHandle.Alloc(appname);
            #endif
            interceptor.Invoke("getLockInfo$$$", "getLockInfo(int&, QString&, QString&)", stack);
            pid = stack[1].s_int;
            #if DEBUG
            DebugGCHandle.Free((GCHandle) stack[2].s_class);
            #else
            ((GCHandle) stack[2].s_class).Free();
            #endif
            #if DEBUG
            DebugGCHandle.Free((GCHandle) stack[3].s_class);
            #else
            ((GCHandle) stack[3].s_class).Free();
            #endif
            return stack[0].s_bool;
        }