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 展开
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 展开
1个回答
展开全部
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
'老式的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
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询