Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: WME PlugIn and C# / .NET  (Read 4158 times)

0 Members and 1 Guest are viewing this topic.

Yuraj

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 2
    • View Profile
    • My homepage
WME PlugIn and C# / .NET
« on: August 17, 2009, 12:24:34 PM »

Hi,
Today I tried to rewrite wme plugin sdk to c# (i trought that wme plugins are .net assemblies), but it is not possible to make plugin with some .net language?
Thanks in advance!
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: WME PlugIn and C# / .NET
« Reply #1 on: August 17, 2009, 01:05:29 PM »

WME plugins are "normal" DLL libraries, not .NET assemblies. If you wanted to write plugin in C#, you'd have to create some kind of wrapper DLL (written in C++/CLI), which would export standard DLL functions, but internally route the calls to C# code.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: WME PlugIn and C# / .NET
« Reply #2 on: August 17, 2009, 01:07:10 PM »

The debugging console (wme_console.dll) works in a similar fashion. You can check the sources.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: WME PlugIn and C# / .NET
« Reply #3 on: August 17, 2009, 09:18:33 PM »

If anyone's interested, I've put together a really quick&dirty project which contains a simple plugin (derived from wme_sample), which instantiates a C# class and redirect a script method ("SampleMethod") to the C# class method, which displays a message box.

It's really just a proof of concept more than anything else. One would need to do a lot more stuff, for example it would be nice to have some neat .NET wrapper classes for the engine objects available to plugins.

http://dead-code.org/download/demos/wme_dotnet.zip

It requires Visual Studio 2005 or later because it uses C++/CLI.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Yuraj

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 2
    • View Profile
    • My homepage
Re: WME PlugIn and C# / .NET
« Reply #4 on: August 18, 2009, 01:10:05 PM »

If anyone's interested, I've put together a really quick&dirty project which contains a simple plugin (derived from wme_sample), which instantiates a C# class and redirect a script method ("SampleMethod") to the C# class method, which displays a message box.

It's really just a proof of concept more than anything else. One would need to do a lot more stuff, for example it would be nice to have some neat .NET wrapper classes for the engine objects available to plugins.

http://dead-code.org/download/demos/wme_dotnet.zip

It requires Visual Studio 2005 or later because it uses C++/CLI.
Many thanks Mnemonic, I will look on it later.  :)
//sorry for my bad english, som zo Slovenska  ;)
« Last Edit: August 18, 2009, 02:33:49 PM by Yuraj »
Logged
 

Page created in 0.02 seconds with 24 queries.