Jump to content
Tuts 4 You

Archived

This topic is now archived and is closed to further replies.

Freefall63

Listen .v2m module music in VB .NET?

Recommended Posts

Freefall63

Hey guys,

I made some .v2m music on my own and would like to play them statically in vb 2008 .NET,

because this is my favourite language. All I could find on the net was a c++ project, a delphi .dll and

a vb 6 native project with a modified linker to link a v2m lib. Now I need to ask, is there any way?

Greetz,

Freefall

- Attachment: My v2m music file and the magicv2m.dll delphi sound engine and some other useful stuff.

V2.rar

V2m plugins & projects.rar

Share this post


Link to post
Share on other sites
Freefall63

Is there really nobody that wants to help me? :(

Share this post


Link to post
Share on other sites
hmi222

Hey guys,

I made some .v2m music on my own and would like to play them statically in vb 2008 .NET,

because this is my favourite language. All I could find on the net was a c++ project, a delphi .dll and

a vb 6 native project with a modified linker to link a v2m lib. Now I need to ask, is there any way?

Greetz,

Freefall

- Attachment: My v2m music file and the magicv2m.dll delphi sound engine and some other useful stuff.

This lib is a bit older. Farbrausch released V1.5 some time ago.

Grab the source code of the V2 Lib here and try to interface to .net

https://github.com/f.../tree/master/v2

Have fun...

Share this post


Link to post
Share on other sites
Freefall63

Ah thx dude for remind me :D they´ve already published their sources. Well I´ve still no idea how to start...

Share this post


Link to post
Share on other sites
Freefall63

More help would be appreciated....

Share this post


Link to post
Share on other sites
hmi222

Try this fast test, not all V2M funktions are implemented.

Its C# and im not a .net coder.

I think yu can easily convert to vb.net.

Its based on Ufo-Pussys dmex.code

dmex_V2M_v15.zip

Share this post


Link to post
Share on other sites
Freefall63

Great, thank you guys! I´ll take a look into that.

@Kurapica:

I also need to thank you for the c# ufmod netmodule tutorial, it was great! :)

Is there also a batch script for VB .NET?

Share this post


Link to post
Share on other sites
Freefall63

@hmi222:

Woher hast du diese V2_DLL.dll??? Das ist C++, sag bloß du hast diesen behinderten scheißhaufen von farbrausch quellcode kompilieren können :D

Übrigens funzt das anscheinend bei mir nicht, beim start gibts gleich mal ne dmex fehlermeldung "Entrypoint not valid or not found." und daraufhin sofort diese exception "Could not map v2m!". Hab die plattform jetzt auf x86 konfiguriert aber es hat sich nix geändert. Dein code muss soweit auch stimmen, kompilieren kann ich das ja auch...

Share this post


Link to post
Share on other sites
Freefall63

Sry forgot to switch back to English^^

Well Kurapica´s project didn´t work either, I´ve uploaded the error screen. Never saw that error lol :D

post-71143-0-74771600-1353517283_thumb.j

Share this post


Link to post
Share on other sites
Kurapica

of course It won't work, because I'm sure you have a 64 bit OS and as you can see, the exe doesn't have the 32bit required flag set ...

Open the Project and change the Target CPU to 0x86 and It should work .. this is necessary because the external DLL is a 32 bit module.

Share this post


Link to post
Share on other sites
Freefall63

I already set it to x86, and look at the picture, there is no HResult exception. the error came from this line:


V2mPlayFile(CD.FileName, True)

It seems to have problems with reading from memory o.Ô

PS: Thanks for the link, finally I can use netmodules in vb now :) YEY! :D

Share this post


Link to post
Share on other sites
Kurapica

sorry I don't understand german or that language, but I remember that the DLL fails playing some V2M modules, could be a format problem or something like that.

Share this post


Link to post
Share on other sites
Freefall63

It´s an old v2m file, so that´s not the case. I already know of this issue :P What else may be the problem?

Share this post


Link to post
Share on other sites
Kurapica

send me your Project if possible otherwise I can't guess in the dark !

It will be an opportunity to install Visual Studio again after all this time :)

Share this post


Link to post
Share on other sites
Freefall63

Ok let me see, do you have some time this evening? It would be much faster if we work together on that with teamviewer.

Share this post


Link to post
Share on other sites
hmi222

@Freefall63

Woher hast du diese V2_DLL.dll??? Das ist C++, sag bloß du hast diesen behinderten scheißhaufen von farbrausch quellcode kompilieren können :D

Übrigens funzt das anscheinend bei mir nicht, beim start gibts gleich mal ne dmex fehlermeldung "Entrypoint not valid or not found." und daraufhin sofort diese exception "Could not map v2m!". Hab die plattform jetzt auf x86 konfiguriert aber es hat sich nix geändert. Dein code muss soweit auch stimmen, kompilieren kann ich das ja auch...

Is your OS 64bit? So i think thats a problem to replay that way.

If so, try to test on 32bit.

all examples in this post are working for me, also Kurapica's too!

Share this post


Link to post
Share on other sites
Kurapica

1 - start a "cmd.exe" as an administrator

2 - Type "bcdedit.exe/set {current} nx AlwaysOff" + Enter

3 - Restart Windows

Not my fault, I didn't code that DLL or add that silly DEP crap feature to windows :)

Share this post


Link to post
Share on other sites
Freefall63

1 - start a "cmd.exe" as an administrator

2 - Type "bcdedit.exe/set {current} nx AlwaysOff" + Enter

3 - Restart Windows

Not my fault, I didn't code that DLL or add that silly DEP crap feature to windows :)

Yes! It´s working now, great! I only have two questions left:

1. Where do you have these v2m c++ playback dlls / projects from

2. Do I need to repeat these steps when I want to run my app on another computer?

Share this post


Link to post
Share on other sites
Kurapica

Q1 : I made these forms with Visual studio 2008

Q2 : most probably it will work on Windows XP without these steps, but on Windows Vista or 7 there is no guarantee, maybe you should find another DLL that doesn't mess with DEP ?

another solution that I didn't test and to avoid turning off DEP, use a recent version of MoleBox, Create an executable pack and make sure to add the V2M DLL to the package, It may work normally on any PC.

Share this post


Link to post
Share on other sites
hmi222

Freefall63:

Yes! It´s working now, great! I only have two questions left:

1. Where do you have these v2m c++ playback dlls / projects from

2. Do I need to repeat these steps when I want to run my app on another computer?

Which examples (dll's) are working now?

Could yu please detail something more?

to nr 1:

The V2_DLL.dll was compiled by me, based on the sources of the new V2M Format Version 1.5 by kb/Farbrausch. http://1337haxorz.de/products.html#v2

So there could be made more modifications.

The MagicV2mEngine.dll was done by magic_h2001 ( http://magic.shabgard.org/) based on the V2M format before V1.5. I think yu can find magic_h2001 here on the forum.

Share this post


Link to post
Share on other sites
Freefall63

Which examples (dll's) are working now?

Could yu please detail something more?

to nr 1:

The V2_DLL.dll was compiled by me, based on the sources of the new V2M Format Version 1.5 by kb/Farbrausch. http://1337haxorz.de/products.html#v2

So there could be made more modifications.

Your example works for me when I disable DEP. F*** this DEP s*** - it doesn´t work on any other pc because of this dep issue...

How exactly did you compile a dll out of that example on http://1337haxorz.de ? I couldn´t even compile the example project xD

Perhaps you could make a little tutorial for me to learn from you?

Share this post


Link to post
Share on other sites
Freefall63

Q1 : I made these forms with Visual studio 2008

Q2 : most probably it will work on Windows XP without these steps, but on Windows Vista or 7 there is no guarantee, maybe you should find another DLL that doesn't mess with DEP ?

another solution that I didn't test and to avoid turning off DEP, use a recent version of MoleBox, Create an executable pack and make sure to add the V2M DLL to the package, It may work normally on any PC.

Q1 : Of course you made the forms with VS 2008, but how did you compile the dll?

Q2 : I tried molebox some time ago to include the bass.dll, however that didn´t really work...

Share this post


Link to post
Share on other sites
Kurapica

Freefall63 : Why don't you calm down ? we all can use the F language skillfully so please keep the tone down.

I didn't compile the DLL myself but I found it in a package made by mudlord If I remember correctly.

Maybe you should try a recent version of Molebox again and make sure It works before jumping to false conclusions.

Share this post


Link to post
Share on other sites

×