Ah, itβs easy to explain: you are using the wrong API. GetProcessWorkingSetSize requests the minimum and maximum sizes of working sets. These are quotas , not acutal values.
The minimum size of the working set is that Windows guarantees that it will be locked in RAM until the world runs out. The maximum working set size is the amount of memory that Windows will allow your process to move pages to the pool (they do not necessarily disappear, but access to them causes an error and redisplay).
Do you want GetProcessMemoryInfo
EDIT :
Since it is now clear that you did not use the wrong API (only with the name incorrect func), I did some testing ( VirtualAlloc and memory mapped files, both in combination with VirtualLock ) on my XP system. At first glance, it seems that you are absolutely right. Allocating 512 MB or displaying 512 MB of memory from a 650 MB file added 512 MB to the virtual size, but did not increase the working set. After VirtualLock(512MB) did not affect the working set at all!
Then it occurred to me that VirtualLock took exactly zero time in each case, which did not seem plausible, for example. in order to get half a gigabyte from the disk. So, I checked the return code and guess what. Windows does not believe that a 512 MB lock is a good idea and will refuse to do so.
The experiment was repeated with only 64 MB, and now, the working set immediately went up to 64 MB, as it should be. So, in one word: "works for me."
To be sure, have you checked the return code?
In a second glance, this behavior is even clearly defined and well documented. Documents in VirtualLock will explicitly indicate:
The maximum number of pages on which the blocking process can be equal to the number of pages in the minimum working set minus small overhead.
With and without locking after correctly setting WS quotas: 
VirtualBox is another matter, what you see in the task manager is only the working set of the Interface program and the Manager interface, both of which support working sizes up to 64 M at any time. Although I'm not sure what kind of memory it can allocate in some drivers, or if they block memory at all.
I am currently running 2 virtual machines with 1.6 GB main memory. Seeing how my 32-bit Windows sees only 3.25 GB, this would leave only 50 MB if the memory belonging to the virtual machines is locked. In addition, Process Explorer tells me that only Firefox has a working set of 474 MB and it grows while I type it (holy ...? !!). This does not make it probable that all memory in virtual machines is really locked, because such numbers would be completely impossible.
In accordance with the request, we will take a picture of VMMap here: 
The numbers are admittedly ridiculous ... There are 1.6 million in VM, of which, according to VMMap, 821MiB are reserved and 772MiB are fixed, Process Explorer shows only 163MiB and 54MiB, respectively. There is something completely suspicious, but I suspect that this is probably some kind of obscure VirtualBox hacking, and not a Windows problem.