VB6(visual basic 6.0)程序求注释m7,谢谢 10

PublicFunctionDDECallback(ByValuTypeAsLong,ByValuFmtAsLong,ByValhConvAsLong,ByValhszS... Public Function DDECallback(ByVal uType As Long, ByVal uFmt As Long, ByVal hConv As Long, ByVal hszString1 As Long, _
ByVal hszString2 As Long, ByVal hData As Long, ByVal dwData1 As Long, ByVal dwData2 As Long) As Long
On Error Resume Next

Dim lSize As Long
Dim sValue As String
Dim sTopic As String
Dim sItem As String
Dim sSymbol As String
Dim sFieldType As String
Dim nPeriod As Integer
Dim Ret As Long

Debug.Print "In client callback. uType: " & uType
Select Case uType
' This is th eevent you'll receive when a server sends you a advise.
Case XTYP_ADVDATA
Debug.Print "XTYP_ADVDATA"
lSize = DdeGetData(hData, vbNullString, 0, 0)
If (lSize > 0) Then
sValue = Space(lSize)
DdeGetData hData, sValue, lSize + 1, 0
End If
lSize = DdeQueryString(g_lInstID, hszString1, vbNullString, 0, CP_WINANSI)
If (lSize > 0) Then
sTopic = Space(lSize)
DdeQueryString g_lInstID, hszString1, sTopic, lSize + 1, CP_WINANSI
End If
lSize = DdeQueryString(g_lInstID, hszString2, vbNullString, 0, CP_WINANSI)
If (lSize > 0) Then
sItem = Space(lSize)
DdeQueryString g_lInstID, hszString2, sItem, lSize + 1, CP_WINANSI
nPeriod = InStr(sItem, ",")
If (nPeriod > 0) Then
sSymbol = Left(sItem, nPeriod - 1)
sFieldType = Mid(sItem, nPeriod + 1, Len(sItem))
End If
End If
DataRecieved sTopic, sSymbol, sFieldType, sValue
Case XTYP_ADVSTART
Debug.Print "XTYP_ADVSTART"

Case XTYP_ADVSTOP
Debug.Print "XTYP_ADVSTOP"
Case XTYP_CONNECT
Debug.Print "XTYP_CONNECT"
Case XTYP_CONNECT_CONFIRM
Debug.Print "XTYP_CONNECT_CONFIRM"
Case XTYP_DISCONNECT
Debug.Print "XTYP_DISCONNECT"
g_hDDEConv = 0
Case XTYP_ERROR
Debug.Print "XTYP_ERROR"
Case XTYP_EXECUTE
Debug.Print "XTYP_EXECUTE"
Case XTYP_MASK
Debug.Print "XTYP_MASK"
Case XTYP_MONITOR
Debug.Print "XTYP_MONITOR"
Case XTYP_POKE
Debug.Print "XTYP_POKE"
Case XTYP_REGISTER
Debug.Print "XTYP_REGISTER"
Case XTYP_REQUEST
Debug.Print "XTYP_REQUEST"
Case XTYP_SHIFT
Debug.Print "XTYP_SHIFT"
Case XTYP_UNREGISTER
Debug.Print "XTYP_UNREGISTER"
Case XTYP_WILDCONNECT
Debug.Print "XTYP_WILDCONNECT"
Case XTYP_XACT_COMPLETE
Debug.Print "XTYP_XACT_COMPLETE"
End Select
DDECallback = 0
End Function
展开
 我来答
fafa_12184155
2011-01-08 · TA获得超过613个赞
知道小有建树答主
回答量:797
采纳率:0%
帮助的人:607万
展开全部
你代码太多,
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式