Hi there,
I've just created a WPF application like a simple Player, then I create the relative dll file.
I've also created a Win32 Application and I added my dll file created earlier.
The question is:
How can I do for to call/run that dll file in my Win32 Application?
I hope to be clear,
Thanks a lot,
Carmelo.
-
-
It wasn't all that clear. An "application" is an EXE, not a DLL. If you really did create a WPF application, just use one of the many "spawn" APIs to start the WPF application (CreateProcess, spawn, ShellStart, etc.). If, however, you've created a WPF user control or something similar, and what to display that from a Win32 application, you'll need to use interop APIs. http://msdn.microsoft.com/en-us/library/ms742522.aspx
-
Carmelo, a WPF application compiles to a .exe which can be executed alone.
If you have produced a DLL, tyhen it seems that you have created a WPF Control, which fo simplicity's sake, should be used in a WPF project (you need to reference it)
If you need to use it in Winforms, then you need to look up WPF / Winforms Interop. (Again, you need to add a reference to the dll you created, copying it in is not sufficient)
If it is a Win32 MFC app, then I don't think WPF will interop with that, but I could be wrong. -
Hi everybody and thanks for the replies,spivonious said:
maybe I haven't been too clear...
I've already read about "WPF and Win32 Interoperation Overview" and I've tried the "Win32 Clock Interoperation Sample".
So I created my WPF dll and I put it in my Win32 app.
Now I have to write the code in my Win32 app in order to call/run my dll added, but I'm not able to do it...
-
Why are you trying to do this? Surely if you are writing something from scratch you may as well use the 1 tech, as your application is easier to maintain that way.Viashivan said:
Hi everybody and thanks for the replies,spivonious said:*snip*
maybe I haven't been too clear...
I've already read about "WPF and Win32 Interoperation Overview" and I've tried the "Win32 Clock Interoperation Sample".
So I created my WPF dll and I put it in my Win32 app.
Now I have to write the code in my Win32 app in order to call/run my dll added, but I'm not able to do it...
If I was upgrading a Winforms application, then I'd look at interop. Is this mostly a win32 app or a WPF one?
-
Hi Vesuvius (are you Italian?vesuvius said:
Why are you trying to do this? Surely if you are writing something from scratch you may as well use the 1 tech, as your application is easier to maintain that way.Viashivan said:*snip*
If I was upgrading a Winforms application, then I'd look at interop. Is this mostly a win32 app or a WPF one?
)
I'm trying to create a Win32 Application and I'd like to create also a WPF dll separately.
So whenever I call my dll from my Win32 app it will do something.
I imported the dll file in my Win32 project with all the referencies but I'm not able to call the dll and show it in a window.
I hope I'm fulfilling,
Thanks a lot,
Carmelo.
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.