Problem when porting VB Script t to VB.Net 
Author Message
 Problem when porting VB Script t to VB.Net

Hi All,
 I have a VBS which looks like this:

set msg = CreateObject ("MyConnector.DMsgObject")
 msg.SetProperty "PropA",  "12345678"
 msg.Send

I need to convert this piece of code to VB.Net
 The method SetProperty has the type:
 Public Overridable Overloads Sub SetDeviceProp (Name As String,  ByRef Val
 As Object)

Here is what I do to port the code:

.
 .
 Imports MyConnector
 .
 .
 Dim iMsg As New MyConnector.DMsgObject()
 .
 .
 iMsg.SetProperty ("PropA" , "12345678")
 iMsg.Send()
 .
 .

The code can be successfully built, but when executed, the "Just-in-Time
 Debugging" window pop up  saying "An Exception
 'System.Runtime.InteropServices.COMException' has occurred in myapp.exe.

Can anyone help me out with this problem?  Thanks in advances!

regards,
Chris



Mon, 05 Sep 2005 03:14:48 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problem when porting VB Script t to VB.Net

2. Problem when porting VB Script t to VB.Net

3. Problem loading VB Com in VB Script

4. VB DLL as a service with running VB-Script files problem

5. using the serial port (COM) in a VB Script

6. VB 6 To VB .NET OLE Upgrade Problems

7. VB 6 to VB .NET Conversion Problem

8. install vb.net cause vb 6 error--30468 problem

9. Calling one VB Script from another VB Script

10. Passing control from VB to VB Script -- need to access SetFocus in script

11. VB.NET newbie - help with programming serial port

12. com Port access in VB.net

 

 
Powered by phpBB® Forum Software