Einzelnen Beitrag anzeigen

TiGü

Registriert seit: 6. Apr 2011
Ort: Berlin
3.060 Beiträge
 
Delphi 10.4 Sydney
 
#14

AW: TShareContract/ShareContractFramework

  Alt 31. Aug 2022, 11:22
Ohne vernünftiges Debugging wird das nichts.
Werden denn beim ersten Aufrufen von InitSharing alle relevanten DLLs geladen?

Code:
Module Load: CLBCatQ.DLL. No Debug Info. Base Address: $76DA0000. Process Project1.exe (9140)
Module Load: twinapi.appcore.dll. No Debug Info. Base Address: $5EDD0000. Process Project1.exe (9140)
Thread Start: Thread ID: 11316. Process Project1.exe (9140)
Thread Start: Thread ID: 14504. Process Project1.exe (9140)
Thread Start: Thread ID: 12160. Process Project1.exe (9140)
Thread Start: Thread ID: 14216. Process Project1.exe (9140)
Module Load: ServiceHostBuilder.dll. No Debug Info. Base Address: $724D0000. Process Project1.exe (9140)
Module Load: OneCoreUAPCommonProxyStub.dll. No Debug Info. Base Address: $55930000. Process Project1.exe (9140)
Module Load: Windows.ApplicationModel.DataTransfer.dll. No Debug Info. Base Address: $715F0000. Process Project1.exe (9140)
Module Load: coml2.dll. No Debug Info. Base Address: $76100000. Process Project1.exe (9140)
Module Load: Windows.Storage.dll. No Debug Info. Base Address: $718E0000. Process Project1.exe (9140)
Module Load: iertutil.dll. No Debug Info. Base Address: $6F9B0000. Process Project1.exe (9140)
Module Load: Wldp.dll. No Debug Info. Base Address: $71740000. Process Project1.exe (9140)
Wie weit kommst du denn in System.Win.ShareContract?
Bekommst du einen validen Zeiger für deinen FTransferManager?

Delphi-Quellcode:
constructor TShareContract.Create(AWinHandle: HWND);
begin
  inherited Create;
  FFileList := TStringList.Create;
  if not Assigned(FProcessMessages) then
    raise EShareContractException.Create(SShareContractNotInitialized);

  FWindowHandle := AWinHandle;

  if TOSVersion.Check(10) then
  begin
    FTransferManager := TDataTransferManager.Interop.GetForWindow(FWindowHandle, TWinRTImportHelper.GetUIID<IDataTransferManager>);

    // Set Handler???
    FDataRequestedHandlerIntf := TDataTransferEventHandler.Create(Self);
    FSharingRequested := FTransferManager.add_DataRequested(FDataRequestedHandlerIntf);

    FAppChosenHandlerIntf := TAppChosenEventHandler.Create(Self);

    FTargetAppRequested := FTransferManager.add_TargetApplicationChosen(FAppChosenHandlerIntf);

    FImageDataProvider := TDataProviderHandler.Create(Self);
  end;
end;

Geändert von TiGü (31. Aug 2022 um 11:24 Uhr)
  Mit Zitat antworten Zitat