Found the link....
h ttp://www.rcmp-grc.gc.ca/cfp-pcaf/bulletins/bus-ent/20110323-72-eng.htm
Note specifically paragraph 5, and the example they themselves use. Says that using a .40 magazine in a 9mm pistol (if it fits, and works, of course!) is perfectly legal, even if you can get more than 10 rounds of 9mm into the magazine. The limit on magazines to 10 rounds is based on what round the magazine was designed to hold, not how many of another caliber it can actually hold. So, if your .40 S&W magazine was designed to use .40 S&W (and is marked as such), and only holds 10 rounds of .40 S&W, but you can squeeze 13 rounds of 9mm into it and still use it, then you are not doing anything illegal. At least as far as the RCMP are concerned, anyway. I would, however, suggest that if you plan on doing this, you print out a copy of this bulletin and keep it with you, because not many LEOs may be aware of this, nor many Fudd R/Os - they may insist it's illegal.
Note that modifying a magazine is, to my knowledge (which I admit is limited!), illegal. So if your .40 magazine "almost" holds the 9mm rounds, but not quite, I'd suggest you resist the urge to alter the lips a wee bit so that they'll hold the 9mm. Pretty sure that would be a big no-no. Which is why I mentioned that I have three .40 mags, 2 of which work with 9mm, and another which doesn't - that third one, the lips are just a bit too wide, and the 9mm just spring right back out.
This whole topic usually seems to generate a bunch of discussion whenever it comes up, every few months. Another example of out ridiculous, convoluted and difficult-to-understand firearms laws.
Trav