0

我正在关注此博客以编写相同的代码来更改System.AppUserModel.ID窗口:The Old New Thing :: 如何防止用户将我的程序固定到任务栏?

他在做:

hr = pps->SetValue(pkey, var);
PropVariantClear(&var);

他不做pps->Commit(),我很困惑,因为我已经写了代码,我做了SetValue,我做了,Commit但我的改变不会。

他怎么不做Commit?他弄错了吗?还是他是您不需要的特殊情况Commit

谢谢

4

1 回答 1

0

The issue was, the var was set to a propvariant which was not properly initailized. My InitFromString function was messing up it would forget to set the var.vt. I dont know why a succesful hr was being returned though.

于 2015-01-29T22:34:31.647 回答