惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
Martin Fowler
Martin Fowler
B
Blog RSS Feed
D
DataBreaches.Net
L
LangChain Blog
月光博客
月光博客
S
SegmentFault 最新的问题
阮一峰的网络日志
阮一峰的网络日志
V
Visual Studio Blog
美团技术团队
Jina AI
Jina AI
博客园 - 司徒正美
雷峰网
雷峰网
Last Week in AI
Last Week in AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
小众软件
小众软件
罗磊的独立博客
博客园_首页
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta

博客园 - James Wong

QQ在线代码生成器 - James Wong - 博客园 試試Cashfiesta XP系統下顯示窗體陰影 GDI+的用處 Domino學習筆記(11) Domino學習筆記(10) ERP推行實踐(10) Domino學習筆記(09) Domino學習筆記(08) ERP推行實踐(09) VB2005學習筆記(01) VB2005之全局鼠標鍵盤鉤子 ERP推行實踐(08) Domino學習筆記(07) ERP推行實踐(07) ERP推行實踐(06) ACCESS自動更新模式 ACCESS開發數據應用程序體會 從范例創建首個Lotus應用程序
CreateProcess&Shellexecute - James Wong - 博客园
James Wong · 2005-10-18 · via 博客园 - James Wong

    <DllImport("kernel32.dll")> _
    
Private Shared Function CreateProcess(ByVal lpApplicationName As StringByVal lpCommandLine As StringByVal lpProcessAttributes As IntPtr, _
    
ByVal lpThreadAttributes As IntPtr, ByVal bInheritHandles As IntegerByVal dwCreationFlags As Integer, _
    
ByVal lpEnvironment As IntPtr, ByVal lpCurrentDirectory As StringByRef lpStartupInfo As STARTUPINFO, _
     
ByRef lpProcessInformation As PROCESS_INFORMATION) As Boolean
    
End Function


 
<StructLayout(LayoutKind.Sequential)> _
    
Private Structure STARTUPINFO
        
Public cb As Integer
        
Public lpReserved As String
        
Public lpDesktop As String
        
Public lpTitle As String
        
Public dwX As Integer
        
Public dwY As Integer
        
Public dwXSize As Integer
        
Public dwYSize As Integer
        
Public dwXCountChars As Integer
        
Public dwYCountChars As Integer
        
Public dwFillAttribute As Integer
        
Public dwFlags As Integer
        
Public wShowWindow As Int32
        
Public cbReserved2 As Short
        
Public lpReserved2 As IntPtr
        
Public hStdInput As IntPtr
        
Public hStdOutput As IntPtr
        
Public hStdError As IntPtr
    
End Structure


    
<StructLayout(LayoutKind.Sequential)> _
    
Private Structure PROCESS_INFORMATION
        
Public hProcess As IntPtr
        
Public hThread As IntPtr
        
Public dwProcessId As Integer
        
Public dwThreadId As Integer
    
End Structure


  
<DllImport("shell32.dll")> _
    
Private Shared Function ShellExecuteEx(ByRef lpExecInfo As SHELLEXECUTEINFO) As Integer

    
End Function


   
<StructLayout(LayoutKind.Sequential)> _
Public Structure SHELLEXECUTEINFO
        
Public cbSize As Integer
        
Public fMask As Integer
        
Public hwnd As IntPtr
        
Public lpVerb As String                  ' /* Action,edit,open,print */
        Public lpFile As String                  '; /*  According to the value of lpVerb,always set to the filename */
        Public lpParameters As String            '; /* Parameters chars */
        Public lpDirectory As String             '; /* Directory */
        Public nShow As Integer
        
Public hInstApp As IntPtr
        
Public lpIDList As Integer
        
Public lpClass As String
        
Public hkeyClass As IntPtr
        
Public dwHotKey As Integer
        
Public hIcon As IntPtr
        
Public hProcess As IntPtr
    
End Structure