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
J

Jason Hihn

@Jason Hihn
About
Posts
47
Topics
19
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Cross platform for the C++ guy (protable C++ or .NET)
    J Jason Hihn

    wxWindows is where it's at!!! It does everything you need/want.

    The Lounge csharp c++ linux discussion learning

  • Sending e-mail from MS DOS prompt window.
    J Jason Hihn

    DOS, no, Win32 Console, Yes. There is nothing preventing you from usig MAPI or equivelent APIs in a console based win32 app. But there is no command per sa.

    System Admin com question

  • Red Had Linux screwed XP
    J Jason Hihn

    Lol. XP does the same thing to Linux then it sees it!

    System Admin help question linux workspace

  • Getting the Harddrive's Serial Number
    J Jason Hihn

    I've searched and searched and I can't find anything on it. I'm not referring to a Volume serial number (easy) but the actual hardware serial number on the physical drive, assigned by the manuf. and not the partition's operating-system-assiged number. Does anyone have a clue on how I can read it under 95/NT? Many thanks!

    C / C++ / MFC hardware question

  • Release mode crashes, debug mode doesn't (and it's not my code)
    J Jason Hihn

    When you switch from debig to release mode, rather than inherit settings from the debug mode, (even such no brainers as /subsystem:XXXXXXX) it starts from some dumb defaults which can have nothing do to with your debug mode program. I had to change from /subsystem:windows to /subsystem console. The really weird thing (and for this I blame Microsoft) is that I had no WinMain(), only a main(). With /subsystem:windows I should have gotten a warning at the least. Now, even so, I'd expect my program to crash (or nto even compile) because there was no WinMain, BUT SOME HOW ONE GOT SUPPLIED TO IT. I accidentaly I ran it on my PC (remember it's a service, it's supposed to be started that way, plus I'm running Win98, which doesn't have full NT-Services) and it put me into a WinMain. Where I came from, I don't know... then I remembered to check the subsystem. Many thanks to all you who tried to help!

    C / C++ / MFC help announcement c++ data-structures debugging

  • Release mode crashes, debug mode doesn't (and it's not my code)
    J Jason Hihn

    Well I've done some investigating... Looks like it does actually run my code, but only the constructors run. Those are filled with bounds checked string copies and integer initializations. All contructors return ok. Where the problem lies is when it tries to call StartService() which then goes to ServiceMain(), then to Initialize(). Somehow on it's way to calling StartService, it is bombing. The thing is I can't figure out what is begin called between the constuctors and StartService. Arg! PS. It's just a win32 app with sockets (NOT MFC! I'm using wrappers from W3MFC) and a MySQL library.

    C / C++ / MFC help announcement c++ data-structures debugging

  • Release mode crashes, debug mode doesn't (and it's not my code)
    J Jason Hihn

    Well, adding to the complexity is the fact that it's an NT service, so it has no main() to speak of. It has an init() and a run() and a stop(). I put very simple MessageBox(NULL, "Running", "NT Service", MB_OK) statements at the very beginning of those and it dies before even hitting them. What's making it even harder is then ir crashes, that's all thr stak info I have. If it's in my code, I can look at my map file an find what function did it, but I don't have map files ofr MCF42.dll!

    C / C++ / MFC help announcement c++ data-structures debugging

  • Release mode crashes, debug mode doesn't (and it's not my code)
    J Jason Hihn

    Arg. Someone please help because this is driving my crazy! I have several apps that when I compile them using the win32 release configuration they bomb immediately. I'm downloading SP5 now, and I'm wondering if that will fix it. I've seen this before, and so have other devlopers where I work, but they all fixed it by shipping debug code. Unfortuately, that is not acceptible for the product. If I can't compile it as release, is there a way to use the debug version, but instead of having the ASSERTS() in the MFC stuff produce a message box, have it bomb or exit right away? (Which would make it acceptible) Many thanks in advance! PS. I know it's not my code because according to the stack, it hasn't even entered my code yet: MFC42! 73ddb4ec() KERNEL32! 77e7eb69()

    C / C++ / MFC help announcement c++ data-structures debugging

  • Confused about Bound sockets and deamons
    J Jason Hihn

    I have a program that I wrote that works like s webserver, or I want it to anyway. Clients will connect to a socket do something, then disconnect. Currently, I'm seeing weird behavior, but everythign is weird because this is new to me. First, I'm using a socket wrapper from PJ Naughter's W3Mfc project. I am under the impression that with web servers you connect to a well-known socket. Then the server 'bounces' you to a new socket so it can accept the next connection. The bounced connection is handled by a thread. In my code, I have a basic server that Bind()s, Accept()s and allows for 5 connections. In one function (and thread) I: setup the server socket, enter a while loop, wait for an accept(), do my stuff over the socket, then close it. Should I be firing off a new thread after I accept()? Originally the code was written to handle a few connections a minute, but it looks like it may do several dozen now. I'm seeing the first 6 connections get accepted.. then the next few fail, then it's spotty. Would firing off a new thread fix this? How do I Accept() and start a thread safely (how do I pass the connected socket to the new thread?) Thank you for your time.

    C / C++ / MFC question sysadmin help workspace

  • "Scalar deleting destructor" error
    J Jason Hihn

    Im my example, they both are the same. ObjPtr is a Obj * Sorry for the abiguity.

    C / C++ / MFC question c++ data-structures debugging performance

  • "Scalar deleting destructor" error
    J Jason Hihn

    new() returns a pointer This pointer to the object, not the object itself, is stored in the CArray

    C / C++ / MFC question c++ data-structures debugging performance

  • "Scalar deleting destructor" error
    J Jason Hihn

    What effect would that have?

    C / C++ / MFC question c++ data-structures debugging performance

  • "Scalar deleting destructor" error
    J Jason Hihn

    I have code that looks like: CArray ArrayOfObjPtrs; ObjPtr op=new Obj(); ArrayOfObjPtrs.Add(op); Then in another function called later in the same thread, I do: delete ArrayOfObjPtrs.GetAt(0); // free the object ** run-time error on this line ** ArrayOfObjPtrs.RemoveAt(0); the Run-time error is in MSVCRTD, but the last call of mine is on the stack right before it, is "Obj::`scalar deleting desctructor' (unsigned int 1) + 56 bytes I get a Debug Asseertion: dbgdel.cpp Line 47, Expression _BLOCK_TYPE_IS_VALID(pHead->nBlockUse) Can anyone please tell me what is going on? Thanks soooo much! PS. Commenting out the 'delete' line results in a memory leak

    C / C++ / MFC question c++ data-structures debugging performance

  • Debug info missing
    J Jason Hihn

    I have a project where debugging is checked under Link, I am bulging the debug version, and i'm ising the Microsoft format for debug info. Still, when my program crashes, it doesn't have any symbols, function names or line numbers. Is there something I can do to fix it?

    C / C++ / MFC debugging help question announcement

  • CArray question
    J Jason Hihn

    I have objects that I create with new() and I store pointers to them in a CArray: Object *o; o=new Object(); Array.Add(o); When I want to delete all and free all memory, do I have to do: while (Array.GetSize()){ delete Array[0]; Array.RemoveAt(0); } Thanks!

    C / C++ / MFC data-structures performance question

  • XP taskbar behavior is driving me crazy
    J Jason Hihn

    Could someone please explain it to me. In all Windows before, clicking on a button in the task bar would bring that application to the top. If it were minimized, it would restore it. If it were maximized, it would iconify (win3.1 term) it. In XP it just turns blue and blinks at you. If I don't figure out what is going on, I will 1) go insane and 2) switch to linux (not impling that you have to be crazy to use linux ;-) Could someone please tell me how to get the old behavior back? Thanks!

    System Admin question linux tutorial

  • Wrong app icon used in explorer
    J Jason Hihn

    For a while my icon was rightm but it's now wrong. The program uses the right icon when it's running, but Explorer uses the "wrong" one. How can I get my program's icon in explorer to be the one I want? (Changing the icon in a ashorcut doesn't count!) Thanks

    C / C++ / MFC question

  • Font problems on 9x vs NT kernels (please help)
    J Jason Hihn

    I was... but I fixed that. Now I dereference a pointer to a font that always exists (so I can adjust the CFont at runtime), and it still breaks ;( This has me most perplexed.

    System Admin help visual-studio question announcement

  • Font problems on 9x vs NT kernels (please help)
    J Jason Hihn

    I'm using a layout class, which I think is only partially my problem...But here's waht I;ve got. I have a program that desires to be proportional regardless of window size. So, I have a layout class that auto-sizes the controls for me. That works great. The problem comes in when I change the font size (to remain proportional) for the CWnds that make up the program's interface. Under 9x, it works fine. I can drag windows over the interface and everything stays intact. When I drag a window over the NT version, all the CWnds are re-drawn in the system's fail-safe font (system, 8pt.) To nail down this issue, I have the CWnds report to me their font info. Under 9x, they always report the right info. Under NT, they give me garbage for the font name. So then set the font correctly. Now it reports the right fonts, but it still draws them in the system's failsafe font. Right now I have a thread on a timer to fix this, but it is still sloppy looking between the refresh intervals. As far as I can tell, the correct font info is set for the CWnd (using WM_SETFONT) but I have no idea why when it's redrawn automatically that it uses the system's fail-safe font. Can anyone please help me? Has anyone seen this?

    System Admin help visual-studio question announcement

  • Page eject
    J Jason Hihn

    There's a really nice CPage class for printing here All you would need is to call it's StartDoc();StartPage();EndPage();EndDoc() functions, after grabbing the printer info (you can hide the dialog -- you'll see what I mean). It works transparently - so local or network is not an issue

    C / C++ / MFC c++
  • Login

  • Don't have an account? Register

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