Anyone ever get a handle on DDEML client server operation?
Posted: Mon Sep 16, 2024 9:21 am
My main project could really benefit from use of DDEML but all efforts to get a handle on it escapes me. 

http://www.purebasic.com
https://www.purebasic.fr/english/
Huh???
Exactly, I feel the same way. I rarely bother to ask honest questions on the forum most of the time, because of this kind of agenda that they have. I've blocked the three of them whom I've seen do it to others, so I just never bother to read their replies.
The original post stated this (emphasis added):PBJim wrote: Tue Sep 17, 2024 12:18 amExactly, I feel the same way. I rarely bother to ask honest questions on the forum most of the time, because of this kind of agenda that they have. I've blocked the three of them whom I've seen do it to others, so I just never bother to read their replies.
People using this forum speak different languages natively and the OP gave one sentence, not even a question.Randy Walker wrote: Mon Sep 16, 2024 9:21 am My main project could really benefit from use of DDEML but all efforts to get a handle on it escapes me.![]()
I could grasp enough about DDE that I understand it is used to allow two apps to communicate between each other. I'm really only looking to send data from one app to the other. Cannot get any useful info on your IPC so you're just talking over my head, like the URL you sent. But thanks for the reply anyway.idle wrote: Mon Sep 16, 2024 11:48 pm I've never used it and yes it does look a little complicated
What are you doing that you think DDE is the right solution. There are loads of IPC methods you could use
People using this forum speak different languages natively and the OP gave one sentence, not even a question.Randy Walker wrote: Mon Sep 16, 2024 9:21 am My main project could really benefit from use of DDEML but all efforts to get a handle on it escapes me.![]()
BTW = By The Way... The question was in the subject line:People using this forum speak different languages natively and the OP gave one sentence, not even a question.
Code: Select all
EnableExplicit
Global mhwnd,apphwnd
Procedure SendToApp(hwnd,type,*mdata)
Protected *cds.COPYDATASTRUCT,str.s
*cds = AllocateMemory(SizeOf(COPYDATASTRUCT))
Select type
Case #PB_String
str = PeekS(*mdata,-1)
*cds\dwData = type
*cds\cbData = StringByteLength(str)
*cds\lpData = @str
EndSelect
SendMessage_(hwnd, #WM_COPYDATA, mhwnd, *cds)
FreeMemory(*cds)
EndProcedure
Procedure WinCallback(hWnd, uMsg, WParam, LParam)
Protected *cds.COPYDATASTRUCT
Select umsg
Case #WM_COPYDATA
*cds = LParam
Select *cds\dwData
Case #PB_String
SetGadgetText(0,PeekS(*cds\lpData,-1))
EndSelect
EndSelect
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure
Procedure FindWindowByName(name.s)
Protected hwnd,TitleSize.l,Title.s
hwnd = GetWindow_(GetDesktopWindow_(), #GW_CHILD)
While hwnd
TitleSize.l = GetWindowTextLength_(hwnd) + 2
Title = Space(TitleSize)
GetWindowText_(hwnd, Title, TitleSize)
If FindString(LCase(Title), LCase(name))
If hwnd <> WindowID(mhwnd)
ProcedureReturn hwnd
EndIf
EndIf
hwnd = GetWindow_(hwnd, #GW_HWNDNEXT)
Wend
EndProcedure
Procedure SendString()
Protected str.s = GetGadgetText(0)
If apphwnd = 0
apphwnd = FindWindowByName("Sendit")
EndIf
If apphwnd
SendToApp(apphwnd,#PB_String,@str)
SetGadgetText(0,"")
EndIf
EndProcedure
mhwnd = OpenWindow(#PB_Any,0,0,200,100,"Sendit")
apphwnd = FindWindowByName("Sendit")
EditorGadget(0,10,10,180,30)
ButtonGadget(1,10,50,60,30,"Send url")
BindGadgetEvent(1,@SendString(),#PB_EventType_LeftClick)
SetWindowCallback(@WinCallback(),mhwnd)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
Hahaaa I searched "CDS example" on the web and got many hits for "Credit default swap".
I did search for copy data structure and got one hit with C++ example but my brain melts just looking at C code.idle wrote: Tue Sep 17, 2024 7:11 am
Are easy to achieve but if DDE is what you really need it helps to explain what your specific requirements are which might be more beneficial in getting answers abd also helps others too.
DDE looks Like some over complicated ms solution to a problem that can be solved by much simpler means.
Search for copy data structure that might be what you need