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

PublicFunctionDDE_Advise(strTopicAsString,strItemAsString,strDataAsString)AsBooleanOn... Public Function DDE_Advise(strTopic As String, strItem As String, strData As String) As Boolean
On Error Resume Next

Dim lRet As Long
Dim sValue As String
DDE_Advise = True

' Load the buffer.
sValue = strData

DDE_CreateStringHandles "STIDDE", strTopic, strItem
' Open the conversation.
If (g_hDDEConv = 0) Then
g_hDDEConv = DDE_Connect
End If

If g_hDDEConv Then
' Perform the transaction.
lRet = DdeClientTransaction(strData, Len(strData), g_hDDEConv, g_hItem, CF_TEXT, XTYP_ADVSTART, 2000, 0)

If (lRet) Then
Debug.Print "DDE_Advise Success"
Else
Debug.Print "DDE_Advise Failed"
TranslateError
DDE_Advise = False
End If
Else
DDE_Advise = False
End If

DDE_FreeStringHandles
End Function
展开
 我来答
图杭科技
2011-01-11 · TA获得超过531个赞
知道小有建树答主
回答量:1014
采纳率:50%
帮助的人:591万
展开全部
Public Function DDE_Advise(strTopic As String, strItem As String, strData As String) As Boolean
'老式的DDE数据交换

On Error Resume Next
‘出错则下一个
Dim lRet As Long
Dim sValue As String
DDE_Advise = True’交换成功则用此布尔T变量

' Load the buffer.
sValue = strData

DDE_CreateStringHandles "STIDDE", strTopic, strItem
' Open the conversation.
If (g_hDDEConv = 0) Then
g_hDDEConv = DDE_Connect
End If

If g_hDDEConv Then
' Perform the transaction.
lRet = DdeClientTransaction(strData, Len(strData), g_hDDEConv, g_hItem, CF_TEXT, XTYP_ADVSTART, 2000, 0)

If (lRet) Then
Debug.Print "DDE_Advise Success"’成功
Else
Debug.Print "DDE_Advise Failed"
TranslateError
DDE_Advise = False‘失败
End If
Else
DDE_Advise = False'失败
End If

DDE_FreeStringHandles
End Function
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

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

类别

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

说明

0/200

提交
取消

辅 助

模 式