Home All Groups Group Topic Archive Search About
Author
17 Mar 2009 11:17 PM
tourerukcom
Hi

I have a active x control which works fine on IE on XP but as soon as
i run it under vista on IE  7 the active x control is not installing
correctly. I get the Object doesnt support this property or method
which usually means its not loaded and registered correctly.

Can anyone help?

Thanks Neil

Author
17 Mar 2009 11:25 PM
Nobody
<toureruk***@hotmail.com> wrote in message
news:289f4147-550f-4c7c-a425-8c708be202a2@z9g2000yqi.googlegroups.com...
> Hi
>
> I have a active x control which works fine on IE on XP but as soon as
> i run it under vista on IE  7 the active x control is not installing
> correctly. I get the Object doesnt support this property or method
> which usually means its not loaded and registered correctly.
>
> Can anyone help?

Need more details:

What's the ActiveX control you are trying to install?

How are you installing it?
Author
18 Mar 2009 9:39 AM
tourerukcom
Show quote Hide quote
On 17 Mar, 23:25, "Nobody" <nob***@nobody.com> wrote:
> <toureruk***@hotmail.com> wrote in message
>
> news:289f4147-550f-4c7c-a425-8c708be202a2@z9g2000yqi.googlegroups.com...
>
> > Hi
>
> > I have a active x control which works fine on IE on XP but as soon as
> > i run it under vista on IE  7 the active x control is not installing
> > correctly. I get the Object doesnt support this property or method
> > which usually means its not loaded and registered correctly.
>
> > Can anyone help?
>
> Need more details:
>
> What's the ActiveX control you are trying to install?
>
> How are you installing it?

Hi

Im new to active x programming so i created a standard cab file using
the package wizard in vb. Im simply putting the code in a html file so
my customers goto the website and it will run.

Thanks
Author
18 Mar 2009 3:09 PM
mayayana
Im new to active x programming so i created a standard cab file using
the package wizard in vb. Im simply putting the code in a html file so
my customers goto the website and it will run.
>

   The control is signed? IE won't normally load unsigned controls.
And the client has dealt with ActiveX opt-in? And there's
no mixup with CLSIDs? The message you described usually
happens because a non-existent method has been called.
.....Object doesnt support this property .....
That indicates that *something* is loaded. But you may
have somehow loaded the wrong thing, mistakenly made a
public method private, etc.

   Given the numerous problems with ActiveX in IE
I would think you could find a better way to accomplish
the task. ActiveX in IE was a bad idea in the first place.
It's a big security risk that shouldn't be enabled and
won't work in any browser but IE. In recognizing that problem
Microsoft has only made things worse. Instead of eliminating
ActiveX in IE when running online, they've just put up
obstacles. (Code signing, opt-in for "unrecognized" controls.)
They keep ActiveX usable for themselves and partners like
Adobe -- enough so to keep the risk alive -- while making it
nearly unusable for everyone else.
Author
18 Mar 2009 9:38 PM
tourerukcom
Show quote Hide quote
On 18 Mar, 15:09, "mayayana" <mayayaX***@rcXXn.com> wrote:
> Im new to active x programming so i created a standard cab file using
> the package wizard in vb. Im simply putting the code in a html file so
> my customers goto the website and it will run.
>
>
>
>    The control is signed? IE won't normally load unsigned controls.
> And the client has dealt with ActiveX opt-in? And there's
> no mixup with CLSIDs? The message you described usually
> happens because a non-existent method has been called.
> ....Object doesnt support this property .....
> That indicates that *something* is loaded. But you may
> have somehow loaded the wrong thing, mistakenly made a
> public method private, etc.
>
>    Given the numerous problems with ActiveX in IE
> I would think you could find a better way to accomplish
> the task. ActiveX in IE was a bad idea in the first place.
> It's a big security risk that shouldn't be enabled and
> won't work in any browser but IE. In recognizing that problem
> Microsoft has only made things worse. Instead of eliminating
> ActiveX in IE when running online, they've just put up
> obstacles. (Code signing, opt-in for "unrecognized" controls.)
> They keep ActiveX usable for themselves and partners like
> Adobe -- enough so to keep the risk alive -- while making it
> nearly unusable for everyone else.

i changed the settings in IE to accept unsignedcontrols and put all
settings to its lowest for atest but still no joy even though it works
fine on IE7 on XP. I didnt want to use a active x but i needed a
control that would read from the serial port and upload to the web
with out distributing a desktop app to do it . it just seems to be a
problem with vista and its doing my head in lol :)
Author
18 Mar 2009 10:10 PM
tourerukcom
Here is my test code

Public Enum CommPorts
    COM1 = 0
    COM2 = 1
    COM3 = 2
    COM4 = 3
    COM5 = 4
    COM6 = 5
    COM7 = 6
    COM8 = 7
    COM9 = 8
    COM10 = 9
    COM11 = 10
    COM12 = 11
    COM13 = 12
    COM14 = 13
    COM15 = 14
    COM16 = 15
End Enum



'// Returned status values...
Const STATUS_OK                 As Long = 0
Const COMMUNICATIONS_ERROR      As Long = -1
Const BAD_PARAM                 As Long = -2
Const SETUP_ERROR               As Long = -3
Const INVALID_COMMAND_NUMBER    As Long = -4
Const COMMAND_LRC_ERROR         As Long = -7
Const RECEIVED_CHARACTER_ERROR  As Long = -8
Const GENERAL_ERROR             As Long = -9
Const FILE_NOT_FOUND            As Long = 2
Const ACCESS_DENIED             As Long = 5

'// Parameter values...
Const PARAM_OFF                 As Long = 0
Const PARAM_ON                  As Long = 1
Const DATA_AVAILABLE            As Long = 1
Const DATA_NOT_AVAILABLE        As Long = 0

Const DETERMINE_SIZE            As Long = 0

Dim scustomeraccount As String
Dim iCommPort As Integer
Public Event ReadBarcodes()

Public Property Let CommPort(ByVal ComPort As Integer)
    iCommPort = ComPort
End Property
Public Property Let customeraccount(ByVal newvalue As Variant)
    scustomeraccount = newvalue
End Property

Public Sub ReadBarcodes()
    Dim nRC As Long
    Dim nNumOfBarcodes As Long
    Dim i As Long
    Dim j As Long

    Dim arrbyteBarcode(99) As Byte '100 elements
    Dim nBytesRead As Long
    Dim bstrBarcode As String
    Dim bstrTmp As String * 50

    '** Open the com port
    Dim dwRC As Long
    Dim dwComPort As Long
    Dim SucessCom As Boolean
    dwComPort = iCommPort - 1
    Label1.Caption = ""

    'Open the com port
    dwRC = csp2Init(dwComPort)

    If dwRC <> STATUS_OK Then
        MsgBox ("Could Not Open COM Port")
        SuccessCom = True
    Else
        SucessCom = False
        bComConnected = True
    End If

    'Determine if we can read the data
    nRC = csp2ReadData

    If nRC > 0 Then
        'cs1504 has barcodes!
        nNumOfBarcodes = nRC

        Dim httpreq As MSXML2.ServerXMLHTTP40
        Set httpreq = New MSXML2.ServerXMLHTTP40

        'Check to see that we are in ascii mode...
        If csp2GetASCIIMode = PARAM_ON Then

           'DisplayInBCWindow "ASCII Mode ON"

            For i = 0 To (nNumOfBarcodes - 1)
                nBytesRead = csp2GetPacket(arrbyteBarcode(0), i, 100)

                If nBytesRead > 0 Then
                    nRC = csp2GetCodeType(arrbyteBarcode(1), bstrTmp,
Len(bstrTmp))

                    bstrBarcode = " "

                    ' display the barcode is ascii
                    ' skip the length, type, .... timestamp
                    For j = 2 To (nBytesRead - 5)
                        bstrBarcode = bstrBarcode & Chr(arrbyteBarcode
(j))

                    Next j
                    httpreq.open "POST", "http://sanderson.sandemo.com/
Barcode/capturebarcode.asp", False
                    httpreq.setRequestHeader "Content-Type",
"application/x-www-form-urlencoded"
                    httpreq.send "Barcode=" & bstrBarcode &
"&CustAcc=" & scustomeraccount
                End If
            Next i

        End If
    Else
        MsgBox ("No Barcodes to Read.")
    End If
   dwRC = csp2ClearData()
End Sub
Author
19 Mar 2009 3:39 AM
mayayana
I'm not really familiar with the various XMLHTTP objects.
They're really for scripting. And I wonder about the fact
that you've got an event (never raised) with the same
name as a sub! Maybe someone else will offer some help
on that score.

   But you say it works fine on XP... It sounds like you need
to narrow down the problem. It started out that you had
a working OCX that acted up on Vista. Now you're
troubleshooting OCX "test code". ?


Show quoteHide quote
>
> Here is my test code
>
> Public Enum CommPorts
>     COM1 = 0
>     COM2 = 1
>     COM3 = 2
>     COM4 = 3
>     COM5 = 4
>     COM6 = 5
>     COM7 = 6
>     COM8 = 7
>     COM9 = 8
>     COM10 = 9
>     COM11 = 10
>     COM12 = 11
>     COM13 = 12
>     COM14 = 13
>     COM15 = 14
>     COM16 = 15
> End Enum
>
>
>
> '// Returned status values...
> Const STATUS_OK                 As Long = 0
> Const COMMUNICATIONS_ERROR      As Long = -1
> Const BAD_PARAM                 As Long = -2
> Const SETUP_ERROR               As Long = -3
> Const INVALID_COMMAND_NUMBER    As Long = -4
> Const COMMAND_LRC_ERROR         As Long = -7
> Const RECEIVED_CHARACTER_ERROR  As Long = -8
> Const GENERAL_ERROR             As Long = -9
> Const FILE_NOT_FOUND            As Long = 2
> Const ACCESS_DENIED             As Long = 5
>
> '// Parameter values...
> Const PARAM_OFF                 As Long = 0
> Const PARAM_ON                  As Long = 1
> Const DATA_AVAILABLE            As Long = 1
> Const DATA_NOT_AVAILABLE        As Long = 0
>
> Const DETERMINE_SIZE            As Long = 0
>
> Dim scustomeraccount As String
> Dim iCommPort As Integer
> Public Event ReadBarcodes()
>
> Public Property Let CommPort(ByVal ComPort As Integer)
>     iCommPort = ComPort
> End Property
> Public Property Let customeraccount(ByVal newvalue As Variant)
>     scustomeraccount = newvalue
> End Property
>
> Public Sub ReadBarcodes()
>     Dim nRC As Long
>     Dim nNumOfBarcodes As Long
>     Dim i As Long
>     Dim j As Long
>
>     Dim arrbyteBarcode(99) As Byte '100 elements
>     Dim nBytesRead As Long
>     Dim bstrBarcode As String
>     Dim bstrTmp As String * 50
>
>     '** Open the com port
>     Dim dwRC As Long
>     Dim dwComPort As Long
>     Dim SucessCom As Boolean
>     dwComPort = iCommPort - 1
>     Label1.Caption = ""
>
>     'Open the com port
>     dwRC = csp2Init(dwComPort)
>
>     If dwRC <> STATUS_OK Then
>         MsgBox ("Could Not Open COM Port")
>         SuccessCom = True
>     Else
>         SucessCom = False
>         bComConnected = True
>     End If
>
>     'Determine if we can read the data
>     nRC = csp2ReadData
>
>     If nRC > 0 Then
>         'cs1504 has barcodes!
>         nNumOfBarcodes = nRC
>
>         Dim httpreq As MSXML2.ServerXMLHTTP40
>         Set httpreq = New MSXML2.ServerXMLHTTP40
>
>         'Check to see that we are in ascii mode...
>         If csp2GetASCIIMode = PARAM_ON Then
>
>            'DisplayInBCWindow "ASCII Mode ON"
>
>             For i = 0 To (nNumOfBarcodes - 1)
>                 nBytesRead = csp2GetPacket(arrbyteBarcode(0), i, 100)
>
>                 If nBytesRead > 0 Then
>                     nRC = csp2GetCodeType(arrbyteBarcode(1), bstrTmp,
> Len(bstrTmp))
>
>                     bstrBarcode = " "
>
>                     ' display the barcode is ascii
>                     ' skip the length, type, .... timestamp
>                     For j = 2 To (nBytesRead - 5)
>                         bstrBarcode = bstrBarcode & Chr(arrbyteBarcode
> (j))
>
>                     Next j
>                     httpreq.open "POST", "http://sanderson.sandemo.com/
> Barcode/capturebarcode.asp", False
>                     httpreq.setRequestHeader "Content-Type",
> "application/x-www-form-urlencoded"
>                     httpreq.send "Barcode=" & bstrBarcode &
> "&CustAcc=" & scustomeraccount
>                 End If
>             Next i
>
>         End If
>     Else
>         MsgBox ("No Barcodes to Read.")
>     End If
>    dwRC = csp2ClearData()
> End Sub
>
>
>
Author
19 Mar 2009 10:26 AM
tourerukcom
Show quote Hide quote
On 19 Mar, 03:39, "mayayana" <mayayaX***@rcXXn.com> wrote:
>    I'm not really familiar with the various XMLHTTP objects.
> They're really for scripting. And I wonder about the fact
> that you've got an event (never raised) with the same
> name as a sub! Maybe someone else will offer some help
> on that score.
>
>    But you say it works fine on XP... It sounds like you need
> to narrow down the problem. It started out that you had
> a working OCX that acted up on Vista. Now you're
> troubleshooting OCX "test code". ?
>
>
>
>
>
> > Here is my test code
>
> > Public Enum CommPorts
> >     COM1 = 0
> >     COM2 = 1
> >     COM3 = 2
> >     COM4 = 3
> >     COM5 = 4
> >     COM6 = 5
> >     COM7 = 6
> >     COM8 = 7
> >     COM9 = 8
> >     COM10 = 9
> >     COM11 = 10
> >     COM12 = 11
> >     COM13 = 12
> >     COM14 = 13
> >     COM15 = 14
> >     COM16 = 15
> > End Enum
>
> > '// Returned status values...
> > Const STATUS_OK                 As Long = 0
> > Const COMMUNICATIONS_ERROR      As Long = -1
> > Const BAD_PARAM                 As Long = -2
> > Const SETUP_ERROR               As Long = -3
> > Const INVALID_COMMAND_NUMBER    As Long = -4
> > Const COMMAND_LRC_ERROR         As Long = -7
> > Const RECEIVED_CHARACTER_ERROR  As Long = -8
> > Const GENERAL_ERROR             As Long = -9
> > Const FILE_NOT_FOUND            As Long = 2
> > Const ACCESS_DENIED             As Long = 5
>
> > '// Parameter values...
> > Const PARAM_OFF                 As Long = 0
> > Const PARAM_ON                  As Long = 1
> > Const DATA_AVAILABLE            As Long = 1
> > Const DATA_NOT_AVAILABLE        As Long = 0
>
> > Const DETERMINE_SIZE            As Long = 0
>
> > Dim scustomeraccount As String
> > Dim iCommPort As Integer
> > Public Event ReadBarcodes()
>
> > Public Property Let CommPort(ByVal ComPort As Integer)
> >     iCommPort = ComPort
> > End Property
> > Public Property Let customeraccount(ByVal newvalue As Variant)
> >     scustomeraccount = newvalue
> > End Property
>
> > Public Sub ReadBarcodes()
> >     Dim nRC As Long
> >     Dim nNumOfBarcodes As Long
> >     Dim i As Long
> >     Dim j As Long
>
> >     Dim arrbyteBarcode(99) As Byte '100 elements
> >     Dim nBytesRead As Long
> >     Dim bstrBarcode As String
> >     Dim bstrTmp As String * 50
>
> >     '** Open the com port
> >     Dim dwRC As Long
> >     Dim dwComPort As Long
> >     Dim SucessCom As Boolean
> >     dwComPort = iCommPort - 1
> >     Label1.Caption = ""
>
> >     'Open the com port
> >     dwRC = csp2Init(dwComPort)
>
> >     If dwRC <> STATUS_OK Then
> >         MsgBox ("Could Not Open COM Port")
> >         SuccessCom = True
> >     Else
> >         SucessCom = False
> >         bComConnected = True
> >     End If
>
> >     'Determine if we can read the data
> >     nRC = csp2ReadData
>
> >     If nRC > 0 Then
> >         'cs1504 has barcodes!
> >         nNumOfBarcodes = nRC
>
> >         Dim httpreq As MSXML2.ServerXMLHTTP40
> >         Set httpreq = New MSXML2.ServerXMLHTTP40
>
> >         'Check to see that we are in ascii mode...
> >         If csp2GetASCIIMode = PARAM_ON Then
>
> >            'DisplayInBCWindow "ASCII Mode ON"
>
> >             For i = 0 To (nNumOfBarcodes - 1)
> >                 nBytesRead = csp2GetPacket(arrbyteBarcode(0), i, 100)
>
> >                 If nBytesRead > 0 Then
> >                     nRC = csp2GetCodeType(arrbyteBarcode(1), bstrTmp,
> > Len(bstrTmp))
>
> >                     bstrBarcode = " "
>
> >                     ' display the barcode is ascii
> >                     ' skip the length, type, .... timestamp
> >                     For j = 2 To (nBytesRead - 5)
> >                         bstrBarcode = bstrBarcode & Chr(arrbyteBarcode
> > (j))
>
> >                     Next j
> >                     httpreq.open "POST", "http://sanderson.sandemo.com/
> > Barcode/capturebarcode.asp", False
> >                     httpreq.setRequestHeader "Content-Type",
> > "application/x-www-form-urlencoded"
> >                     httpreq.send "Barcode=" & bstrBarcode &
> > "&CustAcc=" & scustomeraccount
> >                 End If
> >             Next i
>
> >         End If
> >     Else
> >         MsgBox ("No Barcodes to Read.")
> >     End If
> >    dwRC = csp2ClearData()
> > End Sub- Hide quoted text -
>
> - Show quoted text -

i found the problem!! vista wouldnt install the MSXML4.0 libary as
when i switched back to MSXML 2 everything worked fine! Still not sure
whats going on but it is working now.
Author
19 Mar 2009 2:12 PM
Nobody
<toureruk***@hotmail.com> wrote in message
news:e02b847f-d8c7-4474-b29b-174c5a7c12da@w9g2000yqa.googlegroups.com...
> i found the problem!! vista wouldnt install the MSXML4.0 libary as
> when i switched back to MSXML 2 everything worked fine! Still not sure
> whats going on but it is working now.

See these links:

Using the right version of MSXML in Internet Explorer
http://blogs.msdn.com/xmlteam/archive/2006/10/23/using-the-right-version-of-msxml-in-internet-explorer.aspx

List of Microsoft XML Parser (MSXML) versions
http://support.microsoft.com/kb/269238
Author
18 Mar 2009 11:05 PM
mayayana
>
i changed the settings in IE to accept unsignedcontrols and put all
settings to its lowest for atest but still no joy even though it works
fine on IE7 on XP. I didnt want to use a active x but i needed a
control that would read from the serial port and upload to the web
with out distributing a desktop app to do it . it just seems to be a
problem with vista and its doing my head in lol :)
>

  I don't have much experience with Vista, but I
wonder if maybe it just won't let you "go that low".
What you're doing sounds like it's not only unsigned
but also "unsafe". In other words, you're doing things
that would not normally be allowed at all because
they're high risk. IE has settings for that, to allow or
disallow "loading and initializing ActiveX controls not
marked safe for scripting", or something to that effect.
Maybe Vista's IE just won't let you make that choice?

   It's very confusing dealing with later versions of
IE because there are a number of half-baked, overlapping
security add-ons that are poorly documented. (The
other day I tested a webpage on XP SP2 with IE8 and
it gave me grave warnings about plain DOM script that
just displays flyout menus. I'm guessing that problem is
probably related to Local Machine Lockdown, but it
doesn't make any sense in any context to ban basic,
non-"active" scripting.)

  If you want to live a bit dangerously you could try
marking the control as safe for scripting and see if
that helps:

Find the CLSID key for the object in HKCR\CLSID
  Under that key look for a subkey named:  Implemented Categories
  If it's not there, create it.
Under the "Implemented Categories" key create 2 more keys. Name them:

   {7DD95801-9882-11CF-9FA9-00AA006C42C4}
   {7DD95802-9882-11CF-9FA9-00AA006C42C4}

  This marks the given class as Safe For Scripting and Safe For
Initialization.
There are no values to be added to these keys; the key itself is all that's
needed.

  You could write a script or something similar to automate
the setting, but it will have to be done on all clients. Basically
you're trying to do something that a browser should never be
able to do. So if it's realistic at all then it will only be so
among a given set of configured PCs. You can't just load
something like that from a page and expect it to run. If that
worked then any site could easily commandeer the PC of any
visitor using IE.
Author
17 Mar 2009 11:40 PM
Bill McCarthy
Hi Neil,

You need to either install the activex control whilst running as administer,
or try using RegFree COM by using a SxS manifest.

<toureruk***@hotmail.com> wrote in message
Show quoteHide quote
news:289f4147-550f-4c7c-a425-8c708be202a2@z9g2000yqi.googlegroups.com...
> Hi
>
> I have a active x control which works fine on IE on XP but as soon as
> i run it under vista on IE  7 the active x control is not installing
> correctly. I get the Object doesnt support this property or method
> which usually means its not loaded and registered correctly.
>
> Can anyone help?
>
> Thanks Neil
Author
18 Mar 2009 7:02 AM
MM
On Wed, 18 Mar 2009 10:40:12 +1100, "Bill McCarthy" <TPASoft.com Are
Identity Thieves> wrote:

>...or try using RegFree COM by using a SxS manifest.

Which I have proved to myself works totally excellently on Vista!

MM