FAQ Database Discussion Community


PeekMessage triggers WndProc callback

c,winapi,msdn,internals
Yesterday I encountered the weirdest problem I have ever seen. I wrote a module that should get a notification on USB plugs. To do so, I created a dummy window and registered it to device change notifications using some interface's GUID. The strange error occurs when PeekMessage is called. at...

Implementation of TYPE_SIGNIFICANT_MOTION sensor in android

android,android-sensors,internal,internals
In 4.4, Google introduced the Significant Motion Sensor. Assuming that it is software implemented, using hardware sensors like the accelerometer and gyroscope, I'd like to know how exactly it was done (I couldn't find it in the sources as well)....

How to find out what type a rustc::middle::ty::Ty represents?

plugins,rust,lint,internals
For writing yet another lint in Rust, I need to make sure that the type of an Expr is actually an Option<_> (or any pointer to one). I have already walked any ptrs and rptrs to their conclusion and am left with a rustc::middle::ty that in my test case debugs...

Which channel type uses the least amount of memory in Go?

memory,go,resources,channel,internals
I find myself frequently using channels to get things to stop. In these cases the channel is being used solely as a means of signaling, and none of the data is actually used. For example: package main import ( "fmt" "time" ) func routine(stopChan chan bool) { fmt.Println("goroutine: I've started!")...

File Caching between processes

linux,windows,caching,internals
I'm interested in knowing under windows and linux, does file caching work between processes? if process A reads the whole file, and a new process B wants to read parts of it (or all of it), would it make sense to assume the file is already in memory? or does...