-
Notifications
You must be signed in to change notification settings - Fork 4
ToastCore在64位运行时引发闪退 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
更新,单步发现程序在执行 public void Dispose() {
PropVariantClear(this);
GC.SuppressFinalize(this);
} 时退出。 是 /// <summary>
/// 创建快捷方式
/// </summary>
private static void CreatShortcut<T>(string shortcutPath) {
String exePath = Process.GetCurrentProcess().MainModule.FileName;
IShellLinkW newShortcut = (IShellLinkW)new CShellLink();
ErrorHelper.VerifySucceeded(newShortcut.SetPath(exePath));
IPropertyStore newShortcutProperties = (IPropertyStore)newShortcut;
using (PropVariant appId = new PropVariant(_aumid)) {
ErrorHelper.VerifySucceeded(newShortcutProperties.SetValue(new PropertyKey(TOAST_G, 5), appId));
}
using (PropVariant toastid = new PropVariant(typeof(T).GUID)) {
ErrorHelper.VerifySucceeded(newShortcutProperties.SetValue(new PropertyKey(TOAST_G, 26), toastid));
}
ErrorHelper.VerifySucceeded(newShortcutProperties.Commit());
// Commit the shortcut to disk
IPersistFile newShortcutSave = (IPersistFile)newShortcut;
ErrorHelper.VerifySucceeded(newShortcutSave.Save(shortcutPath, true));
} 的调用 |
执行这一句的时候程序闪退: |
测试发现不新建快捷方式就不会出现问题,而且推送Toast时快捷方式非必须。 |
目前还没有找到 |
更新:注释掉创建快捷方式后推送Commands不被识别,所以依然要想办法解决前面的问题 |
|
在 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如题,暂时没找到问题原因
The text was updated successfully, but these errors were encountered: