DDEClientTransaction doesn't work

  • Thread starter Thread starter valdo 77 via .NET 247
  • Start date Start date
V

valdo 77 via .NET 247

Hello,
I'm trying to setup DDE converzation using VB.NET. I used APIfinctions. I have initialized DDEML & got connection. I haveproblem to send the command to the application. The functionalways return 0. Can sombody give me any direction hov to solvethis, please.

I have declared DDEClientTransastion this way:

Public Declare Function DdeClientTransaction Lib "user32" Alias"DdeClientTransaction" (ByRef pData As String, ByVal cbData AsInteger, ByVal hConv As Integer, ByVal hszItem As Integer, ByValwFmt As Integer, ByVal wType As Integer, ByVal dwTimeout AsInteger, ByRef pdwResult As Integer) As Integer

I'm trying to use this function, where 'DdeCommand' is command,'StrLength' is length of command +1, 'ConnectId' is DDEConnecthandle & Result = 0

DdeClientTransaction(DdeCommand, StrLength, ConnectId, 0, 0,XTYP_EXECUTE, 2000, Result)
 
valdo said:
Hello,
I'm trying to setup DDE converzation using VB.NET. I used API
finctions. I have initialized DDEML & got connection. I have problem to
send the command to the application. The function always return 0. Can
sombody give me any direction hov to solve this, please.
I have declared DDEClientTransastion this way:

Public Declare Function DdeClientTransaction Lib "user32" Alias
"DdeClientTransaction" (ByRef pData As String, ByVal cbData As Integer,
ByVal hConv As Integer, ByVal hszItem As Integer, ByVal wFmt As
Integer, ByVal wType As Integer, ByVal dwTimeout As Integer, ByRef
pdwResult As Integer) As Integer
I'm trying to use this function, where 'DdeCommand' is command,
'StrLength' is length of command +1, 'ConnectId' is DDEConnect handle &
Result = 0
DdeClientTransaction(DdeCommand, StrLength, ConnectId, 0, 0, XTYP_EXECUTE, 2000, Result)

There is a lot involved in getting the DDEML to work. Take a look at
the following sample.

Watch for wrap...
http://www.gotdotnet.com/Community/...mpleGuid=2C8C36CF-A974-4B7B-8924-2ED516B75181
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top