Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

Andy Davey

@Andy Davey
About
Posts
35
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • .Net Quizz
    A Andy Davey

    This will stretch your memories a bit. Basically sometime between Dec 2002 and Sep 2003 someone posted (in the lounge) a link to a quiz that you could do to test your knowledge of .net (may have been geared towards vb.net but I'm not positive). The quiz was hosted at Microsoft and at the end it gave you a score and a rating etc. It appears that I never bookmarked the link or sent it to myself in an email, and I was wondering if anyone could remember how to get to the quiz (if it is indeed still hosted). Im not to hopeful but if you never ask you never know. TIA Andy

    The Lounge csharp tutorial

  • Detect cause of application memory leak
    A Andy Davey

    Rrrrrright. I'd never considered that. Yeah the way that I access the API is by passing an uninitialised object which the API initialises (eg GetMesssage(out p_messageDetails);) Now who's repsonsibility is it to deallocate the memory used in the message? Mine or the marshallers? I wouldn't even know how to deallocate that memory to be honest :-). Its amazing how lazy you get when you code under a GC. Andy

    C# csharp performance question

  • Detect cause of application memory leak
    A Andy Davey

    Basically my windows service is used to handle a teletext signal reader (essentially receives text over TV broadcasting) via a C api compiled to a dll. My service continually waits on the feed for new messages. Once a message is received, it is processed, stored to a database and made available for other applications in my domain. Where I initially thought my memory was getting gobbled up was in my queues used to pass messages between threads, since depending on the throughput of the device, could have up to 18,000 messages (each message object is probably < 100 bytes or so) waiting to be processed. But I did the math and that didn't come close to my 200Mb working set. Essentially one thread puts messages in a queue and another thread waits for messages in the queue, dequeues the message and processes it. There are around 10 such threading setups in the service. So I'm looking else where for the problem. Somewhere I'm forgetting to deallocate objects. One thing that I'm testing for at the moment is that maybe one of my threads is crashing and the queue of which its supposed to dequeue is filling up. Since the problem doesn't appear until the service has been running longer than 6 hours or more, it's going to take some time to find (which further makes me think that a thread is crashing somewhere). Failing one of my threads crashing over the weekend I will be looking at that manager heap profiler mentioned above in one of the posts. Andy

    C# csharp performance question

  • Unrolling a loop: why can't .NET add 1 + 2 + 3 + ...
    A Andy Davey

    Just out of interest, are you unrolling your loops purely for performance reasons? What is the measured difference in performance between using the loop and unrolling it? Andy

    C# csharp data-structures help tutorial

  • Updating my main form (gui) from another class
    A Andy Davey

    eggie5 wrote: Why can I not change the value of the progess bar to 100? Do you mean that the progress bar doens't visually change or do you mean that the framework throws an exception. Without seeing more of your code I would suspect its the former one. From what I can see you are expecting this pb class to update the progress bar in the applications main form. However, the pb class has no reference to the main form. When the pb class is created, a new object of type Form1 is created. This new is not the same object as the one displayed on the screen when you run your program. To get your guid member to reference the displayed form - pass a Form1 object reference to the pb constructor. An example would be

    public class Form1
    {
    pb m_pb;

    public Form1()
    {
    m_pb = new pb(this);
    //...
    }

    //...
    }

    public class pb
    {
    Form1 guid;

    public pb(Form1 p_ref)
    {
    guid = p_ref;
    guid.progressBar1.Value = 100;
    //...
    }

    //...
    }

    C# question

  • Detect cause of application memory leak
    A Andy Davey

    Hi, I've written this windows service in C# which unfortunately has a memory leak in it. Basically the program starts out using a 10Mb working set, but after three days it goes up to 200Mb, which says to me somewhere I'm forgetting to dereference some objects etc. The thing is I've looked and I can't find it. Is there a tool or methodology for finding object references that are being held onto erroneously by my application? Shouldn't be too hard to find - theres 200Mb of them (and thats after 3 days - this thing is supposed to run 24x7) TIA, Andy

    C# csharp performance question

  • wacked out idea, unless its possible
    A Andy Davey

    I remeber reading somewhere that you could work out which continent a server resided on based on its TTL value. But I also remember reading elsewhere that this was during the early days of the net and probably doesn't work as well as it used to. Andy

    Article Writing com sysadmin tools question learning

  • Opening Solutions
    A Andy Davey

    What exactly do you mean? Steve McLenithan wrote: VS.net solution hosted on another machine I'm a bit confused by your choice of the word hosted. If you are talking about a regular .sln file (the file that makes up the solution), then just create a network share to the folder the solution resides in and open it like you would a file that resides on your local computer. If you are referring to an Web Project hosted on the network, then it's best to creata a local solution (say a blank one), an d then add the web project to the solution using the VS.NET ide (its a context menu option for the solution in Solution Explorer). Hope this helps, and I hope I haven't misunderstood your question. Andy

    Visual Studio csharp visual-studio sysadmin ai-models question

  • VS.NET IDE unavailable from Task Bar
    A Andy Davey

    I sometimes get the same problem. Annoying but I've found no workaround besides rebooting (even then I can't be sure that it fixes it - I only get this problem once or twice a month)

    Visual Studio visual-studio csharp question

  • Leaving source control
    A Andy Davey

    Have you tried File -> Source Control -> Change Source Control. Basically you can use this to then unbind the project from any source code provider that you may have/have not installed. HIH Andy

    Visual Studio csharp visual-studio wpf wcf

  • Moving file to the output directory
    A Andy Davey

    If its named app.config (for windows and console applications) and resides in the root of your project, VS.NET will do this for you automatically (and rename it to the name of your executable). Otherwise if you have another .config file (say foo.config) you can set the Build Action (right click on the file and select Properties from within VS) to content. I'm pretty sure then that VS will copy the file to the output directory when it performs its build. HIH Andy

    Visual Studio question

  • Server Explorer and SQL Server
    A Andy Davey

    I posted this question in the General Discussions forum yesterday because I didn't realise this forum existed till now. Basically my problem is this. I have installed an instance (the default) of SQL Server 2000 on a computer in our domain. Howerver when I connect to a database on this server using VS's Server Explorer, I don't get any of the nice options like "Edit Stored Procedure", "New Stored Procedure" etc etc. However, I have installed MSDE 2000 on other computers on the domain and I have no problems doing that sort of stuff with them. I doubt the problem is a database credentials issus since, I use exactly the same credentials through an Access Project to access the database to modify its structure. To further confirm this I even enabled SQL authentication and logged in as 'sa', to no avail. Another thing that I have noticed is that when I right click on the connection under 'Data Connections', I don't have the option to "Modify Connection" (its greyed out) like I do with other connections to other servers on the domain. Also the connection doens't list the "Database Diagrams" or the "Functions" sub folders. Its almost as if VS is using a different driver to connect to this SQL Server 2000 as opposed to the other MSDE 2000 machines on the network in the domain. Its rather annoying as you can imagine, but I have no idea what could be causing it. Something in VS.NET tells it that it can't edit the database etc. I even installed VS's remote components and enabled remote debugging on the server to see if that would fix it, all to no avail. Has anyone else experienced something similar. I've googled away and no one else seems to have this issue. Thanks in advance, Andy

    Visual Studio database help sysadmin csharp sql-server

  • Time display
    A Andy Davey

    I wish the time display would be in your local time as per your computer. Might also be useful (as an option, probably not default) to have two times listed for posts not posted by yourself. One for the time it was posted relative to your timezone, the other relative to the posters time zone.

    Site Bugs / Suggestions com question

  • Bull in a China Shop (no really)
    A Andy Davey

    Pretty funny: http://www.local6.com/orlpn/news/stories/news-223217920030528-090521.html[^]

    The Lounge html com announcement

  • Server Explorer and SQL
    A Andy Davey

    Thanks for your post. Unfortunately, I've already tried using the sa account etc and still had the same problems. It's really weird. Almost like a different driver is being used to access the database on that server as opposed to databases on other servers. The reason I say this is that if I connect to a database that VS will allow me to edit/add etc etc and the server is MSDE 2000 I get the following folders underneath the database connection: Database Diagrams, Tables, Views, Stored Procedures, Functions. Yet, under the SQL 2000 database connection, I'm only seeing Tables, Views and Stored Procedures. No Database Diagrams and no Functions. Odd. Any thoughts?

    IT & Infrastructure database visual-studio csharp sql-server sysadmin

  • Server Explorer and SQL
    A Andy Davey

    Hi all, I have a new installation of SQL 2000 on our domain here at work on a different machine to the one I develop one. For some strange reason however, when I connect to the a database on the SQL Server through Server Explorer in VS.NET (both 2002 and 2003), it won't allow me to do stuff like create new stored procedures, edit exiting ones etc. A real pain in the butt since otherwise I have to open up Access or QA in the background to make changes to the database instead of right in the IDE. What's also weird tho, is that I have MSDE 2000 installed on yet another machine on the domain, and it doesn't have any problems with me editing the stored procedures, or even doing some remote debugging. I've experienced this problem once before with a remote database, and I'd just assumed the problem was because the database was remote and not on the same domain etc. Anyways if anyone else has had a similar experience and knows of a work around, or even what makes VS decide for which DB connections it will enable/disable the "edit stored procedure" menu items etc, that will be great. TIA Andy

    IT & Infrastructure database visual-studio csharp sql-server sysadmin

  • call to the main thread
    A Andy Davey

    The mono project is located at www.go-mono.com[^] HTH Andy

    .NET (Core and Framework) winforms learning workspace

  • Ultimate Case Mod
    A Andy Davey

    Check this site out for a truly remarkable case modification: http://www.pimprig.com/modules.php?s=&name=Sections&sop=viewarticle&artid=72[^]

    The Lounge php com question

  • Software Version Control
    A Andy Davey

    Currently Im looking for some version control software, but I haven't found any good reviews as such as to determine which package out there will suit my needs best. Basically I'm the only developer (until I'm rich that is :cool: ), and I do all my work in VS.NET 2002. What I'm looking for in an SVC is: *IDE integration
    *the ability to say "this is a release" and be both continue improving the code without losing the ability to go back to the old release version in the case of a major bug is found.
    *the ability to use version control on my web projects as well (some that I have trialed don't do this).
    *an easy to use graphical interface. I don't think I would like a command line interface. I may be wrong, but I think i would get jack of it after a while.
    Any suggestions on either a good review or your own recommendations? TIA Andy

    The Lounge visual-studio announcement csharp collaboration help

  • Call Shell Command
    A Andy Davey

    Its a bit more complicated but here is an example:

    using System;
    using System.Diagnostics;

    Process p = new Process();
    p.StartInfo = new ProcessStartInfo(@"Rundll32.exe shell32.dll,Control_RunDLL Sysdm.cpl, 0");
    p.StartInfo.UseShellExecute = true;
    p.Start();

    // and optionally
    p.WaitForExit();

    Andy He who knows and knows that he knows, is wise;  follow him_He who knows and knows not that he knows, is asleep;_  wake him_He who knows not, and knows that he knows not, is simple;_  teach him_He whoe knows not and knows not that he knows not, is a fool;_  kick him

    C# csharp linux
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups