Aidez moi pour un blem d'ocx jvous en suppli

Messages postés
42
Date d'inscription
vendredi 2 août 2002
Statut
Membre
Dernière intervention
5 novembre 2004
-
Messages postés
42
Date d'inscription
vendredi 2 août 2002
Statut
Membre
Dernière intervention
5 novembre 2004
-
Jorai besoin dune explication ou dun exemple pour copier un ocx : je voudrai kopier mswinsck.ocx de maniere a ce ke si la personne na pas cet ocx il se copie et ke le gars puisse kan meme ouvrir le prog

5 réponses

Messages postés
36
Date d'inscription
vendredi 12 juillet 2002
Statut
Membre
Dernière intervention
21 décembre 2004

Tu dois donc écrire ton popre WinSocket en utilisant les APIs, pas d'autre solutions.
Messages postés
42
Date d'inscription
vendredi 2 août 2002
Statut
Membre
Dernière intervention
5 novembre 2004

Nan c bon je vien de trouvé encore plus simple il suffit de mettre une ressource avec locx en question et de le copié o demarrage du prog.
Messages postés
42
Date d'inscription
vendredi 2 août 2002
Statut
Membre
Dernière intervention
5 novembre 2004

-------------------------------
Réponse au message :
-------------------------------

Tu dois donc écrire ton popre WinSocket en utilisant les APIs, pas d'autre solutions.

Tu pourrais mexpliker un peu plus stp et me donner un exemple si possible
Messages postés
36
Date d'inscription
vendredi 12 juillet 2002
Statut
Membre
Dernière intervention
21 décembre 2004

Voici quelques exemples de fonctions API pour un Socket

Je n'ai pas mis les Types ni les constantes

Tu pourras faire une recherche sur les sites qui expliquent les API.

Public Declare Function setsockopt Lib "wsock32.dll" (ByVal s As Long, ByVal Level As Long, ByVal optname As Long, optval As Any, ByVal optlen As Long) As Long
Public Declare Function getsockopt Lib "wsock32.dll" (ByVal s As Long, ByVal Level As Long, ByVal optname As Long, optval As Any, optlen As Long) As Long
Public Declare Function WSAGetLastError Lib "wsock32.dll" () As Long
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Public Declare Function WSAIsBlocking Lib "wsock32.dll" () As Long
Public Declare Function WSACleanup Lib "wsock32.dll" () As Long
Public Declare Function Send Lib "wsock32.dll" Alias "send" (ByVal s As Long, buf As Any, ByVal buflen As Long, ByVal flags As Long) As Long
Public Declare Function recv Lib "wsock32.dll" (ByVal s As Long, buf As Any, ByVal buflen As Long, ByVal flags As Long) As Long
Public Declare Function WSAStartup Lib "wsock32.dll" (ByVal wVR As Long, lpWSAD As WSADataType) As Long
Public Declare Function htons Lib "wsock32.dll" (ByVal hostshort As Long) As Integer
Public Declare Function ntohs Lib "wsock32.dll" (ByVal netshort As Long) As Integer
Public Declare Function socket Lib "wsock32.dll" (ByVal af As Long, ByVal s_type As Long, ByVal protocol As Long) As Long
Public Declare Function closesocket Lib "wsock32.dll" (ByVal s As Long) As Long
Public Declare Function Connect Lib "wsock32.dll" Alias "connect" (ByVal s As Long, addr As sockaddr, ByVal namelen As Long) As Long
Public Declare Function WSAAsyncSelect Lib "wsock32.dll" (ByVal s As Long, ByVal hwnd As Long, ByVal wMsg As Long, ByVal lEvent As Long) As Long
Public Declare Function inet_addr Lib "wsock32.dll" (ByVal cp As String) As Long
Public Declare Function gethostbyname Lib "wsock32.dll" (ByVal host_name As String) As Long
Public Declare Sub MemCopy Lib "kernel32" Alias "RtlMoveMemory" (Dest As Any, Src As Any, ByVal cb&)
Public Declare Function inet_ntoa Lib "wsock32.dll" (ByVal inn As Long) As Long
Public Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As Any) As Long
Public Declare Function WSACancelBlockingCall Lib "wsock32.dll" () As Long
Messages postés
42
Date d'inscription
vendredi 2 août 2002
Statut
Membre
Dernière intervention
5 novembre 2004

Merci bocoup