0

I have a dll that is loaded by an application "A" and this dll export few functions. I have another application "B" that loads another Dll. I want to call function of DLL A from DLL B. Is there any way to achieve this via windows messages, ipc etc.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Rahul Bajaj
  • 135
  • 2
  • 14
  • Why won't you load DLL A from DLL B as well? – Lior Kogan Oct 27 '15 at 16:20
  • @LiorKogan that would not be possible because dll A export one function which except specific parameter(Object Of particular type) which is available only from host application A – Rahul Bajaj Oct 27 '15 at 16:28
  • You may want to check out COM... – BadZen Oct 27 '15 at 16:28
  • if process A and B belong to same user session and run at same integrity level, then Lior's suggestion makes sense. – Nandu Oct 27 '15 at 16:28
  • What you seem to be talking about is inter-process communication. Is that right? You want to call a function in process A from process B (regardless of where that function is implemented, DLL or not)? Is that right? – GreatAndPowerfulOz Oct 27 '15 at 16:30
  • You say (1) you want to call a function of DLL A (2) DLL A exports only one function (3) you can't call this function. I'm lost... – Lior Kogan Oct 27 '15 at 16:31
  • @Gread.And.Powerful.Oz yes i am talking about ipc but i want to call function of Dll A via Dll B both are in septate in process – Rahul Bajaj Oct 27 '15 at 16:33
  • @LiorKogan Dll A export only one function. I want to call this function from Dll B. Both dlls are loaded into septate process. – Rahul Bajaj Oct 27 '15 at 16:35
  • There are various ways. One way is to use COM, another is sockets. You can use a windows message too, but that requires finding out the correct window handle to send the message. See here: http://www.codeproject.com/Articles/137/Sending-a-message-to-the-Main-Frame-Window-of-Anot – GreatAndPowerfulOz Oct 27 '15 at 16:50
  • @Gread.And.Powerful.Oz thanks – Rahul Bajaj Oct 28 '15 at 14:36

0 Answers0