Skip to content

Commit

Permalink
Merge commit '1730d88488ddfc09c42143937b2a35f5f7298406'
Browse files Browse the repository at this point in the history
  • Loading branch information
lindexi committed Jun 19, 2024
2 parents 48593d0 + 1730d88 commit 1c06602
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 2 deletions.
53 changes: 51 additions & 2 deletions WPFDemo/NocejefiWeyufilareewe/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.UI.Xaml.Controls;
using Windows.UI.ViewManagement;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml;

namespace NocejefiWeyufilareewe;
Expand Down Expand Up @@ -45,9 +46,57 @@ static void Main(string[] args)
VerticalAlignment = VerticalAlignment.Center,
}.Do(button => button.Click += (s, _) =>
{
// 以下代码会导致炸掉
// 0x0D9D8624
// 0xC0000005: 读取位置 0x00000000 时发生访问冲突。
// 堆栈
/*
* Microsoft.ui.xaml.dll!Microsoft::WRL::ComPtr<struct ABI::Microsoft::UI::Composition::IVisual>::As<struct ABI::Microsoft::UI::Composition::ISpriteVisual>(class Microsoft::WRL::Details::ComPtrRef<class Microsoft::WRL::ComPtr<struct ABI::Microsoft::UI::Composition::ISpriteVisual> >) 未知
Microsoft.ui.xaml.dll!DCompTreeHost::UpdateUIThreadCounters(unsigned int,float) 未知
Microsoft.ui.xaml.dll!CCoreServices::SubmitPrimitiveCompositionCommands() 未知
Microsoft.ui.xaml.dll!CCoreServices::NWDrawTree(class HWWalk *,class CWindowRenderTarget *,class VisualTree *,bool,bool *) 未知
Microsoft.ui.xaml.dll!CCoreServices::NWDrawMainTree() 未知
Microsoft.ui.xaml.dll!CWindowRenderTarget::Draw() 未知
Microsoft.ui.xaml.dll!CXcpBrowserHost::OnTick() 未知
Microsoft.ui.xaml.dll!CXcpDispatcher::Tick() 未知
Microsoft.ui.xaml.dll!CXcpDispatcher::OnReentrancyProtectedWindowMessage(struct HWND__ *,unsigned int,unsigned int,long) 未知
Microsoft.ui.xaml.dll!CDeferredInvoke::DispatchQueuedMessage(bool *,bool *) 未知
Microsoft.ui.xaml.dll!Microsoft::WRL::Details::DelegateArgTraits<long (__stdcall ABI::Windows::Foundation::ITypedEventHandler_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Microsoft::UI::Dispatching::DispatcherQueueTimer *,ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *>,IInspectable *>::*)(ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *,IInspectable *)>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,ABI::Windows::Foundation::ITypedEventHandler<ABI::Microsoft::UI::Dispatching::DispatcherQueueTimer *,IInspectable *>,Microsoft::WRL::FtmBase>,`CXcpDispatcher::Init'::`55'::<lambda_1> &,1,ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *,IInspectable *>::Invoke() 未知
CoreMessagingXP.dll!Microsoft::WRL::Details::DelegateArgTraits<long ( Windows::Foundation::ITypedEventHandler_impl<struct Windows::Foundation::Internal::AggregateType<class Microsoft::UI::Dispatching::DispatcherQueueTimer *,struct Microsoft::UI::Dispatching::IDispatcherQueueTimer *>,struct IInspectable *>::*)(struct Microsoft::UI::Dispatching::IDispatcherQueueTimer *,struct IInspectable *)>::DelegateInvokeHelper<struct Microsoft::WRL::Implements<struct Microsoft::WRL::RuntimeClassFlags<2>,struct Windows::Foundation::ITypedEventHandler<class Microsoft::UI::Dispatching::DispatcherQueueTimer *,struct IInspectable *>,class Microsoft::WRL::FtmBase>,class <lambda_1b1a5b0dce93060c2ffe10d1d311f882>,-1,struct Microsoft::UI::Dispatching::IDispatcherQueueTimer *,struct IInspectable *>::Invoke(struct Microsoft::UI::Dispatching::IDispatcherQueueTimer *,struct IInspectable *) 未知
CoreMessagingXP.dll!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<class <lambda_2ad0659dc62ecd7334c0ef0269e3265b>,struct Windows::Foundation::ITypedEventHandler<class Microsoft::UI::Dispatching::DispatcherQueue *,struct IInspectable *> >(class <lambda_2ad0659dc62ecd7334c0ef0269e3265b>,class Microsoft::WRL::Details::EventTargetArray *,class Microsoft::WRL::EventSource<struct Windows::Foundation::ITypedEventHandler<class Microsoft::UI::Dispatching::DispatcherQueue *,struct IInspectable *>,struct Microsoft::WRL::InvokeModeOptions<-2> > *) 未知
CoreMessagingXP.dll!Microsoft::WRL::EventSource<struct Windows::Foundation::ITypedEventHandler<class Microsoft::UI::Dispatching::DispatcherQueue *,struct IInspectable *>,struct Microsoft::WRL::InvokeModeOptions<-2> >::InvokeAll<class Microsoft::UI::Dispatching::DispatcherQueue *,std::nullptr_t>(class Microsoft::UI::Dispatching::DispatcherQueue *,std::nullptr_t) 未知
CoreMessagingXP.dll!Microsoft::UI::Dispatching::DispatcherQueueTimer::TimerCallback(void *) 未知
CoreMessagingXP.dll!CFlat::SehSafe::Execute<<lambda_e16aea3717fc5beac95aa2e513a8f395>>() 未知
CoreMessagingXP.dll!Microsoft::CoreUI::ActionCallback::ImportAdapter$(class CFlat::Box$1<struct CFlat::FunctionPointerAndUserData$1<long (*)(void *)> > *) 未知
CoreMessagingXP.dll!Microsoft::CoreUI::Support::ActivationContext::CallbackWithActivationContext(class Microsoft::CoreUI::Dispatch::Timeout *,struct System::UIntPtr) 未知
CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch(void) 未知
CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchNextItem(class Microsoft::CoreUI::Dispatch::DispatchItem *) 未知
CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchLoop(enum Microsoft::CoreUI::Dispatch::RunnablePriorityMask) 未知
CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop(enum Microsoft::CoreUI::Dispatch::RunMode) 未知
CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::UserAdapter::DrainCoreMessagingQueue(enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,void * *) 未知
CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch(bool,enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,void * *) 未知
CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatchRaw(enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,bool,void * *) 未知
CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::UserAdapter::DoWork(struct HWND__ *,enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,bool) 未知
CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::UserAdapter::HandleDispatchNotifyMessage(struct HWND__ *,unsigned int,long) 未知
CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::UserAdapter::WindowProc(struct HWND__ *,unsigned int,unsigned int,long) 未知
user32.dll!__InternalCallWinProc@20() 未知
user32.dll!UserCallWinProcCheckWow(struct _ACTIVATION_CONTEXT *,void *,struct HWND__ *,enum _WM_VALUE,unsigned int,long,void *,int) 未知
user32.dll!DispatchClientMessage() 未知
user32.dll!___fnDWORD@4() 未知
ntdll.dll!_KiUserCallbackDispatcher@12() 未知
Microsoft.ui.xaml.dll!DirectUI::FrameworkApplication::StartDesktop(void) 未知
Microsoft.ui.xaml.dll!DirectUI::FrameworkApplicationFactory::Start() 未知
[托管到本机的转换]
Microsoft.WinUI.dll!ABI.Microsoft.UI.Xaml.IApplicationStaticsMethods.Start(WinRT.IObjectReference _obj = {WinRT.ObjectReference<WinRT.Interop.IUnknownVftbl>}, Microsoft.UI.Xaml.ApplicationInitializationCallback callback = {Method = {System.Reflection.RuntimeMethodInfo}}) 未知
Microsoft.WinUI.dll!Microsoft.UI.Xaml.Application.Start(Microsoft.UI.Xaml.ApplicationInitializationCallback callback = {Method = {System.Reflection.RuntimeMethodInfo}}) 未知
*/
Application.Current.DebugSettings.EnableFrameRateCounter = true;
//ApplicationView.TryUnsnapToFullscreen();
// System.InvalidCastException:“Specified cast is not valid.”
// https://stackoverflow.com/questions/73936140/how-to-get-the-window-hosting-a-uielement-instance
var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(s);
//var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(s);
})
}
};
Expand Down
8 changes: 8 additions & 0 deletions WPFDemo/NocejefiWeyufilareewe/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"profiles": {
"NocejefiWeyufilareewe": {
"commandName": "Project",
"nativeDebugging": true
}
}
}

0 comments on commit 1c06602

Please sign in to comment.