Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 2nd, 2004, 10:57 AM   #1
Infamous
Newbie
 
Join Date: Oct 2004
Posts: 1
Rep Power: 0 Infamous is on a distinguished road
unsigned char *GamePacketSize(unsigned char *data, unsigned int *size,
               unsigned int *offset)
{
  unsigned int a;

  if (data[0] < 0xF0) {
    *size = data[0] - 1;
    *offset = 1;
    return &data[1];
  }

  a = (data[0] & 0xF) << 8;
  *size = a + data[1] - 2;
  *offset = 2;
  return &data[2];
}

Anyone care to port/help port this to VB?

Thanks.
Infamous is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:31 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC