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
M

Mark Otway

@Mark Otway
About
Posts
57
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Why the hell does my PC keep hibernating? :(
    M Mark Otway

    The machine is just a standard XP pro box. I use TS to access it via my laptop so I don't have to have a screen attached to it. Nobody other than myself accesses the box, so it's something that couldn't get changed by somebody else. I see where you're coming from with the comment re: the Bios - the only weird thing is that it only hibernates the box, and it wasn't happening 2 weeks ago!

    ________________________ http://www.webreaper.net

    System Admin dotnet question csharp java com

  • Why the hell does my PC keep hibernating? :(
    M Mark Otway

    A real head-scratcher, this one. I have a Dell Precision 530, twin 1.7Ghz Xeon server running XP, at home. The server runs headless, and I access it via TS from my laptop (or remotely from work). It's used as a torrent server, and also as a music server for streaming choons to my Soundbridge. It's been running fine since I set it up a couple of months ago. To save a bit of power, and because it's noisy as hell and keeps me awake at night, I have it set up with an AT job to hibernate it at 22:30 each evening, and the BIOS wakes it up again at 8am each day. Again, that's been working just fine for the last 8 weeks. However, last week, it suddenly started shutting down for no apparent reason. It seems to start up, works for 3-4 minutes, and then hibernates, after which it's inaccessible (remotely) until I physically power it up again (not practical when I'm in the office ). Question is, why?!?! I've checked the event log sometimes the last thing in the event log seems to be a message saying ".NET Runtime Optimization Service (clr_optimization_v2.0.50727_32) - Completed all work. Shutting down.", which implies that this service is completing and causing the machine to shutdown or reboot. However, after some investigation it seems that the 'Shutting Down' comment refers to the CLR optimisation process, not the PC itself, so this may be a red herring. (see here: http://discussion.autodesk.com/thread.jspa?threadID=521502). I've tried uninstalling the .Net Framework v3 to see if it's that which is causing the problem, but no joy. I've also played with the power-saving settings, to see if they'd got corrupt, but again, not change (I have them set to 'Never' hibernate). I installed AVG last night, no viruses or other crap which might be causing it. The PC seems to stay alive when I'm connected to it, but shuts down a few minutes after I disconnect. I ran the AVG full scan, which took about half an hour, and at some point after that did the machine hibernate, so it's like it's doing it when the machine is idle. I have no idea why it's behaving like this, but it's driving me nuts - and is particularly irritating as I'm currently trying to initial-seed a 23GB torrent at the moment, which isn't going to happen if the machine's only up for 4 minutes at a time. If I disable hibernation, the machine stays awake and it's not a problem. So, any other ideas?

    ________________________ http://www.webreaper.net

    System Admin dotnet question csharp java com

  • ImageButton Server-side OnClick handler doesn't always get called
    M Mark Otway

    Bit of extra info: the odd thing is that we have 2 production servers running exactly the same code - one is used as a 'staging' server (i.e., sand-box pre-production site used for external client testing) and the other is the actual production site. Both are configured identically (one used to be the real production system before we migrated it to an alternate hosting environment). The odd thing is that the IE client which exhibits the problem on the staging server, doesn't exhibit that behaviour on the production server. So you have the same binaries and presentation (.asXx) files on both servers, and yet the same IE client behaves differently depending on which server you use. And yet my machine works perfectly when I run against either server. It's a head-scratcher, alright... ________________________ http://www.webreaper.net -- modified at 6:58 Thursday 4th May, 2006

    ASP.NET csharp sysadmin regex question

  • ImageButton Server-side OnClick handler doesn't always get called
    M Mark Otway

    I've tried changing the AutoEventWireup="true" but it doesn't make any difference, the event still fails to trigger. I wouldn't have thought a setting like that should affect it anyway (or, more to the point, if it was as simple as that, I wouldn't expect the code-behind call to trigger on any client at all, rather than working on some and not on others, as we're currently seeing). Any other ideas? ________________________ http://www.webreaper.net

    ASP.NET csharp sysadmin regex question

  • ImageButton Server-side OnClick handler doesn't always get called
    M Mark Otway

    Javascript is enabled, as are cookies, etc. We have lots of other code running on that machine (we've got a development machine which the problem happens on, but all our other sites work on that machine). It also comes and goes - I've had the problem on my development machine one day, and then a couple of hours later it stops happening and the site works correctly. It's most bizarre! ________________________ http://www.webreaper.net

    ASP.NET csharp sysadmin regex question

  • ImageButton Server-side OnClick handler doesn't always get called
    M Mark Otway

    I have a server-side ImageButton: <asp:ImageButton id="btnDoSomething" runat="server" StartContainer="maindirection" 0nClick="StartProcessButtonClick" AlternateText="Start process" ImageUrl="/public/buttonImage.jpg" /> (note I've changed the O in OnClick to a zero so this post displays correctly). The button has the appropriate code-behind: protected void StartProcessButtonClick(object sender, ImageClickEventArgs e) { if(sender is ImageButton) { // blah } } This button works for 95% of the visitors to the site, but for a select few, it the server-side handler doesn't get called. It's absolutely consistent - it either works on a PC, or doesn't, but there's no logical pattern as to why it doesn't work. Any ideas at all why the handler would get called for one client (running IE6 SP2) but not for another (same browser)??!!?!? :doh: ________________________ http://www.webreaper.net -- modified at 12:04 Wednesday 3rd May, 2006

    ASP.NET csharp sysadmin regex question

  • Unsafe code on a webserver - 2bpp images
    M Mark Otway

    Anyone? :) ________________________ http://www.webreaper.net

    C# database graphics help

  • Unsafe code on a webserver - 2bpp images
    M Mark Otway

    We're doing some bitmap manipulation and have come up against the issue of not being able to create a 2bpp bitmap. So we've implemented the following class: public class BitmapSubsystem { public static readonly BitmapSubsystem Instance = new BitmapSubsystem(); protected ColorPalette GetMonoColorPalette() { // Make a new Bitmap object to get its Palette. Bitmap bitmap = new Bitmap( 1, 1, PixelFormat.Format1bppIndexed ); ColorPalette palette = bitmap.Palette; // Grab the palette palette.Entries[0] = Color.FromArgb( (int)0xFF, (int)0, (int)0,(int)0 ); // Black palette.Entries[1] = Color.FromArgb( (int)0, (int)255, (int)255,(int)255 ); // Transparent bitmap.Dispose(); // cleanup the source Bitmap return palette; // Send the palette back } public void ConvertTo2bppBitmap( Bitmap sourceBitmap, Stream output ) { // Make a new 8-BPP indexed bitmap that is the same size as the source image. int Width = sourceBitmap.Width; int Height = sourceBitmap.Height; // Always use PixelFormat8bppIndexed because that is the color // table-based interface to the GIF codec. Bitmap bitmap = new Bitmap(Width, Height, PixelFormat.Format8bppIndexed); try { // Create a color palette big enough to hold the colors you want. ColorPalette pal = GetMonoColorPalette(); // Set the palette into the new Bitmap object. bitmap.Palette = pal; // Lock a rectangular portion of the bitmap for writing. BitmapData bitmapData; Rectangle rect = new Rectangle(0, 0, Width, Height); bitmapData = bitmap.LockBits( rect, ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed); // Write to the temporary buffer that is provided by LockBits. // Copy the pixels from the source image in this loop. // Because you want an index, convert RGB to the appropriate // palette index here. IntPtr pixels = bitmapData.Scan0; unsafe { // Get the pointer to the image bits. // This is the unsafe operation. byte * pBits; if (bitmapData.Stride > 0) pBits = (byte *)pixels.ToPointer(); else // If the Stride is negative, Scan0 points to the last // scanline in the buffer. To normalize the loop, obtain // a pointer to the front of the buffer that is located // (Height-1) scanlines previous. pBits = (byte *)pixels.ToPointer() + bitmapData.Stride*(Height-1); uint stride = (uint)Math.

    C# database graphics help

  • The daily routine
    M Mark Otway

    I always check the Dilbert cartoon. I also usually check CodeProject, using the RSS viewer. Unfortunately though, somebody appears to have broken it at the moment. :( ________________________ http://www.webreaper.net

    The Lounge com question

  • How do I install ASP.NET on my IIS?!
    M Mark Otway

    I've started developing C#/ASP.Net apps, and have got everything set up at work, but I want to do some stuff on my home PC too. I've got VS.Net 2003 installed, and IIS is running fine. I've also installed .Net framework v1.1. However, when I try and load or create a new C#/ASP.Net project in VS, I get the error: Visual Studio has detected that the specified web server is not running ASP.NET 1.1. You will be unable to run ASP.NET web applications or services. Now, I've spent the whole of this evening messing around with VS.Net installers, and searching MSDN for a solution, but can't find anything to solve this! :confused: It's driving me nuts!!! :( Can anyone point me in the right direction to solve this?! :| ________________________ http://www.webreaper.net

    ASP.NET csharp question asp-net dotnet visual-studio

  • UNICODE build - but something's linking incorrectly
    M Mark Otway

    Hi, Got a bit of a perplexing problem. I'm building a Unicode DLL, which is linking to a lib I've built (also Unicode, obviously). If I build the DLL without referencing the lib, it builds perfectly. However, when I link in the lib, something in it is causing the non-Unicode MFC libraries (nafxcwd) to be linked in too, causing the error: LINK : warning LNK4098: defaultlib 'nafxcwd.lib' conflicts with use of other libs; use /NODEFAULTLIB:library However, both DLL and lib are compiled with _UNICODE defined, and the lib's compiled with /NODEFAULTLIB, so I can't work out where the reference to the non-Unicode symbol is coming from. I've tried linking with /VERBOSE:LIB, but it doesn't seem to be giving any clues. The question is, how can I find out what symbol is causing the linker to search in the nafxcwd library? Is there any linker option which will show me which symbol is being searched for when each library is being searched? Any other easy ways of solving this? Thanks Mark

    C / C++ / MFC question help c++

  • RasCustomDial
    M Mark Otway

    Help! I'm having real problems getting this to work. I've tried the customdial sample which somebody kindly found for me yesterday, but it doesn't seem to work right. Has anyone got a Custom Dialler working properly who could spend a few minutes with me helping me iron out the problems? (mark@otway.com). ________________________ http://www.webreaper.net

    C / C++ / MFC csharp com help question

  • Platform SDK Sample - can you send it to me?
    M Mark Otway

    Thanks very much. :-D ________________________ http://www.webreaper.net

    C / C++ / MFC csharp question

  • Platform SDK Sample - can you send it to me?
    M Mark Otway

    I need a sample from the Aug 2001 Platform SDK CD. I don't have the CD available to me, but need it fairly urgently. It's the customdial sample, and should be located in the \Samples\NetDs\RAS\CustomDial sample directory on the CD. I'd appreciate it if somebody could email this to me. :-D ________________________ http://www.webreaper.net

    C / C++ / MFC csharp question

  • RAS AutoDial Settings problem
    M Mark Otway

    I'm trying to configure my own GUI for an AutoDial RAS entry, in a similar method to the RasJazz[^] sample in the MSDN. I'm using RasSetEntryProperties to set the autodial DLL and autodial function, and have built a suitable RAS autodial DLL with both ASCII and Unicode exported functions. But it doesn't work. :( For some reason, calling RasSetEntryProperties seems to corrupt the dial-up entry, altering the options so that a phonebook entry which previously didn't prompt at all now prompts for the phone number. And regardless of this, the autodial function never seems to get called in my DLL. :confused: Anyone got a working example of this stuff?!? I've even tried compiling the FYI, here's my code to set up the phone book entry for my autodial DLL.... DWORD dwEntrySize = sizeof( RASENTRY ); RASENTRY entry; ZeroMemory( &entry, dwEntrySize ); entry.dwSize = dwEntrySize; DWORD dwRet = RasGetEntryProperties( NULL, sDialEntryName, &entry, &dwEntrySize, NULL, NULL); if( !dwRet ) { if( bAddAutoDial ) { // Set the path to this DLL and the function name strcpy( entry.szAutodialDll, sDLLPath ); strcpy( entry.szAutodialFunc, "ISPIAutoDialHandler" ); } else { entry.szAutodialDll[0] = NULL; entry.szAutodialFunc[0] = NULL; } dwRet = RasSetEntryProperties( NULL, sDialEntryName, &entry, entry.dwSize, NULL, 0); if( ! dwRet ) bRet = TRUE; } ________________________ http://www.webreaper.net

    C / C++ / MFC csharp com help tutorial question

  • Monitoring dialling - how?
    M Mark Otway

    That's exactly what I'm doing, and it works perfectly - as long as I perform the dial myself. However, I also want to monitor the dialling even if it's performed by another app, or by the user manually starting a connection via dial-up networking. In the latter case, whilst I can get an HRASCONN handle by enumerating RAS connections, it only 'appears' after the RASC_Auth status occurs - meaning I can't time the actually dialling part of the connection unless I initiate it. Regarding the engaged error issue, I'm not sure - but it's something I have to handle/detect, so if I find a solution I'll post it back in this thread. :-D ________________________ http://www.webreaper.net

    C / C++ / MFC csharp question

  • Monitoring dialling - how?
    M Mark Otway

    Hi all, I'm trying to find out how I can 'get into' the ras dial process before a connection is established. Basically, I need to be able to measure the time it takes to carry out the various stages of dialling a connection - whether or not it's my app which instigates the dial. Currently, I measure the dialling stages (dial, connect, auth, projection, etc) if I dial myself (using a RasDialFun and RasDial). I can measure the timings for the later stages of a dial (everything from Auth onwards) by using RasConnectionNotification to indicate a new connection being made, and then by polling with RasGetConnectStatus to see the later connection stages change. However, I have no way of detecting a new dial occurrence before the physical link is established. Ideally, I'd like to be able to detect the dialling as soon as it occurred, and monitor the time it takes for the call to be answered (including failures, such as line engaged, etc) for *any* connection, instigated by any app (or even the user dialling via DUN). Is this possible? Thanks Mark ________________________ http://www.webreaper.net

    C / C++ / MFC csharp question

  • Platform Manager 4.0 Installation Problem
    M Mark Otway

    Well, one clean XP installation later, and it installed flawlessly. :-D :rolleyes: Thanks for your help, anyway! :) ________________________ http://www.webreaper.net

    Mobile c++ hardware help question workspace

  • Platform Manager 4.0 Installation Problem
    M Mark Otway

    It's XP Pro, and fully updated...... :rolleyes: I'm going to have to try the last-resort option - I'm going to do a clean XP install and see if it'll work on that..... :omg: :eek: ________________________ http://www.webreaper.net

    Mobile c++ hardware help question workspace

  • Platform Manager 4.0 Installation Problem
    M Mark Otway

    Yep, read all the readme files. I tried installing eVC3 last night, and exactly the same thing happened with that, too. I left it going all night, and it was still in the same place this morning. Even if I try to cancel the installation, it sits there doing nothing for hours too. The only way I can get it to continue is to kill the process 'emulator.exe'. Any clues at all would be most useful. ________________________ http://www.webreaper.net

    Mobile c++ hardware help question workspace
  • Login

  • Don't have an account? Register

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