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
P

Paul Riley

@Paul Riley
About
Posts
1.4k
Topics
52
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • VS2005 Locking Up All-Too-Regularly
    P Paul Riley

    Hi all, Since the New Year, I've started running into problems with VS2005 that just weren't there before. Mostly when I do a build the IDE reports on the build, completes it and then locks for a few minutes. It doesn't appear to be doing much, my hard drive doesn't seem to be going nuts, but if I look at the Task Manager, it is eating up about 20% of my processor for the whole time it's hanging. Note: This only appears to be happening for two of five solutions (both are Web Application Projects but so is another that seems to work fine). The common thread between those two projects would be two included DLLs. Also Note: Two other developers are on my team and they're not having problems. During the time when this started to happen, several changes have been made to my system, including VS2005 SP1, but I've tried removing every change that I can think of. I've even uninstalled every bit of VS2005 including the MSDN Library and then reinstalled to both pre-and-post-SP1 configurations and still I'm having this problem. Note again that of the other two developers, one is still pre-SP1 and the other is post-SP1. Annoyingly I'm not really sure when this started, I remember it happening once a couple of weeks ago but now it's happening every time I build or do a Find All References or run the project or stop running the project, or pretty much anything beyond editing a file. So maybe it's a progressive problem or maybe the original issue was a glitch and this is a new problem. Either way, as you can imagine, this is slightly irritating :mad: Either has anyone seen and solved a similar problem or can anyone give me an idea how to figure out what it thinks is so important that it hangs the IDE while it does it? Not Happy! :((

    Paul

    Visual Studio help visual-studio collaboration tutorial question

  • how many ways are there to create a instance of a class?
    P Paul Riley

    Mark Nischalke wrote: True enough. My point was to say that new and CreateInstance are not the only choices all the time. Indeed, and don't get me wrong, I'm becoming a great fan of the Factory, particularly since I discovered the joys of unit testing. Mark Nischalke wrote: If you really want to get down to it every method must at some point use new, so there is only one way. Actually, when you put it that way, I wonder whether it's the other way around. Perhaps the keyword new translates into something related to the Activator.CreateInstance, much like lock translates to Monitor.Enter. But I don't know, I try not to consider these things too deeply. :rolleyes: Paul

    ASP.NET question

  • Installer
    P Paul Riley

    The project and solution are not output files. The assumption is that you only want to install the web app, not the entire project. Paul

    ASP.NET question tutorial

  • how many ways are there to create a instance of a class?
    P Paul Riley

    Which in turn would have to use either new or reflection, the factory is just a wrapper. Don't confuse matters ;P. Paul

    ASP.NET question

  • how many ways are there to create a instance of a class?
    P Paul Riley

    There are a number of ways, but anything other than "new" are in the realms of Reflection, and probably should be avoided unless you have a real need to use them. The web service problem I posted some way down this page uses Activator.CreateInstance. Paul

    ASP.NET question

  • Movie: War of the Snores
    P Paul Riley

    Paul Watson wrote: Cutting through my rant, I felt that the movie was essentially a family drama which got muddled up in an alien invasion. The genius of the original story was a tacked on idea at the end of the movie, To be fair (and I haven't seen the new movie yet) the original (ie. the book) was one of the classic sci-fi horror genre where the antagonist is more a plot device than the point of the story. Like Day of the Triffids, it's more about how people react in times of adversity than the adversity itself, though compared to Day of the Triffids, it's fairly optimistic. It does have an ending that is seemingly tacked on to give a relatively happy ending, which is also unlike Day of the Triffids where a handful of people escape to the Isle of Wight. So it sounds to me like you're saying they got that bit right. What worries me more, and stopped me rushing to see the movie, is the inclusion of the kids. Assumedly this was done to remove the necessity for a voice-over monologue, which a truly faithful rendition of War of the Worlds would require, but it's also killed off the dark hopelessness of a single man trecking helplessly through a largely destroyed world, hunting for his true love (which in turn, I imagine, will have weakened the impact of the ending). Typically Spielberg, I'm afraid. Go see Batman next time, truly awesome, there's a good reason they can get away with charging more for it. Sadly I think War of the Worlds is and always will be better as a book. Go read it, or if you want to see a more modern example of a similar genre go read Blood Games or King Blood by Simon Clark (or indeed his sequel to Day of the Triffids) and try to imagine them as films. Paul Watson wrote: Never fear, he is getting married soon, that job will be filled then. *chuntering* lucky, lucky ba- *trails off* Paul

    The Lounge com question

  • OpenFileDialog in ASP.net
    P Paul Riley

    Your C# code runs on the server, thus can have little-to-no direct control over the end user's machine, therefore you can't use .NET Windows Controls in a Web Form (for one thing, you have no idea if the user has the .NET Framework installed). For a MessageBox, you can just include some javascript in which you can use alert("Hey user, I'm giving you a message here");. An OpenFileDialog is more problematic, what do you want it for? If it's just for allowing the user to upload files, use the File Field HTML Control. Paul

    ASP.NET csharp asp-net dotnet

  • XmlSerializer, Reflection and Web Services
    P Paul Riley

    Ok, here's a weird problem, no idea if anyone will be able to help, but let's try it anyway. I'm accessing a number of different web services with the same kind of data presented in different ways, then correlating the data in various ways. I've created a number of plugin DLLs, each of which has data collection and convertion classes marked with a specific attribute so that Reflection can pick them out at will and use them to collect data, regardless of the format it's coming in. This all works absolutely fine in a WinForms project, so I know there's nothing wrong with the code in the plugins or the reflection process. But when I try to call these plugins from a web service of my own, I get an Xml Serialization error from the call to the remote web service, which is singularly non-descriptive but claims it cannot convert from one class to another, giving me no clue which classes it's talking about. If I try to use the XmlSerializer (within the plugin) to write out the web method argument to a file before sending, I get the same response from that. But if I try to write the contents of the object out to a flat StreamWriter, it writes it out successfully, so I know the object exists in memory (though the debugger would seem to indicate otherwise). As a workaround, if I directly reference the plugin DLL from the web application project and create the converter class without reflection, everything works just fine, but I'd prefer not to have to go down that road - there may be a lot of plugins eventually. This pretty much leads me to the conclusion that there's something weird about combining web services, reflection and the XmlSerializer, cause if I remove any of the three from the equation everything is just peachy. Has anyone seen anything like this and got an idea how to get around it? Paul

    ASP.NET help csharp winforms wcf debugging

  • Rename a locked file
    P Paul Riley

    You guys rock, thanks. Serious brain freeze on my part. Paul

    C / C++ / MFC question adobe

  • Rename a locked file
    P Paul Riley

    This seems like a really simple question, but I can't find the answer anywhere else and I know someone in here has to have faced it before. At the commandline (at least on NT/2k/XP, which is all that matters in this question), you can rename a file which is currently locked using ren and the program holding the file will adjust, allowing you to put a new file in its place ready for later. If I try to do this using MoveFileEx then (not entirely surprisingly) it complains that the file is locked. I could open a new process and use the commandline, and I will if I have to, but if there's some way of convincing MoveFileEx or call something else to rename the file then I'd prefer not to have a DOS box flash up. Does anyone know if this is possible? Paul

    C / C++ / MFC question adobe

  • Win API: RegSaveKey / GetShortPathName
    P Paul Riley

    Okay. I discounted the idea that the double-backslash was the problem by using a different folder. Then I realised that I could use GetShortPathName to get the name of the container folder and make sure the file names were 8.3 format when I added them. Problem soved. Doh! Paul

    C / C++ / MFC help windows-admin json question

  • Win API: GetCommandLine
    P Paul Riley

    And another problem that has me completely floored: In a Windows Installer DLL, it is necessary for me to get and adjust the commandline, write it into RunOnce and reboot the machine. I've never used GetCommandLine before because I've always had access to the WinMain arguments, so it has never been necessary but in this case there is no other way to access it. On Windows 9X, I have no problem. I use _tcscpy( szRunOnce, GetCommandLine() ); and szRunOnce is populated with "C:\WINDOWS\SYSTEM\msiexec.exe" /i "E:\MyFolder\MyInstaller.msi" /l*v C:\msilog.txt. That's exactly what I expect. On Windows 2000, I get something else entirely - something like: C:\WINNT\System32\MsiExec.exe -Embedding 03E11881F81557A4CAAAA7C7B6ADDFBB This is no use to me whatsoever, as far as I can see. Is this Windows Installer doing this to me or GetCommandLine? If the latter then is there a good way of building the string that I'm really looking for? Paul

    C / C++ / MFC json help question

  • Win API: RegSaveKey / GetShortPathName
    P Paul Riley

    Okay, I give up. Can anyone here help me with this: According to the MSDN docs for RegSaveKey: "Windows 95/98/Me: RegSaveKey does not support long file names. To save a registry hive to a file with a long file name, first save the hive to a short file name, then rename the resulting file to its long file name." And sure enough this seems to be the case, so I need to convert the filename to a short path. But when I call GetShortPathName, I get the error: The system cannot find the file specified. Well, obviously it can't find it, I'm about to create it. If I create the file to get the short path name then I need to remove it again before calling RegSaveKey, which doesn't seem to support overwriting existing files. So as far as I can gather, the only solution is to create a file, get it's short path name, delete the file and then call RegSaveKey. This seems very convoluted; does anyone have a better way that works? OR... have I completely missed the point here? I do notice that the long path name I'm trying to shorten has a double-backslash in it. C:\WINDOWS\TEMP\\{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}\MyFolder\MyExtract.reg I didn't put it there, it's a Windows Installer API problem. It creates a support folder for installations ("[TEMPFOLDER]\[Product Code GUID]") and when you ask it for the path, you get it with the double-backslash. It hasn't caused me any issues up until this point, but I suppose it could cause the error from GetShortPathName. I don't know. Anybody? Paul

    C / C++ / MFC help windows-admin json question

  • Datagrid Girl
    P Paul Riley

    At $160 an hour, you'd think she'd be able to afford one. Paul

    The Lounge com

  • Fireworks
    P Paul Riley

    John Cardinal wrote: You guys are all missing the painfully obvious: parents are responsible for those problems, look to yourselves, not your government. That would be nice. Unfortunately, I have no kids to teach and there's enough parents out there who refuse to teach their kids that my life can become negatively affected. Who should I turn to? Those parents or the government? Besides, the UK government is already a nanny state. If I have to put up with all the negative crap that comes with that, why shouldn't I expect some sensible decisions to be made as well? Paul

    The Lounge com collaboration question announcement workspace

  • Fireworks
    P Paul Riley

    JohnJ wrote: JohnJ pauses to pull West Highland Terrier off ceiling after loud bang :laugh: We have a German Shepherd - 9 months old and very friendly, but standing his head comes up to my waist. I'm 6' tall. He doesn't so much stick to the ceiling as put a bloody great hole through it. And our official local display is tomorrow night :sigh: Paul

    The Lounge com collaboration question announcement workspace

  • Fireworks
    P Paul Riley

    JohnJ wrote: Like Jonny Newman I have a dog that goes mad when there is a nearby or not so nearby bang, not to mention the growing Liverpool habit of blowing up phone boxes with the damn things Not much danger of that in London this year though, huh? ;P JohnJ wrote: I'm dead against the "Nanny State" but this has gone mad and needs stopping now because each year it get worse, flog the little b*st*rds who let them off to cause disruption Well said, that man. Paul (another dog owner - worse, a very large puppy owner)

    The Lounge com collaboration question announcement workspace

  • Pentium M
    P Paul Riley

    :) Point taken. I'm much happier working with a desktop upgrade, I can do what I like there. I've been putting off a laptop upgrade for a while now but a Celeron 600 with 8Mb RAM really doesn't do it for me any more and it being WinME doesn't make me any happier. Got to bite the bullet. Paul

    The Lounge question

  • Pentium M
    P Paul Riley

    That bad? X| I can't say I'm entirely surprised. Oh well, I'm a developer, There's no lack of huge books around our house. :-D But it occurs to me that better cooling systems would be a good selling point for one laptop over another, and yet I don't see any comparisons between brands on this anywhere. Paul

    The Lounge question

  • Pentium M
    P Paul Riley

    John M. Drescher wrote: AMD has been saying this for years now and could use some adds... :-D :laugh: :-D :cool: Paul

    The Lounge 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