473,397 Members | 1,974 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,397 software developers and data experts.

Function Call in other exe file

Hello.
Can I execute function in my code from other exe file (exe file is writen by
me)?
I also want pass some parameters to the function.
How can I do this?
Nov 16 '05 #1
3 4761
It would be a lot easier if it was a .dll and you just added a reference,
however if you don't mind doing a little work, you can do it with
System.Reflection. You won't be passing it to that function per se unless
you want to start that .exe. If you want to use that function and use
reflection you'll be creating it locally so to speak.

Check out Reflection on MSDN

HTH,

Bill

--
W.G. Ryan MVP Windows - Embedded

http://forums.devbuzz.com
http://www.knowdotnet.com/dataaccess.html
http://www.msmvps.com/williamryan/
"msnews.microsoft.com" <da*********@hotmail.com> wrote in message
news:OO**************@tk2msftngp13.phx.gbl...
Hello.
Can I execute function in my code from other exe file (exe file is writen by me)?
I also want pass some parameters to the function.
How can I do this?

Nov 16 '05 #2
I have a Windows Service exe file (it's executed) and I want to call
function which is in this exe from my code.
How can I do it?

"William Ryan eMVP" <do********@comcast.nospam.net> wrote in message
news:#6**************@tk2msftngp13.phx.gbl...
It would be a lot easier if it was a .dll and you just added a reference,
however if you don't mind doing a little work, you can do it with
System.Reflection. You won't be passing it to that function per se unless
you want to start that .exe. If you want to use that function and use
reflection you'll be creating it locally so to speak.

Check out Reflection on MSDN

HTH,

Bill

--
W.G. Ryan MVP Windows - Embedded

http://forums.devbuzz.com
http://www.knowdotnet.com/dataaccess.html
http://www.msmvps.com/williamryan/
"msnews.microsoft.com" <da*********@hotmail.com> wrote in message
news:OO**************@tk2msftngp13.phx.gbl...
Hello.
Can I execute function in my code from other exe file (exe file is
writen by
me)?
I also want pass some parameters to the function.
How can I do this?


Nov 16 '05 #3
Can you send me some little simples of each method?

"Jackson Davis" <an*******@discussions.microsoft.com> wrote in message
news:26**********************************@microsof t.com...
There are a number of ways you can do this:
1. The service exe can expose itself in the running object table. The client can get the instance from there. 2. You can use .Net Remoting and make a remote call.
3. The exe can expose its method as a web service.

None of these are trivial, but none are hard either.

Jackon Davis
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 16 '05 #4

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

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
2
by: Marc Shapiro | last post by:
I am relatively new to python (I have used it on and off for a few small projects over the last few years) so I imagine that what I am trying to do has already been done, but practical experience,...
39
by: Randell D. | last post by:
Folks, I'm sure this can be done legally, and not thru tricks of the trade - I hope someone can help. I'm writing a 'tool' (a function) which can be used generically in any of my projects. ...
2
by: laredotornado | last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to have my Javascript function execute from the BODY's "onload" method, but if there is already an onload method defined, I would...
7
by: Petr Jakes | last post by:
I have got names of functions stored in the file. For the simplicity expect one row only with two function names: printFoo, printFOO In my code I would like to define functions and then to read...
3
by: Beta What | last post by:
Hello, I have a question about casting a function pointer. Say I want to make a generic module (say some ADT implementation) that requires a function pointer from the 'actual/other modules'...
89
by: Cuthbert | last post by:
After compiling the source code with gcc v.4.1.1, I got a warning message: "/tmp/ccixzSIL.o: In function 'main';ex.c: (.text+0x9a): warning: the 'gets' function is dangerous and should not be...
28
by: Bill | last post by:
Hello All, I am trying to pass a struct to a function. How would that best be accomplished? Thanks, Bill
9
by: CryptiqueGuy | last post by:
Consider the variadic function with the following prototype: int foo(int num,...); Here 'num' specifies the number of arguments, and assume that all the arguments that should be passed to this...
40
by: Angus | last post by:
Hello I am writing a library which will write data to a user defined callback function. The function the user of my library will supply is: int (*callbackfunction)(const char*); In my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.