elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Rompecabezas de Bitcoin, Medio millón USD en premios


  Mostrar Temas
Páginas: [1] 2 3 4
1  Programación / Programación Visual Basic / Multithread Socket (Thread per Socket)not Complete en: 3 Febrero 2012, 20:32 pm
Good evening
First want to say a Big Thanks to my friend Rookie Learn to Fly for the amazng example with ThreadPool and for the Help on QQ .Yukun for the beautiful multithread Console example .


My next Step is to Create Multithread with Forms and use Events .Like Example with Winsocks Array
Thanks for the time

http://www.mediafire.com/?h3krt1mfrbf02c2
P.s sorry for my English
2  Programación / Programación Visual Basic / Recv Function Crash ( Noblocking Mode) en: 19 Julio 2011, 23:40 pm
Good morning
 I try to make a Multithread socket .I pass the AcceptHandler in a new thread and Succesfully Workthread Start .
 The socket By Default is Blocking mode
 In blocking Mode Create Threads and can Send data to the Last Socket  Successfully
 If go to Set The Socket in NoBlocking Mode
Código:
Dim NonBlock As Long 
 NonBlock = 1
 If ioctlsocket (nRet, FIONBIO, NonBlock) = SOCKET_ERROR Then
 WriteLog "Socket Cannot Set NoBlocking"
 End If
My project Run Succesfully Create the First thread and The Second(ListenThread).When Client Connect start the ClientThread(WorkThread)and Crash .
 My Workthread

Código:
Public Function Workthread (ByVal Param As Long) As Long 
 Const MAX_BUFFER_LENGTH As Long = 8192 'Normal = 8192' MAX = 65536
 Dim Buffa (1 To MAX_BUFFER_LENGTH) As Byte
 Dim dBuff As String
 Dim ReadBuff As String
 Dim sRec As Long
 tID = GetCurrentThreadId
 Add_DataClientStore ClientCount, nRet, tID''/ / Store Data in a public type (sockid, threadid)
 WriteLog "New Client Arrive with Socket ID" & nRet & "On Thread ID:" & tID''/ / write data to listbox
 Do''While True

 ClientStore (ClientCount). Sock_ID = nRet
 sRec = recv (ClientStore (ClientCount). Sock_ID, Buffa (1), MAX_BUFFER_LENGTH, 0 &)
 ReadBuff = StrConv (Buffa, vbUnicode)
 [b]dBuff = Left $ (ReadBuff, sRec) [/b]
 WriteLog "Data Received.:" & DBuff & "Socket ID ..." & ClientStore (ClientCount). Sock_ID
 End If
 Loop
 End Function

The line to Crash is
dBuff = Left$(ReadBuff, sRec)
If Someone know anything
 Thanks for the time

 p.s Attach a ScreenShot with 505 Threads
 2:The Main thread and the Listenthread
 503 :Clients
 cpu usage =100%

This is the Error 
http://i54.tinypic.com/11qh94w.jpg
thanks for the time 
Good  night 
3  Programación / Programación Visual Basic / Socket api example en: 15 Julio 2011, 17:19 pm
Good afternoon 
I work in a  example with threads  .
Search around to find a small working example with Berkeley sockets.
If someone  have something  to  help me 
Thanks for the time 
4  Programación / Programación Visual Basic / imagelist Questions en: 4 Enero 2011, 22:11 pm
Good  evening   
I use a picture to load a gif from a dll .
When  add a picture in Imagelist use <<Call Form1.img.ListImages.Add(, , Form1.Flag.Picture)>>
want to Load severals gifs in the Imagelist
How can call the Items  from the Imagelist in ListView ?
thanks for the time  .
No want to add All together  .....

Ps This  project use GetLocaleInfo  to find what Country u are from and add the flag(gif)in the ListView.

 
5  Programación / Programación Visual Basic / Resourse From Dll(gif) en: 25 Diciembre 2010, 12:52 pm
Good  morning   

I play a litle with Resource File last night
Add a resource(gif) in a small project and is easy to load it from there in the form and show in listview.
Try to add the resourse(gif)in Dll and  call it from there but i cant 
Please can someone   help me with this   .or give me some tips 

thanks for the time
6  Programación / Programación Visual Basic / how to refresh the ping en: 18 Noviembre 2010, 01:32 am
Good  evening   
Lot  of  rain  outside  and  sit here and  play  a  litle   
i  make a  small example with alistview  and use  a ping  module  to ping  any item(ip)from the list 
My  question is  how  to  make  the item from(ping)refresh it 
when  add  a  new ip  and  try  to ping again the first ping  items be  the same  with the last   .
thanks  for  the time   
have a good  night 

p.s  no  want to  ping  all  time  .any ideas  welcome   
7  Programación / Programación Visual Basic / Plugins and Winsock communication en: 13 Noviembre 2010, 01:19 am
Good  morning
I play with sandsprite plugin example a litle 
In main Form(host  project) put a winsock .How can communicate  the plugin(test.dll)with  the  host ?
When plugin load can  use the winsock like the host...
i try to explain  clearly   
thanks for the time
8  Programación / Programación Visual Basic / Socket and Multithread en: 5 Septiembre 2010, 14:42 pm
Good  morning   
Weeks ago  Cobein  make a  very  nice and  stable  multithreading  example   ...
I  try  to  make a  small  multithread  socket  example with  this  .
My   knowliedge  in  this  part  is  almost  0 and  of  course  cant  do  it   ..
Someone  have experiense  in  this  language  or other  can  make a  small  example   
i  think  is  very  helpful  .thanks  for the time..
Want  to see a  multithread  socket  example  in  vbasic 

p.s  havea  good  time  to everybody   


9  Programación / Programación Visual Basic / Leandro Socket and Multithread en: 6 Mayo 2010, 19:57 pm
I   found this  amazing  example  and  study  it 
Have  to  say  is  perfect .
Deside to play a  litle  with Multithread .But my  knowledge not  so top  and  need  some help .
I know need to  create  New Thread  when Accept New Connection   .
Someone  can  help
Have a good  time 



p.sLeandro  send  u pm come on msn   



10  Programación / Programación Visual Basic / Socket api and Winsock.ocx en: 22 Abril 2010, 21:06 pm
Good  evening 
usualy  work  with  csocketmaster 
But last  days start to make a  multithread  example .For  this use  the  socket api(vbip)very nice example  with  api    .My  question  is 
In Csocketmaster  or  winsock.ocx  use  2  parameters  to connect   (remoteip-port)
But in  socketapi  need   2 parameters(sockethandle-remoteip-port)
i  can  understand  .
Make  me  so  stupid 
 Someone  can  point  me  in  correct direction or  the  way to  connect  winsock.ocx  with  socket  api 
thanks  for the time 
   p.s  try to  explain  with  the  better  way   

Páginas: [1] 2 3 4
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines