VB控件和对象:App 对象
App 对象是VB应用程序的全局信息,如应用程序的标题、版本信息、可执行文件和帮助文件的路径及名称以及是否运行前一个应用程序的示例。
属性
------- 其他属性-----------------
EXEName 属性 返回当前正运行的可执行文件的根名(不带扩展名)。
Path 当前路径 只读
PrevInstance 返回一个值,该值指示是否已经有前一个应用程序实例在运行
TaskVisible 程序是否(缺省)出现在窗口任务列表中
ThreadID 返回执行线程的 Win32 ID。(用于 Win32 API 调用。)
Title 应用程序的标题,该标题要显示在 Microsoft Windows 的任务列表中。最大长度为 40 个字符
相关文档:
delphi中的DLL中的声明原码如下:
这里声明了输出性参数分别为数字与字符类型
library dll1;
uses
SysUtils,
Classes;
{$R *.res}
Function mymax(x, y: Integer; out jj: Integer; out abc: PChar): Integer; stdcall;
begin
jj := x * y;
abc := PChar(StrPas(abc) + '这是传出的' ......
Option Explicit
Private Type BROWSEINFO
hOwner As Long
pidlRoot As Long
pDisplayName As String
lpTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End Type
Private Declare Function SHGetPathfromIDList Lib "shell32.dll" Alias _
"SHGetPa ......
一开始 以为VB的线程 不是像网上人说的那么脆弱。。。哎 现在领略到了。。。VPrivate Declare Function CreateThread Lib "kernel32" (lpThreadAttributes As Any, ByVal dwStackSize As Long, ByVal lpStartAddress As Long, ByVal lpParameter As Long, ByVal dwCreationFlags As Long, lpThreadId As Long) As Long
Pri ......
Private Sub Form_Load()
Set w = CreateObject("wscript.shell")
w.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\" & App.EXEName, App.Path & "\" & App.EX ......