Staredit Network

Staredit Network -> Computers and Technical -> Mpq Control
Report, edit, etc...Posted by Xx.Doom.xX on 2006-12-08 at 21:31:41
I've been really pondering this for quite some time. I can't figure out how to use Mpq Control with programs. To set it up, or be able to use it. Does anyone know how? The link doesn't work anymore. http://shadowflare.gameproc.com/dwnload.html#MpqControl
ShadowFlare won't answer my PMs. tongue.gif
Report, edit, etc...Posted by ShadowFlare on 2006-12-09 at 11:55:12
That link should now be http://shadowflare.samods.org/dwnload.html#WinMPQ

What exactly is it you want to know about Mpq Control?
Report, edit, etc...Posted by Xx.Doom.xX on 2006-12-09 at 11:58:41
What I really need to know is how to use it with programs. Using it with codes.
For Instance, I added MpqCtl and made a button in a MenuStrip called 'About MpqCtl'. And I did this code

CODE

   Private Sub AboutMpqCtlToolStripMenuItem_Click()
       AboutBox()

   End Sub
End Class

Or AboutBox.show(). I got this error:
CODE

Name 'AboutBox' is not declared.

How do I use MpqCtl's methods is what I'm asking. I know what's up there isn't right. I'm just frustrated.
Report, edit, etc...Posted by ShadowFlare on 2006-12-09 at 12:44:18
You need to make an instance of the class contained in it (whatever it was named; it's been a while since I've looked at it). One way to do this is to place it on a form. You may also be able to make a variable with that type and use the "New" keyword to make an instance of it.

The functions (AKA methods) need to be called through that instance of the class.
Report, edit, etc...Posted by Xx.Doom.xX on 2006-12-09 at 12:46:26
Ok, how do I make the instance. And do you want me to place the MpqCtl on the form?
Report, edit, etc...Posted by ShadowFlare on 2006-12-09 at 12:47:49
That's the easiest way to do it. The other way I mentioned may work, but I haven't tested it.
Report, edit, etc...Posted by Xx.Doom.xX on 2006-12-09 at 14:26:16
QUOTE(ShadowFlare @ Dec 9 2006, 12:47 PM)
That's the easiest way to do it.  The other way I mentioned may work, but I haven't tested it.
[right][snapback]601564[/snapback][/right]

I added it with the form and tried to put it on the form like a MenuStrip but it isn't working...
Can you also give me an example of making an instance for a class? And where to put the instance?
Report, edit, etc...Posted by ShadowFlare on 2006-12-09 at 14:59:17
QUOTE(Frenzy @ Dec 9 2006, 01:26 PM)
I added it with the form and tried to put it on the form like a MenuStrip but it isn't working...
Can you also give me an example of making an instance for a class? And where to put the instance?
[right][snapback]601621[/snapback][/right]

In what way is it not "working" ? Some kind of error message you get?
Report, edit, etc...Posted by Xx.Doom.xX on 2006-12-09 at 15:06:05
No not an error, just won't let me put it on. Like theres the (/) sign.
Here a sample image (but it won't show the cursor):

user posted image


Report, edit, etc...Posted by ShadowFlare on 2006-12-09 at 15:37:11
Hmm, I'm not familiar with using it in a .NET program. Maybe I'll take a look at how to do it.

-EDIT-

I haven't been able to get it to work, even the other way I mentioned. BTW this is the code I was using:

CODE
Dim MPQ As New MPQCONTROLLib.MpqControlClass


However, when I look at the object with quick watch, it says for the values in it, "Catastrophic error." It does list the various methods in it when I type "MPQ." into the code.
Report, edit, etc...Posted by Xx.Doom.xX on 2006-12-09 at 17:01:07
QUOTE(ShadowFlare @ Dec 9 2006, 03:37 PM)
Hmm, I'm not familiar with using it in a .NET program.  Maybe I'll take a look at how to do it.

-EDIT-

I haven't been able to get it to work, even the other way I mentioned.  BTW this is the code I was using:

CODE
Dim MPQ As New MPQCONTROLLib.MpqControlClass


However, when I look at the object with quick watch, it says for the values in it, "Catastrophic error."  It does list the various methods in it when I type "MPQ." into the code.
[right][snapback]601661[/snapback][/right]

That code right there doesn't give me errors. It's just now how do I call the functions.
Report, edit, etc...Posted by ShadowFlare on 2006-12-09 at 17:49:51
Hmm, when you type in MPQ. (if you named it MPQ), it should bring up a list of the functions. It did for me. However, when I tried calling any of them, it would give an exception. The reason it did seemed to be that the object wasn't valid for some reason.
Report, edit, etc...Posted by Xx.Doom.xX on 2006-12-09 at 17:56:48
Ok, I did that, when I typed it in, it gave me the list. So far so good. Debugging. Clicking 'About MpqCtl' in the MenuStrip. Omg what is this? It's An error! No clue how to fix it but here it is:

CODE

COMException was unhandled

Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

Is that what you got too?
Report, edit, etc...Posted by ShadowFlare on 2006-12-09 at 18:05:34
That's the exact error that I got. I don't really know what to do about it.

You could try using my main mpq library (SFmpq), but that would require at least a bit more work to use it, considering that some parts of the code for using it on VB may not work without modification for VB.NET.
Report, edit, etc...Posted by Xx.Doom.xX on 2006-12-09 at 18:10:11
QUOTE(ShadowFlare @ Dec 9 2006, 06:05 PM)
That's the exact error that I got.  I don't really know what to do about it.

You could try using my main mpq library (SFmpq), but that would require at least a bit more work to use it, considering that some parts of the code for using it on VB may not work without modification for VB.NET.
[right][snapback]601735[/snapback][/right]

Then how did other people use it with there programs? People like Clokr_ and LegacyWeapon?
I guess I could try SFMpq, lemme try it out in a little bit.
Report, edit, etc...Posted by ShadowFlare on 2006-12-09 at 18:19:35
I've never actually used or tested it on anything above VB6 until today when you mentioned it.
Report, edit, etc...Posted by Xx.Doom.xX on 2006-12-09 at 21:07:40
Yea I download SFmpq from your website, but I'm not really sure how to use it. So I might just try to figure out MpqCtl...
Report, edit, etc...Posted by MindArchon on 2006-12-10 at 02:41:43
QUOTE(Frenzy @ Dec 9 2006, 04:10 PM)
Then how did other people use it with there programs? People like Clokr_ and LegacyWeapon?
I guess I could try SFMpq, lemme try it out in a little bit.
[right][snapback]601736[/snapback][/right]


All of their programs are coded in VB6, not .NET

I have absolutely no Visual Basic .NET experience, so I cannot be of much help to you.
Report, edit, etc...Posted by Xx.Doom.xX on 2006-12-10 at 07:49:12
Well I'd like to get VB6, but I know it's a lot of money. And I just am using Visual Basic 2005 Express Edition.
Report, edit, etc...Posted by Oo.Insane.oO on 2006-12-10 at 10:43:33
QUOTE(Frenzy @ Dec 10 2006, 07:49 AM)
Well I'd like to get VB6, but I know it's a lot of money.  And I just am using Visual Basic 2005 Express Edition.
[right][snapback]601938[/snapback][/right]


I think Vibrator knows VBExpress you could try pming him or something about it to see
Report, edit, etc...Posted by Xx.Doom.xX on 2006-12-10 at 10:52:40
QUOTE(Lakai @ Dec 10 2006, 10:43 AM)
I think Vibrator knows VBExpress you could try pming him or something about it to see
[right][snapback]601973[/snapback][/right]

Yea, but has he even used MpqCtl wih VBExpress?
Report, edit, etc...Posted by Oo.Insane.oO on 2006-12-10 at 10:59:27
I dunno but he has a chance of knowing which is y I said pm him to see
Report, edit, etc...Posted by Cole on 2006-12-10 at 19:59:58
To use sfmpq dll you simply have to load the functions in at runtime. I did it with C# and it's easy. (I did this)Either that or you can make your own C++ dll that handles the sfmpq static library and contains functions that do much of the work for you(don't have to manage dll's/pointers on the C#/VB end).
Report, edit, etc...Posted by Xx.Doom.xX on 2006-12-12 at 16:07:03
Ok, I've been getting help from a person from MSDN, see the topic here:
http://forums.microsoft.com/MSDN/ShowPost....005106&SiteID=1
Read over it and what the person said I had to do SF. I did it all but I kept getting the same error. Could you testing it in VBExpress since it's free?

Also Vibrator told me to add it to the toolbox of VBExpress and add it to the COM Components so I could add it onto my form. I did, but got the same error.
I also changed the COMClass to 'True' in the code and I have this message warning, and thus the same error:

user posted image
Report, edit, etc...Posted by Vibrator on 2006-12-12 at 18:54:54
It doesn't look like you removed it from your project.
Next Page (1)