Dde Api .dll

Posted on by admin
Windows Api Dll

DDE for Excel API Quick Reference This Quick Reference assumes that you are comfortable downloading and installing software. Download and Install the API. In computing, Dynamic Data Exchange (DDE). (NDDEAPI Server Side) NDDENB32.DLL (Network DDE NetBIOS Interface) NETDDE.EXE (Network DDE - DDE Communication).

Ok, here's a brief bit of the code. The whole vb6 code can be downloaded here: Ultimately, I'd like this in vb.net if I can get it to work. Here's the section of code i think applies. 'ran the initialize code first.

'add functions that are listed below but not shown are api calls. ' Private Sub cmdRequest_Click() Dim lRet As Long Dim lSize As Long Dim sBuffer As String Dim sFinal As String If (CheckData('Request')) Then ' 'ive substituted the values I've tried in the next line.

DDE_CreateStringHandles 'iexplore', 'WWW_GetWindowInfo', 'BufferSpacer' ' Open the conversation. If (g_hDDEConv = 0) Then g_hDDEConv = DDE_Connect End If If g_hDDEConv Then ' Perform the transaction. LRet = DdeClientTransaction(0, 0, g_hDDEConv, g_hItem, CF_TEXT, XTYP_REQUEST, 2000, 0) 'AT THIS POINT, NOTHING IS RETURNED for lRet SO IT DROPS TO 'DDE REQUEST FAILED' If (lRet) Then Debug.Print 'DDE Request Success.'

' Grab the data from the DDE object create during the transaction. The DDE object ' is part of the DDE subsystem memory. Once we get what we want we need to free ' the object. Check the Microsoft Platform SDK for more information on freeing ' DDE global memory. ' The first call returns the size of the of the string. Program Do Podkrecania Procesora Chomikuj: Full Version Software. For some reason there's ' always an extra 3 bytes attached to the end of the string. That's why I have a magic ' number.

LSize = DdeGetData(lRet, vbNullString, 0, 0) ' Allocate a buffer for the return data. SBuffer = String$(lSize, 0) ' Grab the data. LSize = DdeGetData(lRet, sBuffer, Len(sBuffer), 0) ' Print the contents of the buffer. TxtValue.Text = sBuffer Debug.Print sBuffer ' Free the DDE subsystem resources.

DdeFreeDataHandle lRet Else Debug.Print 'DDE Request Failed' TranslateError End If End If DDE_FreeStringHandles Else MsgBox 'Please enter the required data for the transaction.' End If End Sub Private Sub DDE_CreateStringHandles(ByRef sTheService As String, ByRef sTheTopic As String, Optional ByRef sTheItem As String = ') ' Create the string handles for the service and topic.

DDEML will not ' allow you to use standard strings. NOTE: Make sure to release the ' string handles once you are done with them. G_hService = DdeCreateStringHandle(g_lInstID, sTheService, CP_WINANSI) g_hTopic = DdeCreateStringHandle(g_lInstID, sTheTopic, CP_WINANSI) ' Only convert the item if we were passed a string otherwise you'll get a memory ' error. If (sTheItem ') Then g_hItem = DdeCreateStringHandle(g_lInstID, 'WWW_GetWindowInfo', CP_WINANSI) End If End Sub Private Function DDE_Connect() As Long Dim udtConvCont As CONVCONTEXT Dim hDDEConv As Long ' Set up the conversation context structure. UdtConvCont.iCodePage = CP_WINANSI udtConvCont.cb = Len(udtConvCont) hDDEConv = 0 ' Open the connection to the service. HDDEConv = DdeConnect(g_lInstID, g_hService, g_hTopic, udtConvCont) ' Do we have a connection? If hDDEConv Then Debug.Print 'DDE Connection Success.'