473,322 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Call EXE method from DLL using named instance

Hi
Is there a way that I can call a method in an EXE (managed code,
VB.NET) from a .NET DLL by passing a reference to the instance of the
EXE? Multiple instances of EXE might be running and loaded in memory
and I need the DLL to invoke a method within the running instance by
passing a reference (such as the application title, window handler
etc).

TIA

Jul 24 '06 #1
3 3055
Hello pv*********@gmail.com,

Whoa. That's just.. messed up. You call function in DLLs from applications..
not the other way around. Rethink your architecture.

-Boo
Hi
Is there a way that I can call a method in an EXE (managed code,
VB.NET) from a .NET DLL by passing a reference to the instance of the
EXE? Multiple instances of EXE might be running and loaded in memory
and I need the DLL to invoke a method within the running instance by
passing a reference (such as the application title, window handler
etc).
TIA

Jul 24 '06 #2
Well, not quite... The DLL acts as a wrapper class and the method that
invokes the call to the EXE is actually called from an Access VBA
module.


GhostInAK wrote:
Hello pv*********@gmail.com,

Whoa. That's just.. messed up. You call function in DLLs from applications..
not the other way around. Rethink your architecture.

-Boo
Hi
Is there a way that I can call a method in an EXE (managed code,
VB.NET) from a .NET DLL by passing a reference to the instance of the
EXE? Multiple instances of EXE might be running and loaded in memory
and I need the DLL to invoke a method within the running instance by
passing a reference (such as the application title, window handler
etc).
TIA
Jul 24 '06 #3
<pv*********@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Well, not quite... The DLL acts as a wrapper class and the method that
invokes the call to the EXE is actually called from an Access VBA
module.

Unless things have drastically changed for the worse, a DLL is, by
definition, an in-process server. Each exe will reference a different
instance of that DLL. Normally, the way to "call" methods in a standard EXE
(vs and Out of process server... which I have no idea if dotNet supports or
not), you reference your DLL from the EXE, call a method/set a
property/whatever in that DLL and, sometime later, the DLL fires an event.
The exe can trap that event. The DLL can pass any information to the exe as
arguments to the event handler.

I'm just 'poking around' here though so..... In VB6, this kind of stuff is
gravy. Especially when dealing with a VBA back-end.

--
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm
Jul 25 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Erlend Fuglum | last post by:
I have tried and tried, but cannot figure out the source of the following error: AttributeError: 'module' object has no attribute 'menyHMTL' __doc__ = 'Attribute not found.' __getitem__ =...
7
by: Jeffrey E. Forcier | last post by:
I am attempting to write a class whose string representation changes in response to external stimuli. While that effect is obviously possible via other means, I attempted this method first and was...
1
by: keith.walter | last post by:
My first asp.net app is almost "done" and I am stuck. Here is my situation: I have a "mother" page add_customer.aspx and a"child" user control add_group.ascx. On the mother page is an "add...
9
by: Joel Finkel | last post by:
Is there a way to execute a method if all we know is its name as a string? Let's say we have the following class. What is the code for the Execute method? I need a solution that works with the...
2
by: Sylvain Ferriol | last post by:
hello can you explain why python does not see difference between instance method and class method, having the same name example .... def f(self): .... print('instance method')...
46
by: Steven T. Hatton | last post by:
I just read §2.11.3 of D&E, and I have to say, I'm quite puzzled by what it says. http://java.sun.com/docs/books/tutorial/essential/concurrency/syncrgb.html <shrug> -- NOUN:1. Money or...
9
by: Steve Richter | last post by:
in a generic class, can I code the class so that I can call a static method of the generic class T? In the ConvertFrom method of the generic TypeConvert class I want to write, I have a call to...
3
by: wendallsan | last post by:
Hi All, I've stumped myself writing an app that uses Prototype and a bit of PHP. Here is what I have: I have a custom class named Default_county_init_data that, upon initialization makes...
44
by: Steven D'Aprano | last post by:
I have a class which is not intended to be instantiated. Instead of using the class to creating an instance and then operate on it, I use the class directly, with classmethods. Essentially, the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.