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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
A

Aaron Dilliard

@Aaron Dilliard
About
Posts
24
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Application Dissapearing After Linking With COM
    A Aaron Dilliard

    Well... I guess I could have my files out of sync... anything is possible at this point. It is one of those issues that makes you pull your hair out. I get no information whatsoever from this. I do know from my tracing that it is blowing away in the COM assembly itself, right when it is about to access the webservice. It always goes away at the same place. It just seems odd that it would only be these 2 MFC apps that would get messed up when at least 8 other applications (VS2005 or .net encapsulated admittedly) use the same assembly. At first I thought it was a security problem, so I demanded unrestricted permission... and no exception. I just wish there was a way to figure out what was going on. This machine does not have VS and can not have it installed, so I have to debug with tracing. Not very helpful for this scenario.

    COM csharp c++ question com security

  • Application Dissapearing After Linking With COM
    A Aaron Dilliard

    I have a COM dll written in c# that is being called from various c++ applications. On only 1 machine so far, I am having the application that calls the COM dll just dissapear and unload. I am unsure what is happening. I have try catches all through the code trying to catch the exception getting thrown, but it doesnt catch, just unloads. What types of exceptions or security issues would cause the entire application to unload without getting caught? It is worth noting that so far the only applications that are failing are VS6 MFC apps. Apps that are built in VS2005, or that are instantiated in a .net environment do not produce this issue. The scenario is this. C++ app calls VS2005 dll which holds refrences to the c# COM dll. 2005 dll calls into c# COM which provides webservice access to the caller. It is also worth nothing that a static method calls a singleton class in the C# COM dll. (Singleton is for websvc access). I know it is not much to go on, but I need ideas about general security problems or COM issues with what I have described, or even what type of exception is uncatchable and unloads the app :). Thanks in advance.

    COM csharp c++ question com security

  • Database C#
    A Aaron Dilliard

    Access isn't the best database for a lot of things. It is hard to answer without knowing exactly what you are trying to do, but some suggestions.... If you have a 2 tier application where multiple users connect to the database, Access does not support connection pooling, so you have a lot of connections open to the same database/table. This will slow down Access quite a bit. If the relationships in the database are complex and you are (or are not in some circumstances) forcing the restraints/relations to be upheld in the program, that will drain Access. Are you filling a datatable with a dataadapter? If so, how many times are you doing it? (Check to make sure your sequence of events doesnt load the data twice). If using commands and a datatable, set BeginLoadData=true before reading the data to the datatable, and =false when done. This temporarily keeps restraints from being enforced. If none of that helps, more info is needed. Aaron

    C# csharp database help question

  • read files from folder
    A Aaron Dilliard

    string[] files=Directory.GetFiles(skinsFolder); As a note, you will have the full path. If you only want the file name, just get a substring of the last index of '\'. Aaron

    C#

  • Crystal Report Redistributable - Not
    A Aaron Dilliard

    It depends on if the client computers already have it, in my case they did not. Google for Crystal Reports redistributable, and you should get the crystal reports website. You will need to download the merge module for the VS2005 version of Crystal Reports. Note that the clients will have to have admin access to install the merge module. Aaron

    C# question announcement

  • Get Running Processes Using A Library [modified]
    A Aaron Dilliard

    I was wondering if there was a way to determine application dependencies at runtime.. I have several applications sharing a managed library registered in the GAC. When I need to update that library (not changing its version info, so that I dont have to recompile the programs to use the updated library), I need a way to see what open processes are using that library so I can kill them before the update. If anyone has any suggestions, please let me know. Thanks is advance, Aaron

    C# announcement dotnet

  • returning more than one item
    A Aaron Dilliard

    You can also use "out" paramaters, which let you pass information back as a write only variable. private string ReturnStuff(out var1, out var2) { var1=something; var2=something; return primaryKey; } Note these are Write-Only variables. Aaron

    C# question

  • lock() and Thread.Interrupt()
    A Aaron Dilliard

    Just looking at your code (and I could be misunderstanding what you are trying to do here), but you are calling Thread.Sleep with a timeout of 100ms, which means if you dont interrupt it within 100ms of calling, then it wakes back up and resumes the code. If you interrupt the thread while it is waiting to aquire a lock then you will certainly get an exception (in this case unhandled). Perhaps specify an infinite timeout in the Sleep() method? That way it will stay in "stay asleep" until explicitly interrupted. Aaron

    C# dotnet question

  • ListView Item/Subitem backcolor solution
    A Aaron Dilliard

    A few days ago I posted a message wondering if anyone had any info on a problem with the ListView in .NET 2.0. The backcolor would disappear when scrolling or selecting and wouldnt come back until the form lost focus and got it back. (As a side note, calling Invalidate() or Refresh() on the ListView caused ALL items to lose color.) The solution turns out to be simple. In the Main method, just add Application.EnableVisualStyles(). HTH anyone with the same issue. Aaron

    C# help csharp

  • ListViewItem color issues
    A Aaron Dilliard

    On many of my applications I make use of a ListView control, that has a certain color displayed on the column that is currently sorted. It also highlights rows for special things. In .NET 1.1 this worked perfectly, but whenever I try to import an app into .NET 2.0 (VS 2005) the color highlights only show up when the form loses focus and gets it back. If you scroll, the items lose the color. This also happens when the SelectedIndex changes and the highlight is given to a new row. The previously selected row loses color. As I said before, the only way to get back the color is for the form to lose focus and regain it. Is the ListView drawn differently in .NET 2.0? Anyone else had this issue? Thanks in advance Aaron

    C# csharp visual-studio help question

  • connected to the internet or not ??
    A Aaron Dilliard

    If you are connected via LAN, then you should always be connected, unless you only have a local INTRANET, which would explain why you couldnt get through. The code supplied would be a valid way to check for connection, however. Aaron

    C# help question

  • e-mail through with Outlook Redemption library...
    A Aaron Dilliard

    Im not really understanding exactly what you are needing... but if you are asking if Outlook has to be running for redemption to work, then I would say yes. It has been my experience that the mail will never go through if outlook is not running. I suggest checking for Outlook, and if it is not running, starting the process. When all mail has been sent, then kill the process, or simply leave it open, whichever you prefer. Also, on some versions of Outlook, the mail will stay in the Drafts folder and will not send until the next Send/Receive, despite the solution that the Redemption people give you (SendNow()). Hope that helped Aaron

    C# help question security tutorial

  • System tray icon
    A Aaron Dilliard

    private void Form_SizeChanged(...) { if(this.WindowState==FormWindowState.Minimized) { this.ShowInTaskbar=false; NotifyIcon.Visible=true; }//if }//sizechanged private void NotifyIcon_DoubleClick(...) { this.ShowInTaskbar=true; this.WindowState=FormWindowState.Normal; NotifyIcon.Visible=false; }

    C# csharp question visual-studio

  • Bitmaps and Unsafe Code
    A Aaron Dilliard

    Is there any particular reason you are using pointers to do this? It could be accomplished whithout them. You could tie your bitmap to a graphics object... Graphics g=Graphics.FromImage(myBmp); ... then you could fill the image (much faster than indexing) g.Clear(Color.Black); Next, I take it you are setting the RGB value of each pixel in your for loop, but you are setting them all to Red as it looks, so why not just use.... g.Clear(Color.Red); This will work very fast. If this isnt the solution you are needing, let me know, Aaron

    C# graphics help question

  • Use dll file written by C++ MFC in C#
    A Aaron Dilliard

    using System.InteropServices; [dllImport("yourDll")] public static extern type function(params); Aaron

    C# c++ csharp tutorial question

  • Create updates of my Setup project…
    A Aaron Dilliard

    There are 2 possible answers here.... 1. You didnt set the new uninstaller to uninstall the previous version before the new install. 2. You made a completely different installer that has a new product code, which can not uninstall the other version (directly). Installers (even for the same program) with a different product code can not uninstall another version with a different product code. Solutions: 1. Set UninstallPreviousVersion to true, redistribute. 2. You will have to create a custom action script to find and uninstall the older version with a different product code. You can find it in the registry (Hikey/Local Machine/Microsoft/Windows/CurrentVersion/Uninstall) by the old product code. You will need to run the uninstall string as a process. A note with this is that you cant have 2 instances of windows installer running at once, so you will need to create a custom action script to run on install that will fire the uninstaller program. The uninstaller should wait for the installer to exit before attempting to windows installer will not run to uninstall the program. HTH. Aaron

    C# announcement question csharp visual-studio help

  • Help with socket problem...
    A Aaron Dilliard

    Yes, that is how I tested them to get the bugs out (On My Machine). It takes a good 2 days or so before they stop accepting connections, however, and debugging for that long really isnt feasible, because it doesnt always happen. It does report errors, but the error logs dont report anything unusual, client connected/disconnected, updating database, etc. Nothing that should clog the server like that. Thanks... Aaron

    C# sysadmin help question discussion

  • Help with socket problem...
    A Aaron Dilliard

    I have a server which updates programs on our local network, informs of notifications, etc... The problem is that after so long it will "lock up" and stop accepting connections. I have connected/disconnected clients and tested everywhere for a solution to the problem. There is actually a series of about 6 servers on different ports, and all of them quit accepting at once. The MainSocket is using Socket.BeginAccept and waiting for connections, then passes them off to a data structure I created to maintain the connections/user info/etc. Is there a certain period of "idle time" when the Framework aborts that thread? It seems like if that were the case, however, you wouldnt even be able to connect to the server. As it is, you can get a connection, you just cant communicate. I know without seeing the code it may be hard to determine a solution, but Im not sure exactly what the problem is. Any thoughts or comments would be appreciated... Aaron

    C# sysadmin help question discussion

  • FileName with Directory.GetFiles
    A Aaron Dilliard

    OR you could just strip the directory info from the names... for(int i=0; i

    C# data-structures regex tutorial

  • Print preview not printing...
    A Aaron Dilliard

    If this is the case, (print preview is fine, print is not) then chances are you have some variables not reset somewhere, or set to the wrong value. I would suggest trying to figure out exactly what the problem is before "masking" the problem with another solution. Aaron

    C# question
  • Login

  • Don't have an account? Register

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