1

Topic: vbOgg in VB .net

Heya people,
Anyone had problems with (or even tried!) converting the vbOgg project files into a VB .net solution? I get a conversion error hmm
"The referenced component CommonDialog is missing a design time license."

Since I don't have a copy of VB6 and I don't want to download an illegal copy, can anyone help me out here? Possibly if you give me all the code that's in the vbOgg project files that'll help me big_smile

Thanks!

2

Re: vbOgg in VB .net

Right.. well.. in the spirit of "I'm being paid to do this so I better at least try myself" I have gone and done it myself. I now have the Visual Basic .net project files doing what vbogg does.. basically. Oh, there's no pan.. but that's cos I don't need it so I didn't try it. Thanks for providing the opportunity to ask for help anyway hehe smile

3

Re: vbOgg in VB .net

Sorry nobody got back to you on the 26th...you know how the holidays can be.

Glad you solved your problem, but I confess I'm a bit confused on the request for the VBOgg project code. All the source code is included in the download.

As for your VB.Net conversion, if you had to perform a specific trick to make it work, would you mind sharing that here? Others may run into the same issue.

Are you playing?
http://www.atomicmonks.com/sig.php?a=av&pname=Brother%20Erryn

4

Re: vbOgg in VB .net

I do have the source.. yes.. but it's in VB5 or VB6 format.. which is different to VB .net. When they converted to .net they axed a few things and added a few things and renamed a few things and made it difficult for everyone sad
Turns out I am having problems still. I've got the following problems:
a) While I can open an ogg file and play the whole file, I don't have the ability to change the cooperativelevel (playing global or specific to the app). It seems to be the fact that you used DSSCL_EXCLUSIVE as your cooperative level and for some silly reason my setup doesn't like that. Whether it's .net or DirectSound 9.. I have no idea. So I'm rewriting parts of your vbogg dll to contain this:

pDS->SetCooperativeLevel( hWnd, DSSCL_PRIORITY); //DSSCL_EXCLUSIVE ); //DSSCL_NORMAL ); // DSSCL_PRIORITY );

I've added "priority" there instead of "exclusive". I dunno why, but apparently exclusive doesn't exist with my DS install.

b) I can't change the volume while the file is playing. I haven't even tried to find out why and fix it yet, so yeah tongue

Anyways, once I've done the full conversion to .net I'll probably post a link to a zip of the project files. I just won't have the "global" or the "pan" options available since I have no reason to spend time on them (I'm not being paid for that! tongue ).
Anyways, back to it..

5

Re: vbOgg in VB .net

Well, well, well... here's a novel idea. Whatever version of VB you used interprets "InitOgg Me.HWND, 1" as calling InitOgg with the last parameter, the global/local value as a "1" of type Long.
But in VB .net "InitOgg(Me.Handle.ToInt32, 1)" interprets the "1" at the end of type long but it ends up equalling "0" for some stupid reason. So every time I ran the program it automatically played in local mode, not global mode. Sigh!
Now to fix the volume slider bug...

6

Re: vbOgg in VB .net

And she's all done. Seems VB6 thinks that 32-bit signed data are "Long" types and VB .net thinks that 32-bit signed data are "Integer" types. So I converted all your code to be Integer types, not Long types. I've also put all the pan, global audio, etc stuff in as well so this .net implementation should be a complete replica of your VB6 one.

The ZIP with all of the project files, your original two .dll's and the built .net executable should be available here:
http://damned.ultrafast.com.au/ian/soft … g_Test.zip

So there you have it, hopefully this helps you and anyone else that is crazy enough to use VB .net :>

7

Re: vbOgg in VB .net

That's great! We've avoided .NET like the plague here, but not everybody feels that way. Thanks for providing this to those people.

Are you playing?
http://www.atomicmonks.com/sig.php?a=av&pname=Brother%20Erryn

8

Re: vbOgg in VB .net

No problems smile
I've started using .net simply because it's gonna have better DirectX support and better application-database support which is primarily where my source of income will come from. But you can't go wrong with VB6.. I just wish I had a legit copy of it tongue