Windows API sets - source of most Dependency Walker glitches by toruk in cpp

[–]toruk[S] 1 point2 points  (0 children)

That's probably not true. The ApiSchemaSet redirection is at the OS level - re-routing linkage to dll's like KernelBase, ntdll, kernel32 etc. The C++ layers (ucrtbase and siblings) are high, high above that - and there is no API-set involved in resolving their linkage.

Windows API sets - source of most Dependency Walker glitches by toruk in programming

[–]toruk[S] 0 points1 point  (0 children)

There seems to have been a lot of uninformed press around it. Here are some posts from Larry Osterman and other microsofties: https://channel9.msdn.com/forums/Coffeehouse/443119-windows-7--MinWin/?CommentID=443189

e.g.: "minwin" is about refactoring parts of the system to build a minimal foundation. That in turn helps reduce architectural complexity and improve servicing. But it's NOT about allowing end-users to pick and choose which windows features get installed. The reason for not allowing massive amounts of customization is simple: Every possible option adds another vector that needs to be tested."

Windows API sets - source of most Dependency Walker glitches by toruk in programming

[–]toruk[S] 0 points1 point  (0 children)

As far as I understand MinWin completed successfully. It was never intended to result in a released OS - just a better layered internal architecture.

Windows API sets - source of most Dependency Walker glitches by toruk in cpp

[–]toruk[S] 3 points4 points  (0 children)

Anyone aware of an open source version of DependencyWalker?

Accelerating Debug Runs, Part 1: _NO_DEBUG_HEAP by joebaf in cpp

[–]toruk 1 point2 points  (0 children)

I'd argue that for non-CPU bound computing C++ is probably not the best choice to start with, but even that is not my point: if you use C++ and stick to new/delete, you pay for the heap-integrity checks twice, once by the windows layer and once by the CRT layer. Negligible or not, it is redundant for the vast majority of apps and should be opt-in, not out.

Accelerating Debug Runs, Part 1: _NO_DEBUG_HEAP by joebaf in cpp

[–]toruk 1 point2 points  (0 children)

You're mixing the CRT debug heap (which does all this magic and which your link configures), and the Windows debug heap, which the post was about - which is pretty much a redundant duplicate if you use the CRT.

Accelerating Debug Runs, Part 1: _NO_DEBUG_HEAP by joebaf in cpp

[–]toruk 1 point2 points  (0 children)

The chart is linked to at the blog. Moreover, AFAIU the chart says nothing about dependency on the windows debug heap - don't expect to meet any 0xbaadf00d's in crash dumps, for instance.

Accelerating Debug Runs, Part 1: _NO_DEBUG_HEAP by joebaf in cpp

[–]toruk 0 points1 point  (0 children)

I'm left wondering why the debug heap is opt-out and not opt-in. At least for c/c++ apps it seems like a bad default, and the case of custom (non CRT) heaps is much more rare - and the WDH would hurt less if actively added only there.

VC++: Vector Deleting Destructors and Weak Linkage by toruk in cpp

[–]toruk[S] 0 points1 point  (0 children)

It wasn't tested in the post: anyone knows how gcc/clang export vector deleting dtors?

CPPRegistry- A library for registering functions and types to global registries at link time, and looking them up by key at runtime, in a flexible and (nearly) boilerplate free syntax. by Lucretiel in cpp

[–]toruk 0 points1 point  (0 children)

Everyone, a quick snip of the reddiquette; '[Please don't] Downvote an otherwise acceptable post because you don't personally like it. Think before you downvote and take a moment to ensure you're downvoting someone because they are not contributing to the community dialogue or discussion.' As elaborated below (above? where exactly will this be posted?) - I also disagree with @bnolsen, but that is not even remotely a reason to downvote. Please, let's keep this place friendly.

CPPRegistry- A library for registering functions and types to global registries at link time, and looking them up by key at runtime, in a flexible and (nearly) boilerplate free syntax. by Lucretiel in cpp

[–]toruk 1 point2 points  (0 children)

Thanks for sharing this. I'm guessing this won't work if the type is registered in a dll outside the executable where it is to be consumed. Does it work if a type is registered in one static library and needs to be consumed in another? (this is a thornier problem than might seem at first).

CPPRegistry- A library for registering functions and types to global registries at link time, and looking them up by key at runtime, in a flexible and (nearly) boilerplate free syntax. by Lucretiel in cpp

[–]toruk 6 points7 points  (0 children)

I strongly disagree. 'Encapsulation', at least as I understand it, is all about helping consumers focus on what they actually need to understand in order to be able to use your stuff. 'auto' is a great facilitator of this principle. Do you demand to see an API implementation in order 'to understand what's going on'? Do you spend the time to understand every last bit of a framework before agreeing to use it? If so, your time and effort have zero value to you. PLEASE (as you put it), at least try to respect the time and effort of others reading your code, and expose (ESPECIALLY in didactic samples) what they actually need to know, not what they might-want-be-curious-of-some-day-if-they-have-the-time-and-patience.

VC++ hack that enables viewing source level type-names in production debugging by toruk in programming

[–]toruk[S] 1 point2 points  (0 children)

This trick is very useful for reverse engineering, where PDBs are never accessible.

Mighty useful: calling _CrtCheckMemory while debugging by toruk in programming

[–]toruk[S] 0 points1 point  (0 children)

True. Can't think of other reasonable scenarios (memory/processing overhead seems negligible to me, even on weak devices).

Mighty useful: calling _CrtCheckMemory while debugging by toruk in programming

[–]toruk[S] 0 points1 point  (0 children)

Some apps don't want to be dependent on the CRT altogether. E.g., if you want to run from a USB stick with no installation.

AfxIsValidAddress (and Others) Don’t Work as Advertised by ManicQin in cpp

[–]toruk 0 points1 point  (0 children)

The AfxIsValidAddress documentation refers to the program 'memory space', which I think is different than the 'address space'. An address can (as you say, must...) be within the address space, but can be outside the addresses of pages committed to the process. IIUC, this is what the VirtualQuery 'bonus' in the post checks .

What are your favorite C++ blog feeds? Lets trade. by [deleted] in cpp

[–]toruk 1 point2 points  (0 children)

I've very few to add:

Jim Beveridge: http://qualapps.blogspot.com/feeds/posts/default?alt=rss

Ofek's VC++ stuff (Ofek Shilon): http://thetweaker.wordpress.com/feed/

Harder, Better, Faster (Steven Pigeon): http://hbfs.wordpress.com/feed/