VB进程间通讯 使用匿名管道原代码
Option Explicit
Private Declare Function CreatePipe Lib "kernel32" (phReadPipe As Long, phWritePipe As Long, lpPipeAttributes As SECURITY_ATTRIBUTES, ByVal nSize As Long) As Long
Private Declare Function WriteFile Lib "kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, lpNumberOfBytesWritten As Long, ByVal lpOverlapped As Long) As Long
Private Declare Function CreateProcess Lib "kernel32" Alias "CreateProcessA" (ByVal lpApplicationName As String, ByVal lpCommandLine As String, ByVal lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal lpEnvironment As Long, ByVal lpCurrentDriectory As String, lpStartupInfo As STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function GetStdHandle Lib "kernel32" (ByVal nStdHandle As Long) As Long
Private Const INVALID_HANDLE_VALUE = -1
Private Const STARTF_USESTDHANDLES = &H100
Private Const STARTF_USESHOWWINDOW = &H1
Private Const SW_HIDE = 0
Private Const STD_ERROR_HANDLE = -12&
Private Const STD_OUTPUT_HANDLE = -11&
Private Const HIGH_PRIORITY_CLASS = &H80
Dim m_lngHWrite As Long '写管道名柄
'启动进程信息
Private Type STARTUPINFO
cb As Long
lpReserved As String
lpDesktop As String
lpTitle As String
dwX As Long
dwY A
相关文档:
Format[$] ( expr [ , fmt ] )
format 返回变体型
format$ 强制返回为文本
--------------------------------
数字类型的格式化
--------------------------------
固定格式参数:
General Number 普通数字,如可以用来去掉千位分隔号
format$("100 ......
今天在调试的过程中发现 在vb中拼SQL的时候发现"()" 作用很大
eg: table: T_TEST col : T_KB int ,S_CD int ,Z_SU int
dim gcstrT_1 ,gcstrT_3 as integer
gcstrT_1 = 1
gcstrT_3 = 3
strWhere = strWhere & "……"
strWhere = strWhere & "AND ((T_K ......
VB无所不能之五:建立“标准”DLL动态链接库文件(2)
——作者:钟声
博客地址:http://blog.csdn.net/useway
昨天我们讲到,如何通过特殊方法获取OBJ文件,那么今天我们继续讲如何进行编译连接。
  ......
'在引用里添加ADODB
Public vscn As ADODB.Connection
Public SQLString As String
SQLString = "Provider=SQLOLEDB.1;Password=密码;Persist Security Info=True;User ID=用" & _
"户;Initial Catalog=数据库名;Data Source=服务器名"
  ......
Dim rs As ADODB.Recordset
Dim sqlstr As String
'查询
sqlstr = "select * from 表名 where 字段名 = '" & 查询的内容 & "'"
rs = VScn.Execute("" & SqlSt ......