• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Chriso

#1
Hi everyone,

In the program I am writing I am attempting to implement a 'smiley' feature where someone says a particular phrase and a picture representation is shown instead of the text. For example ; ) (without space) == ;)

So far the images are showing up fine, but when you click the image it allows you to resize the BMP to arbitrary dimensions.

Is there a way to gain access to the properties of these images at run time to disable this behaviour? Or is there any way to redirect/ignore the click event on these images?

I've successfully tried both the 'clipboard - paste' and 'OLEObjects.Add' method to print on the RichTextBox but both behave the same way when you click an image. Locking the text box has no effect either.

Any clues would be greatly appreciated.

Cheers,
- Chriso
#2
Battle.net Bot Development / MCP_MOTD
November 30, 2007, 11:46 PM
When should you request the realm MOTD? I just got disconnected for requesting it on MCP_STARTUP (S->C)
#3
I am trying to change a ListView's SmallIcon set at run-time when the ListView is populated.  The existing items in the ListView do not update using the new ImageList, however new items do.  Anyone know a way around this?

I am currently doing this with no success:

Set lvUsers.SmallIcons = imlClassic
lvUsers.Refresh
#4
I am getting an exception when I try to call the CreateAccount() method within the NLS class, here is the exception:

System.IO.IOException was unhandled
  Message="There is insufficient space in the data buffer for the account creation packet."
  Source="MBNCSUtil"
  StackTrace:
       at MBNCSUtil.NLS.CreateAccount(Stream stream)
       at MBNCSUtil.NLS.CreateAccount(Byte[] buffer, Int32 startIndex, Int32 totalLength)
       at MBNCSUtil.NLS.CreateAccount(BncsPacket acctPacket)


Here is my code:

            AddChat(Color.Yellow, "Attempting to create account...");
            BncsPacket x52 = new BncsPacket((byte)Constants.PID.SID_AUTH_ACCOUNTCREATE);
            NLS nls = new NLS(Config.Username, Config.Password);
            if (nls.CreateAccount(x52) > 0) {          < --- problem occurs here
                bncs.SendData(x52.GetData());
            }
            else
            {
                AddChat(Color.Red, "NLS CreateAccount() call returned no data!");
            }


Any thoughts or suggestions?

I am using MBNCSUtil 2.0.3.15

[Edit: deleted long line that was breaking the layout.]
#5
.NET Platform / C# Data Degradation?
October 21, 2007, 07:38 PM
Outgoing 0x1A (BNLS) does not match incoming 0x50 (BNCS)...

Notice the mpqTime

[BNCS: INCOMING 50]
0000:  00 00 00 00 FE 48 1D D5 AE BB 4A 00 00 7C E3 E5  ....þH.Õ®»J..|ãå
0010:  72 FC C6 01 6C 6F 63 6B 64 6F 77 6E 2D 49 58 38  rüÆ.lockdown-IX8
0020:  36 2D 31 38 2E 6D 70 71 00 AC F5 8D 80 52 AF E9  6-18.mpq.¬õ..R¯é
0030:  C2 92 C4 09 06 54 4D 23 30 00                    Â.Ä..TM#0.......

[BNLS: OUTGOING 1A]
0000:  03 00 00 00 00 00 00 00 EC C1 8D 0C 00 7C E3 E5  ........ìÁ...|ãå
0010:  72 FC C6 01 6C 6F 63 6B 64 6F 77 6E 2D 49 58 38  rüÆ.lockdown-IX8
0020:  36 2D 31 38 2E 6D 70 71 00 3F 3F 3F 3F 52 3F 3F  6-18.mpq.????R??
0030:  3F 3F 3F 09 06 54 4D 23 30 00                    ???..TM#0.......


I'm using DateTime.FromFileTime() to get DateTime mpqTime; then I am sending it to BNLS as mpqTime.ToFileTime()

Any ideas where I am going wrong?

EDIT: I have also tried using MBNCSUtil's ReadInt32() x2, and ReadByteArray(8) with no luck, the data still seems to be losing characters... Could this be an Encoding problem?
#6
.NET Platform / C# Invoking a Form?
October 19, 2007, 03:45 AM
I am having some problems trying to show a form from another thread, the form gets shown but is in a frozen (non-responsive) state.

Heres the code...

frmProfile p = new frmProfile();
p.Show();


Any ideas?
#7
.NET Platform / MBNCSUtil Filetime?
October 06, 2007, 05:08 AM
I was just curious whether DataReader has a function to read FILETIME structures, apart from using ReadByteArray?  What is the best way to the MPQFiletime from SID_AUTH_INFO response?

Cheers.
#8
I keep receiving a run-time error "Input string was not in a correct format." for this line of code:

            int MpqNum = CheckRevision.ExtractMPQNumber(MpqName);

Any ideas why I am getting this error?
#9
Java Programming / Newbie Question (I bet)
September 19, 2007, 07:48 AM
I need to get the second digit of an int?

e.g.
int number = 4321;

therefore i would need to get 3

Thanks.
#10
01:13:12 PM : MCP: 07 00 01 7E 00 00 00

07 00 = packet length
01 = packet ID
7E 00 00 00 = result

BnetDocs does not have 0x7E documented... any clues?

By the way how many characters is good to request in sending the 0x19 packet, I am requesting 10 (0x0A).
#11
.NET Platform / Source Sharing Software
July 18, 2007, 04:39 AM
Are there any applications (plugins) available for C# that can manage your code online so multiple users may work on it simultaneously.  We need one that can lock a file when a specific user works on it, then unlock it once they are done.  Possibly one that is freeware also?
#12
.NET Platform / [C#] Plugin usable in COM?
July 04, 2007, 07:41 PM
Does anyone know if it is possible to create a C# plugin which can be used in Visual Basic 6.0 using CreateObject()? If so, point me to a documentation on it please...

Thanks.
#13
Battle.net Bot Development / BNLS_VERSIONCHECKEX2
December 04, 2006, 05:17 AM
When should this be sent? I keep getting Invalid version response from S=>C SID_AUTH_CHECK
I am currently sending it after I receive SID_AUTH_INFO response
#14
Visual Basic Programming / VB6 - SysTabControl32
December 03, 2006, 09:29 PM
I need to know how to switch between tabs possibly by using SendMessage

I have figured out how to get the SysTabControl's handle as follows:


Dim lngSysTab as Long
lngSysTab = FindWindowEx(lngPropWnd, 0, "SysTabControl32", vbNullString)


I now need to be able to set the controls tab index to 2.

Thanks

PS: Also my ISP blocks microsoft sites for some reason so please don't redirect to MSDN in response
#15
Hey I would normally use Arta's bnetdocs for the packet references of these packets, but since its down...
I need to get the SID_GETLADDERDATA C=>S/S=>C packet reference and SID_GETADVLISTEX C=>S/S=>C packet reference. I have searched this entire forum and come up with nothing of real use. If anyone can can get these for me I'd appreciate it greatly. Also how long is bnetdocs going to be down for?
#16
I've had that 0x43 response happen as well, I believe it was my coding... Because I no longer get that...
#17
I wanted to add a computer player to a game... Is this possible?
I am coding in VB6

This is what i got out of a packetlog my friend sent me (because i no longer have Starcraft)

42  192.**68.**.**:3071  63.241.83.**07:6112  102  Send 
0000  FF 1C 66 00 00 00 00 00 00 00 00 00 02 00 01 00    ..f.............
0010  1F 00 00 00 00 00 00 00 50 61 63 6B 65 74 20 4C    ........Packet L
0020  6F 67 67 65 64 00 00 2C 34 34 2C 2C 36 2C 2C 32    ogged..,44,,6,,2
0030  2C 2C 31 2C 63 30 38 65 66 31 35 62 2C 31 2C 2C    ,,1,c08ef15b,1,,
0040  53 65 61 6E 0D 95 46 61 A7 74 65 A7 74 20 50 6F    Sean..Fa.te.t Po
0050  A7 07 A7 69 62 6C 65 20 4D 61 70 95 20 05 53 70    ...ible Map. .Sp
0060  61 63 65 20 0D 00                                  ace ..

43  63.241.83.**07:6112  192.**68.**.**:3071  8  Recv 
0000  FF 1C 08 00 00 00 00 00                            ........

44  192.**68.**.**:3071  63.241.83.**07:6112  4  Send 
0000  FF 10 04 00                                        ....

45  192.**68.**.**:3071  63.241.83.**07:6112  102  Send 
0000  FF 1C 66 00 0C 00 00 00 15 00 00 00 02 00 01 00    ..f.............
0010  1F 00 00 00 00 00 00 00 50 61 63 6B 65 74 20 4C    ........Packet L
0020  6F 67 67 65 64 00 00 2C 34 34 2C 2C 36 2C 2C 32    ogged..,44,,6,,2
0030  2C 2C 31 2C 63 30 38 65 66 31 35 62 2C 31 2C 2C    ,,1,c08ef15b,1,,
0040  53 65 61 6E 0D 95 46 61 A7 74 65 A7 74 20 50 6F    Sean..Fa.te.t Po
0050  A7 07 A7 69 62 6C 65 20 4D 61 70 95 20 05 53 70    ...ible Map. .Sp
0060  61 63 65 20 0D 00                                  ace ..

46  63.241.83.**07:6112  192.**68.**.**:3071  8  Recv 
0000  FF 1C 08 00 00 00 00 00                            ........

47  192.**68.**.**:3071  63.241.83.**07:6112  4  Send 
0000  FF 00 04 00                                        ....

48  192.**68.**.**:6112  :0  8  SendTo 
0000  07 00 00 00 AE 5D 8C 08                            .....]..


Any help understanding this would be greatly appreciated..