<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>DevX.com Forums - .NET</title>
		<link>http://forums.devx.com</link>
		<description>Technical issues related to the .NET framework and
Microsoft languages including VB.NET and C# programming.</description>
		<language>en</language>
		<lastBuildDate>Sun, 22 Nov 2009 05:43:49 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://forums.devx.com/images/misc/rss.jpg</url>
			<title>DevX.com Forums - .NET</title>
			<link>http://forums.devx.com</link>
		</image>
		<item>
			<title>XmlSerializer issue</title>
			<link>http://forums.devx.com/showthread.php?t=173420&amp;goto=newpost</link>
			<pubDate>Sat, 21 Nov 2009 08:04:16 GMT</pubDate>
			<description><![CDATA[XML:

---Quote---
<?xml version="1.0" encoding="utf-8" ?>
<TTTTModel>
<TTTTClass>
<TTTTType>Deployment</TTTTType>
<TTTTDate>2009-09-30T00:00:00-07:00</TTTTDate>
</TTTTClass>
<TTTTClass>
<TTTTType>Deployment</TTTTType>
<TTTTDate>2009-09-20T00:00:00-07:00</TTTTDate>
</TTTTClass>
<TTTTClass>
<TTTTType>Copy</TTTTType>
<TTTTDate>2009-02-23T00:00:00-07:00</TTTTDate>
</TTTTClass>
</TTTTModel>
---End Quote---

Code:


Code:
---------
[Serializable]
    public class ActionClass
    {
        [XmlElement(Form=XmlSchemaForm.Unqualified)]
        public string ActionType { get; set; }
        [XmlElement(Form = XmlSchemaForm.Unqualified)]
        public DateTime ActionDate { get; set; }
    }




    public class ActionModel : List<ActionClass>
    {
        public ActionModel()
        {
            XmlSerializer xs = new XmlSerializer(typeof(ActionModel), "");

            using (Stream ms = new FileStream("Demo.xml", FileMode.Open, FileAccess.Read))
            {
                object inp = xs.Deserialize(ms);
                this.AddRange((ActionModel)inp);
            }
        }
    }
---------
Why I get exception on object inp = xs.Deserialize(ms)?


---Quote---
<ActionModel xmlns=''> was not expected.
---End Quote---
]]></description>
			<content:encoded><![CDATA[<div>XML:<br />
<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="3" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;<br />
&lt;TTTTModel&gt;<br />
&lt;TTTTClass&gt;<br />
&lt;TTTTType&gt;Deployment&lt;/TTTTType&gt;<br />
&lt;TTTTDate&gt;2009-09-30T00:00:00-07:00&lt;/TTTTDate&gt;<br />
&lt;/TTTTClass&gt;<br />
&lt;TTTTClass&gt;<br />
&lt;TTTTType&gt;Deployment&lt;/TTTTType&gt;<br />
&lt;TTTTDate&gt;2009-09-20T00:00:00-07:00&lt;/TTTTDate&gt;<br />
&lt;/TTTTClass&gt;<br />
&lt;TTTTClass&gt;<br />
&lt;TTTTType&gt;Copy&lt;/TTTTType&gt;<br />
&lt;TTTTDate&gt;2009-02-23T00:00:00-07:00&lt;/TTTTDate&gt;<br />
&lt;/TTTTClass&gt;<br />
&lt;/TTTTModel&gt;
			
			<hr />
		</td>
	</tr>
	</table>
</div><br />
Code:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">[Serializable]<br />
&nbsp; &nbsp; public class ActionClass<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; [XmlElement(Form=XmlSchemaForm.Unqualified)]<br />
&nbsp; &nbsp; &nbsp; &nbsp; public string ActionType { get; set; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; [XmlElement(Form = XmlSchemaForm.Unqualified)]<br />
&nbsp; &nbsp; &nbsp; &nbsp; public DateTime ActionDate { get; set; }<br />
&nbsp; &nbsp; }<br />
<br />
<br />
<br />
<br />
&nbsp; &nbsp; public class ActionModel : List&lt;ActionClass&gt;<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; public ActionModel()<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XmlSerializer xs = new XmlSerializer(typeof(ActionModel), &quot;&quot;);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; using (Stream ms = new FileStream(&quot;Demo.xml&quot;, FileMode.Open, FileAccess.Read))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; object inp = xs.Deserialize(ms);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.AddRange((ActionModel)inp);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }</code><hr />
</div>Why I get exception on object inp = xs.Deserialize(ms)?<br />
<br />
<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="3" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				&lt;ActionModel xmlns=''&gt; was not expected.
			
			<hr />
		</td>
	</tr>
	</table>
</div></div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>senglory</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=173420</guid>
		</item>
		<item>
			<title>VB 2005 Serial Ports</title>
			<link>http://forums.devx.com/showthread.php?t=173416&amp;goto=newpost</link>
			<pubDate>Fri, 20 Nov 2009 17:26:04 GMT</pubDate>
			<description>I am trying to write an application which among other things tests serial ports on a PCB.  The PCB has a RS232 to RS422 two way conversion.  Com1 and Com2 are my available RS232 ports and Com4 and Com5 are my available RS422 ports.  I want to write to the RS232 port and verify that the correct data comes out the RS422 port.  Then I want to write to the RS422 port and verify that the correct data comes out the RS232 port.  I can’t seem to find the correct method to make that happen.</description>
			<content:encoded><![CDATA[<div>I am trying to write an application which among other things tests serial ports on a PCB.  The PCB has a RS232 to RS422 two way conversion.  Com1 and Com2 are my available RS232 ports and Com4 and Com5 are my available RS422 ports.  I want to write to the RS232 port and verify that the correct data comes out the RS422 port.  Then I want to write to the RS422 port and verify that the correct data comes out the RS232 port.  I can’t seem to find the correct method to make that happen.</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>csparks</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=173416</guid>
		</item>
		<item>
			<title>Carriage return</title>
			<link>http://forums.devx.com/showthread.php?t=173413&amp;goto=newpost</link>
			<pubDate>Fri, 20 Nov 2009 00:09:01 GMT</pubDate>
			<description>In my last thread I wrote about having printing problems I feel that I have the printing taken care of. I feel that it is more a carriage return problem. In one of the feilds in my database the data is entered like this on a single line with spaces it would look like this:

*KF 123 O456 1972*

Where ever there is a space I would like a carriage return so that when it is printed it will look like this:

*KF
123
O456
1972*</description>
			<content:encoded><![CDATA[<div>In my last thread I wrote about having printing problems I feel that I have the printing taken care of. I feel that it is more a carriage return problem. In one of the feilds in my database the data is entered like this on a single line with spaces it would look like this:<br />
<br />
<b>KF 123 O456 1972</b><br />
<br />
Where ever there is a space I would like a carriage return so that when it is printed it will look like this:<br />
<br />
<b>KF<br />
123<br />
O456<br />
1972</b></div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>COMPCAD</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=173413</guid>
		</item>
		<item>
			<title><![CDATA[Mystery "missing milliseconds": calling ActiveX from VB.Net sometimes takes 15ms !!??]]></title>
			<link>http://forums.devx.com/showthread.php?t=173412&amp;goto=newpost</link>
			<pubDate>Thu, 19 Nov 2009 20:04:00 GMT</pubDate>
			<description><![CDATA[Posting here because I think it might be related to .Net runtime or Interop wrappers for unmanaged C++/MFC COM controls:

Background: I have an ActiveX/COM control written in C++/MFC which processes video (ie. 30 frames per second => about 33ms per frame processing budget) Various rendering aspects of the control can be modified using Set calls on the control, which clients can issue at any time.
It turns out that someone (Windows scheduler, .Net interop wrappers, MFC call dispatcher, memory allocator, garbage disposal ?) is quite frequently eating an incredibly long 15.625ms to make or return from the call into the control. Thats half my per-frame budget eaten by some gremlins in the runtime !

The control itself is - for historical reasons - written in C++/MFC. The problem happens when the control is called from C# as well as VB.Net. It happens on very different hardware (an HP Pavilion 2.8Ghz Pentium D, a Macbook Pro with 2.5 Ghz Intel Core 2 Duo running Parallels VM). Just how often this mystery hiccup of 15.625ms occurs differs between machines, but when it does, it is always 15.625ms exactly. Strange.

I have made a rather minimal test case that strips out all the video processing etc.
First, I created an MFC/COM Control project in the Project Wizard of Visual Studio 2003 and left things at their default settings (Apartment threading etc.). Then I added a single user defined call TestCall() to the control which does nothing (manually since there is no more classwizard)

Then I created a VB Client program which instantiates the control. It endlessly calls the TestTiming() sub which times how long a single call into the control takes and prints out that time.

The TestTiming call basically just does this:


Code:
---------
    startTime = DateTime.Now
    Dim h = AxTestControl1.TestCall()
    endTime = DateTime.Now
    Dim ms As integer = endTime.Subtract(startTime).TotalMilliseconds
---------
I print out calls that take 0 ms (well something less than 1ms anyway) as "." and for calls > 0ms I print out the actual ms. The output looks something like this:

.15.625 ms
.........15.625 ms
.........15.625 ms
.........15.625 ms
..........15.625 ms
..........15.625 ms
...........15.625 ms
..........15.625 ms
..........15.625 ms

So some variable nr of calls that execute quickly, as desired, and then a "hiccup" call that always takes the exact same amount of time (15.625ms), then some more quick calls.

If instead of the user defined control function .TestCall() inside the timing I use a standard control property, like

Code:
---------
Dim h = AxTestControl1.Height
---------
or a built in control method like

Code:
---------
Dim h = AxTestControl1.ToString()
---------
Then I never, ever get a hiccup call.

On different machines you will get a different average number of "." before a hiccup but even then the hiccup is 15.625ms

I should mention that the sample code spins off a background thread and calls the TimingTest from its ThreadTask(). This is the way the bug was originally reported to me. However, I can put the 

Code:
---------
Do
    TimingTest()
Loop
---------
right in the main UI thread - as the first thing in Form1_Load() for example. And it will exhibit the same behaviour, except there will be substantially more good=0ms="." calls on average between the inevitable hiccups.

I *think* my timing test methodology is correct (?) And the fact that standard control properties and functions never hiccup indicate that the hiccups are not an artefact of my test setup, but related to a dispatched call into a user-defined function of the control.

Anybody have an idea what is going on and how I can prevent the far too frequent eating of half my per-frame processing budget by the runtime ?

I bow in gratitude for any advice :)

Mr.Toad

Specs:
Visual Studio 2003 .Net 1.1
Windows XP Pro SP2

Complete Form1.vb of the VB Client:

Code:
---------
Imports System.Threading

Public Class Form1
    Inherits System.Windows.Forms.Form
    #Region " Windows Form Designer generated code "
    Private fMyThread As Thread

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ' to see the hiccup on the main UI thread, put the Do/TestTiming()/Loop here
        fMyThread = New Thread(AddressOf ThreadTask)
        fMyThread.Start()
    End Sub

    Private Sub ThreadTask()
        Do
            TestTiming()
        Loop
    End Sub

    Private Sub TestTiming()
        Dim startTime, endTime As System.DateTime

        startTime = DateTime.Now
        Dim h = AxTestControl1.TestCall() ' user defined control methods do cause frequent hiccups of 15.625ms
        'Dim h = AxTestControl1.ToString() ' standard control properties and method never cause a hiccup
        endTime = DateTime.Now

        Dim ms As Double = endTime.Subtract(startTime).TotalMilliseconds

        If (ms > 0) Then
            Console.WriteLine(ms & " ms")
        Else
            Static n As Integer = 0
            n += 1
            If (n Mod 80 = 0) Then Console.WriteLine("")
            Console.Write(".")
        End If
    End Sub
End Class
---------
And the C++ component itself (it has quite a few automatically generated files, I show only what I think is most relevant here - ie changes from the boilerplate code from the MFC ActiveX Control C++ project template):

TestControlCtrl.cpp (I added the TestCall declaration and implementation, analogously in TestControlCtrl.h, not shown here)

Code:
---------
....unmodified boilerplate code here

// Dispatch map
BEGIN_DISPATCH_MAP(CTestControlCtrl, COleControl)
    DISP_FUNCTION_ID(CTestControlCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
    DISP_FUNCTION(CTestControlCtrl, "TestCall", TestCall, VT_I2, VTS_NONE)
END_DISPATCH_MAP()

....unmodified boilerplate code here

// CTestControlCtrl message handlers

short CTestControlCtrl::TestCall( void )
{
    return 0; // do nothing
}
---------

TestControl.idl (I added the line with TestCall in it)

Code:
---------
#include <olectl.h>
#include <idispids.h>

[ uuid(6E23484D-00D2-4500-A149-BF20F088CE00), version(1.0),
  helpfile("TestControl.hlp"),
  helpstring("TestControl ActiveX Control module"),
  control ]
library TestControlLib
{
    importlib(STDOLE_TLB);

    //  Primary dispatch interface for CTestControlCtrl

    [ uuid(E8A6BFC3-87DB-48DF-812A-2E79604C1AA3),
      helpstring("Dispatch interface for TestControl Control")]
    dispinterface _DTestControl
    {
        properties:
        methods:

            [id(DISPID_ABOUTBOX)] void AboutBox();
            [id(2)] int TestCall( void ); // I added this for my test
    };
...etc. (rest unchanged)
---------
I attach the full sourcecode (Visual Studio solutions) for both the testing control and the VB.Net client code calling it.]]></description>
			<content:encoded><![CDATA[<div>Posting here because I think it might be related to .Net runtime or Interop wrappers for unmanaged C++/MFC COM controls:<br />
<br />
Background: I have an ActiveX/COM control written in C++/MFC which processes video (ie. 30 frames per second =&gt; about 33ms per frame processing budget) Various rendering aspects of the control can be modified using Set calls on the control, which clients can issue at any time.<br />
It turns out that someone (Windows scheduler, .Net interop wrappers, MFC call dispatcher, memory allocator, garbage disposal ?) is quite frequently eating an incredibly long 15.625ms to make or return from the call into the control. Thats half my per-frame budget eaten by some gremlins in the runtime !<br />
<br />
The control itself is - for historical reasons - written in C++/MFC. The problem happens when the control is called from C# as well as VB.Net. It happens on very different hardware (an HP Pavilion 2.8Ghz Pentium D, a Macbook Pro with 2.5 Ghz Intel Core 2 Duo running Parallels VM). Just how often this mystery hiccup of 15.625ms occurs differs between machines, but when it does, it is always 15.625ms exactly. Strange.<br />
<br />
I have made a rather minimal test case that strips out all the video processing etc.<br />
First, I created an MFC/COM Control project in the Project Wizard of Visual Studio 2003 and left things at their default settings (Apartment threading etc.). Then I added a single user defined call TestCall() to the control which does nothing (manually since there is no more classwizard)<br />
<br />
Then I created a VB Client program which instantiates the control. It endlessly calls the TestTiming() sub which times how long a single call into the control takes and prints out that time.<br />
<br />
The TestTiming call basically just does this:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&nbsp; &nbsp; startTime = DateTime.Now<br />
&nbsp; &nbsp; Dim h = AxTestControl1.TestCall()<br />
&nbsp; &nbsp; endTime = DateTime.Now<br />
&nbsp; &nbsp; Dim ms As integer = endTime.Subtract(startTime).TotalMilliseconds</code><hr />
</div>I print out calls that take 0 ms (well something less than 1ms anyway) as &quot;.&quot; and for calls &gt; 0ms I print out the actual ms. The output looks something like this:<br />
<br />
.15.625 ms<br />
.........15.625 ms<br />
.........15.625 ms<br />
.........15.625 ms<br />
..........15.625 ms<br />
..........15.625 ms<br />
...........15.625 ms<br />
..........15.625 ms<br />
..........15.625 ms<br />
<br />
So some variable nr of calls that execute quickly, as desired, and then a &quot;hiccup&quot; call that always takes the exact same amount of time (15.625ms), then some more quick calls.<br />
<br />
If instead of the user defined control function .TestCall() inside the timing I use a standard control property, like<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Dim h = AxTestControl1.Height</code><hr />
</div>or a built in control method like<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Dim h = AxTestControl1.ToString()</code><hr />
</div>Then I never, ever get a hiccup call.<br />
<br />
On different machines you will get a different average number of &quot;.&quot; before a hiccup but even then the hiccup is 15.625ms<br />
<br />
I should mention that the sample code spins off a background thread and calls the TimingTest from its ThreadTask(). This is the way the bug was originally reported to me. However, I can put the <br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Do<br />
&nbsp; &nbsp; TimingTest()<br />
Loop</code><hr />
</div>right in the main UI thread - as the first thing in Form1_Load() for example. And it will exhibit the same behaviour, except there will be substantially more good=0ms=&quot;.&quot; calls on average between the inevitable hiccups.<br />
<br />
I *think* my timing test methodology is correct (?) And the fact that standard control properties and functions never hiccup indicate that the hiccups are not an artefact of my test setup, but related to a dispatched call into a user-defined function of the control.<br />
<br />
Anybody have an idea what is going on and how I can prevent the far too frequent eating of half my per-frame processing budget by the runtime ?<br />
<br />
I bow in gratitude for any advice :)<br />
<br />
Mr.Toad<br />
<br />
Specs:<br />
Visual Studio 2003 .Net 1.1<br />
Windows XP Pro SP2<br />
<br />
Complete Form1.vb of the VB Client:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Imports System.Threading<br />
<br />
Public Class Form1<br />
&nbsp; &nbsp; Inherits System.Windows.Forms.Form<br />
&nbsp; &nbsp; #Region &quot; Windows Form Designer generated code &quot;<br />
&nbsp; &nbsp; Private fMyThread As Thread<br />
<br />
&nbsp; &nbsp; Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
&nbsp; &nbsp; &nbsp; &nbsp; ' to see the hiccup on the main UI thread, put the Do/TestTiming()/Loop here<br />
&nbsp; &nbsp; &nbsp; &nbsp; fMyThread = New Thread(AddressOf ThreadTask)<br />
&nbsp; &nbsp; &nbsp; &nbsp; fMyThread.Start()<br />
&nbsp; &nbsp; End Sub<br />
<br />
&nbsp; &nbsp; Private Sub ThreadTask()<br />
&nbsp; &nbsp; &nbsp; &nbsp; Do<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TestTiming()<br />
&nbsp; &nbsp; &nbsp; &nbsp; Loop<br />
&nbsp; &nbsp; End Sub<br />
<br />
&nbsp; &nbsp; Private Sub TestTiming()<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim startTime, endTime As System.DateTime<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; startTime = DateTime.Now<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim h = AxTestControl1.TestCall() ' user defined control methods do cause frequent hiccups of 15.625ms<br />
&nbsp; &nbsp; &nbsp; &nbsp; 'Dim h = AxTestControl1.ToString() ' standard control properties and method never cause a hiccup<br />
&nbsp; &nbsp; &nbsp; &nbsp; endTime = DateTime.Now<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Dim ms As Double = endTime.Subtract(startTime).TotalMilliseconds<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; If (ms &gt; 0) Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine(ms &amp; &quot; ms&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; Else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Static n As Integer = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; n += 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If (n Mod 80 = 0) Then Console.WriteLine(&quot;&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.Write(&quot;.&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; End Sub<br />
End Class</code><hr />
</div>And the C++ component itself (it has quite a few automatically generated files, I show only what I think is most relevant here - ie changes from the boilerplate code from the MFC ActiveX Control C++ project template):<br />
<br />
TestControlCtrl.cpp (I added the TestCall declaration and implementation, analogously in TestControlCtrl.h, not shown here)<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">....unmodified boilerplate code here<br />
<br />
// Dispatch map<br />
BEGIN_DISPATCH_MAP(CTestControlCtrl, COleControl)<br />
&nbsp; &nbsp; DISP_FUNCTION_ID(CTestControlCtrl, &quot;AboutBox&quot;, DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)<br />
&nbsp; &nbsp; DISP_FUNCTION(CTestControlCtrl, &quot;TestCall&quot;, TestCall, VT_I2, VTS_NONE)<br />
END_DISPATCH_MAP()<br />
<br />
....unmodified boilerplate code here<br />
<br />
// CTestControlCtrl message handlers<br />
<br />
short CTestControlCtrl::TestCall( void )<br />
{<br />
&nbsp; &nbsp; return 0; // do nothing<br />
}</code><hr />
</div><br />
TestControl.idl (I added the line with TestCall in it)<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">#include &lt;olectl.h&gt;<br />
#include &lt;idispids.h&gt;<br />
<br />
[ uuid(6E23484D-00D2-4500-A149-BF20F088CE00), version(1.0),<br />
&nbsp; helpfile(&quot;TestControl.hlp&quot;),<br />
&nbsp; helpstring(&quot;TestControl ActiveX Control module&quot;),<br />
&nbsp; control ]<br />
library TestControlLib<br />
{<br />
&nbsp; &nbsp; importlib(STDOLE_TLB);<br />
<br />
&nbsp; &nbsp; //&nbsp; Primary dispatch interface for CTestControlCtrl<br />
<br />
&nbsp; &nbsp; [ uuid(E8A6BFC3-87DB-48DF-812A-2E79604C1AA3),<br />
&nbsp; &nbsp; &nbsp; helpstring(&quot;Dispatch interface for TestControl Control&quot;)]<br />
&nbsp; &nbsp; dispinterface _DTestControl<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; properties:<br />
&nbsp; &nbsp; &nbsp; &nbsp; methods:<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [id(DISPID_ABOUTBOX)] void AboutBox();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [id(2)] int TestCall( void ); // I added this for my test<br />
&nbsp; &nbsp; };<br />
...etc. (rest unchanged)</code><hr />
</div>I attach the full sourcecode (Visual Studio solutions) for both the testing control and the VB.Net client code calling it.</div>


	<br />
	<div style="padding:3px">

	

	

	

	
		<fieldset class="fieldset">
			<legend>Attached Files</legend>
			<table cellpadding="0" cellspacing="3" border="0">
			<tr>
	<td><img class="inlineimg" src="http://forums.devx.com/images/attach/zip.gif" alt="File Type: zip" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
	<td><a href="http://forums.devx.com/attachment.php?attachmentid=1972&amp;d=1258660893">TestingCode.zip</a> (28.9 KB)</td>
</tr>
			</table>
		</fieldset>
	

	</div>
]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>rtvstoad</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=173412</guid>
		</item>
		<item>
			<title>Copy data from datatable to ms access table</title>
			<link>http://forums.devx.com/showthread.php?t=173411&amp;goto=newpost</link>
			<pubDate>Thu, 19 Nov 2009 12:34:09 GMT</pubDate>
			<description>Hi everyone , does any know how to copy a datatable to a ms access table with out using a loop to insert per row ? I think there must be a way to do that but i did search for 2 days and got no results !</description>
			<content:encoded><![CDATA[<div>Hi everyone , does any know how to copy a datatable to a ms access table with out using a loop to insert per row ? I think there must be a way to do that but i did search for 2 days and got no results !</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>hoangnnm</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=173411</guid>
		</item>
		<item>
			<title><![CDATA[Can't access WshShell object in VB.NET 2005]]></title>
			<link>http://forums.devx.com/showthread.php?t=173407&amp;goto=newpost</link>
			<pubDate>Wed, 18 Nov 2009 18:56:21 GMT</pubDate>
			<description><![CDATA[Hi;

I've written a small application for our ER. I did an upgrade to it (a very very minor one) and now my Windows.Forms.SendKeys is no longer working.

I've done some research and windows script hosting might be the answer.

The problem is that I can't figure out how to access WshShell...or set it.

I've added the script hosting reference and a reference to the wshom.ocx but neither of them seem to work.

Here's the line in vb scripting that I think I need an equivalent for in VB.NET


Code:
---------
Set WshShell = WScript.CreateObject("WScript.Shell")
---------

Can anyone help?]]></description>
			<content:encoded><![CDATA[<div>Hi;<br />
<br />
I've written a small application for our ER. I did an upgrade to it (a very very minor one) and now my Windows.Forms.SendKeys is no longer working.<br />
<br />
I've done some research and windows script hosting might be the answer.<br />
<br />
The problem is that I can't figure out how to access WshShell...or set it.<br />
<br />
I've added the script hosting reference and a reference to the wshom.ocx but neither of them seem to work.<br />
<br />
Here's the line in vb scripting that I think I need an equivalent for in VB.NET<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Set WshShell = WScript.CreateObject(&quot;WScript.Shell&quot;)</code><hr />
</div><br />
Can anyone help?</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>David Rothbauer</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=173407</guid>
		</item>
		<item>
			<title>sending binary data to serial port</title>
			<link>http://forums.devx.com/showthread.php?t=173405&amp;goto=newpost</link>
			<pubDate>Wed, 18 Nov 2009 14:36:47 GMT</pubDate>
			<description><![CDATA[Hi

I wish to send binary data to device which is connected via serial port. I am using VB.Net 2005 with MScomm32. Here is the code

I have converted the binary value inton Hexadecimel.

MSComm1.Output = Chr(CInt(&H91))
            MSComm1.Refresh()

Error thrown was

Exception from HRESULT: 0x800A017C (CTL_E_INVALIDPROPERTYVALUE)

Can anyone suggest a soultion 

Thanks in advance

Faisal]]></description>
			<content:encoded><![CDATA[<div>Hi<br />
<br />
I wish to send binary data to device which is connected via serial port. I am using VB.Net 2005 with MScomm32. Here is the code<br />
<br />
I have converted the binary value inton Hexadecimel.<br />
<br />
MSComm1.Output = Chr(CInt(&amp;H91))<br />
            MSComm1.Refresh()<br />
<br />
Error thrown was<br />
<br />
Exception from HRESULT: 0x800A017C (CTL_E_INVALIDPROPERTYVALUE)<br />
<br />
Can anyone suggest a soultion <br />
<br />
Thanks in advance<br />
<br />
Faisal</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>pfaisalbe</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=173405</guid>
		</item>
		<item>
			<title>Transaction Question (vb.net 2008)</title>
			<link>http://forums.devx.com/showthread.php?t=173397&amp;goto=newpost</link>
			<pubDate>Tue, 17 Nov 2009 14:46:57 GMT</pubDate>
			<description><![CDATA[Good Morning All,

I'm trying to run a transaction and I'm having some issues.  What would cause a query to be executed before the transaction.commit() is called?  Is there a specifice order that queries should be ran when working with a transaction?  I have 1 update query that will always execute no matter what, before the .commit() is called.  What would cause this?


Thanks in advance....

jb]]></description>
			<content:encoded><![CDATA[<div>Good Morning All,<br />
<br />
I'm trying to run a transaction and I'm having some issues.  What would cause a query to be executed before the transaction.commit() is called?  Is there a specifice order that queries should be ran when working with a transaction?  I have 1 update query that will always execute no matter what, before the .commit() is called.  What would cause this?<br />
<br />
<br />
Thanks in advance....<br />
<br />
jb</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>jcb1269</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=173397</guid>
		</item>
		<item>
			<title>Help with struct and arrays</title>
			<link>http://forums.devx.com/showthread.php?t=173389&amp;goto=newpost</link>
			<pubDate>Tue, 17 Nov 2009 02:54:39 GMT</pubDate>
			<description><![CDATA[can i add value to an array from users input? or can i set the value of an array from inputting it. i would like to create an array and not hardcode the values, just have the values input.

dim 1,2,3,4,5,6,7,8,9,10,11,12,13,14 as interger

Dim sport(13) As interger
'declaring an array
sport(0) = 1
sport(1) = 2
sport(2) = 3
sport(3) = 4
sport(4) = 5
sport(5) = 6 and so on....]]></description>
			<content:encoded><![CDATA[<div>can i add value to an array from users input? or can i set the value of an array from inputting it. i would like to create an array and not hardcode the values, just have the values input.<br />
<br />
dim 1,2,3,4,5,6,7,8,9,10,11,12,13,14 as interger<br />
<br />
Dim sport(13) As interger<br />
'declaring an array<br />
sport(0) = 1<br />
sport(1) = 2<br />
sport(2) = 3<br />
sport(3) = 4<br />
sport(4) = 5<br />
sport(5) = 6 and so on....</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>velkropie</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=173389</guid>
		</item>
		<item>
			<title>VB.Net 2003 - OpenFileDialog problem</title>
			<link>http://forums.devx.com/showthread.php?t=173381&amp;goto=newpost</link>
			<pubDate>Mon, 16 Nov 2009 07:59:47 GMT</pubDate>
			<description><![CDATA[Hi Helper,
I need your help.

I am using the OPENFILEDIALOG control to prompt the users to select Microsoft WORD document. When the user instead of clicking OK and click on CANCEL, the system generates this error message from the Try / Catch.

Here is the error message:-
Object Reference not set to an instance of an object

Here is the script :

dim strDocFile as string
Try
      With OpenFileDialog1
            OpenFileDialog1.Title = "Please Select File with .Doc  extension"
            OpenFileDialog1.Filter = "doc(*.doc) | *.doc"

           If .ShowDialog() = DialogResult.OK Then
                  strDocFile = .FileName.ToString        
         End If
    End with 

 Catch ex as Exceptional
       MessageBox.Show(ex.message)
End Try]]></description>
			<content:encoded><![CDATA[<div><font face="Verdana">Hi Helper,<br />
I need your help.<br />
<br />
I am using the OPENFILEDIALOG control to prompt the users to select Microsoft WORD document. When the user instead of clicking OK and click on CANCEL, the system generates this error message from the Try / Catch.<br />
<br />
<font size="3"><font color="Red">Here is the error message:-<br />
Object Reference not set to an instance of an object</font></font><br />
<br />
<font color="Blue">Here is the script :<br />
<br />
dim strDocFile as string<br />
Try<br />
      With OpenFileDialog1<br />
            OpenFileDialog1.Title = &quot;Please Select File with .Doc  extension&quot;<br />
            OpenFileDialog1.Filter = &quot;doc(*.doc) | *.doc&quot;<br />
<br />
           If .ShowDialog() = DialogResult.OK Then<br />
                  strDocFile = .FileName.ToString        <br />
         End If<br />
    End with <br />
<br />
 Catch ex as Exceptional<br />
       MessageBox.Show(ex.message)<br />
End Try</font></font></div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>Lennie</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=173381</guid>
		</item>
		<item>
			<title>Extracting System::Strings^ from Array?</title>
			<link>http://forums.devx.com/showthread.php?t=173376&amp;goto=newpost</link>
			<pubDate>Sun, 15 Nov 2009 06:39:56 GMT</pubDate>
			<description><![CDATA[Hello, I've been at this problem for quite a few hours and I have been failing pretty hardcore. What I'm trying to do is extract Strings that I can manipulate from an Array for a CheckedListBox in Visual C++ (2008). This is a snippet of my code:

array<String^, 1>^musicList = Directory::GetFiles( currentMusicFolder, "*.ogg" );
			for (i=0; i<22; i++) {
				itemsToCopy->Items->AddRange(gcnew cli::array<System::Object^ >(1) {musicList[i]});
			}
			for ( int i = 0; i < itemsToCopy->Items->Count; i++ ) {
				itemsToCopy->SetItemChecked( i, true );
			}

So, it's generating an array for a CheckedListBox. Mainly, I'm interested in extracting the individual names from each Array variable (musicList[0], musicList[1], etc.).

The ultimate goal is to use the strings generated from the musicList Array for file copying to a separate directory.

Any thoughts?]]></description>
			<content:encoded><![CDATA[<div>Hello, I've been at this problem for quite a few hours and I have been failing pretty hardcore. What I'm trying to do is extract Strings that I can manipulate from an Array for a CheckedListBox in Visual C++ (2008). This is a snippet of my code:<br />
<br />
array&lt;String^, 1&gt;^musicList = Directory::GetFiles( currentMusicFolder, &quot;*.ogg&quot; );<br />
			for (i=0; i&lt;22; i++) {<br />
				itemsToCopy-&gt;Items-&gt;AddRange(gcnew cli::array&lt;System::Object^ &gt;(1) {musicList[i]});<br />
			}<br />
			for ( int i = 0; i &lt; itemsToCopy-&gt;Items-&gt;Count; i++ ) {<br />
				itemsToCopy-&gt;SetItemChecked( i, true );<br />
			}<br />
<br />
So, it's generating an array for a CheckedListBox. Mainly, I'm interested in extracting the individual names from each Array variable (musicList[0], musicList[1], etc.).<br />
<br />
The ultimate goal is to use the strings generated from the musicList Array for file copying to a separate directory.<br />
<br />
Any thoughts?</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>TheMessenger</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=173376</guid>
		</item>
		<item>
			<title>Maths Symbols in VB</title>
			<link>http://forums.devx.com/showthread.php?t=173371&amp;goto=newpost</link>
			<pubDate>Fri, 13 Nov 2009 22:11:22 GMT</pubDate>
			<description>Hi,
I am fairly new to programming, so please bare with me. I want to program a Maths Quiz which allows the teacher to edit questions and solutions. But for 

For example, in a form I want to have a list of Maths symbols which can be chosen and the teacher can enter text around it. like 2(teacher selects symbol of root) and then enters 5.

Please help me out I am falling behind the deadline for my coursework</description>
			<content:encoded><![CDATA[<div>Hi,<br />
I am fairly new to programming, so please bare with me. I want to program a Maths Quiz which allows the teacher to edit questions and solutions. But for <br />
<br />
For example, in a form I want to have a list of Maths symbols which can be chosen and the teacher can enter text around it. like 2(teacher selects symbol of root) and then enters 5.<br />
<br />
Please help me out I am falling behind the deadline for my coursework</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>oyeioyei</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=173371</guid>
		</item>
		<item>
			<title>Editing binary file</title>
			<link>http://forums.devx.com/showthread.php?t=173367&amp;goto=newpost</link>
			<pubDate>Fri, 13 Nov 2009 18:25:43 GMT</pubDate>
			<description>Hi 

I wish to edit  first three bits of a binary file using VB.net. Can any one help how to handle these using Vb.net ?

Thanks in advance

Faisal</description>
			<content:encoded><![CDATA[<div>Hi <br />
<br />
I wish to edit  first three bits of a binary file using VB.net. Can any one help how to handle these using Vb.net ?<br />
<br />
Thanks in advance<br />
<br />
Faisal</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>pfaisalbe</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=173367</guid>
		</item>
		<item>
			<title>Using encrypted xml documents to fill datasets...</title>
			<link>http://forums.devx.com/showthread.php?t=173366&amp;goto=newpost</link>
			<pubDate>Fri, 13 Nov 2009 15:58:56 GMT</pubDate>
			<description><![CDATA[I have an xml document that is currently un-encrypted and is stored on a windows mobile device. This xml document is used to fill a dataset in a windows forms application on the device. I would like to encrypt this xml  but still be able to use it as a dataset without saving the decrypted file. Is this possible? I already know how to encrypt the file, my problem is decrypting the file and using it to fill the dataset without saving the decrypted file on the device. 

Currently my dataset is filled like this:

Code:
---------
datasetname.ReadXml("xmlfile.xml")
---------
I have tried decrypting the encrypted document like this and filling the dataset but haven't gotten it to work yet:

Code:
---------
            Dim tDESKey As New TripleDESCryptoServiceProvider()
            Dim Key() As Byte = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}
            Dim Vector() As Byte = {1, 2, 3, 4, 5, 6, 7, 8}

            Dim encryptedDoc As New XmlDocument()
            encryptedDoc.Load("xmlfile.xml")

            Dim encryptedElement As XmlElement = CType(encryptedDoc.GetElementsByTagName("EncryptedData")(0), XmlElement)
            Dim ed As New EncryptedData()
            ed.LoadXml(encryptedElementClient)
            Dim exmlClient As New EncryptedXml()
            Dim decryptedDoc As Byte() = exml.DecryptData(ed, tDESKey)

            exml.ReplaceData(encryptedElement, decryptedDoc)

            datasetname.Clear()
            datasetname.ReadXml(decryptedDoc.ToString)
---------
Obviously my key and vectors are not those I have listed. Any suggestions where to go next?]]></description>
			<content:encoded><![CDATA[<div>I have an xml document that is currently un-encrypted and is stored on a windows mobile device. This xml document is used to fill a dataset in a windows forms application on the device. I would like to encrypt this xml  but still be able to use it as a dataset without saving the decrypted file. Is this possible? I already know how to encrypt the file, my problem is decrypting the file and using it to fill the dataset without saving the decrypted file on the device. <br />
<br />
Currently my dataset is filled like this:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">datasetname.ReadXml(&quot;xmlfile.xml&quot;)</code><hr />
</div>I have tried decrypting the encrypted document like this and filling the dataset but haven't gotten it to work yet:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim tDESKey As New TripleDESCryptoServiceProvider()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim Key() As Byte = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim Vector() As Byte = {1, 2, 3, 4, 5, 6, 7, 8}<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim encryptedDoc As New XmlDocument()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; encryptedDoc.Load(&quot;xmlfile.xml&quot;)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim encryptedElement As XmlElement = CType(encryptedDoc.GetElementsByTagName(&quot;EncryptedData&quot;)(0), XmlElement)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim ed As New EncryptedData()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ed.LoadXml(encryptedElementClient)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim exmlClient As New EncryptedXml()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim decryptedDoc As Byte() = exml.DecryptData(ed, tDESKey)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exml.ReplaceData(encryptedElement, decryptedDoc)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; datasetname.Clear()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; datasetname.ReadXml(decryptedDoc.ToString)</code><hr />
</div>Obviously my key and vectors are not those I have listed. Any suggestions where to go next?</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>stangman</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=173366</guid>
		</item>
		<item>
			<title>SERIAL PORT PROGRAMMING problem IN VB.NET</title>
			<link>http://forums.devx.com/showthread.php?t=173364&amp;goto=newpost</link>
			<pubDate>Fri, 13 Nov 2009 13:56:11 GMT</pubDate>
			<description><![CDATA[Hi

I am using visual studio.net 2005 to to get the data from an electronic device. Data format from the device is binary. I am using MSCOMM to transfer the data from device into a PC's binary file

I have used the following simple code to get the data

Private Sub MSComm1_OnComm(ByVal sender As Object, ByVal e As System.EventArgs) Handles MSComm1.OnComm
        If MSComm1.CommEvent = 2 Then
          PrintLine(iFileNumber, MSComm1.Input)
            MSComm1.Refresh()
        End If
       

I am getting the data but which is not the one exactly i need . I have used wifi to get the data , It is successful.  When we do the file transfer using RS232 , Can anyone suggest where I went wrong? 

If you have sample codes for file transferring , Please help

Regards

Faisal]]></description>
			<content:encoded><![CDATA[<div>Hi<br />
<br />
I am using visual studio.net 2005 to to get the data from an electronic device. Data format from the device is binary. I am using MSCOMM to transfer the data from device into a PC's binary file<br />
<br />
I have used the following simple code to get the data<br />
<br />
Private Sub MSComm1_OnComm(ByVal sender As Object, ByVal e As System.EventArgs) Handles MSComm1.OnComm<br />
        If MSComm1.CommEvent = 2 Then<br />
          PrintLine(iFileNumber, MSComm1.Input)<br />
            MSComm1.Refresh()<br />
        End If<br />
       <br />
<br />
I am getting the data but which is not the one exactly i need . I have used wifi to get the data , It is successful.  When we do the file transfer using RS232 , Can anyone suggest where I went wrong? <br />
<br />
If you have sample codes for file transferring , Please help<br />
<br />
Regards<br />
<br />
Faisal</div>

]]></content:encoded>
			<category domain="http://forums.devx.com/forumdisplay.php?f=120">.NET</category>
			<dc:creator>pfaisalbe</dc:creator>
			<guid isPermaLink="true">http://forums.devx.com/showthread.php?t=173364</guid>
		</item>
	</channel>
</rss>
