|
|
|
Page 1 of 2 |
[ 24 posts ] |
1, 2 Next
|
 Some clarification from Admin and WyvernX please : Developer's Corner
|
|
Posted: April 4th, 2003, 12:45 am
|
|
|
|
Viper
Viper's Reps:
|
I haven't looked at XUnleashed programming for a long while now ( pre-version 2 ) but I was browsing through the files this morning. I want to create a .NET-based plug-in ( C# ) for DAoC and was looking for an example of a current C++ plug-in. From my brief scan of the files there seems to be a lot of legacy crap lying about from version 1, so I have a few questions:
1. Is the XFrame example in ProgramSDKXFrame still relevant?
2. How do I access XUnleashed API and also the exposed DAoC functionality from the DAoCUnleashed service?
3. Do you have an example of a .NET based project, empty or otherwise?
I don't want to load and examine VB6 examples because they require me to load other crap onto my system or to convert to VB.NET projects that doesn't seem to work very well.
I could work this out myself with a little time but I thought I'd save myself some work and ask since I don't have huge amounts of time to devote to this.
What would probably help is concise and detailed documentation about how to go about creating a plugin for XUnleashed version 2 instead of having to search through numerous forums posts.
Thanks in advance.
Viper.
|
|
|
|
|
Posted: April 4th, 2003, 12:58 am
|
|
|
|
WyvernX
WyvernX's Reps:
|
I'll do it. I'm heading to bed atm, but I'll give ya the run down in the morn. In the mean time,
1. No longer functional. Only v2 is supported now.
2. Just include the .tlb files in your project.
3. No, but I will create one tomorrow that uses c++ ok? I have my DU Service running c++, so I can create a nice little empty project that will get ya started.
The c++ and c# have alot of advantages over the vb plugins. One, is the direct interaction with the HDC. Every plugin draws on a hdc. In vb, it is difficult to work with, but in c++ etc, you can actually have some nice graphics.
Let me sign off there, and pick back up in the morn when I can think more clearly.
|
|
|
|
|
Posted: April 4th, 2003, 6:44 am
|
|
|
|
Viper
Viper's Reps:
|
Thanks, Wyvern.
I've done a little more digging myself and knocked up a little skeleton app ( C# ) that only has 1 edit box with some text in it.
Everything compiles OK but I'm having trouble registering the dll ( failed to register plugin error ).
Here's a little rundown of what I did:
1. Created a class that implements IXUPlugin and provided the necessary properties and methods for that interface.
2. Modified one of the existing XML files to specify the controls in my interface ( 1 edit box ). Also copied one of the existing bitmaps for a window icon.
3. Created a new directory in pluginsDarkAgeOfCamelot and put the dll, the xml and the bmp file in it.
4. Started up XUnleashed and tried to manually register my dll from the plugins tab.
And that's as far as I've got. Hopefully your C++ example will shine a little more light on it.
Cheers.
Viper.
|
|
|
|
|
Posted: April 4th, 2003, 8:34 am
|
|
|
|
DarkStar
DarkStar's Reps:
|
Viper,
.Net Project are not COM/DCOM.
So when installer try to register it whit COM it Fail!
If you want to register with COM you must:
---
Open your project in DotNet
Under Menu "Project" Click "Properties"
On left view of the opened Window select "Configuration Properties" and then "Build"
Now on Right side of the windows you MUST select "Register for COM Interop"
Rebuild your Project
(After Rebuilding you can find One more DLL that is the COM Interop DLL)
In the .XUI File put as COM Dll the Interop Dll and put your main dll as file.
---
I hope of to have been of aid.
Dark
|
|
|
|
|
Posted: April 4th, 2003, 11:14 am
|
|
|
|
Viper
Viper's Reps:
|
Thanks for your input Dark.
I had already done this but the output is not an interop dll but the dll and a type library.
I'm not sure what you mean by your last line "In the .XUI File put as COM Dll the Interop Dll and put your main dll as file". I could understand it if the output from my project had been something like Interop.Plugin.dll and Plugin.dll but all I have is Plugin.dll and Plugin.tlb.
Putting the .tlb filename in the .xui allows the successful registration but the plugin does not show up in the list of 3rd party plugins.
Viper.
|
|
|
|
|
Posted: April 4th, 2003, 12:10 pm
|
|
|
|
WyvernX
WyvernX's Reps:
|
I was going to say that the DLL's that I have made using .net did not need to be COM dll's. Just plain old MFC dll's with ATL class objects. And registering normally. I'm guessing that you are just missing something. I'm putting together a project now. You did just want a plain MFC dll created with VS.net?
While I'm doing it, make sure that you implement IXU_Plugin. That really is all there is to it for the dll to register. Create a MFC dll. Add a ATL simple object class. I usually create it with Thread model (BOTH) and supporting connection points so I can have events. Implement IXU_Plugin. Compile, and register with XU.
Well, let me get the project out, and you can tell me if it is what you are wanting or now.
|
|
|
|
|
Posted: April 4th, 2003, 2:46 pm
|
|
|
|
Viper
Viper's Reps:
|
Er I'm not using MFC Wyvern  , I'm using a C#-based project which need to be made COM compatible.
I've already done this and the output from building my project is the DLL ( which has no COM interop decoration ) and a TLB which is obviously for COM interop. The problem is I don't know how to rationalise both of these items to work with XUnleashed
I implemented IXUPlugin, I assume that's what you meants and not IXU_Plugin ??
Viper.
|
|
|
|
|
Posted: April 4th, 2003, 2:57 pm
|
|
|
|
WyvernX
WyvernX's Reps:
|
Well I've never made a c# project. Only MFC and non MFC dll's using c++. You can make it without MFC, I just like the extra classes.
I'm finished with the empty project... but again, it is done using MFC and C++ with ATL object classes.
I'll up it in a sec.
I'll see if I can create a c# one, but I have never done anything in c#.
|
|
|
|
|
Posted: April 7th, 2003, 12:44 am
|
|
|
|
DarkStar
DarkStar's Reps:
|
Sorry Viper,
I work with VB.Net not C#
and in VB.net when I select "Register for COM Interop" it create a Dll for me.
Dark
|
|
|
|
|
Posted: April 7th, 2003, 6:39 am
|
|
|
|
Viper
Viper's Reps:
|
Darkstar,
Yes VB.NET and C# are treated slightly differently for COM interop. As you say VB.NET creates a wrapped dll enabling COM components to use it. C# creates a type library and the dll.
I have a few ideas about how to get round this but might need some help from Admin on how to get it to work with XUnleashed. The downside is that to use my plugin the user will need the .NET framework with SP2 on it.
Ah well more fun to come
Viper.
|
|
|
|
|
Posted: April 7th, 2003, 8:56 am
|
|
|
|
WyvernX
WyvernX's Reps:
|
Viper, I'll see what I cna do. How do you create a dll library with c#.. err.. what is the name of the starting project base?
|
|
|
|
|
Posted: April 7th, 2003, 10:43 am
|
|
|
|
Viper
Viper's Reps:
|
WyvernX,
Select File, New, Project and select Visual C# Projects on the left pane. On the right pane select Class Library and the output will automatically be a DLL.
Viper.
|
|
|
|
|
Posted: April 7th, 2003, 11:09 am
|
|
|
|
WyvernX
WyvernX's Reps:
|
Ok, thanks. I'll see if I can spiffy up an empty IXUPlugin implementation for yas.
|
|
|
|
|
Posted: April 7th, 2003, 1:06 pm
|
|
|
|
Viper
Viper's Reps:
|
Hehe, I already have a plugin mate. It's created a dll and a tlb, what to check is see if you can get the tlb/dll to register with XUnleashed and show up in the plugins section.
Viper.
|
|
|
|
|
Posted: April 7th, 2003, 1:16 pm
|
|
|
|
WyvernX
WyvernX's Reps:
|
If you have everything, email it to me and I'll fix it so that it will register with XU and email it back. (save me the trouble of trying to create one)
|
|
|
|
|
Who is online |
|
Users browsing this forum: No registered users and 5 guests |
|
|
|