|
rushing wrote: I am lucky to meet you.
:->, there are many more smarter ppl than me here in code-project, you would be even more luckier if you meet them too
-Prakash
|
|
|
|
|
Is there any way to capture the debug logging on a driver during bootup?
I know it can be done if you’re connected via serial port to another machine, but I’m looking for a method that is standalone.
The DebugView program from sysinternals only seems to work to capture bootup logging if you can successfully logon on open DebugView.
If the machine crashes before then, it seems you loose the logging.
I'm trying to debug a driver that gives me the blue screen of death as soon as I logon.
Top ten member of C++ Expert Exchange.
http://www.experts-exchange.com/Cplusplus
|
|
|
|
|
I could think of few ways.
But first I'd try to communicate with something existing:
- DbgView - they have some new mode - something to do with bootup logging.
- The event log service
- softice
Now, if u crash during logon, the machine is already up with all the services and stuff, so u can use lots of ways, it just depends on your kernel mode arsenal.
Anyway, all the ways that don't include DbgView/event log/softice involves a bit of work in writing the logger service..
U could comunicate with your logger using sockets/pipes, like OutputDebugString - with shared mem and event, or, u could just log it to a file yourself.
|
|
|
|
|
Yes, depends on what services and crap is up such as you can't log to disk if the disk driver isn't loaded yet! However that's one place to go. You could also attempt to allocate a large chunk of memory and log to it and wait for services come up before dumping it to disk.
You could also attempt to take over the screen yourself and dump your stuff to the screen.
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
the disk driver must be up, or else, wher did *this* driver load from???
|
|
|
|
|
That was just an example that any service you use you should ensure it comes up before your driver. In anycase, there are OS services which do come up before the disk driver, most likely very few and I haven't looked at the order of loading in a while.
In anycase, the disk driver itself is on disk so how is it loaded if the disk driver isn't loaded? Most likely your driver comes up afterwards but it's just the point to ensure your driver is properly dependent on services it uses.
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
Hihi,
Just a quick question, is there a way I can set button flags such as BS_PUSHBUTTON, BS_OWNERDRAW, WS_DLGFRAME etc after a button has been created, or do I have to set those on creation only?
Thanks!
Kelly Ryan
|
|
|
|
|
Use SetWindowLong(hwndButton, GWL_STYLE, WS_DLGFRAME(etc.);
Human beings were not meant to sit in little cubicles staring at computer screens all day, filling out useless forms and listening to eight different bosses drone on about about mission statements. -- Peter Gibbons
|
|
|
|
|
Great, thanks!
Kelly Ryan
|
|
|
|
|
Very rarely can you change styles at runtime. You can, however, create a new button at runtime with any style you desire.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
Often if you changes the style and it doesn't seem to work a call such as the following helps:
<br />
SetWindowPos(hWnd, NULL, 0, 0, 0, 0, SWP_NOZORDER|SWP_NOMOVE|SWP_FRAMECHANGED);<br />
Steve
-- modified at 19:45 Tuesday 17th January, 2006
ADDED: I don't this applies to buttons as they don't have non-client area.
|
|
|
|
|
DavidCrow wrote: Very rarely can you change styles at runtime
I don't agree with this. I have done that plenty of times. It works too.
ModifyStyle , ModifyStyleEx , SetWindowLong functions are given for this purpose.
Jesus Loves <marquee direction="up" height="40" scrolldelay="1" step="1" scrollamount="1" style="background:#aabbcc;border-bottom:thin solid 1px #6699cc">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Owner drawn wrote: I have done that plenty of times. It works too.
I did not say it was impossible. Yes it can be done, but most styles cannot be changed at runtime.
Owner drawn wrote: ModifyStyle, ModifyStyleEx, SetWindowLong functions are given for this purpose.
I'm more than aware of those functions and their purpose.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
Hi,
I'm working on an application where I drew a waveform in a frame in a dialog, by using SetWindowExt, SetViewportExt, etc. The application has to be able to capture left button clicks by the user. I believe ON_WM_LBUTTONDOWN returns the CPoint with respect to the top left corner of the window. Anyone has any idea on how I can capture this CPoint with coordinates with respect to my viewport? Thanks!
|
|
|
|
|
misugi wrote: Anyone has any idea on how I can capture this CPoint with coordinates with respect to my viewport?
Have you seen ScreenToClient() and ClientToScreen() ?
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
Yepz seen ScreenToClient() but from the documentation on MSDN i'm under the impression it doesn;t do the job. I'm pretty weak when it comes to playing around with device context, but maybe a scenario can paint my question clearer.
Assuming I have a static control frame for which i do my painting in. So i configured the viewport origin to be the centre of this frame. So when i captured a left button click when the user click within this frame, assuming the centre of the frame, I am wondering if there is any way to return 0,0 as the point.
I am under the impression that OnLButtonDown already return me the CPoint with respect to the client area of my dialog after running a few trys. So ClientToScreen shouldn't be what I'm looking for, as I'm interested in coordinates with respect to the centre of my frame.
I hope this lengthy post doesn't complicate things. And sorry to anyone who got confused by me. =)
|
|
|
|
|
Are you simply wanting to know where, inside of the static control, the left mouse button was clicked?
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
Have a look at DPtoLP(). This will translate from device points to logical points (logical points are points relative to your mapping mode, origin, etc.).
onwards and upwards...
|
|
|
|
|
Hi,
Try to set centre of ur frame as viewport origin.
SetViewportOrg() might help you.
Thanks and Regards,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Hmm...DPtoLP...i nv knew it exists. I'll go try it out. And thanks to everyone for their suggestions! Really appreciate it! ^^
|
|
|
|
|
Dear ALL!,
and Happy New Year 2006!
I am writing you from Switzerland and despite the fact that I have been looking in literature about C++ and on line forums, it remains a problem that I would submit to you. I would be grateful of your help. I am far away from being an expert but indeed today ( I mean since days I am blocked by this ! )
I have to manage a project in C++ which is pretty well working and dealing with stocks of the company I work with ( import/export of mineral water and dispatching stocks).
My project is within a folder: folder00 [ let's call it so]
all *.cpp, *.h files...etc...
I have to modify only one *.h file
and one *.cpp file.
hd01.h
blo1.cp
==> for hd01.h, I have to modify line 5 to 22
and replace the block of numbers by a new block of numbers in a worpad file wpd01.rtf
==> same for blo1.cp [line 58 to 72] with wpd02.rtf
The path of each file is stable
How can I proceed from an external C++ executable file [ let's call it external.cpp]?
And how can I automatically rebuilt the project? From external.cpp too?
Thanks a lot,
Greetings,
TPP
|
|
|
|
|
so basically you just want to build the project from the command line rite?
if yes check nmake.exe and how u can use it, you will need to export a makefile from ur project.
-Prakash
|
|
|
|
|
Hello,
No, in fact there is a project that I can compile, rebuild, link...in Visual C++ 6.0
The name of this project is Proj001 and located in folder \projtpp
But it uses a *.h file that I want to update several times a day because it contains new data inside.
the problem is: how can I build up a new project ( only based on one *.cpp file) that compile , rebuild and execute automatically Proj001?
Thanks a lot,
P
|
|
|
|
|
thierrypp wrote: I want to update several times a day because it contains new data inside.
Why store data directly inside of your application? Your app should be getting that data from a data source, a simple flat text file or database would suffice. Doing so would eliminate the need to recompile so often.
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
|
|
|
|
|
Hi,
No, in fact it contains secure keys to update frequently.
That is why the less I display the best is the security.
But let's say, ok I can manually change data within the *h and *cpp file.
Then if I have previously built up a makefile called "filesecure"
how can I rebuild all until have a new executable file?
I am working with Visual C++ 6.0
Best Regards
|
|
|
|