![]() |
|
Register | FAQ | The Twelve Commandments | Members List | Calendar | Arcade | Find the Best VPN | Today's Posts | Search |
General Gnutella Development Discussion For general discussion about Gnutella development. |
![]() |
| LinkBack ![]() | Thread Tools ![]() | Display Modes ![]() |
|
| |||
![]() Hi ! i am a novice programmer......trying to code a gnutella clone for my class project.. I am facing trouble with using the GUID in the header.... My problem is :- a) As the cocreateguid function returns a GUID structure....how do i convert that into a byte array sos that i can send it on it's way....the UUidtostring () function is not working for me.....is causing an exception in the application code. b)Could anyone also please...clarify the purpose the GUID serves and how do i hanlde it in my application..... ----Thanks help will be highly appreciated.... |
| |||
![]() Quote:
note that you dont need to use CoCreateguid function! Code: Private Function Guid() As Byte() On Error GoTo HandleError Dim iPos As Integer Dim bTemp() As Byte ReDim bTemp(0 To 15) ' client guid Randomize For iPos = 0 To 14 bTemp(iPos) = CByte((254 * Rnd + 1)) Next iPos bTemp(7) = 255 bTemp(15) = 0 Guid = bTemp Exit Function HandleError: LogError ("Guid") Resume Next End Function |
| |||
![]() hi! Thanks for posting the solution!...I am using VC++..but ur post gave me some new ideas..anyway for those who are using the GUID struct....i think....just copying the struct members into a byte array would suffice....using the wsprintf and a format string consisting of %x...this is pretty dumb....but i think it works...:-) |
![]() |
| |
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Stuck on one bar! | Zeromus | Connection Problems | 1 | February 28th, 2007 03:45 PM |
mu3 to mp3 I am stuck please help! | jnielow | Getting Started Using LimeWire + WireShare | 1 | February 16th, 2007 01:30 PM |
stuck | tibbs | Getting Started Using LimeWire + WireShare | 0 | July 1st, 2006 10:34 AM |
Stuck... | DaRren MArtin acoustic | Download/Upload Problems | 1 | June 9th, 2005 07:56 AM |
stuck at 99% | grumpy | Download/Upload Problems | 1 | January 29th, 2005 03:13 PM |