views:

70

answers:

1

I saw ExpandEnvironmentStrings is used here for Desktop. How do I do it in Windows Mobile? The data type looks valid in Windows Mobile

+2  A: 

It is interesting that the documentation says REG_EXPAND_SZ is available for Windows CE because it doesn't make any sense. Windows CE (and therefore windows mobile) doesn't have environment variables, so there is no process environment to expand the values from, which is probably why ExpandEnvironmentStrings doesn't exist. The data type is probably valid just because the registry doesn't care very much about data types - apart from some light checking the registry just stores blobs of bytes and the type is not important to it.

Stewart
any references to support your answer?
afriza
@afriza: what, specifically, do you want references for? The lack of environment variables, or the availability of REG_EXPAND_SZ? Both are definitely true.
ctacke
Years of experience with Windows Mobile, plus this MSDN page which shows that environment variables are not supported http://msdn.microsoft.com/en-us/library/ms885182.aspx Anything beyond that is simple deduction. The bit about how the registry works I think comes from Inside Windows 2000 - since the WinCE registry is modelled after the NT registry it follows that the implementation is likely to be similar.
Stewart
Thanks ctacke for confirming the answer and Stewart for the follow-up comment
afriza