Jump to content
Tuts 4 You

Listen .v2m module music in VB .NET?


Freefall63

Recommended Posts

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

Edited by Freefall63
Link to comment

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...

Edited by hmi222
Link to comment
  • 4 weeks later...

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?

Link to comment

@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...

Link to comment

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

Edited by Freefall63
Link to comment

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.

Link to comment

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

Edited by Freefall63
Link to comment

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.

Link to comment

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 :)

Link to comment

@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!

Link to comment

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 :)

Link to comment

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?

Link to comment

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.

  • Like 1
Link to comment

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.

Edited by hmi222
Link to comment

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?

Edited by Freefall63
Link to comment

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...

Link to comment

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.

  • Like 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...