Solved

Urgent Help Needed

Posted on 2004-09-29
4
605 Views
Last Modified: 2007-12-19
Is there anyway to solve this error?

Error msg: 'State' is a type in 'AxMSWinsockLib.AxWinsock' and cannot be used as an expression.

 Private Sub wsSend_ConnectionRequest(ByVal sender As Object, ByVal e As AxMSWinsockLib.DMSWinsockControlEvents_ConnectionRequestEvent) Handles wsSend.ConnectionRequest
        If wsSend.State <> MSWinsockLib.StateConstants.sckClosed Then
            wsSend.Close()
        End If

        wsSend.Accept(e.requestID)

        If wsSend.State = MSWinsockLib.StateConstants.sckConnected Then
            Call WsSendConnected()
        End If
    End Sub


thank you!
0
Comment
Question by:loverbear84
  • 3
4 Comments
 
LVL 4

Accepted Solution

by:
eozz_2000 earned 125 total points
ID: 12187101
Change your code to this:

Private Sub wsSend_ConnectionRequest(ByVal sender As Object, ByVal e As AxMSWinsockLib.DMSWinsockControlEvents_ConnectionRequestEvent) Handles wsSend.ConnectionRequest
        If wsSend.CtlState <> MSWinsockLib.StateConstants.sckClosed Then
            wsSend.Close()
        End If

        wsSend.Accept(e.requestID)

        If wsSend.CtlState = MSWinsockLib.StateConstants.sckConnected Then
            Call WsSendConnected()
        End If
    End Sub

I hope this could help you :)
0
 

Author Comment

by:loverbear84
ID: 12187194
thank for ur immediate response
the code work.
Do you have the code on how to send and recieve file from pda to pc and vice versa though gsm/gprs but not web based type. Do you have any example cos really need it urgently, i will increase the point if gd solution is given
thank alot

0
 
LVL 4

Expert Comment

by:eozz_2000
ID: 12187320
Well, is important to know that is an only question per discussion if not be at that way... all of us would do a lot of questions and don't giving any points...
0
 
LVL 4

Expert Comment

by:eozz_2000
ID: 12187326
sorry if this upset you but... the people like to receive points for their good answers :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now