如果声明放在模块中生成public类型,还有就是涉及的常量和结构也要声明

解决方案 »

  1.   

    老大,你的SECURITY_ATTRIBUTES呢?
      

  2.   

    因為SECURITY_ATTRIBUTES是VB沒有數據類型.所以你要先聲明這個數據類型..然後才可以調用..
     type SECURITY_ATTRIBUTES 
        nLength as long 
        lpSecurityDescriptor as long
        bInheritHandle as long
    end type
      

  3.   

    假如不是要用权限的话,可以把
    lpSecurityAttributes As SECURITY_ATTRIBUTES
    改为
    ByVal lpSecurityAttributes As Long
    调用时把lpSecurityAttributes设为0
    其实这个平时也没什么用,而且在95,98下会被忽略.