473,768 Members | 7,424 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exception from HRESULT: 0x800A017C (CTL_E_INVALIDP ROPERTYVALUE)

I get tis error message as soon as i a step into the comm1.Output =
Packet(i) line of code.

Below is my code could someone run this and see if they get the smae
message?

Public Sub GetIndicator_In fo()
Dim Len As Byte = 6
Dim Cmd As Byte = 7
Dim loPass_byte As Byte = 28
Dim hiPass_byte As Byte = 45
Dim CRClo_byte As Byte = 48
Dim CRChi_byte As Byte = 130
Dim i As Integer
Dim Packet(5) As Byte
Packet(0) = 6
Packet(1) = 7
Packet(2) = 28
Packet(3) = 45
Packet(4) = 48
Packet(5) = 130

For i = 0 To 5
comm1.Output = Packet(i)
Thread.Sleep(5)
Next i

End Sub

Sep 22 '07 #1
6 5288

"cmdolcet69 " <co************ @hotmail.comha scritto nel messaggio
news:11******** **************@ n39g2000hsh.goo glegroups.com.. .
>I get tis error message as soon as i a step into the comm1.Output =
Packet(i) line of code.
[...]

Dim Packet(5) As Byte
[...]

For i = 0 To 5
comm1.Output = Packet(i)
I've not tested this and I'm very newbie to VB.Net, but would it be possible
that the Output property is not of type Byte?
Maybe you should convert from Byte (Packet(i)) to the type of the Output
property?

G
Sep 22 '07 #2
First, your sub still won't compile as was pointed out in the other threads.
You have not shown the declaration of comm1.

I suspect from before, it is a MSCOMM object.

Won't this class "System.IO.Port s.SerialPort" work?

"cmdolcet69 " wrote:
I get tis error message as soon as i a step into the comm1.Output =
Packet(i) line of code.

Below is my code could someone run this and see if they get the smae
message?

Public Sub GetIndicator_In fo()
Dim Len As Byte = 6
Dim Cmd As Byte = 7
Dim loPass_byte As Byte = 28
Dim hiPass_byte As Byte = 45
Dim CRClo_byte As Byte = 48
Dim CRChi_byte As Byte = 130
Dim i As Integer
Dim Packet(5) As Byte
Packet(0) = 6
Packet(1) = 7
Packet(2) = 28
Packet(3) = 45
Packet(4) = 48
Packet(5) = 130

For i = 0 To 5
comm1.Output = Packet(i)
Thread.Sleep(5)
Next i

End Sub

Sep 22 '07 #3
Colin,

Your naming of variables leaves much to be desired

Soon you will come up against your variable names being reserved keywords

Spoof your e-mail unless you like SPAM

Example:

co************* **@variables.at_all

--
Newbie Coder
(It's just a name)

"cmdolcet69 " <co************ @hotmail.comwro te in message
news:11******** **************@ n39g2000hsh.goo glegroups.com.. .
I get tis error message as soon as i a step into the comm1.Output =
Packet(i) line of code.

Below is my code could someone run this and see if they get the smae
message?

Public Sub GetIndicator_In fo()
Dim Len As Byte = 6
Dim Cmd As Byte = 7
Dim loPass_byte As Byte = 28
Dim hiPass_byte As Byte = 45
Dim CRClo_byte As Byte = 48
Dim CRChi_byte As Byte = 130
Dim i As Integer
Dim Packet(5) As Byte
Packet(0) = 6
Packet(1) = 7
Packet(2) = 28
Packet(3) = 45
Packet(4) = 48
Packet(5) = 130

For i = 0 To 5
comm1.Output = Packet(i)
Thread.Sleep(5)
Next i

End Sub

Sep 22 '07 #4
On Sep 22, 5:42 pm, Family Tree Mike
<FamilyTreeM... @discussions.mi crosoft.comwrot e:
First, your sub still won't compile as was pointed out in the other threads.
You have not shown the declaration of comm1.

I suspect from before, it is a MSCOMM object.

Won't this class "System.IO.Port s.SerialPort" work?

"cmdolcet69 " wrote:
I get tis error message as soon as i a step into the comm1.Output =
Packet(i) line of code.
Below is my code could someone run this and see if they get the smae
message?
Public Sub GetIndicator_In fo()
Dim Len As Byte = 6
Dim Cmd As Byte = 7
Dim loPass_byte As Byte = 28
Dim hiPass_byte As Byte = 45
Dim CRClo_byte As Byte = 48
Dim CRChi_byte As Byte = 130
Dim i As Integer
Dim Packet(5) As Byte
Packet(0) = 6
Packet(1) = 7
Packet(2) = 28
Packet(3) = 45
Packet(4) = 48
Packet(5) = 130
For i = 0 To 5
comm1.Output = Packet(i)
Thread.Sleep(5)
Next i
End Sub- Hide quoted text -

- Show quoted text -
No this namespace wont work because it not a valild namespace in vb
2003 with ,net 1.1.
That is why i use the mscomm reference and call my object.

Here the delcaration of the comm1
Imports MSCommLib
Private comm1 As New MSComm

Public Sub SetupCOM(ByVal comPort As Integer)
''initialize the com if it has not been already
'If IsNothing(comm1 ) Then
' comm1 = New MSComm
'End If
''set the properties of the com port
'comm1.CommPort = comPort
'comm1.Settings = "57600,n,8, 1"
''open the port and clear the buffer if it is not alread open
(which it better not be)
'If Not comm1.PortOpen Then
' comm1.PortOpen = True
' comm1.InBufferC ount = 0
' System.Threadin g.Thread.Curren tThread.Sleep(1 00)
'End If

end sub.
I think this isn;t working because when i call my comm1.output it
doesn;t work like the serial com in vb 2005.
In vb 2005 there is not write method for this class.

If anyone has any ideas please let me know.
Sep 23 '07 #5
How about trying the following, as taken roughly from MSDN:

For i = 0 To 5
comm1.Output = Chr(Packet(i))

' Wait for the data to come back to the serial port.
' Only you would know if the device will respond back for each
byte.
Do
Buffer = Buffer & MSComm1.Input
Loop Until InStr(Buffer, "OK" & vbCrLf)

' unclear if this is still necessary...
' Thread.Sleep(5)
Next i

Sep 23 '07 #6
On Sep 22, 9:46 pm, Family Tree Mike
<FamilyTreeM... @discussions.mi crosoft.comwrot e:
How about trying the following, as taken roughly from MSDN:

For i = 0 To 5
comm1.Output = Chr(Packet(i))

' Wait for the data to come back to the serial port.
' Only you would know if the device will respond back for each
byte.
Do
Buffer = Buffer & MSComm1.Input
Loop Until InStr(Buffer, "OK" & vbCrLf)

' unclear if this is still necessary...
' Thread.Sleep(5)
Next i
The packet needs to be a byte so that the micro will recognize the
info being sent. I will try this out and see, and then get back!

Sep 23 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2162
by: RSB | last post by:
Hi Every one, i am using the try Catch block.. and the Exception object has a Message Property but i want to Catch the Error Number so that based on the Error number i can display Different error message.... try{ }
0
1984
by: BizWorld | last post by:
I am using a com component in my web application. when i call a method of com component. it gives the following error only ComException HRESULT: 0xC0000005 If i run this com component in VB 6 exe in stand alone application. it runs fine. It looks like Interop assembly is generating this error. i am using
3
7852
by: Lekyan | last post by:
I have problem setting the password for an ADAM user using C#. I used the SetPassword code given in the Microsoft page, changed several parameters, but ran into an exception. I wonder if other people have solved this problem. But I have searched Google groups for a couple days but still couldn't get a solution. I copied the code from: ...
4
3902
by: Mark | last post by:
I have a COM object that calls into a C# Forms library. The library can throw exceptions and I want to handle the exceptions in COM. Adam Nathan wrote a Microsoft sponsored book titled .Net and Com the complete interoperability guide which shows examples of how to do this. Below please find the book example code for getting extended error information from a V-Table bound .Net component. This code does not compile because the compiler gives...
4
1766
by: Shimon Sim | last post by:
I just switch my asp application to .net 2 and got this error. Any reasons why? Thank you. Server Error in '/RAFEmployee' Application. -------------------------------------------------------------------------------- The specified module could not be found. (Exception from HRESULT: 0x8007007E) Description: An unhandled exception occurred during the execution of the
2
17372
by: sgr | last post by:
Hello I'm making an application that uses an excel worksheet, My problem appears when I open the worksheet to see the data (then I close it and save the changes) and I try to insert a new row from my application appears the error: System.Runtime.InteropServices.COMException(0x800401A8): Exception HRESULT: 0x800401A8 Thanks for all
11
7036
by: Don | last post by:
When using Visual Basic .NET with a reference to Interop.Outlook, is there a way to get more detailed information about an error other than Exception.Message or Exception.ToString? For example, Outlook's MailItem.SaveAs method can return an error message of "The operation failed", but I have no idea what that means. As a test, I tried SaveAs using a filename that contained illegal characters and got the error message "Internal Application...
4
14410
by: fergc | last post by:
Hi.. I'm learning visual basic, so I installed the Visual Studio 2008 Express Edition to do the school projects, but when I try to look at the properties of my project I can't.. this is what appears in all the properties tabs Error trying to load the page. The system can not find the file specified. (Exception HRESULT: 0x80070002) can anyone help please?
4
23543
by: yogarajan | last post by:
The specified module could not be found. (Exception from HRESULT: 0x8007007E) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E) Source Error: An unhandled...
0
9407
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10175
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10017
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9961
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9843
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6656
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5425
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3534
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2808
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.