// Visual DataFlex COM proxy classes generated from C:\WINDOWS\System32\MSWINSCK.OCX Use FlexCom20.pkg // Protocol Constants Define OLEProtocolConstants For Integer // TCP protocol Define OLEsckTCPProtocol For 0 // UDP protocol Define OLEsckUDPProtocol For 1 // State Constants Define OLEStateConstants For Integer // Socket is currently closed Define OLEsckClosed For 0 // Socket is currently open Define OLEsckOpen For 1 // Socket is listening for requests Define OLEsckListening For 2 // Socket has a pending request Define OLEsckConnectionPending For 3 // Socket is resolving remote computer name Define OLEsckResolvingHost For 4 // Socket has resolved remote computer name Define OLEsckHostResolved For 5 // Socket is connecting to remote computer Define OLEsckConnecting For 6 // Socket has connected to remote computer Define OLEsckConnected For 7 // Socket is closing connection to remote computer Define OLEsckClosing For 8 // Socket has encountered an error Define OLEsckError For 9 // Error Constants Define OLEErrorConstants For Integer // Invalid property value Define OLEsckInvalidPropertyValue For 380 // Property is write-only Define OLEsckGetNotSupported For 394 // Property is read-only Define OLEsckSetNotSupported For 383 // Out of memory Define OLEsckOutOfMemory For 7 // Wrong protocol or connection state for the requested transaction or request Define OLEsckBadState For 40006 // The argument passed to a function was not in the correct format or in the specified range Define OLEsckInvalidArg For 40014 // Successful Define OLEsckSuccess For 40017 // Unsupported variant types Define OLEsckUnsupported For 40018 // Invalid operation at current state Define OLEsckInvalidOp For 40020 // Argument is out of range Define OLEsckOutOfRange For 40021 // Wrong protocol for the requested transaction or request Define OLEsckWrongProtocol For 40026 // The operation is canceled Define OLEsckOpCanceled For 10004 // Invalid argument Define OLEsckInvalidArgument For 10014 // Socket is non-blocking and the specified operation will block Define OLEsckWouldBlock For 10035 // A blocking winsock operation is in progress Define OLEsckInProgress For 10036 // The operation is completed. No blocking operation is in progress. Define OLEsckAlreadyComplete For 10037 // The descriptor is not a socket Define OLEsckNotSocket For 10038 // The datagram is too large to fit into the buffer and is truncated Define OLEsckMsgTooBig For 10040 // The specified port is not supported Define OLEsckPortNotSupported For 10043 // Address in use Define OLEsckAddressInUse For 10048 // Address is not available from the local machine Define OLEsckAddressNotAvailable For 10049 // Network subsystem failed Define OLEsckNetworkSubsystemFailed For 10050 // The network cannot be reached from this host at this time Define OLEsckNetworkUnreachable For 10051 // Connection has timed out when SO_KEEPALIVE is set Define OLEsckNetReset For 10052 // Connection is aborted due to timeout or other failure Define OLEsckConnectAborted For 10053 // The connection is reset by remote side Define OLEsckConnectionReset For 10054 // No buffer space is available Define OLEsckNoBufferSpace For 10055 // Socket is already connected Define OLEsckAlreadyConnected For 10056 // Socket is not connected Define OLEsckNotConnected For 10057 // Socket has been shut down Define OLEsckSocketShutdown For 10058 // The attempt to connect timed out Define OLEsckTimedout For 10060 // Connection is forcefully rejected Define OLEsckConnectionRefused For 10061 // WinsockInit should be called first Define OLEsckNotInitialized For 10093 // Authoritative answer: Host not found Define OLEsckHostNotFound For 11001 // Non-Authoritative answer: Host not found Define OLEsckHostNotFoundTryAgain For 11002 // Non-recoverable errors Define OLEsckNonRecoverableError For 11003 // Valid name, no data record of requested type Define OLEsckNoData For 11004 // CLSID: {248DD892-BB45-11CF-9ABC-0080C7E7B78D} // Winsock methods and events Class cComIMSWinsockControl Is a Mixin // Returns/Sets the socket protocol Function ComProtocol Returns OLEProtocolConstants Handle hDispatchDriver OLEProtocolConstants retVal Get phDispatchDriver To hDispatchDriver Get InvokeComMethod Of hDispatchDriver 3 OLE_VT_I4 To retVal Function_Return retVal End_Function // Returns/Sets the socket protocol Procedure Set ComProtocol OLEProtocolConstants value Handle hDispatchDriver Get phDispatchDriver To hDispatchDriver Send PrepareParams To hDispatchDriver 1 Set ComProperty Of hDispatchDriver 3 OLE_VT_I4 To value End_Procedure // Returns the remote host IP address Function ComRemoteHostIP Returns String Handle hDispatchDriver String retVal Get phDispatchDriver To hDispatchDriver Get InvokeComMethod Of hDispatchDriver 4 OLE_VT_BSTR To retVal Function_Return retVal End_Function // Returns the local machine name Function ComLocalHostName Returns String Handle hDispatchDriver String retVal Get phDispatchDriver To hDispatchDriver Get InvokeComMethod Of hDispatchDriver 5 OLE_VT_BSTR To retVal Function_Return retVal End_Function // Returns the local machine IP address Function ComLocalIP Returns String Handle hDispatchDriver String retVal Get phDispatchDriver To hDispatchDriver Get InvokeComMethod Of hDispatchDriver 6 OLE_VT_BSTR To retVal Function_Return retVal End_Function // Returns the socket handle Function ComSocketHandle Returns Integer Handle hDispatchDriver Integer retVal Get phDispatchDriver To hDispatchDriver Get InvokeComMethod Of hDispatchDriver 7 OLE_VT_I4 To retVal Function_Return retVal End_Function // Returns/Sets the port to be connected to on the remote computer Function ComRemotePort Returns Integer Handle hDispatchDriver Integer retVal Get phDispatchDriver To hDispatchDriver Get InvokeComMethod Of hDispatchDriver 1 OLE_VT_I4 To retVal Function_Return retVal End_Function // Returns/Sets the port to be connected to on the remote computer Procedure Set ComRemotePort Integer value Handle hDispatchDriver Get phDispatchDriver To hDispatchDriver Send PrepareParams To hDispatchDriver 1 Set ComProperty Of hDispatchDriver 1 OLE_VT_I4 To value End_Procedure // Returns/Sets the port used on the local computer Function ComLocalPort Returns Integer Handle hDispatchDriver Integer retVal Get phDispatchDriver To hDispatchDriver Get InvokeComMethod Of hDispatchDriver 2 OLE_VT_I4 To retVal Function_Return retVal End_Function // Returns/Sets the port used on the local computer Procedure Set ComLocalPort Integer value Handle hDispatchDriver Get phDispatchDriver To hDispatchDriver Send PrepareParams To hDispatchDriver 1 Set ComProperty Of hDispatchDriver 2 OLE_VT_I4 To value End_Procedure // Returns the state of the socket connection Function ComState Returns Short Handle hDispatchDriver Short retVal Get phDispatchDriver To hDispatchDriver Get InvokeComMethod Of hDispatchDriver 8 OLE_VT_I2 To retVal Function_Return retVal End_Function // Returns the number of bytes received on this connection Function ComBytesReceived Returns Integer Handle hDispatchDriver Integer retVal Get phDispatchDriver To hDispatchDriver Get InvokeComMethod Of hDispatchDriver 9 OLE_VT_I4 To retVal Function_Return retVal End_Function // Connect to the remote computer Procedure ComConnect Variant llRemoteHost Variant llRemotePort Handle hDispatchDriver Get phDispatchDriver To hDispatchDriver Send PrepareParams To hDispatchDriver 2 Send DefineParam To hDispatchDriver OLE_VT_VARIANT llRemoteHost Send DefineParam To hDispatchDriver OLE_VT_VARIANT llRemotePort Send InvokeComMethod To hDispatchDriver 64 OLE_VT_VOID End_Procedure // Listen for incoming connection requests Procedure ComListen Handle hDispatchDriver Get phDispatchDriver To hDispatchDriver Send InvokeComMethod To hDispatchDriver 65 OLE_VT_VOID End_Procedure // Accept an incoming connection request Procedure ComAccept Integer llrequestID Handle hDispatchDriver Get phDispatchDriver To hDispatchDriver Send PrepareParams To hDispatchDriver 1 Send DefineParam To hDispatchDriver OLE_VT_I4 llrequestID Send InvokeComMethod To hDispatchDriver 66 OLE_VT_VOID End_Procedure // Send data to remote computer Procedure ComSendData Variant lldata Handle hDispatchDriver Get phDispatchDriver To hDispatchDriver Send PrepareParams To hDispatchDriver 1 Send DefineParam To hDispatchDriver OLE_VT_VARIANT lldata Send InvokeComMethod To hDispatchDriver 67 OLE_VT_VOID End_Procedure // Retrieve data sent by the remote computer Procedure ComGetData Variant lldata Variant lltype Variant llmaxLen Handle hDispatchDriver Get phDispatchDriver To hDispatchDriver Send PrepareParams To hDispatchDriver 3 Send DefineParam To hDispatchDriver (OLE_VT_BYREF Ior OLE_VT_VARIANT) lldata Send DefineParam To hDispatchDriver OLE_VT_VARIANT lltype Send DefineParam To hDispatchDriver OLE_VT_VARIANT llmaxLen Send InvokeComMethod To hDispatchDriver 68 OLE_VT_VOID End_Procedure // Look at incoming data without removing it from the buffer Procedure ComPeekData Variant lldata Variant lltype Variant llmaxLen Handle hDispatchDriver Get phDispatchDriver To hDispatchDriver Send PrepareParams To hDispatchDriver 3 Send DefineParam To hDispatchDriver (OLE_VT_BYREF Ior OLE_VT_VARIANT) lldata Send DefineParam To hDispatchDriver OLE_VT_VARIANT lltype Send DefineParam To hDispatchDriver OLE_VT_VARIANT llmaxLen Send InvokeComMethod To hDispatchDriver 69 OLE_VT_VOID End_Procedure // Close current connection Procedure ComClose Handle hDispatchDriver Get phDispatchDriver To hDispatchDriver Send InvokeComMethod To hDispatchDriver 70 OLE_VT_VOID End_Procedure // Binds socket to specific port and adapter Procedure ComBind Variant llLocalPort Variant llLocalIP Handle hDispatchDriver Get phDispatchDriver To hDispatchDriver Send PrepareParams To hDispatchDriver 2 Send DefineParam To hDispatchDriver OLE_VT_VARIANT llLocalPort Send DefineParam To hDispatchDriver OLE_VT_VARIANT llLocalIP Send InvokeComMethod To hDispatchDriver 71 OLE_VT_VOID End_Procedure // Returns/Sets the name used to identify the remote computer Function ComRemoteHost Returns String Handle hDispatchDriver String retVal Get phDispatchDriver To hDispatchDriver Get InvokeComMethod Of hDispatchDriver 10 OLE_VT_BSTR To retVal Function_Return retVal End_Function // Returns/Sets the name used to identify the remote computer Procedure Set ComRemoteHost String value Handle hDispatchDriver Get phDispatchDriver To hDispatchDriver Send PrepareParams To hDispatchDriver 1 Set ComProperty Of hDispatchDriver 10 OLE_VT_BSTR To value End_Procedure End_Class // CLSID: {248DD893-BB45-11CF-9ABC-0080C7E7B78D} // Microsoft Winsock Control events Class cComDMSWinsockControlEvents Is a Mixin // Error occurred Procedure OnComError Short llNumber String ByRef llDescription Integer llScode String llSource String llHelpFile Integer llHelpContext Boolean ByRef llCancelDisplay End_Procedure // Occurs when data has been received from the remote computer Procedure OnComDataArrival Integer llbytesTotal End_Procedure // Occurs connect operation is completed Procedure OnComConnect End_Procedure // Occurs when a remote client is attempting to connect Procedure OnComConnectionRequest Integer llrequestID End_Procedure // Occurs when the connection has been closed Procedure OnComClose End_Procedure // Occurs during process of sending data Procedure OnComSendProgress Integer llbytesSent Integer llbytesRemaining End_Procedure // Occurs after a send operation has completed Procedure OnComSendComplete End_Procedure Procedure RegisterComEvents Send RegisterComEvent 6 msg_OnComError Send RegisterComEvent 0 msg_OnComDataArrival Send RegisterComEvent 1 msg_OnComConnect Send RegisterComEvent 2 msg_OnComConnectionRequest Send RegisterComEvent 5 msg_OnComClose Send RegisterComEvent 3 msg_OnComSendProgress Send RegisterComEvent 4 msg_OnComSendComplete End_Procedure End_Class // CoClass // ProgID: MSWinsock.Winsock.1 // CLSID: {248DD896-BB45-11CF-9ABC-0080C7E7B78D} // Microsoft Winsock Control Class cComWinsock Is a cComActiveXControl Import_Class_Protocol cComIMSWinsockControl Import_Class_Protocol cComDMSWinsockControlEvents Procedure Construct_Object Forward Send Construct_Object Set psProgID To "{248DD896-BB45-11CF-9ABC-0080C7E7B78D}" Set psEventId To "{248DD893-BB45-11CF-9ABC-0080C7E7B78D}" //////////////////////////////////////////////////// // THE LICENSE KEY OF A VALID MS VISUAL STUDIO // PRODUCT IS REQUIRED HERE Set psLicenseKey To "xxxxxxxxxxxxxxxxxxx" // JUST REGENERATE THIS PACKAGE FROM A MACHINE // WHICH HAS THE ABOVE PRODUCT INSTALLED /////////////////////////////////////////////////// Set peAutoCreate To acAutoCreate End_Procedure End_Class