I’m new here and couldn’t really find anything on .net c# (search doesn’t seem very healthy at the moment). So i’ve been working on a C# wrapper. I don’t know how far you got, but if you’re working from the VB .bas file then make sure you cross check all the variable types with the C++ headers, as C# seems incompatible.
E.g. Init is Long, Long, Long in the VB (ouch!), the C++ is int (which is 32 bit), int, uint. So the C# Wrapper should be int int, unit or you’ll get an invalid params error.
I’ll post the wrapper when i’m done, and if someone else has already done it and I haven’t found the post I would be greatful if someone could point me in the right direction
- Kryalis answered 15 years ago
you can have my code if you want i havent converted many functions, just those that deal with playing sounds and music since all i needed was basic functionality…is there anyway i can post it to the messageboard or should i email it to you?
- AngryAlex answered 15 years ago
As I said in some topic before: Importing the .bas in Visual Basic.Net seems to be no problem.
I’ll check out if I find out how to do it in c#.
If you know a little Visual Basic, then you might be able to create a .dll that exports all the functions in Visual Basic.Net, that could be used in c#.
I’m not sure, but I also thought there already had been a topic about c#, so maybe you could also look for that topic.
- Adion answered 16 years ago
ok, this is probably a bug with me/.NET or i could just be doing something wrong but, i’ve implemented most functions and all enums/structs/whatever from the bas file (btw is the bas file a complete implementation or not?).
i then call these functions in this order:—
testsound = FSOUND_Sample_Load(FSOUND_FREE,”jules.mp3″,FSOUND_NORMAL,0));
init returns 0, which means no error, correct?
then sample_load returns som big number, which i pass to PlaySound, which also returns some big number, however nothing is actually played.
Please login first to submit.