|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
timer1.stopAt the very top of my program I dim a new instance of a com FTP control. I have a processing sub which calls a login function which runs the ftp controls login method and verifies it got logged in. The processing sub then calls a remote directory function. The remote directory function calls the com controls method to open the directory for a remote directory listing and gets the listing. The processing sub can be called from a button click or from the timer1.tick event. Testing using the button is great. When the timer kicks it off it logs in fine and then gives "There is no source code available for the current location" on myftpClient.opendirectory which is the com controls method to open the directory for a remote directory listing. This solves the problem but why? The first line in the processing sub is Timer1.stop. I do this to keep it from trying to start processing again while processing is running. The last line in the processing sub is Timer1.start. If instead of doing this I use a boolean variable as a flag saying processing is occurring I have no problems. Why would timer1.stop cause this problem? And why would it allow the login to work but not the opendirectory? I expect it's something simple I'm not understanding about timer events. Please enlighten me. I was using VB2003. I upgraded the project to VB2005 and it works as I
first designed it. ???? cj wrote: Show quoteHide quote > This program is used to send files to an ftp server at 2:00am each day. > At the very top of my program I dim a new instance of a com FTP > control. I have a processing sub which calls a login function which runs > the ftp controls login method and verifies it got logged in. The > processing sub then calls a remote directory function. The remote > directory function calls the com controls method to open the directory > for a remote directory listing and gets the listing. > > The processing sub can be called from a button click or from the > timer1.tick event. Testing using the button is great. When the timer > kicks it off it logs in fine and then gives "There is no source code > available for the current location" on myftpClient.opendirectory which > is the com controls method to open the directory for a remote directory > listing. > > This solves the problem but why? The first line in the processing sub > is Timer1.stop. I do this to keep it from trying to start processing > again while processing is running. The last line in the processing sub > is Timer1.start. If instead of doing this I use a boolean variable as a > flag saying processing is occurring I have no problems. Why would > timer1.stop cause this problem? And why would it allow the login to > work but not the opendirectory? > > I expect it's something simple I'm not understanding about timer events. > Please enlighten me. Hi cj,
Based on my understanding, the issue: 1) Only occurs in .NET 1.1 2) Only when you're calling Timer.Stop() in the beginning of Tick event 3) Occurs when calling the COM component's OpenDirectory() method Please correct me if I've misunderstood anything. To troubleshoot this issue, I have to ask some questions first: 1) What's the exact exception you're seeing? 2) Do you mean removing "Timer1.Stop" in the Tick event will fix the issue? 3) Is it related to the specific com component you're using? I mean, if we use some other com component in the Tick event, do you still see the issue? I'm afraid without reproducible project, it's difficult to troubleshoot and find the root cause on my side. In the meanwhile, I'll check the implementation changes in the Timer code from 1.1 to 2.0 to see if there's any break changes. Sincerely, Walter Wang (waw***@online.microsoft.com, remove 'online.') Microsoft Online Community Support ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. If you are using Outlook Express, please make sure you clear the check box "Tools/Options/Read: Get 300 headers at a time" to see your reply promptly. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. I understand it is hard to solve a problem unless your looking at the
code. I also found that the same program opened and compiled in VB2005 does not have the problem. Given I'm on a tight time frame and there is no reason this can't be done in VB2005 that's what I'm going to do. I appreciate your help but I don't have time to figure out why it will not work in 2003. I'll just use 2005. Thanks Walter Wang [MSFT] wrote: Show quoteHide quote > Hi cj, > > Based on my understanding, the issue: > 1) Only occurs in .NET 1.1 > 2) Only when you're calling Timer.Stop() in the beginning of Tick event > 3) Occurs when calling the COM component's OpenDirectory() method > > Please correct me if I've misunderstood anything. > > To troubleshoot this issue, I have to ask some questions first: > 1) What's the exact exception you're seeing? > 2) Do you mean removing "Timer1.Stop" in the Tick event will fix the issue? > 3) Is it related to the specific com component you're using? I mean, if we > use some other com component in the Tick event, do you still see the issue? > > > I'm afraid without reproducible project, it's difficult to troubleshoot and > find the root cause on my side. > > In the meanwhile, I'll check the implementation changes in the Timer code > from 1.1 to 2.0 to see if there's any break changes. > > > Sincerely, > Walter Wang (waw***@online.microsoft.com, remove 'online.') > Microsoft Online Community Support > > ================================================== > Get notification to my posts through email? Please refer to > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > ications. If you are using Outlook Express, please make sure you clear the > check box "Tools/Options/Read: Get 300 headers at a time" to see your reply > promptly. > > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues > where an initial response from the community or a Microsoft Support > Engineer within 1 business day is acceptable. Please note that each follow > up response may take approximately 2 business days as the support > professional working with you may need further investigation to reach the > most efficient resolution. The offering is not appropriate for situations > that require urgent, real-time or phone-based interactions or complex > project analysis and dump analysis issues. Issues of this nature are best > handled working with a dedicated Microsoft Support Engineer by contacting > Microsoft Customer Support Services (CSS) at > http://msdn.microsoft.com/subscriptions/support/default.aspx. > ================================================== > > This posting is provided "AS IS" with no warranties, and confers no rights. > > > >
What Does This Mean?
Computer Name - Best way to obtain this VB.Net Best way to write to textfiles? cant assign variable values to property in Class file Re: .net Visual Studio A Simple SQL Result displayed into a TextBox VS 2005 SP1? how can I tell if it is a folder or a non-folder file Keeping Code Snippets? DataGridView visible columns |
|||||||||||||||||||||||