Take a look at Microsofts public symbol server. You can download symbols for all their code from it, and set breakpoints and so on.
You can speciyf these sylbols in VS and when it tries to load downloads them automatically. I use windbg though so I cant help you much more than that, and I work in the kernel, but if you choose to do the same this is a usefull command:
bp nt!ntcreatefile "dt nt!_UNICODE_STRING poi(poi(@esp+0xc)+0x8)"
It sets a break point on createfile (this is what CreateFile maps to in the kernel) and displays the file being opened (This is 32 bit, if it was 64 the parameter would be in a register not on the stack).
SO any user mode acces to creatfile you can break on and have a wander arond the stack and see whats doing what.
Or as the poster above says, set the bp in the usermode dll.
I can deffinitely recomend using windbg, it is a hell of a debugger, everyone in microsoft uses it, VS is a toy in comparison.
My system is win7 64Bit
I use the VS2008 to compile the chrome solution. But I meet some problem about compile the FFMPEG.
I google that the others are all ok when compiling, but I have bad luck. I donot know why some error happen.
Does anyone meet the same problems?
Hi All, many thanks up-front to anyone who can help here.
I have a client that wants me to migrate a CTreeView-derived class to one which works like a docking pane. The class is so large now that it's not feasible to rewrite everything.
So...I still have the underlying CTreeCtrl-derived class (more/less untouched), which is a child of a class derived from CDockablePane (migrated from the CView class). I've also derived from CMultiPaneFrameWnd (used when the pane is floating) to try to trap events.
I've got it working about 80%. I need help/direction with the other 20%. I've got the CDockablePane derived class working with bulk of the MESSAGE_MAP events (menu handlers, ON_UPDATE_COMMAND_UI, etc.) working correctly. The events associated with the mouse are giving me grief.
I see 3 standard modes for the dockable pane: floating, docked, and tabbed. And they all behave differently w/r to mouse events - and depending on the docking mode.
* If the docking mode is DT_SMART *and* the pane is NOT floating, then drag&drop and double-clicking work correctly.
* If the docking mode isn't DT_SMART, then drag&drop usually tries to drag the complete docking pane instead of working correctly (regardless of floating, docked, tabbed).
* When the pane is floating, I can't trap WM_LBUTTONDBLCLK (unless you click on the lines and little [+] boxes...) or the respective notify or reflect messages - even Spy++ doesn't record them. I just don't see any left button double-click events - at all!
Found it! There is an intermediate class which inherited from CTreeCtrl. It was originally set up to support a CView, and forwarded the LButtonDown event to its parent. Well, now that the parent is a dockable pane, the behaviour changed a lot! Removing that handler got lots of stuff working!
i know accessing was ok with windows 98/me but with windows 7 it cannot be done.
but i have read that they can be accessed by making some drivers orany extra special drivers for this !! help needed realy hard time !! i work on windows 7 now and getting win 98is a big issue for me !! help !
The windows API will support paralell port acces the same way it does serial port. You need to do a CreateFile() on \\\\.\\Lpt1 or some such. Look at the DeviceIOControl codes you can use to control it.
Dont try writing a driver, you will probably spend a year getting it working.
Hi Folks... Having a hard time to figure out if we can call Rest Based Web Service API's in C++. Need to pass the secret Key to the Server and get back the response. Any idea or pointer or framework in C++ would be useful.
Any sample application will be useful.
Can it be done using sockets programming?
Having a hard time to figure out if we can call Rest Based Web Service API's in C++
You can do just about anything in C++. Having said that, it might not be your easiest solution. Higher level languages tend to have better abstraction for certain things.
raghunath sahoo wrote:
Can it be done using sockets programming?
Of course it can be done using socket programming, how exactly do you think web services work? Problem with developers that work at a high level is they don't seem to know about the magic that's happening in the background. Simple answer: the web works over sockets.
I just typed "REST C++" in google and got a bunch of results, why don't you try one of those?
Thanks Albert... I had googled out earlier for the same...the links had no relevant information. The few pointers which are shown use may be other language framework to have the connection established.
I would rather just check out how win sock will be working.
Beacuse of the urgency just to write the code entirely in c++ and using any service or framework avalable or any one having worked in it... will be helpful to guide... as really am clueless.
So basically, the sockets can be programmed with whatever language you want and everything else is layers that go above (or below) your base communication layer. Some languages offer higher abstraction so for example, you can get straight to web services without knowing anything about the other layers. Sometimes it's beneficial to keep things abstract to get things done quickly, but I'd personally recommend you at least know about the inner workings of things.
When you try it in other compiler (for example, see link above for codepad.org), results are correct, i.e. output looks like this:
Now, when you try this in VC++ (2010), size of struct with std::string is always (debug and release) 4 more that size of just std::string. Any other structs/classes are of correct size, and only those with std::string are bigger than they should be. Am I missing something or this is MS bug?
First it's not technically a bug unless it either doesn't work or doesn't meet the C++ spec. I don't think either of these things is the case.
Second it looks much more likely that StringAndEmpty is larger because it's derived from an already complex class the v-table for which is compiled into an external module. It's a guess but I reckon you've got an extra pointer in there to look up the pre-existing std::string vtable.
I have read a full explanation of the various sizes and formats of MSVC and other compilers minimal/empty/simple/complex structs and classes with and without virtual inheritance. I can neither remember all the details nor where I read it but I do remember that there were a lot more variations 4-byte, 8-byte, 12-byte, 16-byte, 20-byte 'headers' than I would ever have thought and much of the variation was within one type of compiler rather than between them. If I remember where that detailed research is I'll post a link.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
Well, consider the following struct:
struct JustString: public std::string
It has the same size as just std::string, so no, there is no extra pointer in VFT. The question I have is about Empty Base Class Optimization - size of empty base class should be reduced to zero in descendant if possible. Yes, it is not a requirement, only a suggestion in a standard. Problem is, I don't understand this: it works for non-MS compilers; in MS-compiler it works for all cases EXCEPT std:string. I will check later with VC++ 2012 to see if they made it work, but right now I have no other explanation than some problems with MS compiler. Or is there any compiler option specifically for this case that I don't know about?
Last Visit: 31-Dec-99 19:00 Last Update: 25-Jan-15 11:33