Exemplo n.º 1
0
        public void Load(string file, IntPtr hWnd, SLR_FLAGS flags, int timeoutMilliseconds)
        {
            CheckDisposed();

            if (!File.Exists(file))
            {
                throw new FileNotFoundException("file not found", file);
            }

            PersistFile.Load(file, 0x00000000);

            if ((int)(flags & SLR_FLAGS.NO_UI) != 0)
            {
                flags |= (SLR_FLAGS)(timeoutMilliseconds << 16);
            }

            if (shellLinkW != null)
            {
                shellLinkW.Resolve(hWnd, flags);
            }
            else
            {
                shellLinkA.Resolve(hWnd, flags);
            }
        }
Exemplo n.º 2
0
 public void Load(string file, IntPtr hWnd, SLR_FLAGS flags, TimeSpan timeOut)
 {
     Load(file, hWnd, flags, (int)timeOut.TotalMilliseconds);
 }
Exemplo n.º 3
0
 public void Load(string file, IntPtr hWnd, SLR_FLAGS flags)
 {
     Load(file, hWnd, flags, 1);
 }
Exemplo n.º 4
0
        public void Load(string file, IntPtr hWnd, SLR_FLAGS flags, int timeoutMilliseconds)
        {
            CheckDisposed();

            if (!File.Exists(file))
                throw new FileNotFoundException("file not found", file);

            PersistFile.Load(file, 0x00000000);

            if ((int)(flags & SLR_FLAGS.NO_UI) != 0)
                flags |= (SLR_FLAGS)(timeoutMilliseconds << 16);

            if (shellLinkW != null)
                shellLinkW.Resolve(hWnd, flags);
            else
                shellLinkA.Resolve(hWnd, flags);
        }
Exemplo n.º 5
0
 public void Load(string file, IntPtr hWnd, SLR_FLAGS flags, TimeSpan timeOut)
 {
     Load(file, hWnd, flags, (int)timeOut.TotalMilliseconds);
 }
Exemplo n.º 6
0
 public void Load(string file, IntPtr hWnd, SLR_FLAGS flags)
 {
     Load(file, hWnd, flags, 1);
 }