From d0fd93a91305efd9bb80a44c17c068069799feac Mon Sep 17 00:00:00 2001 From: Yoshi Askharoun Date: Thu, 11 Nov 2021 11:18:46 -0600 Subject: [PATCH] Added raw ZuneDBApi decomp --- .../-ArrayType---BY00--CBD.cs | 15 + .../-ArrayType---BY00--CBG.cs | 15 + .../-ArrayType---BY00--CBU_GUID--.cs | 14 + .../-ArrayType---BY00Q6MPEBXXZ.cs | 14 + ...ayType---BY00UDBPropertyRequestStruct--.cs | 14 + .../-ArrayType---BY00UtagSAFEARRAYBOUND--.cs | 14 + .../-ArrayType---BY01J.cs | 14 + .../-ArrayType---BY01Q6AXXZ.cs | 14 + ...ayType---BY01UDBPropertyRequestStruct--.cs | 14 + .../-ArrayType---BY01W4EMediaRights--.cs | 14 + .../-ArrayType---BY03--CBG.cs | 15 + .../-ArrayType---BY03Q6AXXZ.cs | 14 + .../-ArrayType---BY04--CBD.cs | 15 + .../-ArrayType---BY04--CBG.cs | 15 + .../-ArrayType---BY04Q6AXXZ.cs | 14 + .../-ArrayType---BY05--CBG.cs | 15 + .../-ArrayType---BY05Q6AXXZ.cs | 14 + .../-ArrayType---BY06--CBG.cs | 15 + .../-ArrayType---BY06Q6AXXZ.cs | 14 + .../-ArrayType---BY07--CBD.cs | 15 + .../-ArrayType---BY07--CBG.cs | 15 + .../-ArrayType---BY07PEBU_GUID--.cs | 14 + .../-ArrayType---BY07Q6AXXZ.cs | 14 + ...Type---BY07TWPP_PROJECT_CONTROL_BLOCK--.cs | 14 + ...O_PID_MAP-Subscription-Zune-Microsoft--.cs | 14 + .../-ArrayType---BY08--CBG.cs | 15 + .../-ArrayType---BY08Q6AXXZ.cs | 14 + .../-ArrayType---BY09--CBG.cs | 15 + .../-ArrayType---BY09Q6AXXZ.cs | 14 + ...O_PID_MAP-Subscription-Zune-Microsoft--.cs | 14 + ...-BY0A---CBU_SCHEMAMAPENTRY-CSchemaMap--.cs | 14 + .../-ArrayType---BY0A-P6AHXZ.cs | 14 + .../-ArrayType---BY0A-P6AXXZ.cs | 14 + .../-ArrayType---BY0BA---CBG.cs | 15 + .../-ArrayType---BY0BAA-E.cs | 15 + .../-ArrayType---BY0BAE-G.cs | 15 + .../-ArrayType---BY0BB---CBG.cs | 15 + .../-ArrayType---BY0BC---CBG.cs | 15 + .../-ArrayType---BY0BD-Q6AXXZ.cs | 14 + .../-ArrayType---BY0BF---CBG.cs | 15 + .../-ArrayType---BY0BK---CBG.cs | 15 + .../-ArrayType---BY0BM---CBG.cs | 15 + .../-ArrayType---BY0BN---CBG.cs | 15 + .../-ArrayType---BY0BO-G.cs | 15 + .../-ArrayType---BY0CA---CBG.cs | 15 + .../-ArrayType---BY0CD---CBG.cs | 15 + ...BUPropIdMapEntry-MicrosoftZuneInterop--.cs | 14 + .../-ArrayType---BY0L---CBG.cs | 15 + .../-ArrayType---BY0L-Q6AXXZ.cs | 14 + .../-ArrayType---BY0M---CBG.cs | 15 + .../-ArrayType---BY0N---CBG.cs | 15 + ...deoOfferParams-Service-Zune-Microsoft--.cs | 14 + .../-ArrayType---BY0O---CBG.cs | 15 + .../-ArrayType---BY0P---CBG.cs | 15 + .../LanguageSupport.cs | 15 + .../-CrtImplementationDetails-/Progress.cs | 23 + .../-CrtImplementationDetails-/ThisModule.cs | 14 + .../-CrtImplementationDetails-/TriBool.cs | 23 + ZuneDBApi/-_TypeDescriptor-_extraBytes_15.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_17.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_18.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_20.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_21.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_22.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_23.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_24.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_25.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_26.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_27.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_28.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_29.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_30.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_31.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_32.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_34.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_35.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_36.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_37.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_38.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_44.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_45.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_47.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_49.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_50.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_51.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_52.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_53.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_54.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_55.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_56.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_57.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_58.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_60.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_61.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_65.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_66.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_70.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_71.cs | 13 + ZuneDBApi/-_TypeDescriptor-_extraBytes_90.cs | 13 + .../-_s__RTTIBaseClassArray-_extraBytes_16.cs | 12 + .../-_s__RTTIBaseClassArray-_extraBytes_24.cs | 12 + .../-_s__RTTIBaseClassArray-_extraBytes_40.cs | 12 + .../-_s__RTTIBaseClassArray-_extraBytes_56.cs | 12 + .../-_s__RTTIBaseClassArray-_extraBytes_72.cs | 12 + .../-_s__RTTIBaseClassArray-_extraBytes_8.cs | 12 + ZuneDBApi/AppMetadata.cs | 13 + ZuneDBApi/AuthorizationStatus.cs | 10 + ZuneDBApi/CComPropVariant.cs | 12 + ZuneDBApi/CComPtrMgd-DeviceMediator-.cs | 83 + ...CComPtrMgd-EndpointHostManagerMediator-.cs | 84 + ZuneDBApi/CComPtrMgd-GasGaugeMediator-.cs | 83 + ZuneDBApi/CComPtrMgd-IAccountManagement-.cs | 84 + ZuneDBApi/CComPtrMgd-IAsyncCallback-.cs | 72 + ZuneDBApi/CComPtrMgd-IEndpointHost-.cs | 83 + ZuneDBApi/CComPtrMgd-IEndpointHostManager-.cs | 83 + ZuneDBApi/CComPtrMgd-IFirmwareMetadata-.cs | 83 + .../CComPtrMgd-IFirmwareRestorePoint-.cs | 83 + ...PtrMgd-IFirmwareRestorePointCollection-.cs | 83 + ZuneDBApi/CComPtrMgd-IFirmwareRestorer-.cs | 83 + ...CComPtrMgd-IFirmwareUpdateCallbackData-.cs | 83 + .../CComPtrMgd-IFirmwareUpdateCollection-.cs | 83 + .../CComPtrMgd-IFirmwareUpdateErrorInfo-.cs | 83 + ZuneDBApi/CComPtrMgd-IFirmwareUpdater-.cs | 113 + ZuneDBApi/CComPtrMgd-IGasGauge-.cs | 83 + ZuneDBApi/CComPtrMgd-IJumpList-.cs | 83 + ZuneDBApi/CComPtrMgd-IJumpListCategory-.cs | 78 + ZuneDBApi/CComPtrMgd-IJumpListEntry-.cs | 78 + ZuneDBApi/CComPtrMgd-IPassportIdentity-.cs | 95 + ZuneDBApi/CComPtrMgd-IQuickMixSession-.cs | 83 + ZuneDBApi/CComPtrMgd-IServiceError-.cs | 83 + ZuneDBApi/CComPtrMgd-ISyncEngine-.cs | 84 + ZuneDBApi/CComPtrMgd-ISyncRulesView-.cs | 83 + ZuneDBApi/CComPtrMgd-IThumbBar-.cs | 83 + ZuneDBApi/CComPtrMgd-IThumbBarButton-.cs | 78 + ZuneDBApi/CComPtrMgd-IUpdateManager-.cs | 83 + ...ComPtrMgd-IWinLiveAvailableInformation-.cs | 83 + ZuneDBApi/CComPtrMgd-IWinLiveInformation-.cs | 83 + ZuneDBApi/CComPtrMgd-IWinLiveSignup-.cs | 84 + ZuneDBApi/CComPtrMgd-IWlanProvider-.cs | 84 + .../CComPtrMgd-IZuneMBRBandwidthTest-.cs | 97 + ZuneDBApi/CComPtrMgd-MicrosoftZuneLibrary.cs | 90 + ZuneDBApi/CComPtrMgd-MicrosoftZunePlayback.cs | 78 + .../CComPtrMgd-SyncRulesViewMediator-.cs | 83 + ZuneDBApi/CComPtrNtv-DeviceMediator-.cs | 12 + ZuneDBApi/CComPtrNtv-IAccountManagement-.cs | 12 + ZuneDBApi/CComPtrNtv-IAccountUser-.cs | 12 + ZuneDBApi/CComPtrNtv-IAddress-.cs | 12 + ZuneDBApi/CComPtrNtv-IAppCollection-.cs | 12 + ZuneDBApi/CComPtrNtv-IAsyncCallback-.cs | 12 + ...ComPtrNtv-IAvailableZuneTagInformation-.cs | 12 + ZuneDBApi/CComPtrNtv-IContextData-.cs | 12 + ZuneDBApi/CComPtrNtv-ICreditCard-.cs | 12 + ZuneDBApi/CComPtrNtv-IDeviceAssetProvider-.cs | 12 + .../CComPtrNtv-IDeviceContentProvider-.cs | 12 + .../CComPtrNtv-IDeviceSyncRulesProvider-.cs | 12 + ZuneDBApi/CComPtrNtv-IDownloadManager-.cs | 12 + ZuneDBApi/CComPtrNtv-IDownloadTask-.cs | 12 + ZuneDBApi/CComPtrNtv-IEndpointHost-.cs | 12 + .../CComPtrNtv-IEndpointHostCollection-.cs | 12 + ZuneDBApi/CComPtrNtv-IEndpointHostManager-.cs | 12 + ZuneDBApi/CComPtrNtv-IEndpointManager-.cs | 12 + .../CComPtrNtv-IEndpointNotification-.cs | 12 + ZuneDBApi/CComPtrNtv-IFirmwareMetadata-.cs | 12 + .../CComPtrNtv-IFirmwareRestorePoint-.cs | 12 + ...PtrNtv-IFirmwareRestorePointCollection-.cs | 12 + ZuneDBApi/CComPtrNtv-IFirmwareRestorer-.cs | 12 + .../CComPtrNtv-IFirmwareUpdateCallback-.cs | 12 + ...CComPtrNtv-IFirmwareUpdateCallbackData-.cs | 12 + .../CComPtrNtv-IFirmwareUpdateCollection-.cs | 12 + .../CComPtrNtv-IFirmwareUpdateErrorInfo-.cs | 12 + ...CComPtrNtv-IFirmwareUpdateNotification-.cs | 12 + ZuneDBApi/CComPtrNtv-IFirmwareUpdater-.cs | 12 + ZuneDBApi/CComPtrNtv-IFirmwareUpdater2-.cs | 12 + ZuneDBApi/CComPtrNtv-IGasGauge-.cs | 12 + .../CComPtrNtv-IGetOfferDetailsCallback-.cs | 12 + ZuneDBApi/CComPtrNtv-IHttpWebRequest-.cs | 12 + ZuneDBApi/CComPtrNtv-IJumpListCategory-.cs | 12 + ZuneDBApi/CComPtrNtv-IJumpListEntry-.cs | 12 + .../CComPtrNtv-IMSMediaSchemaPropertySet-.cs | 12 + ZuneDBApi/CComPtrNtv-IMediaRights-.cs | 12 + ZuneDBApi/CComPtrNtv-IMessagingCallback-.cs | 12 + ZuneDBApi/CComPtrNtv-IMetadataManager-.cs | 12 + .../CComPtrNtv-IMusicAlbumCollection-.cs | 12 + .../CComPtrNtv-IMusicTrackCollection-.cs | 12 + ZuneDBApi/CComPtrNtv-INewsletterSettings-.cs | 12 + ZuneDBApi/CComPtrNtv-IPassportIdentity-.cs | 12 + ZuneDBApi/CComPtrNtv-IPriceInfo-.cs | 12 + ZuneDBApi/CComPtrNtv-IPrivacySettings-.cs | 12 + ZuneDBApi/CComPtrNtv-IQueryPropertyBag-.cs | 12 + ZuneDBApi/CComPtrNtv-IQuickMixManager-.cs | 12 + ZuneDBApi/CComPtrNtv-IQuickMixSession-.cs | 12 + ZuneDBApi/CComPtrNtv-IService-.cs | 12 + ZuneDBApi/CComPtrNtv-IServiceError-.cs | 12 + ZuneDBApi/CComPtrNtv-ISignInState-.cs | 12 + ZuneDBApi/CComPtrNtv-ISyncEngine-.cs | 12 + ZuneDBApi/CComPtrNtv-ISyncRulesView-.cs | 12 + ZuneDBApi/CComPtrNtv-ITelemetryManager-.cs | 12 + ZuneDBApi/CComPtrNtv-IThumbBarButton-.cs | 12 + ZuneDBApi/CComPtrNtv-ITokenDetails-.cs | 12 + ZuneDBApi/CComPtrNtv-ITunerConfig-.cs | 12 + ZuneDBApi/CComPtrNtv-IUnknown-.cs | 12 + ZuneDBApi/CComPtrNtv-IUpdateManager-.cs | 12 + ZuneDBApi/CComPtrNtv-IVideoCollection-.cs | 12 + ZuneDBApi/CComPtrNtv-IWin7ShellManager-.cs | 12 + ...ComPtrNtv-IWinLiveAvailableInformation-.cs | 12 + ZuneDBApi/CComPtrNtv-IWinLiveInformation-.cs | 12 + ZuneDBApi/CComPtrNtv-IWinLiveSignup-.cs | 12 + ZuneDBApi/CComPtrNtv-IWlanProvider-.cs | 12 + .../CComPtrNtv-IZuneNetCommentResponse-.cs | 12 + ZuneDBApi/CComPtrNtv-IZuneWebHost-.cs | 12 + ZuneDBApi/CComPtrNtv-Microsoft.cs | 12 + ZuneDBApi/CSchemaMap.cs | 19 + ZuneDBApi/CallbackPriorityManaged.cs | 5 + ZuneDBApi/DBPropertyRequestStruct.cs | 12 + ZuneDBApi/DBPropertySubmitStruct.cs | 12 + ZuneDBApi/DOT11_AUTH_CIPHER_PAIR.cs | 12 + ZuneDBApi/DRMQueryState.cs | 10 + ZuneDBApi/DataStructs/IntSet.cs | 15 + ZuneDBApi/DeviceAccess/EProgressEventType.cs | 13 + ZuneDBApi/DeviceAssetColors.cs | 8 + ZuneDBApi/DeviceAssetImages.cs | 27 + ZuneDBApi/DeviceMediator.cs | 12 + ZuneDBApi/DynamicArray-gcroot-Microsoft.cs | 12 + ZuneDBApi/DynamicArray-int-.cs | 12 + ZuneDBApi/DynamicArray-unsigned-short---.cs | 12 + ZuneDBApi/EAccountUserType.cs | 10 + ZuneDBApi/EAuthenticationScheme.cs | 10 + ZuneDBApi/EAutoPlaylistRuleOperators.cs | 10 + ZuneDBApi/EBillingOfferType.cs | 10 + ZuneDBApi/EBillingPaymentType.cs | 10 + ZuneDBApi/ECallbackPriorityNative.cs | 10 + ZuneDBApi/EClientTypeFlags.cs | 10 + ZuneDBApi/ECompletionAction.cs | 10 + ZuneDBApi/EConcernType.cs | 10 + ZuneDBApi/EContentType.cs | 10 + ZuneDBApi/EContentUriFlags.cs | 10 + ZuneDBApi/ECreditCardType.cs | 10 + ZuneDBApi/EDefinition.cs | 12 + ZuneDBApi/EDeviceAcquisitionMode.cs | 8 + ZuneDBApi/EDeviceContentProperty.cs | 22 + ZuneDBApi/EDeviceContentType.cs | 9 + ZuneDBApi/EDeviceSyncRuleType.cs | 11 + ZuneDBApi/EDownloadContextEvent.cs | 10 + ZuneDBApi/EDownloadFlags.cs | 10 + ZuneDBApi/EDownloadTaskState.cs | 11 + ZuneDBApi/EDownloadType.cs | 10 + ZuneDBApi/EDrmState.cs | 11 + ZuneDBApi/EEndpointCapability.cs | 29 + ZuneDBApi/EEndpointClass.cs | 10 + ZuneDBApi/EEndpointCommonAction.cs | 17 + ZuneDBApi/EEndpointCommonProperty.cs | 59 + ZuneDBApi/EEndpointCompatibilityStatus.cs | 10 + ZuneDBApi/EEndpointFamily.cs | 10 + ZuneDBApi/EEndpointHostAction.cs | 24 + ZuneDBApi/EEndpointHostProperty.cs | 78 + ZuneDBApi/EEndpointHostSetting.cs | 16 + ZuneDBApi/EEndpointStatus.cs | 19 + ZuneDBApi/EFavoritesAction.cs | 10 + ZuneDBApi/EFeatures.cs | 10 + ZuneDBApi/EFirmwareUpdateOption.cs | 10 + ZuneDBApi/EFirmwareUpdateType.cs | 10 + ZuneDBApi/EFriendAction.cs | 10 + ZuneDBApi/EGetOffersFlags.cs | 10 + ZuneDBApi/EHipType.cs | 10 + ZuneDBApi/EHttpCacheLevel.cs | 10 + ZuneDBApi/EImmediateProcessState.cs | 7 + ZuneDBApi/EImmediateSyncType.cs | 6 + ZuneDBApi/EItemDownloadState.cs | 7 + ZuneDBApi/EItemDownloadType.cs | 5 + ZuneDBApi/ELibraryFilter.cs | 6 + ZuneDBApi/EListType.cs | 28 + ZuneDBApi/EMediaCategories.cs | 20 + ZuneDBApi/EMediaFormat.cs | 10 + ZuneDBApi/EMediaPaymentType.cs | 10 + ZuneDBApi/EMediaRelationsType.cs | 4 + ZuneDBApi/EMediaRights.cs | 10 + ZuneDBApi/EMediaStateType.cs | 6 + ZuneDBApi/EMediaStoreEvent.cs | 4 + ZuneDBApi/EMediaTypes.cs | 66 + ZuneDBApi/EPassportPolicy.cs | 10 + ZuneDBApi/EPinType.cs | 6 + ZuneDBApi/EPlaybackOutputSupport.cs | 8 + ZuneDBApi/EPlayedStatus.cs | 5 + ZuneDBApi/EPlaylistCreateConflictAction.cs | 10 + ZuneDBApi/EPlaylistLimitType.cs | 10 + ZuneDBApi/EPlaylistType.cs | 10 + ZuneDBApi/EPrivacySettingId.cs | 10 + ZuneDBApi/EPrivacySettingValue.cs | 10 + ZuneDBApi/EPurchaseOfferType.cs | 10 + ZuneDBApi/EPurchaseOffersFlags.cs | 10 + ZuneDBApi/EQueryPropertyBagProp.cs | 10 + ZuneDBApi/EQuerySortType.cs | 6 + ZuneDBApi/EQueryType.cs | 44 + ZuneDBApi/EQueryTypeView.cs | 15 + ZuneDBApi/EQuickMixMode.cs | 7 + ZuneDBApi/EQuickMixState.cs | 7 + ZuneDBApi/EQuickMixType.cs | 7 + ZuneDBApi/ERefreshLicenseState.cs | 6 + ZuneDBApi/ERelationshipType.cs | 4 + ZuneDBApi/ESeasonPurchaseFlags.cs | 10 + ZuneDBApi/ESeriesPlaybackOrder.cs | 5 + ZuneDBApi/EServiceEndpointId.cs | 10 + ZuneDBApi/EServiceMediaType.cs | 9 + ZuneDBApi/EStreamingActionType.cs | 10 + ZuneDBApi/ESubscriptionEvent.cs | 9 + ZuneDBApi/ESubscriptionProcessingState.cs | 7 + ZuneDBApi/ESubscriptionSource.cs | 9 + ZuneDBApi/ESubscriptionState.cs | 6 + ZuneDBApi/ESyncCategory.cs | 16 + ZuneDBApi/ESyncDeleteType.cs | 7 + ZuneDBApi/ESyncEngineState.cs | 24 + ZuneDBApi/ESyncMode.cs | 8 + ZuneDBApi/ESyncOperation.cs | 10 + ZuneDBApi/ESyncOperationStatus.cs | 6 + ZuneDBApi/ESyncRelationship.cs | 7 + ZuneDBApi/ESyncState.cs | 9 + ZuneDBApi/ETelemetryEvent.cs | 25 + ZuneDBApi/EThumbBarButtonIcons.cs | 10 + ZuneDBApi/ETokenType.cs | 10 + ZuneDBApi/ETranscodeOptimization.cs | 7 + ZuneDBApi/ETranscodePhotoSetting.cs | 7 + ZuneDBApi/ETunerRegisterType.cs | 10 + ZuneDBApi/ETunerType.cs | 10 + ZuneDBApi/EUpdateAction.cs | 10 + ZuneDBApi/EUserRating.cs | 10 + ZuneDBApi/EVideoType.cs | 10 + ZuneDBApi/EWatchType.cs | 7 + ZuneDBApi/EWin7LibraryKind.cs | 8 + ZuneDBApi/EWindowPositionKeys.cs | 10 + ZuneDBApi/EZuneNetMessagingEventType.cs | 10 + ZuneDBApi/EndpointHostManagerMediator.cs | 12 + ZuneDBApi/EtwControlerState.cs | 12 + ZuneDBApi/EventReason.cs | 10 + ZuneDBApi/Features.cs | 36 + ZuneDBApi/FileAssociationInfo.cs | 12 + ZuneDBApi/GasGaugeMediator.cs | 12 + ZuneDBApi/HBITMAP__.cs | 12 + ZuneDBApi/HDROP__.cs | 12 + ZuneDBApi/HICON__.cs | 12 + ZuneDBApi/HINSTANCE__.cs | 12 + ZuneDBApi/HKEY__.cs | 12 + ZuneDBApi/HMENU__.cs | 12 + ZuneDBApi/HMONITOR__.cs | 12 + ZuneDBApi/HWND__.cs | 12 + ZuneDBApi/IAccountManagement.cs | 12 + ZuneDBApi/IAccountUser.cs | 12 + ZuneDBApi/IAddPaymentInstrumentCallback.cs | 12 + ZuneDBApi/IAddress.cs | 12 + ZuneDBApi/IAlbumInfo.cs | 12 + ZuneDBApi/IAppCollection.cs | 12 + ZuneDBApi/IAsyncCallback.cs | 12 + ZuneDBApi/IAutoPlaylistRules.cs | 12 + ZuneDBApi/IAvailableZuneTagInformation.cs | 12 + ZuneDBApi/IBillingOfferCollection.cs | 12 + ZuneDBApi/IBurnPublisher.cs | 12 + ZuneDBApi/IBurnPublisherCallback.cs | 12 + ZuneDBApi/IConfigurationManager.cs | 12 + ZuneDBApi/IContentRefreshTask.cs | 12 + ZuneDBApi/IContextData.cs | 12 + ZuneDBApi/IContributorCollection.cs | 12 + ZuneDBApi/ICredential.cs | 12 + ZuneDBApi/ICreditCard.cs | 12 + ZuneDBApi/ICreditCardCollection.cs | 12 + ZuneDBApi/IDList.cs | 12 + ZuneDBApi/IDRMQuery.cs | 12 + ZuneDBApi/IDataObjectEnumerator.cs | 12 + ZuneDBApi/IDatabaseQueryResults.cs | 12 + ZuneDBApi/IDeregisterTunerCallback.cs | 12 + ZuneDBApi/IDeviceAssetProvider.cs | 12 + ZuneDBApi/IDeviceContentProvider.cs | 12 + ZuneDBApi/IDeviceSyncRulesProvider.cs | 12 + ZuneDBApi/IDownloadCallback.cs | 12 + ZuneDBApi/IDownloadManager.cs | 12 + ZuneDBApi/IDownloadTask.cs | 12 + ZuneDBApi/IDownloadTaskProgress.cs | 12 + ZuneDBApi/IEndpointHost.cs | 12 + ZuneDBApi/IEndpointHostCollection.cs | 12 + ZuneDBApi/IEndpointHostManager.cs | 12 + ZuneDBApi/IEndpointHostManagerCallback.cs | 12 + ZuneDBApi/IEndpointManager.cs | 12 + ZuneDBApi/IEndpointNotification.cs | 12 + ZuneDBApi/IEndpointStatusCallback.cs | 12 + ZuneDBApi/IFamilySettingsProvider.cs | 12 + ZuneDBApi/IFeatureEnablementManager.cs | 12 + ZuneDBApi/IFileAssociationHandler.cs | 12 + ZuneDBApi/IFileProvider.cs | 12 + ZuneDBApi/IFirmwareMetadata.cs | 12 + ZuneDBApi/IFirmwareRestorePoint.cs | 12 + ZuneDBApi/IFirmwareRestorePointCollection.cs | 12 + ZuneDBApi/IFirmwareRestorer.cs | 12 + ZuneDBApi/IFirmwareUpdateCallback.cs | 12 + ZuneDBApi/IFirmwareUpdateCallbackData.cs | 12 + ZuneDBApi/IFirmwareUpdateCollection.cs | 12 + ZuneDBApi/IFirmwareUpdateErrorInfo.cs | 12 + ZuneDBApi/IFirmwareUpdateNotification.cs | 12 + ZuneDBApi/IFirmwareUpdater.cs | 12 + ZuneDBApi/IFirmwareUpdater2.cs | 12 + ZuneDBApi/IFolderProvider.cs | 12 + ZuneDBApi/IGasGauge.cs | 12 + ZuneDBApi/IGasGaugeCallback.cs | 12 + ZuneDBApi/IGetAccountCallback.cs | 12 + ZuneDBApi/IGetBalancesCallback.cs | 12 + ZuneDBApi/IGetBillingOffersCallback.cs | 12 + ZuneDBApi/IGetOfferDetailsCallback.cs | 12 + ZuneDBApi/IGetOffersCallback.cs | 12 + ZuneDBApi/IGetPaymentInstrumentsCallback.cs | 12 + ZuneDBApi/IHMESettings.cs | 12 + ZuneDBApi/IHttpWebRequest.cs | 12 + ZuneDBApi/IHttpWebRequestCallback.cs | 12 + ZuneDBApi/IHttpWebResponse.cs | 12 + ZuneDBApi/IInteropNotify.cs | 12 + ZuneDBApi/IJumpList.cs | 12 + ZuneDBApi/IJumpListCategory.cs | 12 + ZuneDBApi/IJumpListEntry.cs | 12 + ZuneDBApi/IMCDynamicImage.cs | 12 + ZuneDBApi/IMCPlayer.cs | 12 + ZuneDBApi/IMCPlayerEvents.cs | 12 + ZuneDBApi/IMCPlayerSetUri.cs | 12 + ZuneDBApi/IMCPlayerSetUriEvents.cs | 12 + ZuneDBApi/IMCTransport.cs | 12 + ZuneDBApi/IMCTransportEvents.cs | 12 + ZuneDBApi/IMCVolumeControl.cs | 12 + ZuneDBApi/IMSMediaSchemaPropertyList.cs | 12 + ZuneDBApi/IMSMediaSchemaPropertySet.cs | 12 + ZuneDBApi/IMediaCollection.cs | 12 + ZuneDBApi/IMediaOfferCollection.cs | 12 + ZuneDBApi/IMediaRights.cs | 12 + ZuneDBApi/IMessagingCallback.cs | 12 + ZuneDBApi/IMetadataChangeNotify.cs | 12 + ZuneDBApi/IMetadataManager.cs | 12 + ZuneDBApi/IMultiSortAttributes.cs | 12 + ZuneDBApi/IMusicAlbumCollection.cs | 12 + ZuneDBApi/IMusicTrackCollection.cs | 12 + ZuneDBApi/INSSDevice.cs | 12 + ZuneDBApi/INSSDevices.cs | 12 + ZuneDBApi/INSSManager.cs | 12 + ZuneDBApi/INSSProperties.cs | 12 + ZuneDBApi/INSSProperty.cs | 12 + ZuneDBApi/INativeDeferredCallback.cs | 12 + ZuneDBApi/INewsletterSettings.cs | 12 + ZuneDBApi/INotifyManager.cs | 12 + ZuneDBApi/INotifySubscriber.cs | 12 + ZuneDBApi/IPassportIdentity.cs | 12 + ZuneDBApi/IPinProvider.cs | 12 + ZuneDBApi/IPlaylist.cs | 12 + ZuneDBApi/IPlaylistManager.cs | 12 + ZuneDBApi/IPriceInfo.cs | 12 + ZuneDBApi/IPrivacySettings.cs | 12 + ZuneDBApi/IProgressNotify.cs | 12 + ZuneDBApi/IPurchaseOffersCallback.cs | 12 + ZuneDBApi/IQueryPropertyBag.cs | 12 + ZuneDBApi/IQuickMixManager.cs | 12 + ZuneDBApi/IQuickMixSession.cs | 12 + ZuneDBApi/IQuickMixSessionCallback.cs | 12 + ZuneDBApi/IQuickMixStatusCallback.cs | 12 + ZuneDBApi/IRadioPlaylist.cs | 12 + ZuneDBApi/IRadioStationManager.cs | 12 + ZuneDBApi/IRecordManager.cs | 12 + ZuneDBApi/IRecordManagerCallback.cs | 12 + ZuneDBApi/IRefreshTunerListCallback.cs | 12 + ZuneDBApi/IResultSetEvents.cs | 12 + ZuneDBApi/IService.cs | 12 + ZuneDBApi/IServiceError.cs | 12 + ZuneDBApi/ISignInState.cs | 12 + ZuneDBApi/IStream.cs | 12 + ZuneDBApi/ISubscriptionManager.cs | 12 + .../ISubscriptionManagerCredentialProvider.cs | 12 + ZuneDBApi/ISubscriptionViewer.cs | 12 + ZuneDBApi/ISubscriptionViewerCallback.cs | 12 + ZuneDBApi/ISyncEngine.cs | 12 + ZuneDBApi/ISyncProgressCallback.cs | 12 + ZuneDBApi/ISyncRulesView.cs | 12 + ZuneDBApi/ISyncRulesViewCallback.cs | 12 + ZuneDBApi/ITelemetryManager.cs | 12 + ZuneDBApi/IThumbBar.cs | 12 + ZuneDBApi/IThumbBarButton.cs | 12 + ZuneDBApi/ITokenDetails.cs | 12 + ZuneDBApi/ITrackInfo.cs | 12 + ZuneDBApi/ITunerConfig.cs | 12 + ZuneDBApi/IUIThreadCallbackWorker.cs | 12 + ZuneDBApi/IUnknown.cs | 12 + ZuneDBApi/IUpdateManager.cs | 12 + ZuneDBApi/IUpdateProgress.cs | 12 + ZuneDBApi/IUriResourceTracker.cs | 12 + ZuneDBApi/IUsageDataManager.cs | 12 + ZuneDBApi/IUserCredentialManager.cs | 12 + ZuneDBApi/IUserCredentialManagerProvider.cs | 12 + ZuneDBApi/IUserManager.cs | 12 + ZuneDBApi/IVideoCollection.cs | 12 + ZuneDBApi/IWMISGetAlbumForAlbumIdCallback.cs | 12 + ZuneDBApi/IWMPCDDevice.cs | 12 + ZuneDBApi/IWMPCDDeviceList.cs | 12 + ZuneDBApi/IWMPCDMediaInfo.cs | 12 + ZuneDBApi/IWin7Libraries.cs | 12 + ZuneDBApi/IWin7ShellManager.cs | 12 + ZuneDBApi/IWin7ShellManagerMediator.cs | 12 + ZuneDBApi/IWinLiveAvailableInformation.cs | 12 + ZuneDBApi/IWinLiveInformation.cs | 12 + ZuneDBApi/IWinLiveSignup.cs | 12 + ZuneDBApi/IWlanAuthCipherPairList.cs | 12 + ZuneDBApi/IWlanProfile.cs | 12 + ZuneDBApi/IWlanProfileList.cs | 12 + ZuneDBApi/IWlanProvider.cs | 12 + ZuneDBApi/IZuneCDDeviceCallback.cs | 12 + ZuneDBApi/IZuneMBRBandwidthTest.cs | 12 + ZuneDBApi/IZuneMBRBandwidthTestEventSink.cs | 12 + ZuneDBApi/IZuneNetCommentResponse.cs | 12 + ZuneDBApi/IZuneNetMessaging.cs | 12 + ZuneDBApi/IZuneNetResponse.cs | 12 + ZuneDBApi/IZuneSpectrumMgr.cs | 12 + ZuneDBApi/IZuneWebHost.cs | 12 + ZuneDBApi/IZuneWebHostEventSink.cs | 12 + ZuneDBApi/IZuneWlanCallback.cs | 12 + ZuneDBApi/MCHResultAnnouncement.cs | 12 + ZuneDBApi/MCPlayerStatus.cs | 12 + ZuneDBApi/MCStreamChangeType.cs | 10 + ZuneDBApi/MCStreamDescriptor.cs | 12 + ZuneDBApi/MCTransportStatus.cs | 12 + ZuneDBApi/METADATA_ADD_MEDIA.cs | 12 + ZuneDBApi/METADATA_UPDATE_ALBUM.cs | 12 + ZuneDBApi/ManagedFirmwareUpdateOperation.cs | 7 + .../Configuration/AccountGuidConfiguration.cs | 57 + .../CConfigurationManagedBase.cs | 1008 +++ .../Zune/Configuration/CDBurnConfiguration.cs | 222 + .../Configuration/ChannelsConfiguration.cs | 17 + .../Zune/Configuration/ClientConfiguration.cs | 131 + .../ConfigurationChangeEventArgs.cs | 16 + .../ConfigurationChangeEventHandler.cs | 4 + .../Zune/Configuration/DRMConfiguration.cs | 94 + .../Zune/Configuration/DeregisterCallback.cs | 15 + .../Configuration/DevicesConfiguration.cs | 664 ++ .../Zune/Configuration/EventArgsHR.cs | 26 + .../Zune/Configuration/FUEConfiguration.cs | 112 + .../Configuration/FeaturesConfiguration.cs | 401 + .../FeaturesOverrideConfiguration.cs | 401 + .../FileAssociationHandlerFactory.cs | 35 + .../FileAssociationHandlerWrapper.cs | 214 + .../Zune/Configuration/FileAssociationInfo.cs | 48 + .../FirmwareUpdateConfiguration.cs | 131 + .../GeneralSettingsConfiguration.cs | 370 + .../Configuration/GrovelerConfiguration.cs | 219 + .../Zune/Configuration/HMEConfiguration.cs | 110 + .../Zune/Configuration/HMESQMConfiguration.cs | 68 + .../Configuration/IFileAssociationHandler.cs | 15 + .../Zune/Configuration/ITunerInfoHandler.cs | 32 + .../Zune/Configuration/MBRConfiguration.cs | 77 + .../Configuration/MachineConfiguration.cs | 27 + .../Configuration/MediaStoreConfiguration.cs | 538 ++ .../Configuration/MessagingConfiguration.cs | 113 + .../MessagingUserGuidConfiguration.cs | 29 + .../Zune/Configuration/NSSConfiguration.cs | 78 + .../NativeConfigurationChangeEventHandler.cs | 4 + .../Configuration/NotificationMarshaller.cs | 15 + .../Zune/Configuration/PicksConfiguration.cs | 56 + .../Configuration/PicturesConfiguration.cs | 104 + .../Configuration/PlaybackConfiguration.cs | 324 + .../Configuration/QuickMixConfiguration.cs | 184 + .../Configuration/QuickplayConfiguration.cs | 110 + .../Configuration/RecorderConfiguration.cs | 116 + .../Zune/Configuration/RefreshCallback.cs | 15 + .../Zune/Configuration/SQMConfiguration.cs | 100 + .../Zune/Configuration/SeriesConfiguration.cs | 65 + .../Configuration/ServiceConfiguration.cs | 332 + .../ServiceUserGuidConfiguration.cs | 83 + .../Zune/Configuration/SetupConfiguration.cs | 178 + .../Zune/Configuration/ShellConfiguration.cs | 316 + .../Configuration/ShipAssertsConfiguration.cs | 79 + .../Zune/Configuration/SocialConfiguration.cs | 46 + .../SocialUserGuidConfiguration.cs | 56 + .../SubscriptionConfiguration.cs | 92 + .../Configuration/TranscodeConfiguration.cs | 332 + .../Microsoft/Zune/Configuration/TunerInfo.cs | 60 + .../Zune/Configuration/TunerInfoHandler.cs | 356 + .../Configuration/TunerInfoHandlerFactory.cs | 10 + .../Zune/Configuration/TunerRegisterType.cs | 8 + .../Microsoft/Zune/Configuration/TunerType.cs | 9 + .../Configuration/UnitTestConfiguration.cs | 119 + .../Configuration/UsageDataConfiguration.cs | 17 + .../Configuration/UserCardsConfiguration.cs | 56 + .../Zune/Configuration/VersionInfo.cs | 7 + .../WindowsPhoneConfiguration.cs | 46 + .../Zune/ErrorMapperApi/ErrorMapperApi.cs | 35 + .../Zune/ErrorMapperApi/ErrorMapperResult.cs | 47 + .../Messaging/AddCommentCallbackWrapper.cs | 15 + .../Zune/Messaging/CommentCallback.cs | 7 + .../Zune/Messaging/ComposeCompletedHandler.cs | 4 + .../Messaging/DeviceItemsPostedHandler.cs | 4 + .../Zune/Messaging/FavoritesAction.cs | 9 + .../Microsoft/Zune/Messaging/FriendAction.cs | 8 + .../Zune/Messaging/IPropertySetMessageData.cs | 9 + .../Zune/Messaging/MessagingCallback.cs | 6 + .../Messaging/MessagingCallbackWrapper.cs | 15 + .../Zune/Messaging/MessagingNotifier.cs | 184 + .../Zune/Messaging/MessagingService.cs | 1005 +++ .../Zune/Messaging/MessagingSubscriber.cs | 15 + .../Zune/Messaging/PlaylistMessageData.cs | 278 + .../Microsoft/Zune/Playlist/AtomRules.cs | 21 + .../Zune/Playlist/AutoPlaylistBuilder.cs | 438 + .../Zune/Playlist/CreatePlaylistOption.cs | 12 + .../Microsoft/Zune/Playlist/GroupAndAtom.cs | 16 + .../Zune/Playlist/PlaylistAsyncOperation.cs | 15 + .../PlaylistAsyncOperationCompleted.cs | 6 + .../Zune/Playlist/PlaylistLimitType.cs | 9 + .../Zune/Playlist/PlaylistManager.cs | 496 ++ .../Zune/Playlist/PlaylistRuleOperator.cs | 16 + .../Microsoft/Zune/Playlist/PlaylistType.cs | 14 + .../Zune/QuickMix/BatchEndHandler.cs | 6 + ZuneDBApi/Microsoft/Zune/QuickMix/QuickMix.cs | 298 + .../Zune/QuickMix/QuickMixCallbackProxy.cs | 15 + .../Microsoft/Zune/QuickMix/QuickMixItem.cs | 59 + .../Zune/QuickMix/QuickMixProgressHandler.cs | 4 + .../Zune/QuickMix/QuickMixSession.cs | 286 + .../Zune/QuickMix/SimilarMediaBatchHandler.cs | 6 + .../Zune/Service/AccountManagement.cs | 1635 ++++ .../Service/AccountManagementErrorCallback.cs | 6 + .../Microsoft/Zune/Service/AccountSettings.cs | 106 + .../Microsoft/Zune/Service/AccountUser.cs | 362 + .../Microsoft/Zune/Service/AccountUserType.cs | 10 + .../AddPaymentInstrumentCallbackWrapper.cs | 15 + .../AddPaymentInstrumentCompleteCallback.cs | 4 + .../AddPaymentInstrumentErrorCallback.cs | 6 + ZuneDBApi/Microsoft/Zune/Service/Address.cs | 201 + .../Microsoft/Zune/Service/AlbumOffer.cs | 54 + .../Zune/Service/AlbumOfferCollection.cs | 199 + ZuneDBApi/Microsoft/Zune/Service/AppOffer.cs | 88 + .../Zune/Service/AppOfferCollection.cs | 190 + .../Zune/Service/AsyncRequestComplete.cs | 4 + .../Microsoft/Zune/Service/BillingOffer.cs | 79 + .../Zune/Service/BillingOfferCollection.cs | 119 + .../Service/CWebRequestCallbackWrapper.cs | 15 + .../Zune/Service/CountryBaseDetails.cs | 60 + .../Zune/Service/CountryFieldValidator.cs | 29 + .../Microsoft/Zune/Service/CreditCard.cs | 387 + .../Zune/Service/CreditCardCollection.cs | 154 + .../Microsoft/Zune/Service/CreditCardType.cs | 14 + ZuneDBApi/Microsoft/Zune/Service/DRMInfo.cs | 89 + .../Zune/Service/DownloadCallbackWrapper.cs | 15 + .../Zune/Service/DownloadEventHandler.cs | 7 + .../Service/DownloadEventProgressHandler.cs | 6 + .../Zune/Service/EBillingOfferType.cs | 11 + .../Zune/Service/EClientTypeFlags.cs | 13 + .../Microsoft/Zune/Service/EConcernType.cs | 21 + .../Microsoft/Zune/Service/EContentType.cs | 15 + .../Zune/Service/EContentUriFlags.cs | 11 + .../Zune/Service/EDownloadContextEvent.cs | 23 + .../Microsoft/Zune/Service/EDownloadFlags.cs | 15 + .../Microsoft/Zune/Service/EGetOffersFlags.cs | 12 + ZuneDBApi/Microsoft/Zune/Service/EHipType.cs | 8 + .../Microsoft/Zune/Service/EMediaStatus.cs | 14 + .../Zune/Service/EPassportPolicyId.cs | 10 + .../Zune/Service/EPurchaseOfferType.cs | 14 + .../Zune/Service/EPurchaseOffersFlags.cs | 14 + .../Zune/Service/EServiceEndpointId.cs | 44 + .../Zune/Service/EStreamingActionType.cs | 10 + .../Microsoft/Zune/Service/ETokenType.cs | 10 + .../Microsoft/Zune/Service/EmailFormat.cs | 9 + .../Zune/Service/GetAccountCallbackWrapper.cs | 15 + .../Service/GetAccountCompleteCallback.cs | 4 + .../Service/GetBalancesCallbackWrapper.cs | 15 + .../Service/GetBalancesCompleteCallback.cs | 4 + .../Zune/Service/GetBalancesErrorCallback.cs | 6 + .../GetBillingOffersCallbackWrapper.cs | 15 + .../GetBillingOffersCompleteCallback.cs | 4 + .../Service/GetBillingOffersErrorCallback.cs | 6 + .../Service/GetOfferDetailsCallbackWrapper.cs | 16 + .../GetOfferDetailsCompleteCallback.cs | 4 + .../Service/GetOfferDetailsErrorCallback.cs | 6 + .../Zune/Service/GetOffersCallbackWrapper.cs | 15 + .../Zune/Service/GetOffersCompleteCallback.cs | 4 + .../Zune/Service/GetOffersErrorCallback.cs | 6 + .../GetPaymentInstrumentsCallbackWrapper.cs | 15 + .../GetPaymentInstrumentsCompleteCallback.cs | 4 + .../GetPaymentInstrumentsErrorCallback.cs | 6 + .../Microsoft/Zune/Service/HistoryItem.cs | 24 + .../Zune/Service/HttpRequestCachePolicy.cs | 9 + .../Zune/Service/HttpResponseStream.cs | 199 + .../Zune/Service/HttpWebException.cs | 34 + .../Microsoft/Zune/Service/HttpWebRequest.cs | 687 ++ .../Microsoft/Zune/Service/HttpWebResponse.cs | 200 + .../Zune/Service/InitializedEventHandler.cs | 4 + ZuneDBApi/Microsoft/Zune/Service/Offer.cs | 73 + .../Microsoft/Zune/Service/OfferCollection.cs | 45 + .../Zune/Service/PassportIdentity.cs | 139 + .../Zune/Service/PaymentInstrument.cs | 29 + .../Microsoft/Zune/Service/PaymentType.cs | 13 + .../Microsoft/Zune/Service/PointsPayment.cs | 10 + ZuneDBApi/Microsoft/Zune/Service/PriceInfo.cs | 134 + .../Zune/Service/PrivacySettingId.cs | 21 + .../Zune/Service/PrivacySettingValue.cs | 10 + .../Microsoft/Zune/Service/PropertyError.cs | 35 + .../Zune/Service/RatingSystemBase.cs | 71 + .../Microsoft/Zune/Service/RatingValue.cs | 53 + ZuneDBApi/Microsoft/Zune/Service/Service.cs | 7765 +++++++++++++++++ .../Microsoft/Zune/Service/ServiceError.cs | 115 + .../Microsoft/Zune/Service/TokenDetails.cs | 104 + .../Microsoft/Zune/Service/TrackOffer.cs | 35 + .../Zune/Service/TrackOfferCollection.cs | 202 + .../Zune/Service/UriResourceTracker.cs | 133 + .../Microsoft/Zune/Service/VideoOffer.cs | 143 + .../Zune/Service/VideoOfferCollection.cs | 387 + .../Zune/Service/VideoOfferParams.cs | 15 + .../Microsoft/Zune/Service/WMISEndpointIds.cs | 27 + .../Service/WinLiveAvailableInformation.cs | 136 + .../Zune/Service/WinLiveInformation.cs | 244 + .../Microsoft/Zune/Service/WinLiveSignup.cs | 383 + .../CSubscriptionCredentialProviderProxy.cs | 15 + .../Subscription/CSubscriptionEventProxy.cs | 15 + .../Zune/Subscription/PROPERTY_TO_PID_MAP.cs | 15 + .../Zune/Subscription/SubscriptionAction.cs | 10 + .../SubscriptionCredentialHandler.cs | 7 + .../Subscription/SubscriptionDataProvider.cs | 21 + .../SubscriptionDataProviderItem.cs | 431 + .../SubscriptionDataProviderQuery.cs | 46 + .../SubscriptionDataProviderQueryResult.cs | 85 + .../Subscription/SubscriptionEventHandler.cs | 4 + .../Zune/Subscription/SubscriptionManager.cs | 871 ++ .../Subscription/SubscriptionSeriesInfo.cs | 167 + .../SubscriptonCredentialRequestArguments.cs | 86 + .../Subscription/SubscriptonEventArguments.cs | 38 + .../VirtualSubscriptionEpisodeList.cs | 256 + .../VirtualSubscriptionEpisodeListProxy.cs | 15 + ZuneDBApi/Microsoft/Zune/User/UserManager.cs | 161 + .../CUserCredentialProviderProxy.cs | 15 + .../UserCredential/UserCredentialHandler.cs | 7 + .../UserCredential/UserCredentialManager.cs | 102 + .../UserCredentialRequestArguments.cs | 86 + .../Zune/Util/AsyncCallbackWrapper.cs | 15 + .../Zune/Util/AsyncCompleteHandler.cs | 6 + ZuneDBApi/Microsoft/Zune/Util/Clipboard.cs | 171 + .../Microsoft/Zune/Util/ClipboardDataType.cs | 10 + .../Microsoft/Zune/Util/ContentRefreshTask.cs | 138 + .../Microsoft/Zune/Util/DRMCanDoQuery.cs | 150 + .../Zune/Util/DownloadEventArguments.cs | 25 + .../Microsoft/Zune/Util/DownloadManager.cs | 623 ++ .../Zune/Util/DownloadManagerMoveArguments.cs | 21 + .../Zune/Util/DownloadManagerProxy.cs | 15 + .../Util/DownloadManagerUpdateArguments.cs | 24 + .../Zune/Util/DownloadManagerUpdateHandler.cs | 4 + .../Zune/Util/DownloadProgressHandler.cs | 4 + ZuneDBApi/Microsoft/Zune/Util/DownloadTask.cs | 206 + .../Microsoft/Zune/Util/DownloadTaskList.cs | 72 + .../Microsoft/Zune/Util/DownloadTaskProxy.cs | 15 + .../Zune/Util/EDownloadManagerUpdateType.cs | 14 + .../Zune/Util/ETaskbarPlayerCommand.cs | 14 + .../Zune/Util/ETaskbarPlayerState.cs | 18 + .../Zune/Util/FamilySettingsManager.cs | 221 + .../Zune/Util/FeatureChangedInteropWrapper.cs | 15 + .../Microsoft/Zune/Util/FeatureEnablement.cs | 413 + .../Microsoft/Zune/Util/FeaturesChangedApi.cs | 167 + .../Zune/Util/FeaturesChangedHandler.cs | 6 + .../Microsoft/Zune/Util/ITrayDeskBand.cs | 15 + .../Microsoft/Zune/Util/JumpListCategory.cs | 106 + .../Microsoft/Zune/Util/JumpListEntry.cs | 130 + .../Microsoft/Zune/Util/JumpListSession.cs | 195 + .../Zune/Util/MonitorChangeHandler.cs | 4 + .../Zune/Util/NavigationCompleteHandler.cs | 4 + .../Zune/Util/NavigationErrorHandler.cs | 4 + ZuneDBApi/Microsoft/Zune/Util/Notification.cs | 44 + ZuneDBApi/Microsoft/Zune/Util/PhotoManager.cs | 463 + ZuneDBApi/Microsoft/Zune/Util/PinManager.cs | 178 + ZuneDBApi/Microsoft/Zune/Util/Point.cs | 47 + .../Microsoft/Zune/Util/PowerRequirements.cs | 28 + .../Util/PurchaseOffersCallbackWrapper.cs | 15 + .../Util/PurchaseOffersCompleteHandler.cs | 6 + .../Microsoft/Zune/Util/RadioPlaylist.cs | 79 + .../Zune/Util/RadioStationManager.cs | 214 + .../Zune/Util/RadioStationProgressHandler.cs | 6 + .../Microsoft/Zune/Util/RadioStationProxy.cs | 15 + ZuneDBApi/Microsoft/Zune/Util/SQMAction.cs | 12 + ZuneDBApi/Microsoft/Zune/Util/SQMData.cs | 243 + ZuneDBApi/Microsoft/Zune/Util/SQMDataId.cs | 236 + ZuneDBApi/Microsoft/Zune/Util/SQMDataPoint.cs | 23 + .../Zune/Util/SQMStreamPositionType.cs | 9 + ZuneDBApi/Microsoft/Zune/Util/ShipAssert.cs | 87 + ZuneDBApi/Microsoft/Zune/Util/Size.cs | 47 + .../Microsoft/Zune/Util/TaskbarPlayer.cs | 555 ++ .../Zune/Util/TaskbarPlayerCommandHandler.cs | 4 + ZuneDBApi/Microsoft/Zune/Util/TelemetryAPI.cs | 137 + ZuneDBApi/Microsoft/Zune/Util/ThumbBar.cs | 94 + .../Microsoft/Zune/Util/ThumbBarButton.cs | 183 + .../Zune/Util/ThumbBarButtonPressHandler.cs | 4 + .../Zune/Util/UpdateCheckEventArguments.cs | 41 + .../Microsoft/Zune/Util/UpdateManager.cs | 214 + .../Zune/Util/UpdateProgressHandler.cs | 4 + ZuneDBApi/Microsoft/Zune/Util/UpdateProxy.cs | 15 + .../Microsoft/Zune/Util/UsageDataService.cs | 235 + .../Microsoft/Zune/Util/Win7ShellManager.cs | 406 + .../Zune/Util/Win7ShellManagerMediator.cs | 15 + .../Util/WindowPositionKeyPressHandler.cs | 4 + ZuneDBApi/Microsoft/Zune/Util/Windowing.cs | 20 + ZuneDBApi/Microsoft/Zune/Util/ZuneWebHost.cs | 185 + .../Zune/Util/ZuneWebHostEventSink.cs | 15 + .../MicrosoftZuneInterop/PropIdMapEntry.cs | 15 + .../MicrosoftZuneInterop/QueryPropertyBag.cs | 277 + .../MicrosoftZuneLibrary/AlbumMetadata.cs | 629 ++ .../AppInitializationSequencer.cs | 68 + .../AssociateWlanDeviceCompleteHandler.cs | 4 + .../AsyncGetThumbnailState.cs | 51 + .../MicrosoftZuneLibrary/AsyncQueryParams.cs | 52 + .../MicrosoftZuneLibrary/BulkItemAction.cs | 13 + .../CBurnPublisherCallback.cs | 15 + .../MicrosoftZuneLibrary/CDDeviceCallback.cs | 15 + .../CallbackOnUIThread.cs | 28 + ...llbackOnUIThreadBimodalManaged_DONOTUSE.cs | 85 + ...backOnUIThreadBimodalUnmanaged_DONOTUSE.cs | 15 + .../CallbackOnUIThreadPack.cs | 20 + .../CategorySpaceUsedUpdatedHandler.cs | 4 + .../CheckDiskSpaceArgs.cs | 29 + .../CheckForUpdatesArgs.cs | 33 + .../CheckForUpdatesCallback.cs | 15 + .../MicrosoftZuneLibrary/CompletionAction.cs | 11 + .../ContinueFirmwareUpdateArgs.cs | 14 + .../CorePhase2ReadyCallback.cs | 6 + .../DeferrableSyncEventArgs.cs | 7 + .../DeferredSetResultArgs.cs | 21 + .../DeleteFromLibraryEventArgs.cs | 9 + ZuneDBApi/MicrosoftZuneLibrary/Device.cs | 3809 ++++++++ .../DeviceAddedHandler.cs | 4 + .../MicrosoftZuneLibrary/DeviceAssetSet.cs | 24 + ZuneDBApi/MicrosoftZuneLibrary/DeviceList.cs | 730 ++ .../DeviceOverflowHandler.cs | 4 + .../DeviceStatusChangedHandler.cs | 4 + .../EBurnProgressStatus.cs | 15 + ZuneDBApi/MicrosoftZuneLibrary/EBurnState.cs | 16 + .../MicrosoftZuneLibrary/ESyncEventReason.cs | 9 + ZuneDBApi/MicrosoftZuneLibrary/FileEntry.cs | 19 + .../FirmwareCompleteHandler.cs | 4 + .../FirmwareOperationBase.cs | 508 ++ .../FirmwareProcessCompleteArgs.cs | 38 + .../FirmwareRestorePoint.cs | 130 + .../FirmwareRestorePointCollection.cs | 119 + .../MicrosoftZuneLibrary/FirmwareRestorer.cs | 577 ++ .../FirmwareUpdateBeginArgs.cs | 14 + .../FirmwareUpdateErrorInfo.cs | 109 + .../FirmwareUpdateMediator.cs | 15 + .../FirmwareUpdateOption.cs | 8 + .../FirmwareUpdatePackage.cs | 199 + .../FirmwareUpdateProgressArgs.cs | 14 + .../FirmwareUpdateType.cs | 12 + .../MicrosoftZuneLibrary/FirmwareUpdater.cs | 880 ++ .../FormatCompleteHandler.cs | 4 + .../MicrosoftZuneLibrary/FriendOfArtist.cs | 33 + .../FriendlyNameChangedHandler.cs | 4 + .../FriendsOfArtistQuery.cs | 270 + ZuneDBApi/MicrosoftZuneLibrary/GasGauge.cs | 229 + .../GetAlbumForAlbumIdCompleteHandler.cs | 4 + .../GetDeviceWlanNetworksCompleteHandler.cs | 4 + .../GetDeviceWlanProfilesCompleteHandler.cs | 4 + .../GetWlanProfilesCompleteHandler.cs | 4 + ZuneDBApi/MicrosoftZuneLibrary/HMESettings.cs | 778 ++ .../MicrosoftZuneLibrary/HrStatusBase.cs | 24 + .../MicrosoftZuneLibrary/IDatabaseMedia.cs | 7 + .../MicrosoftZuneLibrary/IQueryListEvents.cs | 17 + .../IRequestCallbackOnUIThread.cs | 9 + .../MicrosoftZuneLibrary/InternalErrorInfo.cs | 15 + .../InteropNotifications.cs | 118 + .../LaunchFromShellHelper.cs | 162 + .../LibraryDataProvider.cs | 227 + .../LibraryDataProviderItemBase.cs | 824 ++ .../LibraryDataProviderListItem.cs | 136 + .../LibraryDataProviderQuery.cs | 667 ++ .../LibraryDataProviderQueryResult.cs | 59 + .../LibraryVirtualList.cs | 181 + .../MicrosoftZuneLibrary/ListNotifyData.cs | 9 + ZuneDBApi/MicrosoftZuneLibrary/ManagedLock.cs | 76 + .../MediatorCancelTimerCallback.cs | 21 + .../MetadataMgrNotifications.cs | 328 + .../NSSDeviceListChangeHandler.cs | 4 + .../NativeInteropNotifications.cs | 15 + .../NativeMetadataNotifications.cs | 15 + .../OnBeginFileChangeHandler.cs | 4 + .../OnBeginMetadataLifecycleHandler.cs | 4 + .../OnBeginMigrateHandler.cs | 4 + .../OnBeginScanDirectoryHandler.cs | 6 + .../OnBurnStateChangeHandler.cs | 4 + .../OnEndFileChangeHandler.cs | 4 + .../OnEndMetadataLifecycleHandler.cs | 4 + .../OnEndMigrateHandler.cs | 4 + .../OnEndScanDirectoryHandler.cs | 6 + .../OnFileAddedHandler.cs | 6 + .../OnFileDeleteFailed.cs | 6 + .../OnFileErrorHandler.cs | 6 + .../OnFileRemovedHandler.cs | 6 + .../OnFingerprintingFile.cs | 6 + .../OnItemErrorHandler.cs | 4 + .../OnItemProgressHandler.cs | 4 + .../OnMediaChangedHandler.cs | 6 + .../OnMetadataUpdateHandler.cs | 6 + .../OnQueryCancelHandler.cs | 4 + .../OnRecordPauseHandler.cs | 4 + .../OnRecordProgressHandler.cs | 4 + .../OnRecordResumeHandler.cs | 4 + .../OnRecordStartHandler.cs | 4 + .../OnRecordStopHandler.cs | 4 + .../OnResultsCountUpdate.cs | 4 + .../OnResultsCountUpdatePack.cs | 9 + .../OnScanCompletedHandler.cs | 4 + .../OnSessionProgressHandler.cs | 4 + .../OnSetDriveLockedForBurningHandler.cs | 6 + .../OnShowErrorDialogHandler.cs | 4 + .../RecordManagerCallback.cs | 15 + .../ReservedSpaceUpdatedHandler.cs | 4 + .../ResultSetEventRelay.cs | 15 + ZuneDBApi/MicrosoftZuneLibrary/SafeBitmap.cs | 35 + .../SafeBitmapWithData.cs | 160 + ZuneDBApi/MicrosoftZuneLibrary/SchemaMap.cs | 461 + .../SetDeviceWlanProfilesCompleteHandler.cs | 4 + .../MicrosoftZuneLibrary/SetResultsParams.cs | 44 + .../StartCheckForUpdatesArgs.cs | 29 + .../StartFirmwareRestoreArgs.cs | 31 + .../StartFirmwareUpdateArgs.cs | 36 + .../StaticLibraryDataProvider.cs | 16 + .../StaticLibraryDataProviderObject.cs | 69 + .../StaticLibraryDataProviderQuery.cs | 82 + .../MicrosoftZuneLibrary/SyncBeganHandler.cs | 4 + .../SyncCompletedHandler.cs | 4 + .../MicrosoftZuneLibrary/SyncEventArgs.cs | 9 + .../SyncProgressedHandler.cs | 4 + .../MicrosoftZuneLibrary/SyncRuleDetails.cs | 25 + ZuneDBApi/MicrosoftZuneLibrary/SyncRules.cs | 527 ++ .../MicrosoftZuneLibrary/SyncRulesView.cs | 229 + .../SyncRulesViewItemAddedHandler.cs | 4 + .../SyncRulesViewItemUpdatedHandler.cs | 4 + .../TestDeviceWlanCompleteHandler.cs | 4 + .../ThumbnailChangedHandler.cs | 4 + .../MicrosoftZuneLibrary/TrackMetadata.cs | 511 ++ .../TypeDiscoveringSyncEventArgs.cs | 9 + .../UnassociateWlanDeviceCompleteHandler.cs | 4 + .../UnavailableLibraryListItem.cs | 35 + .../MicrosoftZuneLibrary/UpdateAction.cs | 9 + .../UpdatePackageCollection.cs | 255 + ZuneDBApi/MicrosoftZuneLibrary/UpdateStep.cs | 171 + .../VirtualDatabaseList.cs | 272 + .../WMISGetAlbumForAlbumIdCallbackWrapper.cs | 15 + .../WirelessAuthenticationTypes.cs | 12 + .../MicrosoftZuneLibrary/WirelessCiphers.cs | 12 + .../WlanAuthCipherPair.cs | 66 + .../WlanAuthCipherPairList.cs | 10 + ZuneDBApi/MicrosoftZuneLibrary/WlanProfile.cs | 188 + .../MicrosoftZuneLibrary/WlanProfileList.cs | 10 + .../WlanTestResultCode.cs | 16 + ZuneDBApi/MicrosoftZuneLibrary/WorkerQueue.cs | 268 + ZuneDBApi/MicrosoftZuneLibrary/ZuneLibrary.cs | 1288 +++ .../ZuneLibraryCDDevice.cs | 832 ++ .../ZuneLibraryCDDeviceList.cs | 215 + .../ZuneLibraryCDRecorder.cs | 498 ++ .../ZuneLibraryGenreList.cs | 15 + .../MicrosoftZuneLibrary/ZuneLibraryUtils.cs | 87 + .../MicrosoftZuneLibrary/ZunePlaylist.cs | 62 + .../MicrosoftZuneLibrary/ZuneQueryItem.cs | 65 + .../MicrosoftZuneLibrary/ZuneQueryList.cs | 813 ++ .../MicrosoftZunePlayback/Announcement.cs | 15 + .../AnnouncementHandler.cs | 4 + .../BandwidthTestErrorArgs.cs | 17 + .../BandwidthTestErrorEventHandler.cs | 4 + .../BandwidthTestInterop.cs | 273 + .../BandwidthTestUpdateEventHandler.cs | 4 + .../BandwidthUpdateArgs.cs | 82 + .../CMBRBandwidthTestEventSink.cs | 15 + .../CPlayerInteropEventSink.cs | 15 + .../MBRHeuristicState.cs | 10 + .../MicrosoftZunePlayback/MCPlayerState.cs | 12 + .../MicrosoftZunePlayback/MCTransportState.cs | 11 + .../PlayerBandwithUpdateEventHandler.cs | 4 + .../MicrosoftZunePlayback/PlayerInterop.cs | 1299 +++ .../PlayerPropertyChangedEventArgs.cs | 21 + .../PlayerPropertyChangedEventHandler.cs | 4 + .../MicrosoftZunePlayback/PresentationInfo.cs | 43 + .../MicrosoftZunePlayback/VideoWindow.cs | 39 + ZuneDBApi/MusicAlbumMetadata.cs | 13 + ZuneDBApi/MusicTrackMetadata.cs | 13 + ZuneDBApi/NSSMediator.cs | 12 + ZuneDBApi/NewsletterOptions.cs | 12 + ZuneDBApi/POWER_INFORMATION_LEVEL.cs | 10 + ZuneDBApi/Properties/AssemblyInfo.cs | 11 + ZuneDBApi/QUICK_MIX_MEDIA_INFO.cs | 13 + ZuneDBApi/QUICK_MIX_STATUS_INFO.cs | 12 + ZuneDBApi/SSyncRuleDetails.cs | 12 + ZuneDBApi/SYSTEM_BATTERY_STATE.cs | 13 + ZuneDBApi/SyncRulesViewMediator.cs | 12 + ZuneDBApi/ThumbBarButtonIcons.cs | 14 + ZuneDBApi/TunerInfo.cs | 12 + ZuneDBApi/VideoMetadata.cs | 13 + ZuneDBApi/WBSTRString.cs | 12 + ZuneDBApi/WMIDPREQUESTCODE.cs | 10 + ZuneDBApi/WMT_ATTR_DATATYPE.cs | 10 + ZuneDBApi/WPP_PROJECT_CONTROL_BLOCK.cs | 12 + ZuneDBApi/WString.cs | 12 + ZuneDBApi/WindowPositionKeys.cs | 10 + ZuneDBApi/ZuneDBApi.csproj | 23 + ZuneDBApi/ZuneUI/DescriptionAttribute.cs | 16 + ZuneDBApi/ZuneUI/HRESULT.cs | 625 ++ ZuneDBApi/_COLLECTION_EVENT.cs | 10 + ZuneDBApi/_DOT11_AUTH_ALGORITHM.cs | 10 + ZuneDBApi/_DOT11_CIPHER_ALGORITHM.cs | 10 + ZuneDBApi/_EVENT_TRACE_HEADER.cs | 12 + ZuneDBApi/_EXCEPTION_POINTERS.cs | 12 + ZuneDBApi/_FILETIME.cs | 12 + ZuneDBApi/_GUID.cs | 13 + ZuneDBApi/_MBRHEURISTICDATA.cs | 12 + ZuneDBApi/_OSVERSIONINFOW.cs | 13 + .../_PERFTRACE_COLLECTIONEVENT_RECORD.cs | 12 + ZuneDBApi/_RTL_CRITICAL_SECTION.cs | 12 + ZuneDBApi/_SECURITY_ATTRIBUTES.cs | 12 + ZuneDBApi/_SYSTEMTIME.cs | 12 + ZuneDBApi/_TRACE_GUID_REGISTRATION.cs | 12 + ZuneDBApi/_WPP_TRACE_CONTROL_BLOCK.cs | 12 + .../__MIDL___MIDL_itf_wmpcd_0000_0014_0001.cs | 10 + .../__MIDL___MIDL_itf_wmpcd_0000_0014_0002.cs | 10 + ZuneDBApi/__enative_startup_state.cs | 10 + ZuneDBApi/__s_GUID.cs | 13 + ZuneDBApi/_s__RTTIBaseClassDescriptor2.cs | 12 + ZuneDBApi/_s__RTTIClassHierarchyDescriptor.cs | 12 + ZuneDBApi/_s__RTTICompleteObjectLocator2.cs | 12 + ZuneDBApi/app.manifest | 11 + ZuneDBApi/eErrorCondition.cs | 11 + ZuneDBApi/ePlaylistFileState.cs | 7 + ZuneDBApi/gcroot-Microsoft.cs | 348 + ZuneDBApi/gcroot-MicrosoftZuneLibrary.cs | 108 + ZuneDBApi/gcroot-MicrosoftZunePlayback.cs | 20 + ZuneDBApi/gcroot-System.cs | 60 + ZuneDBApi/tagBITMAP.cs | 12 + ZuneDBApi/tagCOPYDATASTRUCT.cs | 12 + ZuneDBApi/tagINPUT.cs | 12 + ZuneDBApi/tagMONITORINFO.cs | 12 + ZuneDBApi/tagPOINT.cs | 12 + ZuneDBApi/tagPROPVARIANT.cs | 12 + ZuneDBApi/tagRECT.cs | 12 + ZuneDBApi/tagSAFEARRAY.cs | 12 + ZuneDBApi/tagSAFEARRAYBOUND.cs | 12 + ZuneDBApi/tagVARIANT.cs | 12 + ZuneDBApi/tagWINDOWPLACEMENT.cs | 12 + ZuneDBApi/tagWNDCLASSW.cs | 12 + ZuneShell.sln | 14 +- 1034 files changed, 70246 insertions(+), 2 deletions(-) create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00--CBD.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00--CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00--CBU_GUID--.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00Q6MPEBXXZ.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00UDBPropertyRequestStruct--.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00UtagSAFEARRAYBOUND--.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY01J.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY01Q6AXXZ.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY01UDBPropertyRequestStruct--.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY01W4EMediaRights--.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY03--CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY03Q6AXXZ.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY04--CBD.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY04--CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY04Q6AXXZ.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY05--CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY05Q6AXXZ.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY06--CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY06Q6AXXZ.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07--CBD.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07--CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07PEBU_GUID--.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07Q6AXXZ.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07TWPP_PROJECT_CONTROL_BLOCK--.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07UPROPERTY_TO_PID_MAP-Subscription-Zune-Microsoft--.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY08--CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY08Q6AXXZ.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY09--CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY09Q6AXXZ.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY09UPROPERTY_TO_PID_MAP-Subscription-Zune-Microsoft--.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0A---CBU_SCHEMAMAPENTRY-CSchemaMap--.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0A-P6AHXZ.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0A-P6AXXZ.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BA---CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BAA-E.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BAE-G.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BB---CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BC---CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BD-Q6AXXZ.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BF---CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BK---CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BM---CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BN---CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BO-G.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0CA---CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0CD---CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0CF---CBUPropIdMapEntry-MicrosoftZuneInterop--.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0L---CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0L-Q6AXXZ.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0M---CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0N---CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0N-UVideoOfferParams-Service-Zune-Microsoft--.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0O---CBG.cs create mode 100644 ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0P---CBG.cs create mode 100644 ZuneDBApi/-CrtImplementationDetails-/LanguageSupport.cs create mode 100644 ZuneDBApi/-CrtImplementationDetails-/Progress.cs create mode 100644 ZuneDBApi/-CrtImplementationDetails-/ThisModule.cs create mode 100644 ZuneDBApi/-CrtImplementationDetails-/TriBool.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_15.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_17.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_18.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_20.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_21.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_22.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_23.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_24.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_25.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_26.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_27.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_28.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_29.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_30.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_31.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_32.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_34.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_35.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_36.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_37.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_38.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_44.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_45.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_47.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_49.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_50.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_51.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_52.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_53.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_54.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_55.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_56.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_57.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_58.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_60.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_61.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_65.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_66.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_70.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_71.cs create mode 100644 ZuneDBApi/-_TypeDescriptor-_extraBytes_90.cs create mode 100644 ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_16.cs create mode 100644 ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_24.cs create mode 100644 ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_40.cs create mode 100644 ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_56.cs create mode 100644 ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_72.cs create mode 100644 ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_8.cs create mode 100644 ZuneDBApi/AppMetadata.cs create mode 100644 ZuneDBApi/AuthorizationStatus.cs create mode 100644 ZuneDBApi/CComPropVariant.cs create mode 100644 ZuneDBApi/CComPtrMgd-DeviceMediator-.cs create mode 100644 ZuneDBApi/CComPtrMgd-EndpointHostManagerMediator-.cs create mode 100644 ZuneDBApi/CComPtrMgd-GasGaugeMediator-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IAccountManagement-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IAsyncCallback-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IEndpointHost-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IEndpointHostManager-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IFirmwareMetadata-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IFirmwareRestorePoint-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IFirmwareRestorePointCollection-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IFirmwareRestorer-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IFirmwareUpdateCallbackData-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IFirmwareUpdateCollection-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IFirmwareUpdateErrorInfo-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IFirmwareUpdater-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IGasGauge-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IJumpList-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IJumpListCategory-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IJumpListEntry-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IPassportIdentity-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IQuickMixSession-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IServiceError-.cs create mode 100644 ZuneDBApi/CComPtrMgd-ISyncEngine-.cs create mode 100644 ZuneDBApi/CComPtrMgd-ISyncRulesView-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IThumbBar-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IThumbBarButton-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IUpdateManager-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IWinLiveAvailableInformation-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IWinLiveInformation-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IWinLiveSignup-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IWlanProvider-.cs create mode 100644 ZuneDBApi/CComPtrMgd-IZuneMBRBandwidthTest-.cs create mode 100644 ZuneDBApi/CComPtrMgd-MicrosoftZuneLibrary.cs create mode 100644 ZuneDBApi/CComPtrMgd-MicrosoftZunePlayback.cs create mode 100644 ZuneDBApi/CComPtrMgd-SyncRulesViewMediator-.cs create mode 100644 ZuneDBApi/CComPtrNtv-DeviceMediator-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IAccountManagement-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IAccountUser-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IAddress-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IAppCollection-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IAsyncCallback-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IAvailableZuneTagInformation-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IContextData-.cs create mode 100644 ZuneDBApi/CComPtrNtv-ICreditCard-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IDeviceAssetProvider-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IDeviceContentProvider-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IDeviceSyncRulesProvider-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IDownloadManager-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IDownloadTask-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IEndpointHost-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IEndpointHostCollection-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IEndpointHostManager-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IEndpointManager-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IEndpointNotification-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IFirmwareMetadata-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IFirmwareRestorePoint-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IFirmwareRestorePointCollection-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IFirmwareRestorer-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IFirmwareUpdateCallback-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IFirmwareUpdateCallbackData-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IFirmwareUpdateCollection-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IFirmwareUpdateErrorInfo-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IFirmwareUpdateNotification-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IFirmwareUpdater-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IFirmwareUpdater2-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IGasGauge-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IGetOfferDetailsCallback-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IHttpWebRequest-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IJumpListCategory-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IJumpListEntry-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IMSMediaSchemaPropertySet-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IMediaRights-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IMessagingCallback-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IMetadataManager-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IMusicAlbumCollection-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IMusicTrackCollection-.cs create mode 100644 ZuneDBApi/CComPtrNtv-INewsletterSettings-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IPassportIdentity-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IPriceInfo-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IPrivacySettings-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IQueryPropertyBag-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IQuickMixManager-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IQuickMixSession-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IService-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IServiceError-.cs create mode 100644 ZuneDBApi/CComPtrNtv-ISignInState-.cs create mode 100644 ZuneDBApi/CComPtrNtv-ISyncEngine-.cs create mode 100644 ZuneDBApi/CComPtrNtv-ISyncRulesView-.cs create mode 100644 ZuneDBApi/CComPtrNtv-ITelemetryManager-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IThumbBarButton-.cs create mode 100644 ZuneDBApi/CComPtrNtv-ITokenDetails-.cs create mode 100644 ZuneDBApi/CComPtrNtv-ITunerConfig-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IUnknown-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IUpdateManager-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IVideoCollection-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IWin7ShellManager-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IWinLiveAvailableInformation-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IWinLiveInformation-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IWinLiveSignup-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IWlanProvider-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IZuneNetCommentResponse-.cs create mode 100644 ZuneDBApi/CComPtrNtv-IZuneWebHost-.cs create mode 100644 ZuneDBApi/CComPtrNtv-Microsoft.cs create mode 100644 ZuneDBApi/CSchemaMap.cs create mode 100644 ZuneDBApi/CallbackPriorityManaged.cs create mode 100644 ZuneDBApi/DBPropertyRequestStruct.cs create mode 100644 ZuneDBApi/DBPropertySubmitStruct.cs create mode 100644 ZuneDBApi/DOT11_AUTH_CIPHER_PAIR.cs create mode 100644 ZuneDBApi/DRMQueryState.cs create mode 100644 ZuneDBApi/DataStructs/IntSet.cs create mode 100644 ZuneDBApi/DeviceAccess/EProgressEventType.cs create mode 100644 ZuneDBApi/DeviceAssetColors.cs create mode 100644 ZuneDBApi/DeviceAssetImages.cs create mode 100644 ZuneDBApi/DeviceMediator.cs create mode 100644 ZuneDBApi/DynamicArray-gcroot-Microsoft.cs create mode 100644 ZuneDBApi/DynamicArray-int-.cs create mode 100644 ZuneDBApi/DynamicArray-unsigned-short---.cs create mode 100644 ZuneDBApi/EAccountUserType.cs create mode 100644 ZuneDBApi/EAuthenticationScheme.cs create mode 100644 ZuneDBApi/EAutoPlaylistRuleOperators.cs create mode 100644 ZuneDBApi/EBillingOfferType.cs create mode 100644 ZuneDBApi/EBillingPaymentType.cs create mode 100644 ZuneDBApi/ECallbackPriorityNative.cs create mode 100644 ZuneDBApi/EClientTypeFlags.cs create mode 100644 ZuneDBApi/ECompletionAction.cs create mode 100644 ZuneDBApi/EConcernType.cs create mode 100644 ZuneDBApi/EContentType.cs create mode 100644 ZuneDBApi/EContentUriFlags.cs create mode 100644 ZuneDBApi/ECreditCardType.cs create mode 100644 ZuneDBApi/EDefinition.cs create mode 100644 ZuneDBApi/EDeviceAcquisitionMode.cs create mode 100644 ZuneDBApi/EDeviceContentProperty.cs create mode 100644 ZuneDBApi/EDeviceContentType.cs create mode 100644 ZuneDBApi/EDeviceSyncRuleType.cs create mode 100644 ZuneDBApi/EDownloadContextEvent.cs create mode 100644 ZuneDBApi/EDownloadFlags.cs create mode 100644 ZuneDBApi/EDownloadTaskState.cs create mode 100644 ZuneDBApi/EDownloadType.cs create mode 100644 ZuneDBApi/EDrmState.cs create mode 100644 ZuneDBApi/EEndpointCapability.cs create mode 100644 ZuneDBApi/EEndpointClass.cs create mode 100644 ZuneDBApi/EEndpointCommonAction.cs create mode 100644 ZuneDBApi/EEndpointCommonProperty.cs create mode 100644 ZuneDBApi/EEndpointCompatibilityStatus.cs create mode 100644 ZuneDBApi/EEndpointFamily.cs create mode 100644 ZuneDBApi/EEndpointHostAction.cs create mode 100644 ZuneDBApi/EEndpointHostProperty.cs create mode 100644 ZuneDBApi/EEndpointHostSetting.cs create mode 100644 ZuneDBApi/EEndpointStatus.cs create mode 100644 ZuneDBApi/EFavoritesAction.cs create mode 100644 ZuneDBApi/EFeatures.cs create mode 100644 ZuneDBApi/EFirmwareUpdateOption.cs create mode 100644 ZuneDBApi/EFirmwareUpdateType.cs create mode 100644 ZuneDBApi/EFriendAction.cs create mode 100644 ZuneDBApi/EGetOffersFlags.cs create mode 100644 ZuneDBApi/EHipType.cs create mode 100644 ZuneDBApi/EHttpCacheLevel.cs create mode 100644 ZuneDBApi/EImmediateProcessState.cs create mode 100644 ZuneDBApi/EImmediateSyncType.cs create mode 100644 ZuneDBApi/EItemDownloadState.cs create mode 100644 ZuneDBApi/EItemDownloadType.cs create mode 100644 ZuneDBApi/ELibraryFilter.cs create mode 100644 ZuneDBApi/EListType.cs create mode 100644 ZuneDBApi/EMediaCategories.cs create mode 100644 ZuneDBApi/EMediaFormat.cs create mode 100644 ZuneDBApi/EMediaPaymentType.cs create mode 100644 ZuneDBApi/EMediaRelationsType.cs create mode 100644 ZuneDBApi/EMediaRights.cs create mode 100644 ZuneDBApi/EMediaStateType.cs create mode 100644 ZuneDBApi/EMediaStoreEvent.cs create mode 100644 ZuneDBApi/EMediaTypes.cs create mode 100644 ZuneDBApi/EPassportPolicy.cs create mode 100644 ZuneDBApi/EPinType.cs create mode 100644 ZuneDBApi/EPlaybackOutputSupport.cs create mode 100644 ZuneDBApi/EPlayedStatus.cs create mode 100644 ZuneDBApi/EPlaylistCreateConflictAction.cs create mode 100644 ZuneDBApi/EPlaylistLimitType.cs create mode 100644 ZuneDBApi/EPlaylistType.cs create mode 100644 ZuneDBApi/EPrivacySettingId.cs create mode 100644 ZuneDBApi/EPrivacySettingValue.cs create mode 100644 ZuneDBApi/EPurchaseOfferType.cs create mode 100644 ZuneDBApi/EPurchaseOffersFlags.cs create mode 100644 ZuneDBApi/EQueryPropertyBagProp.cs create mode 100644 ZuneDBApi/EQuerySortType.cs create mode 100644 ZuneDBApi/EQueryType.cs create mode 100644 ZuneDBApi/EQueryTypeView.cs create mode 100644 ZuneDBApi/EQuickMixMode.cs create mode 100644 ZuneDBApi/EQuickMixState.cs create mode 100644 ZuneDBApi/EQuickMixType.cs create mode 100644 ZuneDBApi/ERefreshLicenseState.cs create mode 100644 ZuneDBApi/ERelationshipType.cs create mode 100644 ZuneDBApi/ESeasonPurchaseFlags.cs create mode 100644 ZuneDBApi/ESeriesPlaybackOrder.cs create mode 100644 ZuneDBApi/EServiceEndpointId.cs create mode 100644 ZuneDBApi/EServiceMediaType.cs create mode 100644 ZuneDBApi/EStreamingActionType.cs create mode 100644 ZuneDBApi/ESubscriptionEvent.cs create mode 100644 ZuneDBApi/ESubscriptionProcessingState.cs create mode 100644 ZuneDBApi/ESubscriptionSource.cs create mode 100644 ZuneDBApi/ESubscriptionState.cs create mode 100644 ZuneDBApi/ESyncCategory.cs create mode 100644 ZuneDBApi/ESyncDeleteType.cs create mode 100644 ZuneDBApi/ESyncEngineState.cs create mode 100644 ZuneDBApi/ESyncMode.cs create mode 100644 ZuneDBApi/ESyncOperation.cs create mode 100644 ZuneDBApi/ESyncOperationStatus.cs create mode 100644 ZuneDBApi/ESyncRelationship.cs create mode 100644 ZuneDBApi/ESyncState.cs create mode 100644 ZuneDBApi/ETelemetryEvent.cs create mode 100644 ZuneDBApi/EThumbBarButtonIcons.cs create mode 100644 ZuneDBApi/ETokenType.cs create mode 100644 ZuneDBApi/ETranscodeOptimization.cs create mode 100644 ZuneDBApi/ETranscodePhotoSetting.cs create mode 100644 ZuneDBApi/ETunerRegisterType.cs create mode 100644 ZuneDBApi/ETunerType.cs create mode 100644 ZuneDBApi/EUpdateAction.cs create mode 100644 ZuneDBApi/EUserRating.cs create mode 100644 ZuneDBApi/EVideoType.cs create mode 100644 ZuneDBApi/EWatchType.cs create mode 100644 ZuneDBApi/EWin7LibraryKind.cs create mode 100644 ZuneDBApi/EWindowPositionKeys.cs create mode 100644 ZuneDBApi/EZuneNetMessagingEventType.cs create mode 100644 ZuneDBApi/EndpointHostManagerMediator.cs create mode 100644 ZuneDBApi/EtwControlerState.cs create mode 100644 ZuneDBApi/EventReason.cs create mode 100644 ZuneDBApi/Features.cs create mode 100644 ZuneDBApi/FileAssociationInfo.cs create mode 100644 ZuneDBApi/GasGaugeMediator.cs create mode 100644 ZuneDBApi/HBITMAP__.cs create mode 100644 ZuneDBApi/HDROP__.cs create mode 100644 ZuneDBApi/HICON__.cs create mode 100644 ZuneDBApi/HINSTANCE__.cs create mode 100644 ZuneDBApi/HKEY__.cs create mode 100644 ZuneDBApi/HMENU__.cs create mode 100644 ZuneDBApi/HMONITOR__.cs create mode 100644 ZuneDBApi/HWND__.cs create mode 100644 ZuneDBApi/IAccountManagement.cs create mode 100644 ZuneDBApi/IAccountUser.cs create mode 100644 ZuneDBApi/IAddPaymentInstrumentCallback.cs create mode 100644 ZuneDBApi/IAddress.cs create mode 100644 ZuneDBApi/IAlbumInfo.cs create mode 100644 ZuneDBApi/IAppCollection.cs create mode 100644 ZuneDBApi/IAsyncCallback.cs create mode 100644 ZuneDBApi/IAutoPlaylistRules.cs create mode 100644 ZuneDBApi/IAvailableZuneTagInformation.cs create mode 100644 ZuneDBApi/IBillingOfferCollection.cs create mode 100644 ZuneDBApi/IBurnPublisher.cs create mode 100644 ZuneDBApi/IBurnPublisherCallback.cs create mode 100644 ZuneDBApi/IConfigurationManager.cs create mode 100644 ZuneDBApi/IContentRefreshTask.cs create mode 100644 ZuneDBApi/IContextData.cs create mode 100644 ZuneDBApi/IContributorCollection.cs create mode 100644 ZuneDBApi/ICredential.cs create mode 100644 ZuneDBApi/ICreditCard.cs create mode 100644 ZuneDBApi/ICreditCardCollection.cs create mode 100644 ZuneDBApi/IDList.cs create mode 100644 ZuneDBApi/IDRMQuery.cs create mode 100644 ZuneDBApi/IDataObjectEnumerator.cs create mode 100644 ZuneDBApi/IDatabaseQueryResults.cs create mode 100644 ZuneDBApi/IDeregisterTunerCallback.cs create mode 100644 ZuneDBApi/IDeviceAssetProvider.cs create mode 100644 ZuneDBApi/IDeviceContentProvider.cs create mode 100644 ZuneDBApi/IDeviceSyncRulesProvider.cs create mode 100644 ZuneDBApi/IDownloadCallback.cs create mode 100644 ZuneDBApi/IDownloadManager.cs create mode 100644 ZuneDBApi/IDownloadTask.cs create mode 100644 ZuneDBApi/IDownloadTaskProgress.cs create mode 100644 ZuneDBApi/IEndpointHost.cs create mode 100644 ZuneDBApi/IEndpointHostCollection.cs create mode 100644 ZuneDBApi/IEndpointHostManager.cs create mode 100644 ZuneDBApi/IEndpointHostManagerCallback.cs create mode 100644 ZuneDBApi/IEndpointManager.cs create mode 100644 ZuneDBApi/IEndpointNotification.cs create mode 100644 ZuneDBApi/IEndpointStatusCallback.cs create mode 100644 ZuneDBApi/IFamilySettingsProvider.cs create mode 100644 ZuneDBApi/IFeatureEnablementManager.cs create mode 100644 ZuneDBApi/IFileAssociationHandler.cs create mode 100644 ZuneDBApi/IFileProvider.cs create mode 100644 ZuneDBApi/IFirmwareMetadata.cs create mode 100644 ZuneDBApi/IFirmwareRestorePoint.cs create mode 100644 ZuneDBApi/IFirmwareRestorePointCollection.cs create mode 100644 ZuneDBApi/IFirmwareRestorer.cs create mode 100644 ZuneDBApi/IFirmwareUpdateCallback.cs create mode 100644 ZuneDBApi/IFirmwareUpdateCallbackData.cs create mode 100644 ZuneDBApi/IFirmwareUpdateCollection.cs create mode 100644 ZuneDBApi/IFirmwareUpdateErrorInfo.cs create mode 100644 ZuneDBApi/IFirmwareUpdateNotification.cs create mode 100644 ZuneDBApi/IFirmwareUpdater.cs create mode 100644 ZuneDBApi/IFirmwareUpdater2.cs create mode 100644 ZuneDBApi/IFolderProvider.cs create mode 100644 ZuneDBApi/IGasGauge.cs create mode 100644 ZuneDBApi/IGasGaugeCallback.cs create mode 100644 ZuneDBApi/IGetAccountCallback.cs create mode 100644 ZuneDBApi/IGetBalancesCallback.cs create mode 100644 ZuneDBApi/IGetBillingOffersCallback.cs create mode 100644 ZuneDBApi/IGetOfferDetailsCallback.cs create mode 100644 ZuneDBApi/IGetOffersCallback.cs create mode 100644 ZuneDBApi/IGetPaymentInstrumentsCallback.cs create mode 100644 ZuneDBApi/IHMESettings.cs create mode 100644 ZuneDBApi/IHttpWebRequest.cs create mode 100644 ZuneDBApi/IHttpWebRequestCallback.cs create mode 100644 ZuneDBApi/IHttpWebResponse.cs create mode 100644 ZuneDBApi/IInteropNotify.cs create mode 100644 ZuneDBApi/IJumpList.cs create mode 100644 ZuneDBApi/IJumpListCategory.cs create mode 100644 ZuneDBApi/IJumpListEntry.cs create mode 100644 ZuneDBApi/IMCDynamicImage.cs create mode 100644 ZuneDBApi/IMCPlayer.cs create mode 100644 ZuneDBApi/IMCPlayerEvents.cs create mode 100644 ZuneDBApi/IMCPlayerSetUri.cs create mode 100644 ZuneDBApi/IMCPlayerSetUriEvents.cs create mode 100644 ZuneDBApi/IMCTransport.cs create mode 100644 ZuneDBApi/IMCTransportEvents.cs create mode 100644 ZuneDBApi/IMCVolumeControl.cs create mode 100644 ZuneDBApi/IMSMediaSchemaPropertyList.cs create mode 100644 ZuneDBApi/IMSMediaSchemaPropertySet.cs create mode 100644 ZuneDBApi/IMediaCollection.cs create mode 100644 ZuneDBApi/IMediaOfferCollection.cs create mode 100644 ZuneDBApi/IMediaRights.cs create mode 100644 ZuneDBApi/IMessagingCallback.cs create mode 100644 ZuneDBApi/IMetadataChangeNotify.cs create mode 100644 ZuneDBApi/IMetadataManager.cs create mode 100644 ZuneDBApi/IMultiSortAttributes.cs create mode 100644 ZuneDBApi/IMusicAlbumCollection.cs create mode 100644 ZuneDBApi/IMusicTrackCollection.cs create mode 100644 ZuneDBApi/INSSDevice.cs create mode 100644 ZuneDBApi/INSSDevices.cs create mode 100644 ZuneDBApi/INSSManager.cs create mode 100644 ZuneDBApi/INSSProperties.cs create mode 100644 ZuneDBApi/INSSProperty.cs create mode 100644 ZuneDBApi/INativeDeferredCallback.cs create mode 100644 ZuneDBApi/INewsletterSettings.cs create mode 100644 ZuneDBApi/INotifyManager.cs create mode 100644 ZuneDBApi/INotifySubscriber.cs create mode 100644 ZuneDBApi/IPassportIdentity.cs create mode 100644 ZuneDBApi/IPinProvider.cs create mode 100644 ZuneDBApi/IPlaylist.cs create mode 100644 ZuneDBApi/IPlaylistManager.cs create mode 100644 ZuneDBApi/IPriceInfo.cs create mode 100644 ZuneDBApi/IPrivacySettings.cs create mode 100644 ZuneDBApi/IProgressNotify.cs create mode 100644 ZuneDBApi/IPurchaseOffersCallback.cs create mode 100644 ZuneDBApi/IQueryPropertyBag.cs create mode 100644 ZuneDBApi/IQuickMixManager.cs create mode 100644 ZuneDBApi/IQuickMixSession.cs create mode 100644 ZuneDBApi/IQuickMixSessionCallback.cs create mode 100644 ZuneDBApi/IQuickMixStatusCallback.cs create mode 100644 ZuneDBApi/IRadioPlaylist.cs create mode 100644 ZuneDBApi/IRadioStationManager.cs create mode 100644 ZuneDBApi/IRecordManager.cs create mode 100644 ZuneDBApi/IRecordManagerCallback.cs create mode 100644 ZuneDBApi/IRefreshTunerListCallback.cs create mode 100644 ZuneDBApi/IResultSetEvents.cs create mode 100644 ZuneDBApi/IService.cs create mode 100644 ZuneDBApi/IServiceError.cs create mode 100644 ZuneDBApi/ISignInState.cs create mode 100644 ZuneDBApi/IStream.cs create mode 100644 ZuneDBApi/ISubscriptionManager.cs create mode 100644 ZuneDBApi/ISubscriptionManagerCredentialProvider.cs create mode 100644 ZuneDBApi/ISubscriptionViewer.cs create mode 100644 ZuneDBApi/ISubscriptionViewerCallback.cs create mode 100644 ZuneDBApi/ISyncEngine.cs create mode 100644 ZuneDBApi/ISyncProgressCallback.cs create mode 100644 ZuneDBApi/ISyncRulesView.cs create mode 100644 ZuneDBApi/ISyncRulesViewCallback.cs create mode 100644 ZuneDBApi/ITelemetryManager.cs create mode 100644 ZuneDBApi/IThumbBar.cs create mode 100644 ZuneDBApi/IThumbBarButton.cs create mode 100644 ZuneDBApi/ITokenDetails.cs create mode 100644 ZuneDBApi/ITrackInfo.cs create mode 100644 ZuneDBApi/ITunerConfig.cs create mode 100644 ZuneDBApi/IUIThreadCallbackWorker.cs create mode 100644 ZuneDBApi/IUnknown.cs create mode 100644 ZuneDBApi/IUpdateManager.cs create mode 100644 ZuneDBApi/IUpdateProgress.cs create mode 100644 ZuneDBApi/IUriResourceTracker.cs create mode 100644 ZuneDBApi/IUsageDataManager.cs create mode 100644 ZuneDBApi/IUserCredentialManager.cs create mode 100644 ZuneDBApi/IUserCredentialManagerProvider.cs create mode 100644 ZuneDBApi/IUserManager.cs create mode 100644 ZuneDBApi/IVideoCollection.cs create mode 100644 ZuneDBApi/IWMISGetAlbumForAlbumIdCallback.cs create mode 100644 ZuneDBApi/IWMPCDDevice.cs create mode 100644 ZuneDBApi/IWMPCDDeviceList.cs create mode 100644 ZuneDBApi/IWMPCDMediaInfo.cs create mode 100644 ZuneDBApi/IWin7Libraries.cs create mode 100644 ZuneDBApi/IWin7ShellManager.cs create mode 100644 ZuneDBApi/IWin7ShellManagerMediator.cs create mode 100644 ZuneDBApi/IWinLiveAvailableInformation.cs create mode 100644 ZuneDBApi/IWinLiveInformation.cs create mode 100644 ZuneDBApi/IWinLiveSignup.cs create mode 100644 ZuneDBApi/IWlanAuthCipherPairList.cs create mode 100644 ZuneDBApi/IWlanProfile.cs create mode 100644 ZuneDBApi/IWlanProfileList.cs create mode 100644 ZuneDBApi/IWlanProvider.cs create mode 100644 ZuneDBApi/IZuneCDDeviceCallback.cs create mode 100644 ZuneDBApi/IZuneMBRBandwidthTest.cs create mode 100644 ZuneDBApi/IZuneMBRBandwidthTestEventSink.cs create mode 100644 ZuneDBApi/IZuneNetCommentResponse.cs create mode 100644 ZuneDBApi/IZuneNetMessaging.cs create mode 100644 ZuneDBApi/IZuneNetResponse.cs create mode 100644 ZuneDBApi/IZuneSpectrumMgr.cs create mode 100644 ZuneDBApi/IZuneWebHost.cs create mode 100644 ZuneDBApi/IZuneWebHostEventSink.cs create mode 100644 ZuneDBApi/IZuneWlanCallback.cs create mode 100644 ZuneDBApi/MCHResultAnnouncement.cs create mode 100644 ZuneDBApi/MCPlayerStatus.cs create mode 100644 ZuneDBApi/MCStreamChangeType.cs create mode 100644 ZuneDBApi/MCStreamDescriptor.cs create mode 100644 ZuneDBApi/MCTransportStatus.cs create mode 100644 ZuneDBApi/METADATA_ADD_MEDIA.cs create mode 100644 ZuneDBApi/METADATA_UPDATE_ALBUM.cs create mode 100644 ZuneDBApi/ManagedFirmwareUpdateOperation.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/AccountGuidConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/CConfigurationManagedBase.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/CDBurnConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/ChannelsConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/ClientConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/ConfigurationChangeEventArgs.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/ConfigurationChangeEventHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/DRMConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/DeregisterCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/DevicesConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/EventArgsHR.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/FUEConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/FeaturesConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/FeaturesOverrideConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/FileAssociationHandlerFactory.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/FileAssociationHandlerWrapper.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/FileAssociationInfo.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/FirmwareUpdateConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/GeneralSettingsConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/GrovelerConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/HMEConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/HMESQMConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/IFileAssociationHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/ITunerInfoHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/MBRConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/MachineConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/MediaStoreConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/MessagingConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/MessagingUserGuidConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/NSSConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/NativeConfigurationChangeEventHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/NotificationMarshaller.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/PicksConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/PicturesConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/PlaybackConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/QuickMixConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/QuickplayConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/RecorderConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/RefreshCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/SQMConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/SeriesConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/ServiceConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/ServiceUserGuidConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/SetupConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/ShellConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/ShipAssertsConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/SocialConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/SocialUserGuidConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/SubscriptionConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/TranscodeConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/TunerInfo.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/TunerInfoHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/TunerInfoHandlerFactory.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/TunerRegisterType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/TunerType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/UnitTestConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/UsageDataConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/UserCardsConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/VersionInfo.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Configuration/WindowsPhoneConfiguration.cs create mode 100644 ZuneDBApi/Microsoft/Zune/ErrorMapperApi/ErrorMapperApi.cs create mode 100644 ZuneDBApi/Microsoft/Zune/ErrorMapperApi/ErrorMapperResult.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Messaging/AddCommentCallbackWrapper.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Messaging/CommentCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Messaging/ComposeCompletedHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Messaging/DeviceItemsPostedHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Messaging/FavoritesAction.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Messaging/FriendAction.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Messaging/IPropertySetMessageData.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Messaging/MessagingCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Messaging/MessagingCallbackWrapper.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Messaging/MessagingNotifier.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Messaging/MessagingService.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Messaging/MessagingSubscriber.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Messaging/PlaylistMessageData.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Playlist/AtomRules.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Playlist/AutoPlaylistBuilder.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Playlist/CreatePlaylistOption.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Playlist/GroupAndAtom.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Playlist/PlaylistAsyncOperation.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Playlist/PlaylistAsyncOperationCompleted.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Playlist/PlaylistLimitType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Playlist/PlaylistManager.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Playlist/PlaylistRuleOperator.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Playlist/PlaylistType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/QuickMix/BatchEndHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/QuickMix/QuickMix.cs create mode 100644 ZuneDBApi/Microsoft/Zune/QuickMix/QuickMixCallbackProxy.cs create mode 100644 ZuneDBApi/Microsoft/Zune/QuickMix/QuickMixItem.cs create mode 100644 ZuneDBApi/Microsoft/Zune/QuickMix/QuickMixProgressHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/QuickMix/QuickMixSession.cs create mode 100644 ZuneDBApi/Microsoft/Zune/QuickMix/SimilarMediaBatchHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/AccountManagement.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/AccountManagementErrorCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/AccountSettings.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/AccountUser.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/AccountUserType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/AddPaymentInstrumentCallbackWrapper.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/AddPaymentInstrumentCompleteCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/AddPaymentInstrumentErrorCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/Address.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/AlbumOffer.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/AlbumOfferCollection.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/AppOffer.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/AppOfferCollection.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/AsyncRequestComplete.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/BillingOffer.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/BillingOfferCollection.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/CWebRequestCallbackWrapper.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/CountryBaseDetails.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/CountryFieldValidator.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/CreditCard.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/CreditCardCollection.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/CreditCardType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/DRMInfo.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/DownloadCallbackWrapper.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/DownloadEventHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/DownloadEventProgressHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/EBillingOfferType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/EClientTypeFlags.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/EConcernType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/EContentType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/EContentUriFlags.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/EDownloadContextEvent.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/EDownloadFlags.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/EGetOffersFlags.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/EHipType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/EMediaStatus.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/EPassportPolicyId.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/EPurchaseOfferType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/EPurchaseOffersFlags.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/EServiceEndpointId.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/EStreamingActionType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/ETokenType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/EmailFormat.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetAccountCallbackWrapper.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetAccountCompleteCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetBalancesCallbackWrapper.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetBalancesCompleteCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetBalancesErrorCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetBillingOffersCallbackWrapper.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetBillingOffersCompleteCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetBillingOffersErrorCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetOfferDetailsCallbackWrapper.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetOfferDetailsCompleteCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetOfferDetailsErrorCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetOffersCallbackWrapper.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetOffersCompleteCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetOffersErrorCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetPaymentInstrumentsCallbackWrapper.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetPaymentInstrumentsCompleteCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/GetPaymentInstrumentsErrorCallback.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/HistoryItem.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/HttpRequestCachePolicy.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/HttpResponseStream.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/HttpWebException.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/HttpWebRequest.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/HttpWebResponse.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/InitializedEventHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/Offer.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/OfferCollection.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/PassportIdentity.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/PaymentInstrument.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/PaymentType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/PointsPayment.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/PriceInfo.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/PrivacySettingId.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/PrivacySettingValue.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/PropertyError.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/RatingSystemBase.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/RatingValue.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/Service.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/ServiceError.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/TokenDetails.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/TrackOffer.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/TrackOfferCollection.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/UriResourceTracker.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/VideoOffer.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/VideoOfferCollection.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/VideoOfferParams.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/WMISEndpointIds.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/WinLiveAvailableInformation.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/WinLiveInformation.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Service/WinLiveSignup.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Subscription/CSubscriptionCredentialProviderProxy.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Subscription/CSubscriptionEventProxy.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Subscription/PROPERTY_TO_PID_MAP.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionAction.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionCredentialHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionDataProvider.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionDataProviderItem.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionDataProviderQuery.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionDataProviderQueryResult.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionEventHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionManager.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionSeriesInfo.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Subscription/SubscriptonCredentialRequestArguments.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Subscription/SubscriptonEventArguments.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Subscription/VirtualSubscriptionEpisodeList.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Subscription/VirtualSubscriptionEpisodeListProxy.cs create mode 100644 ZuneDBApi/Microsoft/Zune/User/UserManager.cs create mode 100644 ZuneDBApi/Microsoft/Zune/UserCredential/CUserCredentialProviderProxy.cs create mode 100644 ZuneDBApi/Microsoft/Zune/UserCredential/UserCredentialHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/UserCredential/UserCredentialManager.cs create mode 100644 ZuneDBApi/Microsoft/Zune/UserCredential/UserCredentialRequestArguments.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/AsyncCallbackWrapper.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/AsyncCompleteHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/Clipboard.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/ClipboardDataType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/ContentRefreshTask.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/DRMCanDoQuery.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/DownloadEventArguments.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/DownloadManager.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/DownloadManagerMoveArguments.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/DownloadManagerProxy.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/DownloadManagerUpdateArguments.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/DownloadManagerUpdateHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/DownloadProgressHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/DownloadTask.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/DownloadTaskList.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/DownloadTaskProxy.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/EDownloadManagerUpdateType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/ETaskbarPlayerCommand.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/ETaskbarPlayerState.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/FamilySettingsManager.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/FeatureChangedInteropWrapper.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/FeatureEnablement.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/FeaturesChangedApi.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/FeaturesChangedHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/ITrayDeskBand.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/JumpListCategory.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/JumpListEntry.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/JumpListSession.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/MonitorChangeHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/NavigationCompleteHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/NavigationErrorHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/Notification.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/PhotoManager.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/PinManager.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/Point.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/PowerRequirements.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/PurchaseOffersCallbackWrapper.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/PurchaseOffersCompleteHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/RadioPlaylist.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/RadioStationManager.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/RadioStationProgressHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/RadioStationProxy.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/SQMAction.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/SQMData.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/SQMDataId.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/SQMDataPoint.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/SQMStreamPositionType.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/ShipAssert.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/Size.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/TaskbarPlayer.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/TaskbarPlayerCommandHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/TelemetryAPI.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/ThumbBar.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/ThumbBarButton.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/ThumbBarButtonPressHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/UpdateCheckEventArguments.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/UpdateManager.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/UpdateProgressHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/UpdateProxy.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/UsageDataService.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/Win7ShellManager.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/Win7ShellManagerMediator.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/WindowPositionKeyPressHandler.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/Windowing.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/ZuneWebHost.cs create mode 100644 ZuneDBApi/Microsoft/Zune/Util/ZuneWebHostEventSink.cs create mode 100644 ZuneDBApi/MicrosoftZuneInterop/PropIdMapEntry.cs create mode 100644 ZuneDBApi/MicrosoftZuneInterop/QueryPropertyBag.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/AlbumMetadata.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/AppInitializationSequencer.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/AssociateWlanDeviceCompleteHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/AsyncGetThumbnailState.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/AsyncQueryParams.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/BulkItemAction.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/CBurnPublisherCallback.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/CDDeviceCallback.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/CallbackOnUIThread.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/CallbackOnUIThreadBimodalManaged_DONOTUSE.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/CallbackOnUIThreadBimodalUnmanaged_DONOTUSE.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/CallbackOnUIThreadPack.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/CategorySpaceUsedUpdatedHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/CheckDiskSpaceArgs.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/CheckForUpdatesArgs.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/CheckForUpdatesCallback.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/CompletionAction.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/ContinueFirmwareUpdateArgs.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/CorePhase2ReadyCallback.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/DeferrableSyncEventArgs.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/DeferredSetResultArgs.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/DeleteFromLibraryEventArgs.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/Device.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/DeviceAddedHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/DeviceAssetSet.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/DeviceList.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/DeviceOverflowHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/DeviceStatusChangedHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/EBurnProgressStatus.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/EBurnState.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/ESyncEventReason.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FileEntry.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FirmwareCompleteHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FirmwareOperationBase.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FirmwareProcessCompleteArgs.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FirmwareRestorePoint.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FirmwareRestorePointCollection.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FirmwareRestorer.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateBeginArgs.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateErrorInfo.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateMediator.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateOption.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdatePackage.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateProgressArgs.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateType.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdater.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FormatCompleteHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FriendOfArtist.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FriendlyNameChangedHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/FriendsOfArtistQuery.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/GasGauge.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/GetAlbumForAlbumIdCompleteHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/GetDeviceWlanNetworksCompleteHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/GetDeviceWlanProfilesCompleteHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/GetWlanProfilesCompleteHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/HMESettings.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/HrStatusBase.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/IDatabaseMedia.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/IQueryListEvents.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/IRequestCallbackOnUIThread.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/InternalErrorInfo.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/InteropNotifications.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/LaunchFromShellHelper.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProvider.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProviderItemBase.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProviderListItem.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProviderQuery.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProviderQueryResult.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/LibraryVirtualList.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/ListNotifyData.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/ManagedLock.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/MediatorCancelTimerCallback.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/MetadataMgrNotifications.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/NSSDeviceListChangeHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/NativeInteropNotifications.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/NativeMetadataNotifications.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnBeginFileChangeHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnBeginMetadataLifecycleHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnBeginMigrateHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnBeginScanDirectoryHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnBurnStateChangeHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnEndFileChangeHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnEndMetadataLifecycleHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnEndMigrateHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnEndScanDirectoryHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnFileAddedHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnFileDeleteFailed.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnFileErrorHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnFileRemovedHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnFingerprintingFile.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnItemErrorHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnItemProgressHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnMediaChangedHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnMetadataUpdateHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnQueryCancelHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnRecordPauseHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnRecordProgressHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnRecordResumeHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnRecordStartHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnRecordStopHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnResultsCountUpdate.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnResultsCountUpdatePack.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnScanCompletedHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnSessionProgressHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnSetDriveLockedForBurningHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/OnShowErrorDialogHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/RecordManagerCallback.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/ReservedSpaceUpdatedHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/ResultSetEventRelay.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/SafeBitmap.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/SafeBitmapWithData.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/SchemaMap.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/SetDeviceWlanProfilesCompleteHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/SetResultsParams.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/StartCheckForUpdatesArgs.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/StartFirmwareRestoreArgs.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/StartFirmwareUpdateArgs.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/StaticLibraryDataProvider.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/StaticLibraryDataProviderObject.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/StaticLibraryDataProviderQuery.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/SyncBeganHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/SyncCompletedHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/SyncEventArgs.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/SyncProgressedHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/SyncRuleDetails.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/SyncRules.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/SyncRulesView.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/SyncRulesViewItemAddedHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/SyncRulesViewItemUpdatedHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/TestDeviceWlanCompleteHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/ThumbnailChangedHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/TrackMetadata.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/TypeDiscoveringSyncEventArgs.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/UnassociateWlanDeviceCompleteHandler.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/UnavailableLibraryListItem.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/UpdateAction.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/UpdatePackageCollection.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/UpdateStep.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/VirtualDatabaseList.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/WMISGetAlbumForAlbumIdCallbackWrapper.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/WirelessAuthenticationTypes.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/WirelessCiphers.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/WlanAuthCipherPair.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/WlanAuthCipherPairList.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/WlanProfile.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/WlanProfileList.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/WlanTestResultCode.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/WorkerQueue.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/ZuneLibrary.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryCDDevice.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryCDDeviceList.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryCDRecorder.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryGenreList.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryUtils.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/ZunePlaylist.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/ZuneQueryItem.cs create mode 100644 ZuneDBApi/MicrosoftZuneLibrary/ZuneQueryList.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/Announcement.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/AnnouncementHandler.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/BandwidthTestErrorArgs.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/BandwidthTestErrorEventHandler.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/BandwidthTestInterop.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/BandwidthTestUpdateEventHandler.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/BandwidthUpdateArgs.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/CMBRBandwidthTestEventSink.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/CPlayerInteropEventSink.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/MBRHeuristicState.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/MCPlayerState.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/MCTransportState.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/PlayerBandwithUpdateEventHandler.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/PlayerInterop.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/PlayerPropertyChangedEventArgs.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/PlayerPropertyChangedEventHandler.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/PresentationInfo.cs create mode 100644 ZuneDBApi/MicrosoftZunePlayback/VideoWindow.cs create mode 100644 ZuneDBApi/MusicAlbumMetadata.cs create mode 100644 ZuneDBApi/MusicTrackMetadata.cs create mode 100644 ZuneDBApi/NSSMediator.cs create mode 100644 ZuneDBApi/NewsletterOptions.cs create mode 100644 ZuneDBApi/POWER_INFORMATION_LEVEL.cs create mode 100644 ZuneDBApi/Properties/AssemblyInfo.cs create mode 100644 ZuneDBApi/QUICK_MIX_MEDIA_INFO.cs create mode 100644 ZuneDBApi/QUICK_MIX_STATUS_INFO.cs create mode 100644 ZuneDBApi/SSyncRuleDetails.cs create mode 100644 ZuneDBApi/SYSTEM_BATTERY_STATE.cs create mode 100644 ZuneDBApi/SyncRulesViewMediator.cs create mode 100644 ZuneDBApi/ThumbBarButtonIcons.cs create mode 100644 ZuneDBApi/TunerInfo.cs create mode 100644 ZuneDBApi/VideoMetadata.cs create mode 100644 ZuneDBApi/WBSTRString.cs create mode 100644 ZuneDBApi/WMIDPREQUESTCODE.cs create mode 100644 ZuneDBApi/WMT_ATTR_DATATYPE.cs create mode 100644 ZuneDBApi/WPP_PROJECT_CONTROL_BLOCK.cs create mode 100644 ZuneDBApi/WString.cs create mode 100644 ZuneDBApi/WindowPositionKeys.cs create mode 100644 ZuneDBApi/ZuneDBApi.csproj create mode 100644 ZuneDBApi/ZuneUI/DescriptionAttribute.cs create mode 100644 ZuneDBApi/ZuneUI/HRESULT.cs create mode 100644 ZuneDBApi/_COLLECTION_EVENT.cs create mode 100644 ZuneDBApi/_DOT11_AUTH_ALGORITHM.cs create mode 100644 ZuneDBApi/_DOT11_CIPHER_ALGORITHM.cs create mode 100644 ZuneDBApi/_EVENT_TRACE_HEADER.cs create mode 100644 ZuneDBApi/_EXCEPTION_POINTERS.cs create mode 100644 ZuneDBApi/_FILETIME.cs create mode 100644 ZuneDBApi/_GUID.cs create mode 100644 ZuneDBApi/_MBRHEURISTICDATA.cs create mode 100644 ZuneDBApi/_OSVERSIONINFOW.cs create mode 100644 ZuneDBApi/_PERFTRACE_COLLECTIONEVENT_RECORD.cs create mode 100644 ZuneDBApi/_RTL_CRITICAL_SECTION.cs create mode 100644 ZuneDBApi/_SECURITY_ATTRIBUTES.cs create mode 100644 ZuneDBApi/_SYSTEMTIME.cs create mode 100644 ZuneDBApi/_TRACE_GUID_REGISTRATION.cs create mode 100644 ZuneDBApi/_WPP_TRACE_CONTROL_BLOCK.cs create mode 100644 ZuneDBApi/__MIDL___MIDL_itf_wmpcd_0000_0014_0001.cs create mode 100644 ZuneDBApi/__MIDL___MIDL_itf_wmpcd_0000_0014_0002.cs create mode 100644 ZuneDBApi/__enative_startup_state.cs create mode 100644 ZuneDBApi/__s_GUID.cs create mode 100644 ZuneDBApi/_s__RTTIBaseClassDescriptor2.cs create mode 100644 ZuneDBApi/_s__RTTIClassHierarchyDescriptor.cs create mode 100644 ZuneDBApi/_s__RTTICompleteObjectLocator2.cs create mode 100644 ZuneDBApi/app.manifest create mode 100644 ZuneDBApi/eErrorCondition.cs create mode 100644 ZuneDBApi/ePlaylistFileState.cs create mode 100644 ZuneDBApi/gcroot-Microsoft.cs create mode 100644 ZuneDBApi/gcroot-MicrosoftZuneLibrary.cs create mode 100644 ZuneDBApi/gcroot-MicrosoftZunePlayback.cs create mode 100644 ZuneDBApi/gcroot-System.cs create mode 100644 ZuneDBApi/tagBITMAP.cs create mode 100644 ZuneDBApi/tagCOPYDATASTRUCT.cs create mode 100644 ZuneDBApi/tagINPUT.cs create mode 100644 ZuneDBApi/tagMONITORINFO.cs create mode 100644 ZuneDBApi/tagPOINT.cs create mode 100644 ZuneDBApi/tagPROPVARIANT.cs create mode 100644 ZuneDBApi/tagRECT.cs create mode 100644 ZuneDBApi/tagSAFEARRAY.cs create mode 100644 ZuneDBApi/tagSAFEARRAYBOUND.cs create mode 100644 ZuneDBApi/tagVARIANT.cs create mode 100644 ZuneDBApi/tagWINDOWPLACEMENT.cs create mode 100644 ZuneDBApi/tagWNDCLASSW.cs diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00--CBD.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00--CBD.cs new file mode 100644 index 0000000..c00c88b --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00--CBD.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 1)] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + [NativeCppClass] + [UnsafeValueType] + internal struct _0024ArrayType_0024_0024_0024BY00_0024_0024CBD + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00--CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00--CBG.cs new file mode 100644 index 0000000..551689b --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00--CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 2)] + [UnsafeValueType] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY00_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00--CBU_GUID--.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00--CBU_GUID--.cs new file mode 100644 index 0000000..8476463 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00--CBU_GUID--.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 16)] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY00_0024_0024CBU_GUID_0040_0040 + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00Q6MPEBXXZ.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00Q6MPEBXXZ.cs new file mode 100644 index 0000000..be77dad --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00Q6MPEBXXZ.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 8)] + [NativeCppClass] + [MiscellaneousBits(65)] + [DebugInfoInPDB] + internal struct _0024ArrayType_0024_0024_0024BY00Q6MPEBXXZ + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00UDBPropertyRequestStruct--.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00UDBPropertyRequestStruct--.cs new file mode 100644 index 0000000..f6b203f --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00UDBPropertyRequestStruct--.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 32)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(65)] + internal struct _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040 + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00UtagSAFEARRAYBOUND--.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00UtagSAFEARRAYBOUND--.cs new file mode 100644 index 0000000..b68fe83 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY00UtagSAFEARRAYBOUND--.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 8)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(65)] + internal struct _0024ArrayType_0024_0024_0024BY00UtagSAFEARRAYBOUND_0040_0040 + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY01J.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY01J.cs new file mode 100644 index 0000000..c73cb54 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY01J.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 8)] + [MiscellaneousBits(65)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct _0024ArrayType_0024_0024_0024BY01J + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY01Q6AXXZ.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY01Q6AXXZ.cs new file mode 100644 index 0000000..d7c3705 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY01Q6AXXZ.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 16)] + [MiscellaneousBits(65)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct _0024ArrayType_0024_0024_0024BY01Q6AXXZ + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY01UDBPropertyRequestStruct--.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY01UDBPropertyRequestStruct--.cs new file mode 100644 index 0000000..8108111 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY01UDBPropertyRequestStruct--.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 64)] + [NativeCppClass] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + internal struct _0024ArrayType_0024_0024_0024BY01UDBPropertyRequestStruct_0040_0040 + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY01W4EMediaRights--.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY01W4EMediaRights--.cs new file mode 100644 index 0000000..f53b72d --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY01W4EMediaRights--.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 8)] + [MiscellaneousBits(65)] + [DebugInfoInPDB] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY01W4EMediaRights_0040_0040 + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY03--CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY03--CBG.cs new file mode 100644 index 0000000..44a4434 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY03--CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 8)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(65)] + [UnsafeValueType] + internal struct _0024ArrayType_0024_0024_0024BY03_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY03Q6AXXZ.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY03Q6AXXZ.cs new file mode 100644 index 0000000..ff9d777 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY03Q6AXXZ.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 32)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(65)] + internal struct _0024ArrayType_0024_0024_0024BY03Q6AXXZ + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY04--CBD.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY04--CBD.cs new file mode 100644 index 0000000..c223d94 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY04--CBD.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 5)] + [UnsafeValueType] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(65)] + internal struct _0024ArrayType_0024_0024_0024BY04_0024_0024CBD + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY04--CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY04--CBG.cs new file mode 100644 index 0000000..cf23db8 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY04--CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 10)] + [UnsafeValueType] + [MiscellaneousBits(65)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct _0024ArrayType_0024_0024_0024BY04_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY04Q6AXXZ.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY04Q6AXXZ.cs new file mode 100644 index 0000000..8e95f1e --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY04Q6AXXZ.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 40)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(65)] + internal struct _0024ArrayType_0024_0024_0024BY04Q6AXXZ + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY05--CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY05--CBG.cs new file mode 100644 index 0000000..577f0f4 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY05--CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 12)] + [UnsafeValueType] + [NativeCppClass] + [MiscellaneousBits(65)] + [DebugInfoInPDB] + internal struct _0024ArrayType_0024_0024_0024BY05_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY05Q6AXXZ.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY05Q6AXXZ.cs new file mode 100644 index 0000000..9ce1d8f --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY05Q6AXXZ.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 48)] + [MiscellaneousBits(65)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct _0024ArrayType_0024_0024_0024BY05Q6AXXZ + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY06--CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY06--CBG.cs new file mode 100644 index 0000000..39b0656 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY06--CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 14)] + [DebugInfoInPDB] + [NativeCppClass] + [UnsafeValueType] + [MiscellaneousBits(65)] + internal struct _0024ArrayType_0024_0024_0024BY06_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY06Q6AXXZ.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY06Q6AXXZ.cs new file mode 100644 index 0000000..8e91ec2 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY06Q6AXXZ.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 56)] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY06Q6AXXZ + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07--CBD.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07--CBD.cs new file mode 100644 index 0000000..47c7278 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07--CBD.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 8)] + [MiscellaneousBits(65)] + [UnsafeValueType] + [NativeCppClass] + [DebugInfoInPDB] + internal struct _0024ArrayType_0024_0024_0024BY07_0024_0024CBD + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07--CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07--CBG.cs new file mode 100644 index 0000000..83b712d --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07--CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 16)] + [NativeCppClass] + [UnsafeValueType] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + internal struct _0024ArrayType_0024_0024_0024BY07_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07PEBU_GUID--.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07PEBU_GUID--.cs new file mode 100644 index 0000000..b74568d --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07PEBU_GUID--.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 64)] + [MiscellaneousBits(65)] + [DebugInfoInPDB] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY07PEBU_GUID_0040_0040 + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07Q6AXXZ.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07Q6AXXZ.cs new file mode 100644 index 0000000..6691b8d --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07Q6AXXZ.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 64)] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY07Q6AXXZ + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07TWPP_PROJECT_CONTROL_BLOCK--.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07TWPP_PROJECT_CONTROL_BLOCK--.cs new file mode 100644 index 0000000..7dcd780 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07TWPP_PROJECT_CONTROL_BLOCK--.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 256)] + [MiscellaneousBits(65)] + [DebugInfoInPDB] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY07TWPP_PROJECT_CONTROL_BLOCK_0040_0040 + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07UPROPERTY_TO_PID_MAP-Subscription-Zune-Microsoft--.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07UPROPERTY_TO_PID_MAP-Subscription-Zune-Microsoft--.cs new file mode 100644 index 0000000..4371dcd --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY07UPROPERTY_TO_PID_MAP-Subscription-Zune-Microsoft--.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 128)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(65)] + internal struct _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040 + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY08--CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY08--CBG.cs new file mode 100644 index 0000000..73f9181 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY08--CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 18)] + [DebugInfoInPDB] + [UnsafeValueType] + [MiscellaneousBits(65)] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY08_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY08Q6AXXZ.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY08Q6AXXZ.cs new file mode 100644 index 0000000..41450ac --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY08Q6AXXZ.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 72)] + [MiscellaneousBits(65)] + [DebugInfoInPDB] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY08Q6AXXZ + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY09--CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY09--CBG.cs new file mode 100644 index 0000000..32cf0b2 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY09--CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 20)] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + [NativeCppClass] + [UnsafeValueType] + internal struct _0024ArrayType_0024_0024_0024BY09_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY09Q6AXXZ.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY09Q6AXXZ.cs new file mode 100644 index 0000000..87bb4a0 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY09Q6AXXZ.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 80)] + [MiscellaneousBits(65)] + [DebugInfoInPDB] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY09Q6AXXZ + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY09UPROPERTY_TO_PID_MAP-Subscription-Zune-Microsoft--.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY09UPROPERTY_TO_PID_MAP-Subscription-Zune-Microsoft--.cs new file mode 100644 index 0000000..816fd3c --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY09UPROPERTY_TO_PID_MAP-Subscription-Zune-Microsoft--.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 160)] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040 + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0A---CBU_SCHEMAMAPENTRY-CSchemaMap--.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0A---CBU_SCHEMAMAPENTRY-CSchemaMap--.cs new file mode 100644 index 0000000..501607a --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0A---CBU_SCHEMAMAPENTRY-CSchemaMap--.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 1)] + [MiscellaneousBits(65)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct _0024ArrayType_0024_0024_0024BY0A_0040_0024_0024CBU_SCHEMAMAPENTRY_0040CSchemaMap_0040_0040 + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0A-P6AHXZ.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0A-P6AHXZ.cs new file mode 100644 index 0000000..ac2787b --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0A-P6AHXZ.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 1)] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY0A_0040P6AHXZ + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0A-P6AXXZ.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0A-P6AXXZ.cs new file mode 100644 index 0000000..44eeb00 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0A-P6AXXZ.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 1)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(65)] + internal struct _0024ArrayType_0024_0024_0024BY0A_0040P6AXXZ + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BA---CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BA---CBG.cs new file mode 100644 index 0000000..e6258e3 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BA---CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 32)] + [NativeCppClass] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + [UnsafeValueType] + internal struct _0024ArrayType_0024_0024_0024BY0BA_0040_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BAA-E.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BAA-E.cs new file mode 100644 index 0000000..6385730 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BAA-E.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 256)] + [DebugInfoInPDB] + [UnsafeValueType] + [MiscellaneousBits(65)] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY0BAA_0040E + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BAE-G.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BAE-G.cs new file mode 100644 index 0000000..3930e77 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BAE-G.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 520)] + [DebugInfoInPDB] + [NativeCppClass] + [UnsafeValueType] + [MiscellaneousBits(65)] + internal struct _0024ArrayType_0024_0024_0024BY0BAE_0040G + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BB---CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BB---CBG.cs new file mode 100644 index 0000000..de5f55d --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BB---CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 34)] + [UnsafeValueType] + [NativeCppClass] + [MiscellaneousBits(65)] + [DebugInfoInPDB] + internal struct _0024ArrayType_0024_0024_0024BY0BB_0040_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BC---CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BC---CBG.cs new file mode 100644 index 0000000..73cccc9 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BC---CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 36)] + [UnsafeValueType] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(65)] + internal struct _0024ArrayType_0024_0024_0024BY0BC_0040_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BD-Q6AXXZ.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BD-Q6AXXZ.cs new file mode 100644 index 0000000..34821f7 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BD-Q6AXXZ.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 152)] + [MiscellaneousBits(65)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct _0024ArrayType_0024_0024_0024BY0BD_0040Q6AXXZ + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BF---CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BF---CBG.cs new file mode 100644 index 0000000..0690f54 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BF---CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 42)] + [UnsafeValueType] + [MiscellaneousBits(65)] + [DebugInfoInPDB] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY0BF_0040_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BK---CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BK---CBG.cs new file mode 100644 index 0000000..e352ecd --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BK---CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 52)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(65)] + [UnsafeValueType] + internal struct _0024ArrayType_0024_0024_0024BY0BK_0040_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BM---CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BM---CBG.cs new file mode 100644 index 0000000..7f82461 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BM---CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 56)] + [MiscellaneousBits(65)] + [UnsafeValueType] + [DebugInfoInPDB] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY0BM_0040_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BN---CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BN---CBG.cs new file mode 100644 index 0000000..3651de2 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BN---CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 58)] + [NativeCppClass] + [MiscellaneousBits(65)] + [DebugInfoInPDB] + [UnsafeValueType] + internal struct _0024ArrayType_0024_0024_0024BY0BN_0040_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BO-G.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BO-G.cs new file mode 100644 index 0000000..6b939bb --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0BO-G.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 60)] + [MiscellaneousBits(65)] + [DebugInfoInPDB] + [NativeCppClass] + [UnsafeValueType] + internal struct _0024ArrayType_0024_0024_0024BY0BO_0040G + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0CA---CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0CA---CBG.cs new file mode 100644 index 0000000..22ede3a --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0CA---CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 64)] + [NativeCppClass] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + [UnsafeValueType] + internal struct _0024ArrayType_0024_0024_0024BY0CA_0040_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0CD---CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0CD---CBG.cs new file mode 100644 index 0000000..c0665c8 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0CD---CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 70)] + [UnsafeValueType] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(65)] + internal struct _0024ArrayType_0024_0024_0024BY0CD_0040_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0CF---CBUPropIdMapEntry-MicrosoftZuneInterop--.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0CF---CBUPropIdMapEntry-MicrosoftZuneInterop--.cs new file mode 100644 index 0000000..f502afa --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0CF---CBUPropIdMapEntry-MicrosoftZuneInterop--.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 592)] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY0CF_0040_0024_0024CBUPropIdMapEntry_0040MicrosoftZuneInterop_0040_0040 + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0L---CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0L---CBG.cs new file mode 100644 index 0000000..8a9454a --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0L---CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 22)] + [MiscellaneousBits(65)] + [DebugInfoInPDB] + [NativeCppClass] + [UnsafeValueType] + internal struct _0024ArrayType_0024_0024_0024BY0L_0040_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0L-Q6AXXZ.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0L-Q6AXXZ.cs new file mode 100644 index 0000000..bda7d1d --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0L-Q6AXXZ.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 88)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(65)] + internal struct _0024ArrayType_0024_0024_0024BY0L_0040Q6AXXZ + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0M---CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0M---CBG.cs new file mode 100644 index 0000000..d96f054 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0M---CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [UnsafeValueType] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY0M_0040_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0N---CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0N---CBG.cs new file mode 100644 index 0000000..2764226 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0N---CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 26)] + [NativeCppClass] + [UnsafeValueType] + [MiscellaneousBits(65)] + [DebugInfoInPDB] + internal struct _0024ArrayType_0024_0024_0024BY0N_0040_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0N-UVideoOfferParams-Service-Zune-Microsoft--.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0N-UVideoOfferParams-Service-Zune-Microsoft--.cs new file mode 100644 index 0000000..2049220 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0N-UVideoOfferParams-Service-Zune-Microsoft--.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 156)] + [NativeCppClass] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + internal struct _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040 + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0O---CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0O---CBG.cs new file mode 100644 index 0000000..942c45f --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0O---CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 28)] + [MiscellaneousBits(65)] + [UnsafeValueType] + [DebugInfoInPDB] + [NativeCppClass] + internal struct _0024ArrayType_0024_0024_0024BY0O_0040_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0P---CBG.cs b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0P---CBG.cs new file mode 100644 index 0000000..193f6a2 --- /dev/null +++ b/ZuneDBApi/-CppImplementationDetails-/-ArrayType---BY0P---CBG.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCppImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 30)] + [MiscellaneousBits(65)] + [NativeCppClass] + [DebugInfoInPDB] + [UnsafeValueType] + internal struct _0024ArrayType_0024_0024_0024BY0P_0040_0024_0024CBG + { + } +} diff --git a/ZuneDBApi/-CrtImplementationDetails-/LanguageSupport.cs b/ZuneDBApi/-CrtImplementationDetails-/LanguageSupport.cs new file mode 100644 index 0000000..88992e5 --- /dev/null +++ b/ZuneDBApi/-CrtImplementationDetails-/LanguageSupport.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCrtImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 8)] + [NativeCppClass] + [MiscellaneousBits(64)] + [DebugInfoInPDB] + internal struct LanguageSupport + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/-CrtImplementationDetails-/Progress.cs b/ZuneDBApi/-CrtImplementationDetails-/Progress.cs new file mode 100644 index 0000000..7c325dc --- /dev/null +++ b/ZuneDBApi/-CrtImplementationDetails-/Progress.cs @@ -0,0 +1,23 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCrtImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 1)] + [MiscellaneousBits(64)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct Progress + { + [NativeCppClass] + [DebugInfoInPDB] + [CLSCompliant(false)] + [MiscellaneousBits(64)] + public enum State + { + + } + } +} diff --git a/ZuneDBApi/-CrtImplementationDetails-/ThisModule.cs b/ZuneDBApi/-CrtImplementationDetails-/ThisModule.cs new file mode 100644 index 0000000..488d73b --- /dev/null +++ b/ZuneDBApi/-CrtImplementationDetails-/ThisModule.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCrtImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 1)] + [DebugInfoInPDB] + [MiscellaneousBits(64)] + [NativeCppClass] + internal struct ThisModule + { + } +} diff --git a/ZuneDBApi/-CrtImplementationDetails-/TriBool.cs b/ZuneDBApi/-CrtImplementationDetails-/TriBool.cs new file mode 100644 index 0000000..6d55a92 --- /dev/null +++ b/ZuneDBApi/-CrtImplementationDetails-/TriBool.cs @@ -0,0 +1,23 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace _003CCrtImplementationDetails_003E +{ + [StructLayout(LayoutKind.Sequential, Size = 1)] + [MiscellaneousBits(64)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct TriBool + { + [DebugInfoInPDB] + [MiscellaneousBits(64)] + [NativeCppClass] + [CLSCompliant(false)] + public enum State + { + + } + } +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_15.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_15.cs new file mode 100644 index 0000000..030c07b --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_15.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 31)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +[UnsafeValueType] +internal struct _0024_TypeDescriptor_0024_extraBytes_15 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_17.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_17.cs new file mode 100644 index 0000000..921f551 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_17.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 33)] +[MiscellaneousBits(65)] +[NativeCppClass] +[UnsafeValueType] +[DebugInfoInPDB] +internal struct _0024_TypeDescriptor_0024_extraBytes_17 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_18.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_18.cs new file mode 100644 index 0000000..8f55303 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_18.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 34)] +[NativeCppClass] +[DebugInfoInPDB] +[UnsafeValueType] +[MiscellaneousBits(65)] +internal struct _0024_TypeDescriptor_0024_extraBytes_18 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_20.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_20.cs new file mode 100644 index 0000000..0404b2d --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_20.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 36)] +[NativeCppClass] +[DebugInfoInPDB] +[UnsafeValueType] +[MiscellaneousBits(65)] +internal struct _0024_TypeDescriptor_0024_extraBytes_20 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_21.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_21.cs new file mode 100644 index 0000000..9c09fc2 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_21.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 37)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +[UnsafeValueType] +internal struct _0024_TypeDescriptor_0024_extraBytes_21 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_22.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_22.cs new file mode 100644 index 0000000..5d476ea --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_22.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 38)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +[UnsafeValueType] +internal struct _0024_TypeDescriptor_0024_extraBytes_22 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_23.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_23.cs new file mode 100644 index 0000000..8612a76 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_23.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 39)] +[UnsafeValueType] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct _0024_TypeDescriptor_0024_extraBytes_23 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_24.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_24.cs new file mode 100644 index 0000000..4114fde --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_24.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 40)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[UnsafeValueType] +[NativeCppClass] +internal struct _0024_TypeDescriptor_0024_extraBytes_24 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_25.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_25.cs new file mode 100644 index 0000000..90bd408 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_25.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 41)] +[DebugInfoInPDB] +[UnsafeValueType] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct _0024_TypeDescriptor_0024_extraBytes_25 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_26.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_26.cs new file mode 100644 index 0000000..35af340 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_26.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 42)] +[DebugInfoInPDB] +[UnsafeValueType] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct _0024_TypeDescriptor_0024_extraBytes_26 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_27.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_27.cs new file mode 100644 index 0000000..580ed91 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_27.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 43)] +[MiscellaneousBits(65)] +[NativeCppClass] +[UnsafeValueType] +[DebugInfoInPDB] +internal struct _0024_TypeDescriptor_0024_extraBytes_27 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_28.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_28.cs new file mode 100644 index 0000000..e4bed66 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_28.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 44)] +[MiscellaneousBits(65)] +[NativeCppClass] +[UnsafeValueType] +[DebugInfoInPDB] +internal struct _0024_TypeDescriptor_0024_extraBytes_28 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_29.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_29.cs new file mode 100644 index 0000000..ba94f1d --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_29.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 45)] +[NativeCppClass] +[UnsafeValueType] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct _0024_TypeDescriptor_0024_extraBytes_29 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_30.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_30.cs new file mode 100644 index 0000000..3cdab32 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_30.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 46)] +[UnsafeValueType] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct _0024_TypeDescriptor_0024_extraBytes_30 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_31.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_31.cs new file mode 100644 index 0000000..d3600f6 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_31.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 47)] +[MiscellaneousBits(65)] +[UnsafeValueType] +[NativeCppClass] +[DebugInfoInPDB] +internal struct _0024_TypeDescriptor_0024_extraBytes_31 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_32.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_32.cs new file mode 100644 index 0000000..d7da6e1 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_32.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 48)] +[DebugInfoInPDB] +[UnsafeValueType] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct _0024_TypeDescriptor_0024_extraBytes_32 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_34.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_34.cs new file mode 100644 index 0000000..c07718c --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_34.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 50)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +[UnsafeValueType] +internal struct _0024_TypeDescriptor_0024_extraBytes_34 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_35.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_35.cs new file mode 100644 index 0000000..93bd486 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_35.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 51)] +[DebugInfoInPDB] +[UnsafeValueType] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct _0024_TypeDescriptor_0024_extraBytes_35 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_36.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_36.cs new file mode 100644 index 0000000..bebbee9 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_36.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 52)] +[NativeCppClass] +[DebugInfoInPDB] +[UnsafeValueType] +[MiscellaneousBits(65)] +internal struct _0024_TypeDescriptor_0024_extraBytes_36 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_37.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_37.cs new file mode 100644 index 0000000..dc780b5 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_37.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 53)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[UnsafeValueType] +[NativeCppClass] +internal struct _0024_TypeDescriptor_0024_extraBytes_37 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_38.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_38.cs new file mode 100644 index 0000000..cafdcb3 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_38.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 54)] +[MiscellaneousBits(65)] +[UnsafeValueType] +[DebugInfoInPDB] +[NativeCppClass] +internal struct _0024_TypeDescriptor_0024_extraBytes_38 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_44.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_44.cs new file mode 100644 index 0000000..3b3c718 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_44.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 60)] +[NativeCppClass] +[UnsafeValueType] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct _0024_TypeDescriptor_0024_extraBytes_44 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_45.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_45.cs new file mode 100644 index 0000000..56afe20 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_45.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 61)] +[NativeCppClass] +[MiscellaneousBits(65)] +[UnsafeValueType] +[DebugInfoInPDB] +internal struct _0024_TypeDescriptor_0024_extraBytes_45 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_47.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_47.cs new file mode 100644 index 0000000..b9257c4 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_47.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 63)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +[UnsafeValueType] +internal struct _0024_TypeDescriptor_0024_extraBytes_47 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_49.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_49.cs new file mode 100644 index 0000000..7aae8ab --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_49.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 65)] +[MiscellaneousBits(65)] +[UnsafeValueType] +[DebugInfoInPDB] +[NativeCppClass] +internal struct _0024_TypeDescriptor_0024_extraBytes_49 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_50.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_50.cs new file mode 100644 index 0000000..6d3dde6 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_50.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 66)] +[MiscellaneousBits(65)] +[NativeCppClass] +[UnsafeValueType] +[DebugInfoInPDB] +internal struct _0024_TypeDescriptor_0024_extraBytes_50 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_51.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_51.cs new file mode 100644 index 0000000..7334f43 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_51.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 67)] +[DebugInfoInPDB] +[UnsafeValueType] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct _0024_TypeDescriptor_0024_extraBytes_51 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_52.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_52.cs new file mode 100644 index 0000000..de65980 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_52.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 68)] +[DebugInfoInPDB] +[UnsafeValueType] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct _0024_TypeDescriptor_0024_extraBytes_52 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_53.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_53.cs new file mode 100644 index 0000000..90fc6e3 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_53.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 69)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[UnsafeValueType] +[NativeCppClass] +internal struct _0024_TypeDescriptor_0024_extraBytes_53 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_54.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_54.cs new file mode 100644 index 0000000..705ab91 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_54.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 70)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +[UnsafeValueType] +internal struct _0024_TypeDescriptor_0024_extraBytes_54 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_55.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_55.cs new file mode 100644 index 0000000..14b7bab --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_55.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 71)] +[UnsafeValueType] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct _0024_TypeDescriptor_0024_extraBytes_55 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_56.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_56.cs new file mode 100644 index 0000000..e80c894 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_56.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 72)] +[UnsafeValueType] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct _0024_TypeDescriptor_0024_extraBytes_56 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_57.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_57.cs new file mode 100644 index 0000000..fe188fa --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_57.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 73)] +[UnsafeValueType] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct _0024_TypeDescriptor_0024_extraBytes_57 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_58.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_58.cs new file mode 100644 index 0000000..c2e7f3e --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_58.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 74)] +[UnsafeValueType] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct _0024_TypeDescriptor_0024_extraBytes_58 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_60.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_60.cs new file mode 100644 index 0000000..aed997e --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_60.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 76)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +[UnsafeValueType] +internal struct _0024_TypeDescriptor_0024_extraBytes_60 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_61.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_61.cs new file mode 100644 index 0000000..4eee063 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_61.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 77)] +[UnsafeValueType] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct _0024_TypeDescriptor_0024_extraBytes_61 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_65.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_65.cs new file mode 100644 index 0000000..ae6203f --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_65.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 81)] +[UnsafeValueType] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct _0024_TypeDescriptor_0024_extraBytes_65 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_66.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_66.cs new file mode 100644 index 0000000..757758d --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_66.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 82)] +[UnsafeValueType] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct _0024_TypeDescriptor_0024_extraBytes_66 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_70.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_70.cs new file mode 100644 index 0000000..1cb5f84 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_70.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 86)] +[MiscellaneousBits(65)] +[NativeCppClass] +[UnsafeValueType] +[DebugInfoInPDB] +internal struct _0024_TypeDescriptor_0024_extraBytes_70 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_71.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_71.cs new file mode 100644 index 0000000..c57ea87 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_71.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 87)] +[MiscellaneousBits(65)] +[UnsafeValueType] +[NativeCppClass] +[DebugInfoInPDB] +internal struct _0024_TypeDescriptor_0024_extraBytes_71 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_TypeDescriptor-_extraBytes_90.cs b/ZuneDBApi/-_TypeDescriptor-_extraBytes_90.cs new file mode 100644 index 0000000..620abe9 --- /dev/null +++ b/ZuneDBApi/-_TypeDescriptor-_extraBytes_90.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 106)] +[UnsafeValueType] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct _0024_TypeDescriptor_0024_extraBytes_90 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_16.cs b/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_16.cs new file mode 100644 index 0000000..71abba2 --- /dev/null +++ b/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_16.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 20)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct _0024_s__RTTIBaseClassArray_0024_extraBytes_16 +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_24.cs b/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_24.cs new file mode 100644 index 0000000..ce9027c --- /dev/null +++ b/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_24.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 28)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct _0024_s__RTTIBaseClassArray_0024_extraBytes_24 +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_40.cs b/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_40.cs new file mode 100644 index 0000000..36a9f28 --- /dev/null +++ b/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_40.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 44)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct _0024_s__RTTIBaseClassArray_0024_extraBytes_40 +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_56.cs b/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_56.cs new file mode 100644 index 0000000..71193ee --- /dev/null +++ b/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_56.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 60)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct _0024_s__RTTIBaseClassArray_0024_extraBytes_56 +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_72.cs b/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_72.cs new file mode 100644 index 0000000..89ecdde --- /dev/null +++ b/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_72.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 76)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct _0024_s__RTTIBaseClassArray_0024_extraBytes_72 +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_8.cs b/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_8.cs new file mode 100644 index 0000000..82216d1 --- /dev/null +++ b/ZuneDBApi/-_s__RTTIBaseClassArray-_extraBytes_8.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 12)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct _0024_s__RTTIBaseClassArray_0024_extraBytes_8 +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/AppMetadata.cs b/ZuneDBApi/AppMetadata.cs new file mode 100644 index 0000000..066e15b --- /dev/null +++ b/ZuneDBApi/AppMetadata.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 144)] +[DebugInfoInPDB] +[UnsafeValueType] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct AppMetadata +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/AuthorizationStatus.cs b/ZuneDBApi/AuthorizationStatus.cs new file mode 100644 index 0000000..53531b2 --- /dev/null +++ b/ZuneDBApi/AuthorizationStatus.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal enum AuthorizationStatus +{ + +} diff --git a/ZuneDBApi/CComPropVariant.cs b/ZuneDBApi/CComPropVariant.cs new file mode 100644 index 0000000..057168e --- /dev/null +++ b/ZuneDBApi/CComPropVariant.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 24)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal struct CComPropVariant +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrMgd-DeviceMediator-.cs b/ZuneDBApi/CComPtrMgd-DeviceMediator-.cs new file mode 100644 index 0000000..45421d3 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-DeviceMediator-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CDeviceMediator_003E : IDisposable +{ + public unsafe DeviceMediator* p = null; + + private void _007ECComPtrMgd_003CDeviceMediator_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CDeviceMediator_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + DeviceMediator* ptr = p; + DeviceMediator* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + public unsafe implicit operator DeviceMediator*() + { + return p; + } + + [SpecialName] + public unsafe DeviceMediator* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe DeviceMediator* op_Assign(DeviceMediator* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CDeviceMediator_003E() + { + Dispose(false); + } +} diff --git a/ZuneDBApi/CComPtrMgd-EndpointHostManagerMediator-.cs b/ZuneDBApi/CComPtrMgd-EndpointHostManagerMediator-.cs new file mode 100644 index 0000000..fd24945 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-EndpointHostManagerMediator-.cs @@ -0,0 +1,84 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CEndpointHostManagerMediator_003E : IDisposable +{ + public unsafe EndpointHostManagerMediator* p = null; + + private void _007ECComPtrMgd_003CEndpointHostManagerMediator_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CEndpointHostManagerMediator_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + EndpointHostManagerMediator* ptr = p; + EndpointHostManagerMediator* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CEndpointHostManagerMediator_003E() + { + Dispose(false); + } + + [SpecialName] + public unsafe EndpointHostManagerMediator* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe EndpointHostManagerMediator* op_Assign(EndpointHostManagerMediator* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool operator !() + { + return (long)(nint)p == 0; + } +} diff --git a/ZuneDBApi/CComPtrMgd-GasGaugeMediator-.cs b/ZuneDBApi/CComPtrMgd-GasGaugeMediator-.cs new file mode 100644 index 0000000..e3a17a8 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-GasGaugeMediator-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CGasGaugeMediator_003E : IDisposable +{ + public unsafe GasGaugeMediator* p = null; + + private void _007ECComPtrMgd_003CGasGaugeMediator_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CGasGaugeMediator_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + GasGaugeMediator* ptr = p; + GasGaugeMediator* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CGasGaugeMediator_003E() + { + Dispose(false); + } + + public unsafe implicit operator GasGaugeMediator*() + { + return p; + } + + [SpecialName] + public unsafe GasGaugeMediator* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe GasGaugeMediator* op_Assign(GasGaugeMediator* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } +} diff --git a/ZuneDBApi/CComPtrMgd-IAccountManagement-.cs b/ZuneDBApi/CComPtrMgd-IAccountManagement-.cs new file mode 100644 index 0000000..bf7e3c9 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IAccountManagement-.cs @@ -0,0 +1,84 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIAccountManagement_003E : IDisposable +{ + public unsafe IAccountManagement* p = null; + + private void _007ECComPtrMgd_003CIAccountManagement_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIAccountManagement_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IAccountManagement* ptr = p; + IAccountManagement* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + [SpecialName] + public unsafe IAccountManagement* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IAccountManagement* op_Assign(IAccountManagement* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + [return: MarshalAs(UnmanagedType.U1)] + public static unsafe bool operator !(CComPtrMgd_003CIAccountManagement_003E self) + { + return (long)(nint)self.p == 0; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIAccountManagement_003E() + { + Dispose(false); + } +} diff --git a/ZuneDBApi/CComPtrMgd-IAsyncCallback-.cs b/ZuneDBApi/CComPtrMgd-IAsyncCallback-.cs new file mode 100644 index 0000000..21e08a5 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IAsyncCallback-.cs @@ -0,0 +1,72 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIAsyncCallback_003E : IDisposable +{ + public unsafe IAsyncCallback* p = null; + + private void _007ECComPtrMgd_003CIAsyncCallback_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIAsyncCallback_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IAsyncCallback* ptr = p; + IAsyncCallback* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + [SpecialName] + public unsafe IAsyncCallback* op_Assign(IAsyncCallback* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIAsyncCallback_003E() + { + Dispose(false); + } +} diff --git a/ZuneDBApi/CComPtrMgd-IEndpointHost-.cs b/ZuneDBApi/CComPtrMgd-IEndpointHost-.cs new file mode 100644 index 0000000..b03190e --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IEndpointHost-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIEndpointHost_003E : IDisposable +{ + public unsafe IEndpointHost* p = null; + + private void _007ECComPtrMgd_003CIEndpointHost_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIEndpointHost_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IEndpointHost* ptr = p; + IEndpointHost* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + public unsafe implicit operator IEndpointHost*() + { + return p; + } + + [SpecialName] + public unsafe IEndpointHost* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IEndpointHost* op_Assign(IEndpointHost* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIEndpointHost_003E() + { + Dispose(false); + } +} diff --git a/ZuneDBApi/CComPtrMgd-IEndpointHostManager-.cs b/ZuneDBApi/CComPtrMgd-IEndpointHostManager-.cs new file mode 100644 index 0000000..dd4fbbf --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IEndpointHostManager-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIEndpointHostManager_003E : IDisposable +{ + public unsafe IEndpointHostManager* p = null; + + private void _007ECComPtrMgd_003CIEndpointHostManager_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIEndpointHostManager_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IEndpointHostManager* ptr = p; + IEndpointHostManager* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIEndpointHostManager_003E() + { + Dispose(false); + } + + public unsafe implicit operator IEndpointHostManager*() + { + return p; + } + + [SpecialName] + public unsafe IEndpointHostManager* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IEndpointHostManager* op_Assign(IEndpointHostManager* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } +} diff --git a/ZuneDBApi/CComPtrMgd-IFirmwareMetadata-.cs b/ZuneDBApi/CComPtrMgd-IFirmwareMetadata-.cs new file mode 100644 index 0000000..19d32fb --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IFirmwareMetadata-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIFirmwareMetadata_003E : IDisposable +{ + public unsafe IFirmwareMetadata* p = null; + + private void _007ECComPtrMgd_003CIFirmwareMetadata_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIFirmwareMetadata_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IFirmwareMetadata* ptr = p; + IFirmwareMetadata* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIFirmwareMetadata_003E() + { + Dispose(false); + } + + public unsafe implicit operator IFirmwareMetadata*() + { + return p; + } + + [SpecialName] + public unsafe IFirmwareMetadata* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IFirmwareMetadata* op_Assign(IFirmwareMetadata* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } +} diff --git a/ZuneDBApi/CComPtrMgd-IFirmwareRestorePoint-.cs b/ZuneDBApi/CComPtrMgd-IFirmwareRestorePoint-.cs new file mode 100644 index 0000000..955b969 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IFirmwareRestorePoint-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIFirmwareRestorePoint_003E : IDisposable +{ + public unsafe IFirmwareRestorePoint* p = null; + + private void _007ECComPtrMgd_003CIFirmwareRestorePoint_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIFirmwareRestorePoint_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IFirmwareRestorePoint* ptr = p; + IFirmwareRestorePoint* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIFirmwareRestorePoint_003E() + { + Dispose(false); + } + + public unsafe implicit operator IFirmwareRestorePoint*() + { + return p; + } + + [SpecialName] + public unsafe IFirmwareRestorePoint* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IFirmwareRestorePoint* op_Assign(IFirmwareRestorePoint* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } +} diff --git a/ZuneDBApi/CComPtrMgd-IFirmwareRestorePointCollection-.cs b/ZuneDBApi/CComPtrMgd-IFirmwareRestorePointCollection-.cs new file mode 100644 index 0000000..31545ee --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IFirmwareRestorePointCollection-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIFirmwareRestorePointCollection_003E : IDisposable +{ + public unsafe IFirmwareRestorePointCollection* p = null; + + private void _007ECComPtrMgd_003CIFirmwareRestorePointCollection_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIFirmwareRestorePointCollection_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IFirmwareRestorePointCollection* ptr = p; + IFirmwareRestorePointCollection* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIFirmwareRestorePointCollection_003E() + { + Dispose(false); + } + + public unsafe implicit operator IFirmwareRestorePointCollection*() + { + return p; + } + + [SpecialName] + public unsafe IFirmwareRestorePointCollection* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IFirmwareRestorePointCollection* op_Assign(IFirmwareRestorePointCollection* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } +} diff --git a/ZuneDBApi/CComPtrMgd-IFirmwareRestorer-.cs b/ZuneDBApi/CComPtrMgd-IFirmwareRestorer-.cs new file mode 100644 index 0000000..ae11597 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IFirmwareRestorer-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIFirmwareRestorer_003E : IDisposable +{ + public unsafe IFirmwareRestorer* p = null; + + private void _007ECComPtrMgd_003CIFirmwareRestorer_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIFirmwareRestorer_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IFirmwareRestorer* ptr = p; + IFirmwareRestorer* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIFirmwareRestorer_003E() + { + Dispose(false); + } + + public unsafe implicit operator IFirmwareRestorer*() + { + return p; + } + + [SpecialName] + public unsafe IFirmwareRestorer* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IFirmwareRestorer* op_Assign(IFirmwareRestorer* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } +} diff --git a/ZuneDBApi/CComPtrMgd-IFirmwareUpdateCallbackData-.cs b/ZuneDBApi/CComPtrMgd-IFirmwareUpdateCallbackData-.cs new file mode 100644 index 0000000..e0ee7c9 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IFirmwareUpdateCallbackData-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIFirmwareUpdateCallbackData_003E : IDisposable +{ + public unsafe IFirmwareUpdateCallbackData* p = null; + + private void _007ECComPtrMgd_003CIFirmwareUpdateCallbackData_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIFirmwareUpdateCallbackData_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IFirmwareUpdateCallbackData* ptr = p; + IFirmwareUpdateCallbackData* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIFirmwareUpdateCallbackData_003E() + { + Dispose(false); + } + + public unsafe implicit operator IFirmwareUpdateCallbackData*() + { + return p; + } + + [SpecialName] + public unsafe IFirmwareUpdateCallbackData* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IFirmwareUpdateCallbackData* op_Assign(IFirmwareUpdateCallbackData* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } +} diff --git a/ZuneDBApi/CComPtrMgd-IFirmwareUpdateCollection-.cs b/ZuneDBApi/CComPtrMgd-IFirmwareUpdateCollection-.cs new file mode 100644 index 0000000..068b6e4 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IFirmwareUpdateCollection-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIFirmwareUpdateCollection_003E : IDisposable +{ + public unsafe IFirmwareUpdateCollection* p = null; + + private void _007ECComPtrMgd_003CIFirmwareUpdateCollection_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIFirmwareUpdateCollection_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IFirmwareUpdateCollection* ptr = p; + IFirmwareUpdateCollection* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIFirmwareUpdateCollection_003E() + { + Dispose(false); + } + + public unsafe implicit operator IFirmwareUpdateCollection*() + { + return p; + } + + [SpecialName] + public unsafe IFirmwareUpdateCollection* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IFirmwareUpdateCollection* op_Assign(IFirmwareUpdateCollection* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } +} diff --git a/ZuneDBApi/CComPtrMgd-IFirmwareUpdateErrorInfo-.cs b/ZuneDBApi/CComPtrMgd-IFirmwareUpdateErrorInfo-.cs new file mode 100644 index 0000000..45b5a9a --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IFirmwareUpdateErrorInfo-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIFirmwareUpdateErrorInfo_003E : IDisposable +{ + public unsafe IFirmwareUpdateErrorInfo* p = null; + + private void _007ECComPtrMgd_003CIFirmwareUpdateErrorInfo_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIFirmwareUpdateErrorInfo_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IFirmwareUpdateErrorInfo* ptr = p; + IFirmwareUpdateErrorInfo* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIFirmwareUpdateErrorInfo_003E() + { + Dispose(false); + } + + public unsafe implicit operator IFirmwareUpdateErrorInfo*() + { + return p; + } + + [SpecialName] + public unsafe IFirmwareUpdateErrorInfo* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IFirmwareUpdateErrorInfo* op_Assign(IFirmwareUpdateErrorInfo* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } +} diff --git a/ZuneDBApi/CComPtrMgd-IFirmwareUpdater-.cs b/ZuneDBApi/CComPtrMgd-IFirmwareUpdater-.cs new file mode 100644 index 0000000..a0d1b0e --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IFirmwareUpdater-.cs @@ -0,0 +1,113 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIFirmwareUpdater_003E : IDisposable +{ + public unsafe IFirmwareUpdater* p = null; + + private void _007ECComPtrMgd_003CIFirmwareUpdater_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIFirmwareUpdater_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IFirmwareUpdater* ptr = p; + IFirmwareUpdater* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIFirmwareUpdater_003E() + { + Dispose(false); + } + + public unsafe implicit operator IFirmwareUpdater*() + { + return p; + } + + [SpecialName] + public unsafe IFirmwareUpdater* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IFirmwareUpdater* op_Assign(IFirmwareUpdater* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + public unsafe int CopyTo(IFirmwareUpdater** ppT) + { + //IL_0020: Expected I8, but got I + //IL_0036: Expected I, but got I8 + if (ppT == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 168u); + return -2147467261; + } + *(long*)ppT = (nint)p; + IFirmwareUpdater* ptr = p; + if (ptr != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 8)))((nint)ptr); + } + return 0; + } + + public unsafe int QueryInterface_003CIFirmwareUpdater2_003E(IFirmwareUpdater2** pp) + { + //IL_002e: Expected I, but got I8 + IFirmwareUpdater* ptr = p; + if (ptr == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 186u); + return -2147467261; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(ulong*)ptr)))((nint)ptr, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._GUID_f066fc29_e525_4ddc_abe6_5213d22c14d2), (void**)pp); + } +} diff --git a/ZuneDBApi/CComPtrMgd-IGasGauge-.cs b/ZuneDBApi/CComPtrMgd-IGasGauge-.cs new file mode 100644 index 0000000..106af96 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IGasGauge-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIGasGauge_003E : IDisposable +{ + public unsafe IGasGauge* p = null; + + private void _007ECComPtrMgd_003CIGasGauge_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIGasGauge_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IGasGauge* ptr = p; + IGasGauge* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIGasGauge_003E() + { + Dispose(false); + } + + public unsafe implicit operator IGasGauge*() + { + return p; + } + + [SpecialName] + public unsafe IGasGauge* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IGasGauge* op_Assign(IGasGauge* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } +} diff --git a/ZuneDBApi/CComPtrMgd-IJumpList-.cs b/ZuneDBApi/CComPtrMgd-IJumpList-.cs new file mode 100644 index 0000000..a648b7d --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IJumpList-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIJumpList_003E : IDisposable +{ + public unsafe IJumpList* p = null; + + private void _007ECComPtrMgd_003CIJumpList_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIJumpList_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IJumpList* ptr = p; + IJumpList* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + public unsafe implicit operator IJumpList*() + { + return p; + } + + [SpecialName] + public unsafe IJumpList* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IJumpList* op_Assign(IJumpList* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIJumpList_003E() + { + Dispose(false); + } +} diff --git a/ZuneDBApi/CComPtrMgd-IJumpListCategory-.cs b/ZuneDBApi/CComPtrMgd-IJumpListCategory-.cs new file mode 100644 index 0000000..ffe705d --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IJumpListCategory-.cs @@ -0,0 +1,78 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIJumpListCategory_003E : IDisposable +{ + public unsafe IJumpListCategory* p = null; + + private void _007ECComPtrMgd_003CIJumpListCategory_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIJumpListCategory_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IJumpListCategory* ptr = p; + IJumpListCategory* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + [SpecialName] + public unsafe IJumpListCategory* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IJumpListCategory* op_Assign(IJumpListCategory* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIJumpListCategory_003E() + { + Dispose(false); + } +} diff --git a/ZuneDBApi/CComPtrMgd-IJumpListEntry-.cs b/ZuneDBApi/CComPtrMgd-IJumpListEntry-.cs new file mode 100644 index 0000000..d3cab0c --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IJumpListEntry-.cs @@ -0,0 +1,78 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIJumpListEntry_003E : IDisposable +{ + public unsafe IJumpListEntry* p = null; + + private void _007ECComPtrMgd_003CIJumpListEntry_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIJumpListEntry_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IJumpListEntry* ptr = p; + IJumpListEntry* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + [SpecialName] + public unsafe IJumpListEntry* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IJumpListEntry* op_Assign(IJumpListEntry* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIJumpListEntry_003E() + { + Dispose(false); + } +} diff --git a/ZuneDBApi/CComPtrMgd-IPassportIdentity-.cs b/ZuneDBApi/CComPtrMgd-IPassportIdentity-.cs new file mode 100644 index 0000000..281dbdf --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IPassportIdentity-.cs @@ -0,0 +1,95 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIPassportIdentity_003E : IDisposable +{ + public unsafe IPassportIdentity* p = null; + + private void _007ECComPtrMgd_003CIPassportIdentity_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIPassportIdentity_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IPassportIdentity* ptr = p; + IPassportIdentity* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIPassportIdentity_003E() + { + Dispose(false); + } + + public unsafe implicit operator IPassportIdentity*() + { + return p; + } + + [SpecialName] + public unsafe IPassportIdentity* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IPassportIdentity* op_Assign(IPassportIdentity* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + public unsafe int QueryInterface_003CIPassportIdentity_003E(IPassportIdentity** pp) + { + //IL_002e: Expected I, but got I8 + IPassportIdentity* ptr = p; + if (ptr == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 186u); + return -2147467261; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(ulong*)ptr)))((nint)ptr, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._GUID_655b468c_1224_467d_b720_3bac7f99b6ba), (void**)pp); + } +} diff --git a/ZuneDBApi/CComPtrMgd-IQuickMixSession-.cs b/ZuneDBApi/CComPtrMgd-IQuickMixSession-.cs new file mode 100644 index 0000000..0178333 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IQuickMixSession-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIQuickMixSession_003E : IDisposable +{ + public unsafe IQuickMixSession* p = null; + + private void _007ECComPtrMgd_003CIQuickMixSession_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIQuickMixSession_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IQuickMixSession* ptr = p; + IQuickMixSession* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + public unsafe implicit operator IQuickMixSession*() + { + return p; + } + + [SpecialName] + public unsafe IQuickMixSession* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IQuickMixSession* op_Assign(IQuickMixSession* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIQuickMixSession_003E() + { + Dispose(false); + } +} diff --git a/ZuneDBApi/CComPtrMgd-IServiceError-.cs b/ZuneDBApi/CComPtrMgd-IServiceError-.cs new file mode 100644 index 0000000..d9a4880 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IServiceError-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIServiceError_003E : IDisposable +{ + public unsafe IServiceError* p = null; + + private void _007ECComPtrMgd_003CIServiceError_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIServiceError_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IServiceError* ptr = p; + IServiceError* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIServiceError_003E() + { + Dispose(false); + } + + public unsafe implicit operator IServiceError*() + { + return p; + } + + [SpecialName] + public unsafe IServiceError* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IServiceError* op_Assign(IServiceError* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } +} diff --git a/ZuneDBApi/CComPtrMgd-ISyncEngine-.cs b/ZuneDBApi/CComPtrMgd-ISyncEngine-.cs new file mode 100644 index 0000000..5e4f58d --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-ISyncEngine-.cs @@ -0,0 +1,84 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CISyncEngine_003E : IDisposable +{ + public unsafe ISyncEngine* p = null; + + private void _007ECComPtrMgd_003CISyncEngine_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CISyncEngine_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + ISyncEngine* ptr = p; + ISyncEngine* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + public unsafe implicit operator ISyncEngine*() + { + return p; + } + + [SpecialName] + public unsafe ISyncEngine* op_MemberSelection() + { + return p; + } + + public unsafe void Attach(ISyncEngine* p2) + { + //IL_001b: Expected I, but got I8 + ISyncEngine* ptr = p; + if (ptr != p2) + { + if (ptr != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 16)))((nint)ptr); + } + p = p2; + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CISyncEngine_003E() + { + Dispose(false); + } +} diff --git a/ZuneDBApi/CComPtrMgd-ISyncRulesView-.cs b/ZuneDBApi/CComPtrMgd-ISyncRulesView-.cs new file mode 100644 index 0000000..e66053e --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-ISyncRulesView-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CISyncRulesView_003E : IDisposable +{ + public unsafe ISyncRulesView* p = null; + + private void _007ECComPtrMgd_003CISyncRulesView_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CISyncRulesView_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + ISyncRulesView* ptr = p; + ISyncRulesView* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CISyncRulesView_003E() + { + Dispose(false); + } + + public unsafe implicit operator ISyncRulesView*() + { + return p; + } + + [SpecialName] + public unsafe ISyncRulesView* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe ISyncRulesView* op_Assign(ISyncRulesView* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } +} diff --git a/ZuneDBApi/CComPtrMgd-IThumbBar-.cs b/ZuneDBApi/CComPtrMgd-IThumbBar-.cs new file mode 100644 index 0000000..cf214c0 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IThumbBar-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIThumbBar_003E : IDisposable +{ + public unsafe IThumbBar* p = null; + + private void _007ECComPtrMgd_003CIThumbBar_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIThumbBar_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IThumbBar* ptr = p; + IThumbBar* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIThumbBar_003E() + { + Dispose(false); + } + + public unsafe implicit operator IThumbBar*() + { + return p; + } + + [SpecialName] + public unsafe IThumbBar* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IThumbBar* op_Assign(IThumbBar* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } +} diff --git a/ZuneDBApi/CComPtrMgd-IThumbBarButton-.cs b/ZuneDBApi/CComPtrMgd-IThumbBarButton-.cs new file mode 100644 index 0000000..167ebf5 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IThumbBarButton-.cs @@ -0,0 +1,78 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIThumbBarButton_003E : IDisposable +{ + public unsafe IThumbBarButton* p = null; + + private void _007ECComPtrMgd_003CIThumbBarButton_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIThumbBarButton_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IThumbBarButton* ptr = p; + IThumbBarButton* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIThumbBarButton_003E() + { + Dispose(false); + } + + [SpecialName] + public unsafe IThumbBarButton* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IThumbBarButton* op_Assign(IThumbBarButton* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } +} diff --git a/ZuneDBApi/CComPtrMgd-IUpdateManager-.cs b/ZuneDBApi/CComPtrMgd-IUpdateManager-.cs new file mode 100644 index 0000000..38642b0 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IUpdateManager-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIUpdateManager_003E : IDisposable +{ + public unsafe IUpdateManager* p = null; + + private void _007ECComPtrMgd_003CIUpdateManager_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIUpdateManager_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IUpdateManager* ptr = p; + IUpdateManager* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + public unsafe implicit operator IUpdateManager*() + { + return p; + } + + [SpecialName] + public unsafe IUpdateManager* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IUpdateManager* op_Assign(IUpdateManager* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIUpdateManager_003E() + { + Dispose(false); + } +} diff --git a/ZuneDBApi/CComPtrMgd-IWinLiveAvailableInformation-.cs b/ZuneDBApi/CComPtrMgd-IWinLiveAvailableInformation-.cs new file mode 100644 index 0000000..e2d828e --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IWinLiveAvailableInformation-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIWinLiveAvailableInformation_003E : IDisposable +{ + public unsafe IWinLiveAvailableInformation* p = null; + + private void _007ECComPtrMgd_003CIWinLiveAvailableInformation_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIWinLiveAvailableInformation_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IWinLiveAvailableInformation* ptr = p; + IWinLiveAvailableInformation* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + public unsafe implicit operator IWinLiveAvailableInformation*() + { + return p; + } + + [SpecialName] + public unsafe IWinLiveAvailableInformation* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IWinLiveAvailableInformation* op_Assign(IWinLiveAvailableInformation* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIWinLiveAvailableInformation_003E() + { + Dispose(false); + } +} diff --git a/ZuneDBApi/CComPtrMgd-IWinLiveInformation-.cs b/ZuneDBApi/CComPtrMgd-IWinLiveInformation-.cs new file mode 100644 index 0000000..f17c938 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IWinLiveInformation-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIWinLiveInformation_003E : IDisposable +{ + public unsafe IWinLiveInformation* p = null; + + private void _007ECComPtrMgd_003CIWinLiveInformation_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIWinLiveInformation_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IWinLiveInformation* ptr = p; + IWinLiveInformation* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + public unsafe implicit operator IWinLiveInformation*() + { + return p; + } + + [SpecialName] + public unsafe IWinLiveInformation* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IWinLiveInformation* op_Assign(IWinLiveInformation* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIWinLiveInformation_003E() + { + Dispose(false); + } +} diff --git a/ZuneDBApi/CComPtrMgd-IWinLiveSignup-.cs b/ZuneDBApi/CComPtrMgd-IWinLiveSignup-.cs new file mode 100644 index 0000000..1c1e6e9 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IWinLiveSignup-.cs @@ -0,0 +1,84 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIWinLiveSignup_003E : IDisposable +{ + public unsafe IWinLiveSignup* p = null; + + private void _007ECComPtrMgd_003CIWinLiveSignup_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIWinLiveSignup_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IWinLiveSignup* ptr = p; + IWinLiveSignup* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + [SpecialName] + public unsafe IWinLiveSignup* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IWinLiveSignup* op_Assign(IWinLiveSignup* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool operator !() + { + return (long)(nint)p == 0; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIWinLiveSignup_003E() + { + Dispose(false); + } +} diff --git a/ZuneDBApi/CComPtrMgd-IWlanProvider-.cs b/ZuneDBApi/CComPtrMgd-IWlanProvider-.cs new file mode 100644 index 0000000..3e57169 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IWlanProvider-.cs @@ -0,0 +1,84 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIWlanProvider_003E : IDisposable +{ + public unsafe IWlanProvider* p = null; + + private void _007ECComPtrMgd_003CIWlanProvider_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIWlanProvider_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IWlanProvider* ptr = p; + IWlanProvider* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + [SpecialName] + public unsafe IWlanProvider* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IWlanProvider* op_Assign(IWlanProvider* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool operator !() + { + return (long)(nint)p == 0; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIWlanProvider_003E() + { + Dispose(false); + } +} diff --git a/ZuneDBApi/CComPtrMgd-IZuneMBRBandwidthTest-.cs b/ZuneDBApi/CComPtrMgd-IZuneMBRBandwidthTest-.cs new file mode 100644 index 0000000..f5e0902 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-IZuneMBRBandwidthTest-.cs @@ -0,0 +1,97 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CIZuneMBRBandwidthTest_003E : IDisposable +{ + public unsafe IZuneMBRBandwidthTest* p = null; + + private void _007ECComPtrMgd_003CIZuneMBRBandwidthTest_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CIZuneMBRBandwidthTest_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IZuneMBRBandwidthTest* ptr = p; + IZuneMBRBandwidthTest* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + public unsafe implicit operator IZuneMBRBandwidthTest*() + { + return p; + } + + [SpecialName] + public unsafe IZuneMBRBandwidthTest* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe IZuneMBRBandwidthTest* op_Assign(IZuneMBRBandwidthTest* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + public unsafe void Attach(IZuneMBRBandwidthTest* p2) + { + //IL_001b: Expected I, but got I8 + IZuneMBRBandwidthTest* ptr = p; + if (ptr != p2) + { + if (ptr != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 16)))((nint)ptr); + } + p = p2; + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CIZuneMBRBandwidthTest_003E() + { + Dispose(false); + } +} diff --git a/ZuneDBApi/CComPtrMgd-MicrosoftZuneLibrary.cs b/ZuneDBApi/CComPtrMgd-MicrosoftZuneLibrary.cs new file mode 100644 index 0000000..6e46b84 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-MicrosoftZuneLibrary.cs @@ -0,0 +1,90 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using MicrosoftZuneLibrary; + +internal class CComPtrMgd_003CMicrosoftZuneLibrary_003A_003AFirmwareUpdateMediator_003E : IDisposable +{ + public unsafe FirmwareUpdateMediator* p = null; + + private void _007ECComPtrMgd_003CMicrosoftZuneLibrary_003A_003AFirmwareUpdateMediator_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CMicrosoftZuneLibrary_003A_003AFirmwareUpdateMediator_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + FirmwareUpdateMediator* ptr = p; + FirmwareUpdateMediator* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CMicrosoftZuneLibrary_003A_003AFirmwareUpdateMediator_003E() + { + Dispose(false); + } + + public unsafe implicit operator FirmwareUpdateMediator*() + { + return p; + } + + [SpecialName] + public unsafe FirmwareUpdateMediator* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe FirmwareUpdateMediator* op_Assign(FirmwareUpdateMediator* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool operator !() + { + return (long)(nint)p == 0; + } +} diff --git a/ZuneDBApi/CComPtrMgd-MicrosoftZunePlayback.cs b/ZuneDBApi/CComPtrMgd-MicrosoftZunePlayback.cs new file mode 100644 index 0000000..8597271 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-MicrosoftZunePlayback.cs @@ -0,0 +1,78 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using MicrosoftZunePlayback; + +internal class CComPtrMgd_003CMicrosoftZunePlayback_003A_003ACMBRBandwidthTestEventSink_003E : IDisposable +{ + public unsafe CMBRBandwidthTestEventSink* p = null; + + private void _007ECComPtrMgd_003CMicrosoftZunePlayback_003A_003ACMBRBandwidthTestEventSink_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CMicrosoftZunePlayback_003A_003ACMBRBandwidthTestEventSink_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + CMBRBandwidthTestEventSink* ptr = p; + CMBRBandwidthTestEventSink* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + public unsafe implicit operator CMBRBandwidthTestEventSink*() + { + return p; + } + + [SpecialName] + public unsafe CMBRBandwidthTestEventSink* op_Assign(CMBRBandwidthTestEventSink* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CMicrosoftZunePlayback_003A_003ACMBRBandwidthTestEventSink_003E() + { + Dispose(false); + } +} diff --git a/ZuneDBApi/CComPtrMgd-SyncRulesViewMediator-.cs b/ZuneDBApi/CComPtrMgd-SyncRulesViewMediator-.cs new file mode 100644 index 0000000..97a10c5 --- /dev/null +++ b/ZuneDBApi/CComPtrMgd-SyncRulesViewMediator-.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +internal class CComPtrMgd_003CSyncRulesViewMediator_003E : IDisposable +{ + public unsafe SyncRulesViewMediator* p = null; + + private void _007ECComPtrMgd_003CSyncRulesViewMediator_003E() + { + Release(); + } + + private void _0021CComPtrMgd_003CSyncRulesViewMediator_003E() + { + Release(); + } + + public unsafe void Release() + { + //IL_0014: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + SyncRulesViewMediator* ptr = p; + SyncRulesViewMediator* ptr2 = ptr; + if (ptr != null) + { + p = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + Release(); + return; + } + try + { + Release(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CComPtrMgd_003CSyncRulesViewMediator_003E() + { + Dispose(false); + } + + public unsafe implicit operator SyncRulesViewMediator*() + { + return p; + } + + [SpecialName] + public unsafe SyncRulesViewMediator* op_MemberSelection() + { + return p; + } + + [SpecialName] + public unsafe SyncRulesViewMediator* op_Assign(SyncRulesViewMediator* lp) + { + //IL_001c: Expected I, but got I8 + Release(); + p = lp; + if (lp != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)lp + 8)))((nint)lp); + } + return p; + } +} diff --git a/ZuneDBApi/CComPtrNtv-DeviceMediator-.cs b/ZuneDBApi/CComPtrNtv-DeviceMediator-.cs new file mode 100644 index 0000000..c92fd8f --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-DeviceMediator-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CDeviceMediator_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IAccountManagement-.cs b/ZuneDBApi/CComPtrNtv-IAccountManagement-.cs new file mode 100644 index 0000000..f985709 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IAccountManagement-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal struct CComPtrNtv_003CIAccountManagement_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IAccountUser-.cs b/ZuneDBApi/CComPtrNtv-IAccountUser-.cs new file mode 100644 index 0000000..5b65bf0 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IAccountUser-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIAccountUser_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IAddress-.cs b/ZuneDBApi/CComPtrNtv-IAddress-.cs new file mode 100644 index 0000000..ba30fd5 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IAddress-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIAddress_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IAppCollection-.cs b/ZuneDBApi/CComPtrNtv-IAppCollection-.cs new file mode 100644 index 0000000..9247725 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IAppCollection-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIAppCollection_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IAsyncCallback-.cs b/ZuneDBApi/CComPtrNtv-IAsyncCallback-.cs new file mode 100644 index 0000000..453cbcf --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IAsyncCallback-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal struct CComPtrNtv_003CIAsyncCallback_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IAvailableZuneTagInformation-.cs b/ZuneDBApi/CComPtrNtv-IAvailableZuneTagInformation-.cs new file mode 100644 index 0000000..b52be38 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IAvailableZuneTagInformation-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIAvailableZuneTagInformation_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IContextData-.cs b/ZuneDBApi/CComPtrNtv-IContextData-.cs new file mode 100644 index 0000000..5036339 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IContextData-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal struct CComPtrNtv_003CIContextData_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-ICreditCard-.cs b/ZuneDBApi/CComPtrNtv-ICreditCard-.cs new file mode 100644 index 0000000..c008d13 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-ICreditCard-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CICreditCard_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IDeviceAssetProvider-.cs b/ZuneDBApi/CComPtrNtv-IDeviceAssetProvider-.cs new file mode 100644 index 0000000..64ab820 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IDeviceAssetProvider-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal struct CComPtrNtv_003CIDeviceAssetProvider_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IDeviceContentProvider-.cs b/ZuneDBApi/CComPtrNtv-IDeviceContentProvider-.cs new file mode 100644 index 0000000..8bacdb5 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IDeviceContentProvider-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIDeviceContentProvider_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IDeviceSyncRulesProvider-.cs b/ZuneDBApi/CComPtrNtv-IDeviceSyncRulesProvider-.cs new file mode 100644 index 0000000..2778b73 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IDeviceSyncRulesProvider-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal struct CComPtrNtv_003CIDeviceSyncRulesProvider_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IDownloadManager-.cs b/ZuneDBApi/CComPtrNtv-IDownloadManager-.cs new file mode 100644 index 0000000..28dd7d1 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IDownloadManager-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIDownloadManager_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IDownloadTask-.cs b/ZuneDBApi/CComPtrNtv-IDownloadTask-.cs new file mode 100644 index 0000000..f516f21 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IDownloadTask-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct CComPtrNtv_003CIDownloadTask_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IEndpointHost-.cs b/ZuneDBApi/CComPtrNtv-IEndpointHost-.cs new file mode 100644 index 0000000..dd85bb4 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IEndpointHost-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIEndpointHost_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IEndpointHostCollection-.cs b/ZuneDBApi/CComPtrNtv-IEndpointHostCollection-.cs new file mode 100644 index 0000000..59f9a0b --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IEndpointHostCollection-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct CComPtrNtv_003CIEndpointHostCollection_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IEndpointHostManager-.cs b/ZuneDBApi/CComPtrNtv-IEndpointHostManager-.cs new file mode 100644 index 0000000..75dbddd --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IEndpointHostManager-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal struct CComPtrNtv_003CIEndpointHostManager_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IEndpointManager-.cs b/ZuneDBApi/CComPtrNtv-IEndpointManager-.cs new file mode 100644 index 0000000..3784a5e --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IEndpointManager-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct CComPtrNtv_003CIEndpointManager_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IEndpointNotification-.cs b/ZuneDBApi/CComPtrNtv-IEndpointNotification-.cs new file mode 100644 index 0000000..82560a3 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IEndpointNotification-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal struct CComPtrNtv_003CIEndpointNotification_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IFirmwareMetadata-.cs b/ZuneDBApi/CComPtrNtv-IFirmwareMetadata-.cs new file mode 100644 index 0000000..618856a --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IFirmwareMetadata-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal struct CComPtrNtv_003CIFirmwareMetadata_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IFirmwareRestorePoint-.cs b/ZuneDBApi/CComPtrNtv-IFirmwareRestorePoint-.cs new file mode 100644 index 0000000..a9c3831 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IFirmwareRestorePoint-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal struct CComPtrNtv_003CIFirmwareRestorePoint_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IFirmwareRestorePointCollection-.cs b/ZuneDBApi/CComPtrNtv-IFirmwareRestorePointCollection-.cs new file mode 100644 index 0000000..b87741a --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IFirmwareRestorePointCollection-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIFirmwareRestorePointCollection_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IFirmwareRestorer-.cs b/ZuneDBApi/CComPtrNtv-IFirmwareRestorer-.cs new file mode 100644 index 0000000..c1e2fc4 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IFirmwareRestorer-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct CComPtrNtv_003CIFirmwareRestorer_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IFirmwareUpdateCallback-.cs b/ZuneDBApi/CComPtrNtv-IFirmwareUpdateCallback-.cs new file mode 100644 index 0000000..d571023 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IFirmwareUpdateCallback-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIFirmwareUpdateCallback_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IFirmwareUpdateCallbackData-.cs b/ZuneDBApi/CComPtrNtv-IFirmwareUpdateCallbackData-.cs new file mode 100644 index 0000000..4c015b0 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IFirmwareUpdateCallbackData-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal struct CComPtrNtv_003CIFirmwareUpdateCallbackData_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IFirmwareUpdateCollection-.cs b/ZuneDBApi/CComPtrNtv-IFirmwareUpdateCollection-.cs new file mode 100644 index 0000000..3b4bfb7 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IFirmwareUpdateCollection-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal struct CComPtrNtv_003CIFirmwareUpdateCollection_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IFirmwareUpdateErrorInfo-.cs b/ZuneDBApi/CComPtrNtv-IFirmwareUpdateErrorInfo-.cs new file mode 100644 index 0000000..c3a4dd3 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IFirmwareUpdateErrorInfo-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal struct CComPtrNtv_003CIFirmwareUpdateErrorInfo_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IFirmwareUpdateNotification-.cs b/ZuneDBApi/CComPtrNtv-IFirmwareUpdateNotification-.cs new file mode 100644 index 0000000..1ebe193 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IFirmwareUpdateNotification-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIFirmwareUpdateNotification_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IFirmwareUpdater-.cs b/ZuneDBApi/CComPtrNtv-IFirmwareUpdater-.cs new file mode 100644 index 0000000..53da62f --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IFirmwareUpdater-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal struct CComPtrNtv_003CIFirmwareUpdater_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IFirmwareUpdater2-.cs b/ZuneDBApi/CComPtrNtv-IFirmwareUpdater2-.cs new file mode 100644 index 0000000..a4c2737 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IFirmwareUpdater2-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal struct CComPtrNtv_003CIFirmwareUpdater2_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IGasGauge-.cs b/ZuneDBApi/CComPtrNtv-IGasGauge-.cs new file mode 100644 index 0000000..0d7187a --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IGasGauge-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal struct CComPtrNtv_003CIGasGauge_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IGetOfferDetailsCallback-.cs b/ZuneDBApi/CComPtrNtv-IGetOfferDetailsCallback-.cs new file mode 100644 index 0000000..0c06856 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IGetOfferDetailsCallback-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct CComPtrNtv_003CIGetOfferDetailsCallback_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IHttpWebRequest-.cs b/ZuneDBApi/CComPtrNtv-IHttpWebRequest-.cs new file mode 100644 index 0000000..806bd88 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IHttpWebRequest-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal struct CComPtrNtv_003CIHttpWebRequest_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IJumpListCategory-.cs b/ZuneDBApi/CComPtrNtv-IJumpListCategory-.cs new file mode 100644 index 0000000..15f6abf --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IJumpListCategory-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal struct CComPtrNtv_003CIJumpListCategory_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IJumpListEntry-.cs b/ZuneDBApi/CComPtrNtv-IJumpListEntry-.cs new file mode 100644 index 0000000..4ad1b87 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IJumpListEntry-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIJumpListEntry_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IMSMediaSchemaPropertySet-.cs b/ZuneDBApi/CComPtrNtv-IMSMediaSchemaPropertySet-.cs new file mode 100644 index 0000000..7b00ec0 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IMSMediaSchemaPropertySet-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal struct CComPtrNtv_003CIMSMediaSchemaPropertySet_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IMediaRights-.cs b/ZuneDBApi/CComPtrNtv-IMediaRights-.cs new file mode 100644 index 0000000..361b9ae --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IMediaRights-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct CComPtrNtv_003CIMediaRights_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IMessagingCallback-.cs b/ZuneDBApi/CComPtrNtv-IMessagingCallback-.cs new file mode 100644 index 0000000..6600e75 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IMessagingCallback-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIMessagingCallback_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IMetadataManager-.cs b/ZuneDBApi/CComPtrNtv-IMetadataManager-.cs new file mode 100644 index 0000000..15d136e --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IMetadataManager-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct CComPtrNtv_003CIMetadataManager_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IMusicAlbumCollection-.cs b/ZuneDBApi/CComPtrNtv-IMusicAlbumCollection-.cs new file mode 100644 index 0000000..d48405c --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IMusicAlbumCollection-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal struct CComPtrNtv_003CIMusicAlbumCollection_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IMusicTrackCollection-.cs b/ZuneDBApi/CComPtrNtv-IMusicTrackCollection-.cs new file mode 100644 index 0000000..1fb214c --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IMusicTrackCollection-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIMusicTrackCollection_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-INewsletterSettings-.cs b/ZuneDBApi/CComPtrNtv-INewsletterSettings-.cs new file mode 100644 index 0000000..715e4dd --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-INewsletterSettings-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal struct CComPtrNtv_003CINewsletterSettings_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IPassportIdentity-.cs b/ZuneDBApi/CComPtrNtv-IPassportIdentity-.cs new file mode 100644 index 0000000..859ed45 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IPassportIdentity-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal struct CComPtrNtv_003CIPassportIdentity_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IPriceInfo-.cs b/ZuneDBApi/CComPtrNtv-IPriceInfo-.cs new file mode 100644 index 0000000..92f9913 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IPriceInfo-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal struct CComPtrNtv_003CIPriceInfo_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IPrivacySettings-.cs b/ZuneDBApi/CComPtrNtv-IPrivacySettings-.cs new file mode 100644 index 0000000..ed6a7d3 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IPrivacySettings-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIPrivacySettings_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IQueryPropertyBag-.cs b/ZuneDBApi/CComPtrNtv-IQueryPropertyBag-.cs new file mode 100644 index 0000000..42ab7ce --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IQueryPropertyBag-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIQueryPropertyBag_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IQuickMixManager-.cs b/ZuneDBApi/CComPtrNtv-IQuickMixManager-.cs new file mode 100644 index 0000000..12df75e --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IQuickMixManager-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIQuickMixManager_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IQuickMixSession-.cs b/ZuneDBApi/CComPtrNtv-IQuickMixSession-.cs new file mode 100644 index 0000000..578bd5c --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IQuickMixSession-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal struct CComPtrNtv_003CIQuickMixSession_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IService-.cs b/ZuneDBApi/CComPtrNtv-IService-.cs new file mode 100644 index 0000000..1f01efa --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IService-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct CComPtrNtv_003CIService_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IServiceError-.cs b/ZuneDBApi/CComPtrNtv-IServiceError-.cs new file mode 100644 index 0000000..f975a55 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IServiceError-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIServiceError_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-ISignInState-.cs b/ZuneDBApi/CComPtrNtv-ISignInState-.cs new file mode 100644 index 0000000..9c95c34 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-ISignInState-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CISignInState_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-ISyncEngine-.cs b/ZuneDBApi/CComPtrNtv-ISyncEngine-.cs new file mode 100644 index 0000000..3a7c586 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-ISyncEngine-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct CComPtrNtv_003CISyncEngine_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-ISyncRulesView-.cs b/ZuneDBApi/CComPtrNtv-ISyncRulesView-.cs new file mode 100644 index 0000000..29f300d --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-ISyncRulesView-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CISyncRulesView_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-ITelemetryManager-.cs b/ZuneDBApi/CComPtrNtv-ITelemetryManager-.cs new file mode 100644 index 0000000..ffb763d --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-ITelemetryManager-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CITelemetryManager_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IThumbBarButton-.cs b/ZuneDBApi/CComPtrNtv-IThumbBarButton-.cs new file mode 100644 index 0000000..9d2b644 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IThumbBarButton-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct CComPtrNtv_003CIThumbBarButton_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-ITokenDetails-.cs b/ZuneDBApi/CComPtrNtv-ITokenDetails-.cs new file mode 100644 index 0000000..3c7ab4b --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-ITokenDetails-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CITokenDetails_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-ITunerConfig-.cs b/ZuneDBApi/CComPtrNtv-ITunerConfig-.cs new file mode 100644 index 0000000..06dc37b --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-ITunerConfig-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal struct CComPtrNtv_003CITunerConfig_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IUnknown-.cs b/ZuneDBApi/CComPtrNtv-IUnknown-.cs new file mode 100644 index 0000000..8e79425 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IUnknown-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal struct CComPtrNtv_003CIUnknown_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IUpdateManager-.cs b/ZuneDBApi/CComPtrNtv-IUpdateManager-.cs new file mode 100644 index 0000000..de9f690 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IUpdateManager-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal struct CComPtrNtv_003CIUpdateManager_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IVideoCollection-.cs b/ZuneDBApi/CComPtrNtv-IVideoCollection-.cs new file mode 100644 index 0000000..8a4b107 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IVideoCollection-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal struct CComPtrNtv_003CIVideoCollection_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IWin7ShellManager-.cs b/ZuneDBApi/CComPtrNtv-IWin7ShellManager-.cs new file mode 100644 index 0000000..a17ea21 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IWin7ShellManager-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIWin7ShellManager_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IWinLiveAvailableInformation-.cs b/ZuneDBApi/CComPtrNtv-IWinLiveAvailableInformation-.cs new file mode 100644 index 0000000..734d295 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IWinLiveAvailableInformation-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal struct CComPtrNtv_003CIWinLiveAvailableInformation_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IWinLiveInformation-.cs b/ZuneDBApi/CComPtrNtv-IWinLiveInformation-.cs new file mode 100644 index 0000000..68ed77f --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IWinLiveInformation-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal struct CComPtrNtv_003CIWinLiveInformation_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IWinLiveSignup-.cs b/ZuneDBApi/CComPtrNtv-IWinLiveSignup-.cs new file mode 100644 index 0000000..7b41efb --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IWinLiveSignup-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIWinLiveSignup_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IWlanProvider-.cs b/ZuneDBApi/CComPtrNtv-IWlanProvider-.cs new file mode 100644 index 0000000..95d0d0d --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IWlanProvider-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal struct CComPtrNtv_003CIWlanProvider_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IZuneNetCommentResponse-.cs b/ZuneDBApi/CComPtrNtv-IZuneNetCommentResponse-.cs new file mode 100644 index 0000000..8e7bcd3 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IZuneNetCommentResponse-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIZuneNetCommentResponse_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-IZuneWebHost-.cs b/ZuneDBApi/CComPtrNtv-IZuneWebHost-.cs new file mode 100644 index 0000000..f729234 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-IZuneWebHost-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CIZuneWebHost_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CComPtrNtv-Microsoft.cs b/ZuneDBApi/CComPtrNtv-Microsoft.cs new file mode 100644 index 0000000..f5442c8 --- /dev/null +++ b/ZuneDBApi/CComPtrNtv-Microsoft.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct CComPtrNtv_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003AITrayDeskBand_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/CSchemaMap.cs b/ZuneDBApi/CSchemaMap.cs new file mode 100644 index 0000000..dc378cb --- /dev/null +++ b/ZuneDBApi/CSchemaMap.cs @@ -0,0 +1,19 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 1)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct CSchemaMap +{ + [StructLayout(LayoutKind.Sequential, Size = 32)] + [NativeCppClass] + [MiscellaneousBits(65)] + [DebugInfoInPDB] + internal struct _SCHEMAMAPENTRY + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/CallbackPriorityManaged.cs b/ZuneDBApi/CallbackPriorityManaged.cs new file mode 100644 index 0000000..fe83118 --- /dev/null +++ b/ZuneDBApi/CallbackPriorityManaged.cs @@ -0,0 +1,5 @@ +public enum CallbackPriorityManaged +{ + eCallbackPriorityIdle = 1, + eCallbackPriorityNormal = 0 +} diff --git a/ZuneDBApi/DBPropertyRequestStruct.cs b/ZuneDBApi/DBPropertyRequestStruct.cs new file mode 100644 index 0000000..a12829f --- /dev/null +++ b/ZuneDBApi/DBPropertyRequestStruct.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 32)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct DBPropertyRequestStruct +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/DBPropertySubmitStruct.cs b/ZuneDBApi/DBPropertySubmitStruct.cs new file mode 100644 index 0000000..feee230 --- /dev/null +++ b/ZuneDBApi/DBPropertySubmitStruct.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 16)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct DBPropertySubmitStruct +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/DOT11_AUTH_CIPHER_PAIR.cs b/ZuneDBApi/DOT11_AUTH_CIPHER_PAIR.cs new file mode 100644 index 0000000..9b05b57 --- /dev/null +++ b/ZuneDBApi/DOT11_AUTH_CIPHER_PAIR.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct DOT11_AUTH_CIPHER_PAIR +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/DRMQueryState.cs b/ZuneDBApi/DRMQueryState.cs new file mode 100644 index 0000000..a6771c9 --- /dev/null +++ b/ZuneDBApi/DRMQueryState.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal enum DRMQueryState +{ + +} diff --git a/ZuneDBApi/DataStructs/IntSet.cs b/ZuneDBApi/DataStructs/IntSet.cs new file mode 100644 index 0000000..07ccb62 --- /dev/null +++ b/ZuneDBApi/DataStructs/IntSet.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace DataStructs +{ + [StructLayout(LayoutKind.Sequential, Size = 32)] + [NativeCppClass] + [MiscellaneousBits(64)] + [DebugInfoInPDB] + internal struct IntSet + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/DeviceAccess/EProgressEventType.cs b/ZuneDBApi/DeviceAccess/EProgressEventType.cs new file mode 100644 index 0000000..854e3c9 --- /dev/null +++ b/ZuneDBApi/DeviceAccess/EProgressEventType.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +namespace DeviceAccess +{ + [DebugInfoInPDB] + [MiscellaneousBits(64)] + [NativeCppClass] + internal enum EProgressEventType + { + + } +} diff --git a/ZuneDBApi/DeviceAssetColors.cs b/ZuneDBApi/DeviceAssetColors.cs new file mode 100644 index 0000000..2fda517 --- /dev/null +++ b/ZuneDBApi/DeviceAssetColors.cs @@ -0,0 +1,8 @@ +public enum DeviceAssetColors +{ + eDeviceAssetColorCount = 4, + eDeviceAssetColorHoverText = 3, + eDeviceAssetColorGasGaugeText = 2, + eDeviceAssetColorDark = 1, + eDeviceAssetColorLight = 0 +} diff --git a/ZuneDBApi/DeviceAssetImages.cs b/ZuneDBApi/DeviceAssetImages.cs new file mode 100644 index 0000000..21cd4a8 --- /dev/null +++ b/ZuneDBApi/DeviceAssetImages.cs @@ -0,0 +1,27 @@ +public enum DeviceAssetImages +{ + eDeviceAssetImageCount = 23, + eDeviceAssetImageBackground = 22, + eDeviceAssetImageMediumUnsupported = 21, + eDeviceAssetImageMediumDefault = 20, + eDeviceAssetImageLargeDisconnected = 19, + eDeviceAssetImageLargeDefault = 18, + eDeviceAssetImageDisconnectedDragDark = 17, + eDeviceAssetImageDisconnectedClickDark = 0x10, + eDeviceAssetImageDisconnectedHoverDark = 0xF, + eDeviceAssetImageDisconnectedDefaultDark = 14, + eDeviceAssetImageDisconnectedDrag = 13, + eDeviceAssetImageDisconnectedClick = 12, + eDeviceAssetImageDisconnectedHover = 11, + eDeviceAssetImageDisconnectedDefault = 10, + eDeviceAssetImageConnectedSyncingDark = 9, + eDeviceAssetImageConnectedDragDark = 8, + eDeviceAssetImageConnectedClickDark = 7, + eDeviceAssetImageConnectedHoverDark = 6, + eDeviceAssetImageConnectedDefaultDark = 5, + eDeviceAssetImageConnectedSyncing = 4, + eDeviceAssetImageConnectedDrag = 3, + eDeviceAssetImageConnectedClick = 2, + eDeviceAssetImageConnectedHover = 1, + eDeviceAssetImageConnectedDefault = 0 +} diff --git a/ZuneDBApi/DeviceMediator.cs b/ZuneDBApi/DeviceMediator.cs new file mode 100644 index 0000000..9f0a6fa --- /dev/null +++ b/ZuneDBApi/DeviceMediator.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 72)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal struct DeviceMediator +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/DynamicArray-gcroot-Microsoft.cs b/ZuneDBApi/DynamicArray-gcroot-Microsoft.cs new file mode 100644 index 0000000..2c76e5c --- /dev/null +++ b/ZuneDBApi/DynamicArray-gcroot-Microsoft.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 24)] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal struct DynamicArray_003Cgcroot_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003ADownloadManagerUpdateHandler_0020_005E_003E_0020_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/DynamicArray-int-.cs b/ZuneDBApi/DynamicArray-int-.cs new file mode 100644 index 0000000..b3e4216 --- /dev/null +++ b/ZuneDBApi/DynamicArray-int-.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 24)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal struct DynamicArray_003Cint_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/DynamicArray-unsigned-short---.cs b/ZuneDBApi/DynamicArray-unsigned-short---.cs new file mode 100644 index 0000000..6a089ad --- /dev/null +++ b/ZuneDBApi/DynamicArray-unsigned-short---.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 24)] +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct DynamicArray_003Cunsigned_0020short_0020_002A_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/EAccountUserType.cs b/ZuneDBApi/EAccountUserType.cs new file mode 100644 index 0000000..d767d1c --- /dev/null +++ b/ZuneDBApi/EAccountUserType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal enum EAccountUserType +{ + +} diff --git a/ZuneDBApi/EAuthenticationScheme.cs b/ZuneDBApi/EAuthenticationScheme.cs new file mode 100644 index 0000000..a7071c4 --- /dev/null +++ b/ZuneDBApi/EAuthenticationScheme.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal enum EAuthenticationScheme +{ + +} diff --git a/ZuneDBApi/EAutoPlaylistRuleOperators.cs b/ZuneDBApi/EAutoPlaylistRuleOperators.cs new file mode 100644 index 0000000..c2b56e6 --- /dev/null +++ b/ZuneDBApi/EAutoPlaylistRuleOperators.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal enum EAutoPlaylistRuleOperators +{ + +} diff --git a/ZuneDBApi/EBillingOfferType.cs b/ZuneDBApi/EBillingOfferType.cs new file mode 100644 index 0000000..7236660 --- /dev/null +++ b/ZuneDBApi/EBillingOfferType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal enum EBillingOfferType +{ + +} diff --git a/ZuneDBApi/EBillingPaymentType.cs b/ZuneDBApi/EBillingPaymentType.cs new file mode 100644 index 0000000..9716849 --- /dev/null +++ b/ZuneDBApi/EBillingPaymentType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal enum EBillingPaymentType +{ + +} diff --git a/ZuneDBApi/ECallbackPriorityNative.cs b/ZuneDBApi/ECallbackPriorityNative.cs new file mode 100644 index 0000000..0210355 --- /dev/null +++ b/ZuneDBApi/ECallbackPriorityNative.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal enum ECallbackPriorityNative +{ + +} diff --git a/ZuneDBApi/EClientTypeFlags.cs b/ZuneDBApi/EClientTypeFlags.cs new file mode 100644 index 0000000..de05dc3 --- /dev/null +++ b/ZuneDBApi/EClientTypeFlags.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal enum EClientTypeFlags +{ + +} diff --git a/ZuneDBApi/ECompletionAction.cs b/ZuneDBApi/ECompletionAction.cs new file mode 100644 index 0000000..08dcec9 --- /dev/null +++ b/ZuneDBApi/ECompletionAction.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal enum ECompletionAction +{ + +} diff --git a/ZuneDBApi/EConcernType.cs b/ZuneDBApi/EConcernType.cs new file mode 100644 index 0000000..78454cc --- /dev/null +++ b/ZuneDBApi/EConcernType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal enum EConcernType +{ + +} diff --git a/ZuneDBApi/EContentType.cs b/ZuneDBApi/EContentType.cs new file mode 100644 index 0000000..4090d00 --- /dev/null +++ b/ZuneDBApi/EContentType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal enum EContentType +{ + +} diff --git a/ZuneDBApi/EContentUriFlags.cs b/ZuneDBApi/EContentUriFlags.cs new file mode 100644 index 0000000..279240c --- /dev/null +++ b/ZuneDBApi/EContentUriFlags.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal enum EContentUriFlags +{ + +} diff --git a/ZuneDBApi/ECreditCardType.cs b/ZuneDBApi/ECreditCardType.cs new file mode 100644 index 0000000..262d5b3 --- /dev/null +++ b/ZuneDBApi/ECreditCardType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal enum ECreditCardType +{ + +} diff --git a/ZuneDBApi/EDefinition.cs b/ZuneDBApi/EDefinition.cs new file mode 100644 index 0000000..b938dc8 --- /dev/null +++ b/ZuneDBApi/EDefinition.cs @@ -0,0 +1,12 @@ +public enum EDefinition +{ + eDefinitionHigh1080p = 8, + eDefinitionHigh1080i = 7, + eDefinitionHigh720p = 6, + eDefinitionEnhanced576p = 5, + eDefinitionEnhanced480p = 4, + eDefinitionStandard576i = 3, + eDefinitionStandard480i = 2, + eDefinitionLow = 1, + eDefinitionUnknown = 0 +} diff --git a/ZuneDBApi/EDeviceAcquisitionMode.cs b/ZuneDBApi/EDeviceAcquisitionMode.cs new file mode 100644 index 0000000..3d59376 --- /dev/null +++ b/ZuneDBApi/EDeviceAcquisitionMode.cs @@ -0,0 +1,8 @@ +public enum EDeviceAcquisitionMode +{ + eDeviceAcquisitionModePreloadedOnDevice = 3, + eDeviceAcquisitionModeSavedContent = 2, + eDeviceAcquisitionModeCameraRoll = 1, + eDeviceAcquisitionModeNone = 0, + eDeviceAcquisitionModeInvalid = -1 +} diff --git a/ZuneDBApi/EDeviceContentProperty.cs b/ZuneDBApi/EDeviceContentProperty.cs new file mode 100644 index 0000000..206c44f --- /dev/null +++ b/ZuneDBApi/EDeviceContentProperty.cs @@ -0,0 +1,22 @@ +public enum EDeviceContentProperty +{ + eDeviceContentPropertyCount = 17, + eDeviceContentPropertyNeedsTranscode = 0x10, + eDeviceContentPropertyAcquisitionMode = 0xF, + eDeviceContentPropertyLastConnectTime = 14, + eDeviceContentPropertyAppVersion = 13, + eDeviceContentPropertyContentType = 12, + eDeviceContentPropertyInCloud = 11, + eDeviceContentPropertyInLibrary = 10, + eDeviceContentPropertyFileSize = 9, + eDeviceContentPropertyDeviceFolderName = 8, + eDeviceContentPropertyDeviceFilePath = 7, + eDeviceContentPropertyLibraryFilePath = 6, + eDeviceContentPropertyPendingOrder = 5, + eDeviceContentPropertyPendingOperation = 4, + eDeviceContentPropertySyncResult = 3, + eDeviceContentPropertySyncOperation = 2, + eDeviceContentPropertySyncDate = 1, + eDeviceContentPropertyObjectId = 0, + eDeviceContentPropertyInvalid = -1 +} diff --git a/ZuneDBApi/EDeviceContentType.cs b/ZuneDBApi/EDeviceContentType.cs new file mode 100644 index 0000000..b28963c --- /dev/null +++ b/ZuneDBApi/EDeviceContentType.cs @@ -0,0 +1,9 @@ +public enum EDeviceContentType +{ + eDeviceContentTypeStructural = 4, + eDeviceContentTypeEmpty = 3, + eDeviceContentTypeClip = 2, + eDeviceContentTypeProtected = 1, + eDeviceContentTypeClear = 0, + eDeviceContentTypeInvalid = -1 +} diff --git a/ZuneDBApi/EDeviceSyncRuleType.cs b/ZuneDBApi/EDeviceSyncRuleType.cs new file mode 100644 index 0000000..c3712cf --- /dev/null +++ b/ZuneDBApi/EDeviceSyncRuleType.cs @@ -0,0 +1,11 @@ +public enum EDeviceSyncRuleType +{ + eDeviceSyncRuleTypeCount = 6, + eDeviceSyncRuleTypeSyncEpisodesCount = 5, + eDeviceSyncRuleTypeNone = 4, + eDeviceSyncRuleTypeFirstUnplayed = 3, + eDeviceSyncRuleTypeAllUnplayed = 2, + eDeviceSyncRuleTypeExclude = 1, + eDeviceSyncRuleTypeIncludeAll = 0, + eDeviceSyncRuleTypeInvalid = -1 +} diff --git a/ZuneDBApi/EDownloadContextEvent.cs b/ZuneDBApi/EDownloadContextEvent.cs new file mode 100644 index 0000000..9ae917b --- /dev/null +++ b/ZuneDBApi/EDownloadContextEvent.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal enum EDownloadContextEvent +{ + +} diff --git a/ZuneDBApi/EDownloadFlags.cs b/ZuneDBApi/EDownloadFlags.cs new file mode 100644 index 0000000..98e4ecc --- /dev/null +++ b/ZuneDBApi/EDownloadFlags.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal enum EDownloadFlags +{ + +} diff --git a/ZuneDBApi/EDownloadTaskState.cs b/ZuneDBApi/EDownloadTaskState.cs new file mode 100644 index 0000000..5edef6d --- /dev/null +++ b/ZuneDBApi/EDownloadTaskState.cs @@ -0,0 +1,11 @@ +public enum EDownloadTaskState +{ + DLTaskNone = 7, + DLTaskComplete = 6, + DLTaskFailed = 5, + DLTaskCancelled = 4, + DLTaskPaused = 3, + DLTaskDownloading = 2, + DLTaskPending = 1, + DLTaskPendingAttach = 0 +} diff --git a/ZuneDBApi/EDownloadType.cs b/ZuneDBApi/EDownloadType.cs new file mode 100644 index 0000000..0530f85 --- /dev/null +++ b/ZuneDBApi/EDownloadType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal enum EDownloadType +{ + +} diff --git a/ZuneDBApi/EDrmState.cs b/ZuneDBApi/EDrmState.cs new file mode 100644 index 0000000..61d0266 --- /dev/null +++ b/ZuneDBApi/EDrmState.cs @@ -0,0 +1,11 @@ +public enum EDrmState +{ + eDrmStateMax = 41, + eDrmStateFree = 40, + eDrmStateProtected = 30, + eDrmStateExpiring = 26, + eDrmStateDeviceLicense = 23, + eDrmStateExpired = 20, + eDrmStateNoLicense = 10, + eDrmStateUnknown = 0 +} diff --git a/ZuneDBApi/EEndpointCapability.cs b/ZuneDBApi/EEndpointCapability.cs new file mode 100644 index 0000000..42c738a --- /dev/null +++ b/ZuneDBApi/EEndpointCapability.cs @@ -0,0 +1,29 @@ +public enum EEndpointCapability +{ + eEndpointCapabilityCount = 25, + eEndpointCapabilityUsageData = 24, + eEndpointCapabilityOOBECompleted = 23, + eEndpointCapabilityLiveId = 22, + eEndpointCapabilityVideoSupportsCustomProfiles = 21, + eEndpointCapabilityZuneTagLinking = 20, + eEndpointCapabilityWirelessSetupMethod2 = 19, + eEndpointCapabilityWirelessSetupMethod1 = 18, + eEndpointCapabilityVideoCamera = 17, + eEndpointCapabilityStillCamera = 0x10, + eEndpointCapabilityPhotoRotationTag = 0xF, + eEndpointCapabilityRestorePoint = 14, + eEndpointCapabilityMyPhoneLinks = 13, + eEndpointCapabilityFormat = 12, + eEndpointCapabilityPhoneCall = 11, + eEndpointCapabilityFirmwareUpdate = 10, + eEndpointCapabilityCloudSyncPreCheck = 9, + eEndpointCapabilityCloudSync = 8, + eEndpointCapabilityHdVideo = 7, + eEndpointCapabilityPaidApps = 6, + eEndpointCapabilitySyncApps = 5, + eEndpointCapabilityInstallFirmwareGames = 4, + eEndpointCapabilityRental = 3, + eEndpointCapabilityTvOut = 2, + eEndpointCapabilityWireless = 1, + eEndpointCapabilityDevice = 0 +} diff --git a/ZuneDBApi/EEndpointClass.cs b/ZuneDBApi/EEndpointClass.cs new file mode 100644 index 0000000..853cc58 --- /dev/null +++ b/ZuneDBApi/EEndpointClass.cs @@ -0,0 +1,10 @@ +public enum EEndpointClass +{ + eEndpointClassPmx = 5, + eEndpointClassWindowsPhone = 4, + eEndpointClassWM = 3, + eEndpointClassZuneHD = 2, + eEndpointClassClassic = 1, + eEndpointClassReserved = 0, + eEndpointClassInvalid = -1 +} diff --git a/ZuneDBApi/EEndpointCommonAction.cs b/ZuneDBApi/EEndpointCommonAction.cs new file mode 100644 index 0000000..bb771ff --- /dev/null +++ b/ZuneDBApi/EEndpointCommonAction.cs @@ -0,0 +1,17 @@ +public enum EEndpointCommonAction +{ + eEndpointCommonActionCount = 13, + eEndpointCommonActionForgetEndpoint = 12, + eEndpointCommonActionGetLocalizedDisplayName = 11, + eEndpointCommonActionGetSpecialFolderForPath = 10, + eEndpointCommonActionLocalizeDevicePath = 9, + eEndpointCommonActionMapLocalPathToDevice = 8, + eEndpointCommonActionForceAppUpdate = 7, + eEndpointCommonActionCommitFirmware = 6, + eEndpointCommonActionEnumerateContents = 5, + eEndpointCommonActionIngestMetadataAsync = 4, + eEndpointCommonActionHandleRemoval = 3, + eEndpointCommonActionFormat = 2, + eEndpointCommonActionCompleteConnection = 1, + eEndpointCommonActionEstablishConnection = 0 +} diff --git a/ZuneDBApi/EEndpointCommonProperty.cs b/ZuneDBApi/EEndpointCommonProperty.cs new file mode 100644 index 0000000..b2f4c47 --- /dev/null +++ b/ZuneDBApi/EEndpointCommonProperty.cs @@ -0,0 +1,59 @@ +public enum EEndpointCommonProperty +{ + eEndpointCommonPropertyCount = 55, + eEndpointCommonPropertyDeviceChallenge = 54, + eEndpointCommonPropertyMarketplaceCredentials = 53, + eEndpointCommonPropertyMyPhoneDeviceId = 52, + eEndpointCommonPropertyBridge = 51, + eEndpointCommonPropertyDRMUsageData = 50, + eEndpointCommonPropertyFirmwareUpdater = 49, + eEndpointCommonPropertyWlanProviderIfAvailable = 48, + eEndpointCommonPropertyWlanProvider = 47, + eEndpointCommonPropertyDeviceCaps = 46, + eEndpointCommonPropertyUserGuid = 45, + eEndpointCommonPropertyRelationshipId = 44, + eEndpointCommonPropertyDeviceSavedContentFolder = 43, + eEndpointCommonPropertyDeviceCameraRollFolder = 42, + eEndpointCommonPropertyLiveId = 41, + eEndpointCommonPropertyPicturesVideosViewUrl = 40, + eEndpointCommonPropertyPicturesVideosViewText = 39, + eEndpointCommonPropertyFamilyName = 38, + eEndpointCommonPropertyManufacturer = 37, + eEndpointCommonPropertyZuneTag = 36, + eEndpointCommonPropertyFirmwareVersion = 35, + eEndpointCommonPropertyEndpointId = 34, + eEndpointCommonPropertySerialNumber = 33, + eEndpointCommonPropertyServiceUniqueName = 0x20, + eEndpointCommonPropertyCanonicalName = 0x1F, + eEndpointCommonPropertyOwnerApplicationName = 30, + eEndpointCommonPropertyHardwareId = 29, + eEndpointCommonPropertyModelName = 28, + eEndpointCommonPropertyName = 27, + eEndpointCommonPropertyAvailableSpace = 26, + eEndpointCommonPropertyTotalSpace = 25, + eEndpointCommonPropertyColorId = 24, + eEndpointCommonPropertyPlaybackOutputSupport = 23, + eEndpointCommonPropertyCompatibilityStatus = 22, + eEndpointCommonPropertyEndpointStatus = 21, + eEndpointCommonPropertyLastFirmwareUpdateError = 20, + eEndpointCommonPropertyLastDownloadError = 19, + eEndpointCommonPropertyLastLoginError = 18, + eEndpointCommonPropertyTimeZoneBias = 17, + eEndpointCommonPropertyClassId = 0x10, + eEndpointCommonPropertyWatsonSetting = 0xF, + eEndpointCommonPropertyGeoId = 14, + eEndpointCommonPropertyStatedCapacity = 13, + eEndpointCommonPropertyBackgroundId = 12, + eEndpointCommonPropertyTattooId = 11, + eEndpointCommonPropertyPrimaryColorId = 10, + eEndpointCommonPropertyFamilyId = 9, + eEndpointCommonPropertyModelId = 8, + eEndpointCommonPropertyOOBECompleted = 7, + eEndpointCommonPropertyIsInStandardMode = 6, + eEndpointCommonPropertyIsConnectedWirelessly = 5, + eEndpointCommonPropertyIsConnected = 4, + eEndpointCommonPropertyIsFormatting = 3, + eEndpointCommonPropertyIsReady = 2, + eEndpointCommonPropertyPurchaseEnabled = 1, + eEndpointCommonPropertyIsAvailable = 0 +} diff --git a/ZuneDBApi/EEndpointCompatibilityStatus.cs b/ZuneDBApi/EEndpointCompatibilityStatus.cs new file mode 100644 index 0000000..d6c2e5e --- /dev/null +++ b/ZuneDBApi/EEndpointCompatibilityStatus.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal enum EEndpointCompatibilityStatus +{ + +} diff --git a/ZuneDBApi/EEndpointFamily.cs b/ZuneDBApi/EEndpointFamily.cs new file mode 100644 index 0000000..ab72532 --- /dev/null +++ b/ZuneDBApi/EEndpointFamily.cs @@ -0,0 +1,10 @@ +public enum EEndpointFamily +{ + eEndpointFamilyPmxTurtle = 8, + eEndpointFamilyPmxPure = 7, + eEndpointFamilyZuneHD = 6, + eEndpointFamilyDraco = 3, + eEndpointFamilyScorpius = 2, + eEndpointFamilyKeel = 0, + eEndpointFamilyInvalid = -1 +} diff --git a/ZuneDBApi/EEndpointHostAction.cs b/ZuneDBApi/EEndpointHostAction.cs new file mode 100644 index 0000000..8f31794 --- /dev/null +++ b/ZuneDBApi/EEndpointHostAction.cs @@ -0,0 +1,24 @@ +public enum EEndpointHostAction +{ + eEndpointHostActionCount = 21, + eEndpointHostActionResetGasGauge = 20, + eEndpointHostActionClearManualModeRules = 19, + eEndpointHostActionClearRules = 18, + eEndpointHostActionCancelBackgroundTranscode = 17, + eEndpointHostActionStartBackgroundTranscode = 0x10, + eEndpointHostActionCancelSync = 0xF, + eEndpointHostActionStartSyncNextNotify = 14, + eEndpointHostActionStartSync = 13, + eEndpointHostActionForgetEndpoint = 12, + eEndpointHostActionGetLocalizedDisplayName = 11, + eEndpointHostActionGetSpecialFolderForPath = 10, + eEndpointHostActionLocalizeDevicePath = 9, + eEndpointHostActionMapLocalPathToDevice = 8, + eEndpointHostActionForceAppUpdate = 7, + eEndpointHostActionCommitFirmware = 6, + eEndpointHostActionIngestMetadataAsync = 4, + eEndpointHostActionHandleRemoval = 3, + eEndpointHostActionFormat = 2, + eEndpointHostActionCompleteConnection = 1, + eEndpointHostActionEstablishConnection = 0 +} diff --git a/ZuneDBApi/EEndpointHostProperty.cs b/ZuneDBApi/EEndpointHostProperty.cs new file mode 100644 index 0000000..32787d2 --- /dev/null +++ b/ZuneDBApi/EEndpointHostProperty.cs @@ -0,0 +1,78 @@ +public enum EEndpointHostProperty +{ + eEndpointHostPropertyCount = 74, + eEndpointHostPropertyLastSyncTime = 73, + eEndpointHostPropertyLastConnectTime = 72, + eEndpointHostPropertyDeviceAssetProvider = 71, + eEndpointHostPropertySyncEngine = 70, + eEndpointHostPropertySyncEngineIfPresent = 69, + eEndpointHostPropertyCollapsedRulesView = 68, + eEndpointHostPropertyExpandedRulesView = 67, + eEndpointHostPropertyPredictedGasGauge = 66, + eEndpointHostPropertyActualGasGauge = 65, + eEndpointHostPropertyCachedDeviceCaps = 0x40, + eEndpointHostPropertySavedContentRelativeFolder = 0x3F, + eEndpointHostPropertyCameraRollRelativeFolder = 62, + eEndpointHostPropertyReadyForBackgroundTranscode = 61, + eEndpointHostPropertyAssociatedUserId = 60, + eEndpointHostPropertySyncRelationship = 59, + eEndpointHostPropertyDatabaseEndpointId = 58, + eEndpointHostPropertyLastBackgroundTranscodeTime = 57, + eEndpointHostPropertyPercentSpaceReserved = 56, + eEndpointHostPropertySyncing = 55, + eEndpointHostPropertyDeviceChallenge = 54, + eEndpointHostPropertyMarketplaceCredentials = 53, + eEndpointHostPropertyBridge = 51, + eEndpointHostPropertyDRMUsageData = 50, + eEndpointHostPropertyFirmwareUpdater = 49, + eEndpointHostPropertyWlanProviderIfAvailable = 48, + eEndpointHostPropertyWlanProvider = 47, + eEndpointHostPropertyDeviceCaps = 46, + eEndpointHostPropertyUserGuid = 45, + eEndpointHostPropertyRelationshipId = 44, + eEndpointHostPropertyMyPhoneDeviceId = 52, + eEndpointHostPropertyDeviceSavedContentFolder = 43, + eEndpointHostPropertyDeviceCameraRollFolder = 42, + eEndpointHostPropertyLiveId = 41, + eEndpointHostPropertyPicturesVideosViewUrl = 40, + eEndpointHostPropertyPicturesVideosViewText = 39, + eEndpointHostPropertyFamilyName = 38, + eEndpointHostPropertyManufacturer = 37, + eEndpointHostPropertyZuneTag = 36, + eEndpointHostPropertyFirmwareVersion = 35, + eEndpointHostPropertyEndpointId = 34, + eEndpointHostPropertySerialNumber = 33, + eEndpointHostPropertyServiceUniqueName = 0x20, + eEndpointHostPropertyCanonicalName = 0x1F, + eEndpointHostPropertyOwnerApplicationName = 30, + eEndpointHostPropertyHardwareId = 29, + eEndpointHostPropertyModelName = 28, + eEndpointHostPropertyName = 27, + eEndpointHostPropertyAvailableSpace = 26, + eEndpointHostPropertyTotalSpace = 25, + eEndpointHostPropertyColorId = 24, + eEndpointHostPropertyPlaybackOutputSupport = 23, + eEndpointHostPropertyCompatibilityStatus = 22, + eEndpointHostPropertyEndpointStatus = 21, + eEndpointHostPropertyLastFirmwareUpdateError = 20, + eEndpointHostPropertyLastDownloadError = 19, + eEndpointHostPropertyLastLoginError = 18, + eEndpointHostPropertyTimeZoneBias = 17, + eEndpointHostPropertyClassId = 0x10, + eEndpointHostPropertyWatsonSetting = 0xF, + eEndpointHostPropertyGeoId = 14, + eEndpointHostPropertyStatedCapacity = 13, + eEndpointHostPropertyBackgroundId = 12, + eEndpointHostPropertyTattooId = 11, + eEndpointHostPropertyPrimaryColorId = 10, + eEndpointHostPropertyFamilyId = 9, + eEndpointHostPropertyModelId = 8, + eEndpointHostPropertyOOBECompleted = 7, + eEndpointHostPropertyIsInStandardMode = 6, + eEndpointHostPropertyIsConnectedWirelessly = 5, + eEndpointHostPropertyIsConnected = 4, + eEndpointHostPropertyIsFormatting = 3, + eEndpointHostPropertyIsReady = 2, + eEndpointHostPropertyPurchaseEnabled = 1, + eEndpointHostPropertyIsAvailable = 0 +} diff --git a/ZuneDBApi/EEndpointHostSetting.cs b/ZuneDBApi/EEndpointHostSetting.cs new file mode 100644 index 0000000..de8a522 --- /dev/null +++ b/ZuneDBApi/EEndpointHostSetting.cs @@ -0,0 +1,16 @@ +public enum EEndpointHostSetting +{ + eEndpointHostSettingCount = 12, + eEndpointHostSavedDestinationFolder = 11, + eEndpointHostCameraRollDestinationFolder = 10, + eEndpointHostSettingDeleteUGCAfterSync = 9, + eEndpointHostSettingReverseSyncUGC = 8, + eEndpointHostSettingPhotoTranscodeSetting = 7, + eEndpointHostSettingPromptLink = 6, + eEndpointHostSettingVideoTranscodeOptimization = 5, + eEndpointHostSettingAudioTargetBitRate = 4, + eEndpointHostSettingAudioThresholdBitRate = 3, + eEndpointHostSettingDontSyncHatedContent = 2, + eEndpointHostSettingSyncOnConnect = 1, + eEndpointHostSettingPromptGuest = 0 +} diff --git a/ZuneDBApi/EEndpointStatus.cs b/ZuneDBApi/EEndpointStatus.cs new file mode 100644 index 0000000..6162a36 --- /dev/null +++ b/ZuneDBApi/EEndpointStatus.cs @@ -0,0 +1,19 @@ +public enum EEndpointStatus +{ + eEndpointStatusWPhoneIPDisabled = 0xF, + eEndpointStatusReadyForSync = 14, + eEndpointStatusEnumerationCompleted = 13, + eEndpointStatusEnumeratingContents = 12, + eEndpointStatusAvailable = 11, + eEndpointStatusProxyDetectionCompleted = 10, + eEndpointStatusDetectingProxy = 9, + eEndpointStatusAuthenticationCompleted = 8, + eEndpointStatusAuthenticationRequired = 7, + eEndpointStatusAuthenticationFailed = 6, + eEndpointStatusAvailabilityPending = 5, + eEndpointStatusInUse = 4, + eEndpointStatusConnected = 3, + eEndpointStatusHidden = 2, + eEndpointStatusNotPresent = 1, + eEndpointStatusUndefined = 0 +} diff --git a/ZuneDBApi/EFavoritesAction.cs b/ZuneDBApi/EFavoritesAction.cs new file mode 100644 index 0000000..42bb849 --- /dev/null +++ b/ZuneDBApi/EFavoritesAction.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal enum EFavoritesAction +{ + +} diff --git a/ZuneDBApi/EFeatures.cs b/ZuneDBApi/EFeatures.cs new file mode 100644 index 0000000..dc1e467 --- /dev/null +++ b/ZuneDBApi/EFeatures.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal enum EFeatures +{ + +} diff --git a/ZuneDBApi/EFirmwareUpdateOption.cs b/ZuneDBApi/EFirmwareUpdateOption.cs new file mode 100644 index 0000000..646bbfc --- /dev/null +++ b/ZuneDBApi/EFirmwareUpdateOption.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal enum EFirmwareUpdateOption +{ + +} diff --git a/ZuneDBApi/EFirmwareUpdateType.cs b/ZuneDBApi/EFirmwareUpdateType.cs new file mode 100644 index 0000000..53cb4c7 --- /dev/null +++ b/ZuneDBApi/EFirmwareUpdateType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal enum EFirmwareUpdateType +{ + +} diff --git a/ZuneDBApi/EFriendAction.cs b/ZuneDBApi/EFriendAction.cs new file mode 100644 index 0000000..f30f3f7 --- /dev/null +++ b/ZuneDBApi/EFriendAction.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal enum EFriendAction +{ + +} diff --git a/ZuneDBApi/EGetOffersFlags.cs b/ZuneDBApi/EGetOffersFlags.cs new file mode 100644 index 0000000..b1ecf7a --- /dev/null +++ b/ZuneDBApi/EGetOffersFlags.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal enum EGetOffersFlags +{ + +} diff --git a/ZuneDBApi/EHipType.cs b/ZuneDBApi/EHipType.cs new file mode 100644 index 0000000..087b773 --- /dev/null +++ b/ZuneDBApi/EHipType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal enum EHipType +{ + +} diff --git a/ZuneDBApi/EHttpCacheLevel.cs b/ZuneDBApi/EHttpCacheLevel.cs new file mode 100644 index 0000000..e799867 --- /dev/null +++ b/ZuneDBApi/EHttpCacheLevel.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal enum EHttpCacheLevel +{ + +} diff --git a/ZuneDBApi/EImmediateProcessState.cs b/ZuneDBApi/EImmediateProcessState.cs new file mode 100644 index 0000000..b6075a3 --- /dev/null +++ b/ZuneDBApi/EImmediateProcessState.cs @@ -0,0 +1,7 @@ +public enum EImmediateProcessState +{ + EImmediateProcessStateUnSpecified = 0x10, + EImmediateProcessStateCompleted = 2, + EImmediateProcessStateReady = 1, + EImmediateProcessStateNotReady = 0 +} diff --git a/ZuneDBApi/EImmediateSyncType.cs b/ZuneDBApi/EImmediateSyncType.cs new file mode 100644 index 0000000..5f3bbc9 --- /dev/null +++ b/ZuneDBApi/EImmediateSyncType.cs @@ -0,0 +1,6 @@ +public enum EImmediateSyncType +{ + EImmediateSyncTypeDelete = 2, + EImmediateSyncTypeReverseSync = 1, + EImmediateSyncTypeAcquiredItem = 0 +} diff --git a/ZuneDBApi/EItemDownloadState.cs b/ZuneDBApi/EItemDownloadState.cs new file mode 100644 index 0000000..d2d7ba3 --- /dev/null +++ b/ZuneDBApi/EItemDownloadState.cs @@ -0,0 +1,7 @@ +public enum EItemDownloadState +{ + eDownloadStateDownloaded = 3, + eDownloadStateDownloading = 2, + eDownloadStateError = 1, + eDownloadStateNone = 0 +} diff --git a/ZuneDBApi/EItemDownloadType.cs b/ZuneDBApi/EItemDownloadType.cs new file mode 100644 index 0000000..ea02a80 --- /dev/null +++ b/ZuneDBApi/EItemDownloadType.cs @@ -0,0 +1,5 @@ +public enum EItemDownloadType +{ + eDownloadTypeAutomatic = 1, + eDownloadTypeManual = 0 +} diff --git a/ZuneDBApi/ELibraryFilter.cs b/ZuneDBApi/ELibraryFilter.cs new file mode 100644 index 0000000..9f16cfe --- /dev/null +++ b/ZuneDBApi/ELibraryFilter.cs @@ -0,0 +1,6 @@ +public enum ELibraryFilter +{ + eLibraryFilterAll = -1, + eLibraryFilterInLibraryOnly = 1, + eLibraryFilterNotInLibrary = 0 +} diff --git a/ZuneDBApi/EListType.cs b/ZuneDBApi/EListType.cs new file mode 100644 index 0000000..933f825 --- /dev/null +++ b/ZuneDBApi/EListType.cs @@ -0,0 +1,28 @@ +public enum EListType +{ + eListTypeCount = 23, + eLicenseList = 22, + ePinList = 21, + eAppList = 20, + eUserCardPlaylistList = 19, + eUserCardList = 18, + eUserList = 17, + eSubscriptionList = 0x10, + eGenreList = 0xF, + eDiscMediaContentList = 14, + ePlaylistContentList = 13, + ePlaylistList = 12, + eDeviceContentList = 11, + eFolderList = 10, + eFileList = 9, + eDeviceFirmwareList = 8, + ePodcastEpisodeList = 7, + ePodcastList = 6, + eDeviceList = 5, + eVideoList = 4, + ePhotoList = 3, + eTrackList = 2, + eAlbumList = 1, + eArtistList = 0, + eListInvalid = -1 +} diff --git a/ZuneDBApi/EMediaCategories.cs b/ZuneDBApi/EMediaCategories.cs new file mode 100644 index 0000000..2eb5bc5 --- /dev/null +++ b/ZuneDBApi/EMediaCategories.cs @@ -0,0 +1,20 @@ +public enum EMediaCategories +{ + eMediaCategoryAppGame = 257, + eMediaCategoryAppApp = 0x100, + eMediaCategoryVideoShorts = 129, + eMediaCategoryVideoHomeVideo = 0x80, + eMediaCategoryAudioNextCategory = 0x40, + eMediaCategoryPhoto = 11, + eMediaCategoryVideoOther = 10, + eMediaCategoryVideoPodcast = 9, + eMediaCategoryVideoMovie = 8, + eMediaCategoryVideoMusic = 7, + eMediaCategoryVideoNews = 6, + eMediaCategoryVideoTV = 5, + eMediaCategoryAudioOther = 4, + eMediaCategoryAudioPodcast = 3, + eMediaCategoryAudioRadio = 2, + eMediaCategoryAudioMusic = 1, + eMediaCategoryAudioBook = 0 +} diff --git a/ZuneDBApi/EMediaFormat.cs b/ZuneDBApi/EMediaFormat.cs new file mode 100644 index 0000000..6321f6f --- /dev/null +++ b/ZuneDBApi/EMediaFormat.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal enum EMediaFormat +{ + +} diff --git a/ZuneDBApi/EMediaPaymentType.cs b/ZuneDBApi/EMediaPaymentType.cs new file mode 100644 index 0000000..72cb967 --- /dev/null +++ b/ZuneDBApi/EMediaPaymentType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal enum EMediaPaymentType +{ + +} diff --git a/ZuneDBApi/EMediaRelationsType.cs b/ZuneDBApi/EMediaRelationsType.cs new file mode 100644 index 0000000..9b0096d --- /dev/null +++ b/ZuneDBApi/EMediaRelationsType.cs @@ -0,0 +1,4 @@ +public enum EMediaRelationsType +{ + eMediaRelationsTypeQuickMixSeed = 1 +} diff --git a/ZuneDBApi/EMediaRights.cs b/ZuneDBApi/EMediaRights.cs new file mode 100644 index 0000000..7816a38 --- /dev/null +++ b/ZuneDBApi/EMediaRights.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal enum EMediaRights +{ + +} diff --git a/ZuneDBApi/EMediaStateType.cs b/ZuneDBApi/EMediaStateType.cs new file mode 100644 index 0000000..94c2a1e --- /dev/null +++ b/ZuneDBApi/EMediaStateType.cs @@ -0,0 +1,6 @@ +public enum EMediaStateType +{ + eMediaStateGetSyncState = 2, + eMediaStateGetSyncRules = 1, + eMediaStateInvalid = -1 +} diff --git a/ZuneDBApi/EMediaStoreEvent.cs b/ZuneDBApi/EMediaStoreEvent.cs new file mode 100644 index 0000000..2120d7f --- /dev/null +++ b/ZuneDBApi/EMediaStoreEvent.cs @@ -0,0 +1,4 @@ +public enum EMediaStoreEvent +{ + eMediaStoreLicenseRefreshNeededChanged +} diff --git a/ZuneDBApi/EMediaTypes.cs b/ZuneDBApi/EMediaTypes.cs new file mode 100644 index 0000000..e394688 --- /dev/null +++ b/ZuneDBApi/EMediaTypes.cs @@ -0,0 +1,66 @@ +public enum EMediaTypes +{ + eMediaTypeCount = 121, + eMediaTypePin = 120, + eMediaTypeApp = 110, + eMediaTypeEncounter = 98, + eMediaTypeUser = 97, + eMediaTypeUserCard = 96, + eMediaTypeAudioClipMP3 = 80, + eMediaTypePersonPrimaryArtist = 78, + eMediaTypePersonRelatedGenre = 77, + eMediaTypePersonGenre = 76, + eMediaTypePersonInfluencer = 75, + eMediaTypePersonSimilar = 74, + eMediaTypePersonStudio = 73, + eMediaTypePersonNetwork = 72, + eMediaTypePersonProducer = 71, + eMediaTypePersonConductor = 70, + eMediaTypePersonCreator = 69, + eMediaTypePersonWriter = 68, + eMediaTypePersonDirector = 67, + eMediaTypePersonComposer = 66, + eMediaTypePersonArtist = 65, + eMediaTypePersonActor = 0x40, + eMediaTypePlaylistItem = 56, + eMediaTypePlaylistWPL = 51, + eMediaTypePlaylistChannel = 50, + eMediaTypePlaylistM3U = 49, + eMediaTypePlaylistZPL = 48, + eMediaTypeVideoAVI = 44, + eMediaTypeVideoMBR = 43, + eMediaTypeVideoDVRMS = 42, + eMediaTypeAudioQT = 41, + eMediaTypeVideoQT = 40, + eMediaTypeVideoWMV = 39, + eMediaTypeVideoMPG = 38, + eMediaTypeVideoMP4 = 37, + eMediaTypeImageJPEG = 36, + eMediaTypeAudioWAV = 35, + eMediaTypeAudioWMA = 34, + eMediaTypeAudioMP3 = 33, + eMediaTypeAudioMP4 = 0x20, + eMediaTypeGenre = 21, + eMediaTypeFolder = 20, + eMediaTypeTVSeries = 19, + eMediaTypePodcastSeries = 18, + eMediaTypePodcastEpisode = 17, + eMediaTypeSeason = 0x10, + eMediaTypeSubscription = 0xF, + eMediaTypeSeries = 14, + eMediaTypePerson = 13, + eMediaTypeBoxSet = 12, + eMediaTypeAudioAlbum = 11, + eMediaTypeRedirector = 10, + eMediaTypePlaylist = 9, + eMediaTypeDeviceImage = 8, + eMediaTypeDeviceVideo = 7, + eMediaTypeDeviceAudio = 6, + eMediaTypeImage = 5, + eMediaTypeVideo = 4, + eMediaTypeAudio = 3, + eMediaTypeMarketplace = 2, + eMediaTypeDevice = 1, + eMediaTypeFile = 0, + eMediaTypeInvalid = -1 +} diff --git a/ZuneDBApi/EPassportPolicy.cs b/ZuneDBApi/EPassportPolicy.cs new file mode 100644 index 0000000..8be7881 --- /dev/null +++ b/ZuneDBApi/EPassportPolicy.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal enum EPassportPolicy +{ + +} diff --git a/ZuneDBApi/EPinType.cs b/ZuneDBApi/EPinType.cs new file mode 100644 index 0000000..0f01b42 --- /dev/null +++ b/ZuneDBApi/EPinType.cs @@ -0,0 +1,6 @@ +public enum EPinType +{ + ePinTypeQuickMix = 1, + ePinTypeGeneric = 0, + ePinTypeInvalid = -1 +} diff --git a/ZuneDBApi/EPlaybackOutputSupport.cs b/ZuneDBApi/EPlaybackOutputSupport.cs new file mode 100644 index 0000000..969e9da --- /dev/null +++ b/ZuneDBApi/EPlaybackOutputSupport.cs @@ -0,0 +1,8 @@ +public enum EPlaybackOutputSupport +{ + ePlaybackOutputSupportHDDigital = 4, + ePlaybackOutputSupportHDAnalog = 3, + ePlaybackOutputSupportSD = 2, + ePlaybackOutputSupportNone = 1, + ePlaybackOutputSupportUnknown = 0 +} diff --git a/ZuneDBApi/EPlayedStatus.cs b/ZuneDBApi/EPlayedStatus.cs new file mode 100644 index 0000000..8cfd68f --- /dev/null +++ b/ZuneDBApi/EPlayedStatus.cs @@ -0,0 +1,5 @@ +public enum EPlayedStatus +{ + ePlayedStatusPlayed = 1, + ePlayedStatusUnplayed = 0 +} diff --git a/ZuneDBApi/EPlaylistCreateConflictAction.cs b/ZuneDBApi/EPlaylistCreateConflictAction.cs new file mode 100644 index 0000000..715f962 --- /dev/null +++ b/ZuneDBApi/EPlaylistCreateConflictAction.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal enum EPlaylistCreateConflictAction +{ + +} diff --git a/ZuneDBApi/EPlaylistLimitType.cs b/ZuneDBApi/EPlaylistLimitType.cs new file mode 100644 index 0000000..56e1457 --- /dev/null +++ b/ZuneDBApi/EPlaylistLimitType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal enum EPlaylistLimitType +{ + +} diff --git a/ZuneDBApi/EPlaylistType.cs b/ZuneDBApi/EPlaylistType.cs new file mode 100644 index 0000000..bad78f1 --- /dev/null +++ b/ZuneDBApi/EPlaylistType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal enum EPlaylistType +{ + +} diff --git a/ZuneDBApi/EPrivacySettingId.cs b/ZuneDBApi/EPrivacySettingId.cs new file mode 100644 index 0000000..dcf768d --- /dev/null +++ b/ZuneDBApi/EPrivacySettingId.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal enum EPrivacySettingId +{ + +} diff --git a/ZuneDBApi/EPrivacySettingValue.cs b/ZuneDBApi/EPrivacySettingValue.cs new file mode 100644 index 0000000..ca436f8 --- /dev/null +++ b/ZuneDBApi/EPrivacySettingValue.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal enum EPrivacySettingValue +{ + +} diff --git a/ZuneDBApi/EPurchaseOfferType.cs b/ZuneDBApi/EPurchaseOfferType.cs new file mode 100644 index 0000000..290f92a --- /dev/null +++ b/ZuneDBApi/EPurchaseOfferType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal enum EPurchaseOfferType +{ + +} diff --git a/ZuneDBApi/EPurchaseOffersFlags.cs b/ZuneDBApi/EPurchaseOffersFlags.cs new file mode 100644 index 0000000..c0f1450 --- /dev/null +++ b/ZuneDBApi/EPurchaseOffersFlags.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal enum EPurchaseOffersFlags +{ + +} diff --git a/ZuneDBApi/EQueryPropertyBagProp.cs b/ZuneDBApi/EQueryPropertyBagProp.cs new file mode 100644 index 0000000..3c0c5e4 --- /dev/null +++ b/ZuneDBApi/EQueryPropertyBagProp.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal enum EQueryPropertyBagProp +{ + +} diff --git a/ZuneDBApi/EQuerySortType.cs b/ZuneDBApi/EQuerySortType.cs new file mode 100644 index 0000000..a3c89f7 --- /dev/null +++ b/ZuneDBApi/EQuerySortType.cs @@ -0,0 +1,6 @@ +public enum EQuerySortType +{ + eQuerySortOrderDescending = 2, + eQuerySortOrderAscending = 1, + eQuerySortOrderNone = 0 +} diff --git a/ZuneDBApi/EQueryType.cs b/ZuneDBApi/EQueryType.cs new file mode 100644 index 0000000..7f49451 --- /dev/null +++ b/ZuneDBApi/EQueryType.cs @@ -0,0 +1,44 @@ +public enum EQueryType +{ + eQueryTypeArtistsRanking = 39, + eQueryTypeAllApps = 38, + eQueryTypePinsByPinType = 37, + eQueryTypeFilesByTrackId = 36, + eQueryTypeVideoSeriesTitles = 35, + eQueryTypePersonsByTypeId = 34, + eQueryTypeTracksForTOC = 33, + eQueryTypeUserCards = 0x20, + eQueryTypeAlbumsByGenreId = 0x1F, + eQueryTypeTracksByGenreId = 30, + eQueryTypeAllGenres = 29, + eQueryTypePlaylistContentByPlaylistId = 28, + eQueryTypeAllPlaylists = 27, + eQueryTypeSyncProgress = 26, + eQueryTypeVideosByCategoryId = 25, + eQueryTypeVideosByFolderId = 24, + eQueryTypePhotosByFolderId = 23, + eQueryTypeMediaFolders = 22, + eQueryTypeVideoWithKeyword = 21, + eQueryTypeSubscriptionsEpisodesWithKeyword = 20, + eQueryTypeSubscriptionsSeriesWithKeyword = 19, + eQueryTypePhotosWithKeyword = 18, + eQueryTypePlaylistsWithKeyword = 17, + eQueryTypeArtistsWithKeyword = 0x10, + eQueryTypeTracksWithKeyword = 0xF, + eQueryTypeAlbumsWithKeyword = 14, + eQueryTypeAlbumsByTOC = 13, + eQueryTypeEpisodesForSeriesId = 12, + eQueryTypeTracksForAlbumArtistId = 11, + eQueryTypeTracksForAlbumId = 10, + eQueryTypeAlbumsForAlbumArtistId = 9, + eQueryTypeAllPodcastEpisodes = 8, + eQueryTypeAllPodcastSeries = 7, + eQueryTypeAllAlbumArtists = 6, + eQueryTypeAllAlbums = 5, + eQueryTypeAllPhotos = 4, + eQueryTypeAllVideosDetailed = 3, + eQueryTypeAllVideos = 2, + eQueryTypeAllTracksDetailed = 1, + eQueryTypeAllTracks = 0, + eQueryTypeInvalid = -1 +} diff --git a/ZuneDBApi/EQueryTypeView.cs b/ZuneDBApi/EQueryTypeView.cs new file mode 100644 index 0000000..5f5bddd --- /dev/null +++ b/ZuneDBApi/EQueryTypeView.cs @@ -0,0 +1,15 @@ +public enum EQueryTypeView +{ + eQueryTypeDeviceMultiSelectView = 167772160, + eQueryTypeLibraryMultiSelectView = 150994944, + eQueryTypeX360View = 0x8000000, + eQueryTypeSyncFailed = 117440512, + eQueryTypeSyncSucceeded = 100663296, + eQueryTypeSyncRemaining = 83886080, + eQueryTypeDiscMediaView = 0x4000000, + eQueryTypeDeviceSyncRuleView = 50331648, + eQueryTypeRemovableMediaView = 0x2000000, + eQueryTypeDeviceView = 0x1000000, + eQueryTypeLibraryView = 0, + eQueryTypeInvalidView = -1 +} diff --git a/ZuneDBApi/EQuickMixMode.cs b/ZuneDBApi/EQuickMixMode.cs new file mode 100644 index 0000000..fcd3118 --- /dev/null +++ b/ZuneDBApi/EQuickMixMode.cs @@ -0,0 +1,7 @@ +public enum EQuickMixMode +{ + eQuickMixModeSimilarArtists = 2, + eQuickMixModeNowPlaying = 1, + eQuickMixModePlaylist = 0, + eQuickMixModeInvalid = -1 +} diff --git a/ZuneDBApi/EQuickMixState.cs b/ZuneDBApi/EQuickMixState.cs new file mode 100644 index 0000000..56f5b4f --- /dev/null +++ b/ZuneDBApi/EQuickMixState.cs @@ -0,0 +1,7 @@ +public enum EQuickMixState +{ + eQuickMixStateNotFound = 2, + eQuickMixStateReady = 1, + eQuickMixStateUnknown = 0, + eQuickMixStateInvalid = -1 +} diff --git a/ZuneDBApi/EQuickMixType.cs b/ZuneDBApi/EQuickMixType.cs new file mode 100644 index 0000000..a11e778 --- /dev/null +++ b/ZuneDBApi/EQuickMixType.cs @@ -0,0 +1,7 @@ +public enum EQuickMixType +{ + eQuickMixTypeRadio = 2, + eQuickMixTypeMixed = 1, + eQuickMixTypeLocal = 0, + eQuickMixTypeInvalid = -1 +} diff --git a/ZuneDBApi/ERefreshLicenseState.cs b/ZuneDBApi/ERefreshLicenseState.cs new file mode 100644 index 0000000..80ea45e --- /dev/null +++ b/ZuneDBApi/ERefreshLicenseState.cs @@ -0,0 +1,6 @@ +public enum ERefreshLicenseState +{ + eRefreshLicenseState_ForcedRefresh = 2, + eRefreshLicenseState_Refresh = 1, + eRefreshLicenseState_None = 0 +} diff --git a/ZuneDBApi/ERelationshipType.cs b/ZuneDBApi/ERelationshipType.cs new file mode 100644 index 0000000..f01835d --- /dev/null +++ b/ZuneDBApi/ERelationshipType.cs @@ -0,0 +1,4 @@ +public enum ERelationshipType +{ + eRelationshipTypeFriend = 1 +} diff --git a/ZuneDBApi/ESeasonPurchaseFlags.cs b/ZuneDBApi/ESeasonPurchaseFlags.cs new file mode 100644 index 0000000..45ca962 --- /dev/null +++ b/ZuneDBApi/ESeasonPurchaseFlags.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal enum ESeasonPurchaseFlags +{ + +} diff --git a/ZuneDBApi/ESeriesPlaybackOrder.cs b/ZuneDBApi/ESeriesPlaybackOrder.cs new file mode 100644 index 0000000..fa9f28f --- /dev/null +++ b/ZuneDBApi/ESeriesPlaybackOrder.cs @@ -0,0 +1,5 @@ +public enum ESeriesPlaybackOrder +{ + eSeriesPlaybackOrderOldestFirst = 1, + eSeriesPlaybackOrderNewestFirst = 0 +} diff --git a/ZuneDBApi/EServiceEndpointId.cs b/ZuneDBApi/EServiceEndpointId.cs new file mode 100644 index 0000000..278c26b --- /dev/null +++ b/ZuneDBApi/EServiceEndpointId.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal enum EServiceEndpointId +{ + +} diff --git a/ZuneDBApi/EServiceMediaType.cs b/ZuneDBApi/EServiceMediaType.cs new file mode 100644 index 0000000..10230bc --- /dev/null +++ b/ZuneDBApi/EServiceMediaType.cs @@ -0,0 +1,9 @@ +public enum EServiceMediaType +{ + eServiceMediaTypeCount = 4, + eServiceMediaTypeArtist = 3, + eServiceMediaTypeChannel = 2, + eServiceMediaTypePlaylist = 1, + eServiceMediaTypeAlbum = 0, + eServiceMediaTypeInvalid = -1 +} diff --git a/ZuneDBApi/EStreamingActionType.cs b/ZuneDBApi/EStreamingActionType.cs new file mode 100644 index 0000000..d92553a --- /dev/null +++ b/ZuneDBApi/EStreamingActionType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal enum EStreamingActionType +{ + +} diff --git a/ZuneDBApi/ESubscriptionEvent.cs b/ZuneDBApi/ESubscriptionEvent.cs new file mode 100644 index 0000000..41ed032 --- /dev/null +++ b/ZuneDBApi/ESubscriptionEvent.cs @@ -0,0 +1,9 @@ +public enum ESubscriptionEvent +{ + eSubscriptionEventProcessAllRulesComplete = 5, + eSubscriptionEventItemPlayedStatusChanged = 4, + eSubscriptionEventItemDownloadFinished = 3, + eSubscriptionEventItemDownloadStarted = 2, + eSubscriptionEventRefreshFinished = 1, + eSubscriptionEventRefreshStarted = 0 +} diff --git a/ZuneDBApi/ESubscriptionProcessingState.cs b/ZuneDBApi/ESubscriptionProcessingState.cs new file mode 100644 index 0000000..44b0aaf --- /dev/null +++ b/ZuneDBApi/ESubscriptionProcessingState.cs @@ -0,0 +1,7 @@ +public enum ESubscriptionProcessingState +{ + eSubscriptionProcessingStateQuarantine = 3, + eSubscriptionProcessingStateUpdated = 2, + eSubscriptionProcessingStateRefreshing = 1, + eSubscriptionProcessingStateCreated = 0 +} diff --git a/ZuneDBApi/ESubscriptionSource.cs b/ZuneDBApi/ESubscriptionSource.cs new file mode 100644 index 0000000..b8287e3 --- /dev/null +++ b/ZuneDBApi/ESubscriptionSource.cs @@ -0,0 +1,9 @@ +public enum ESubscriptionSource +{ + eSubscriptionSourceUnitTest = 5, + eSubscriptionSourceInternal = 4, + eSubscriptionSourceInbox = 3, + eSubscriptionSourceUrl = 2, + eSubscriptionSourceProtocolHandler = 1, + eSubscriptionSourceZMP = 0 +} diff --git a/ZuneDBApi/ESubscriptionState.cs b/ZuneDBApi/ESubscriptionState.cs new file mode 100644 index 0000000..3331f47 --- /dev/null +++ b/ZuneDBApi/ESubscriptionState.cs @@ -0,0 +1,6 @@ +public enum ESubscriptionState +{ + eSubscriptionStateDormant_MigrationOnly = 3, + eSubscriptionStateUnsubscribed = 1, + eSubscriptionStateSubscribed = 0 +} diff --git a/ZuneDBApi/ESyncCategory.cs b/ZuneDBApi/ESyncCategory.cs new file mode 100644 index 0000000..6771c2e --- /dev/null +++ b/ZuneDBApi/ESyncCategory.cs @@ -0,0 +1,16 @@ +public enum ESyncCategory +{ + eSyncCategoryCount = 11, + eSyncCategoryArtists = 10, + eSyncCategoryInbox = 9, + eSyncCategoryGuest = 8, + eSyncCategoryApps = 7, + eSyncCategoryChannels = 6, + eSyncCategoryAudiobooks = 5, + eSyncCategoryFriends = 4, + eSyncCategoryPodcasts = 3, + eSyncCategoryPhotos = 2, + eSyncCategoryVideo = 1, + eSyncCategoryMusic = 0, + eSyncCategoryInvalid = -1 +} diff --git a/ZuneDBApi/ESyncDeleteType.cs b/ZuneDBApi/ESyncDeleteType.cs new file mode 100644 index 0000000..cd7aefa --- /dev/null +++ b/ZuneDBApi/ESyncDeleteType.cs @@ -0,0 +1,7 @@ +public enum ESyncDeleteType +{ + eSyncDeleteTypeCount = 3, + eSyncDeleteTypeSyncRulesOnly = 2, + eSyncDeleteTypeManualRulesOnly = 1, + eSyncDeleteTypeAll = 0 +} diff --git a/ZuneDBApi/ESyncEngineState.cs b/ZuneDBApi/ESyncEngineState.cs new file mode 100644 index 0000000..28392b4 --- /dev/null +++ b/ZuneDBApi/ESyncEngineState.cs @@ -0,0 +1,24 @@ +public enum ESyncEngineState +{ + sesComplete = 20, + sesMetering = 19, + sesDirectSyncComplete = 18, + sesDirectSyncDownloading = 17, + sesDirectSyncCalculating = 0x10, + sesDirectSyncNotStarted = 0xF, + sesWaitingForDownload = 14, + sesWaitingForServiceNotification = 13, + sesWaitingForLicenseAcquisition = 12, + sesWaitingForTranscode = 11, + sesDeletingFilesByUserRequest = 10, + sesDeletingFilesNotInSyncSet = 9, + sesAcquiredContentRetrieval = 8, + sesInboxSync = 7, + sesUpdatingContent = 6, + sesTransferringFileFromDevice = 5, + sesTransferringFile = 4, + sesBuildingList = 3, + sesRunningRules = 2, + sesBeginning = 1, + sesInitial = 0 +} diff --git a/ZuneDBApi/ESyncMode.cs b/ZuneDBApi/ESyncMode.cs new file mode 100644 index 0000000..7b5257b --- /dev/null +++ b/ZuneDBApi/ESyncMode.cs @@ -0,0 +1,8 @@ +public enum ESyncMode +{ + eSyncModeCount = 3, + eSyncModeManual = 2, + eSyncModeSyncSelected = 1, + eSyncModeSyncAll = 0, + eSyncModeInvalid = -1 +} diff --git a/ZuneDBApi/ESyncOperation.cs b/ZuneDBApi/ESyncOperation.cs new file mode 100644 index 0000000..2042daf --- /dev/null +++ b/ZuneDBApi/ESyncOperation.cs @@ -0,0 +1,10 @@ +public enum ESyncOperation +{ + eSyncOperationReplaceContentOnDevice = 5, + eSyncOperationHijackOnDevice = 4, + eSyncOperationCopyFromDevice = 3, + eSyncOperationUpdateMetadataOnDevice = 2, + eSyncOperationDeleteFromDevice = 1, + eSyncOperationSendToDevice = 0, + eSyncOperationInvalid = -1 +} diff --git a/ZuneDBApi/ESyncOperationStatus.cs b/ZuneDBApi/ESyncOperationStatus.cs new file mode 100644 index 0000000..e1d7e1c --- /dev/null +++ b/ZuneDBApi/ESyncOperationStatus.cs @@ -0,0 +1,6 @@ +public enum ESyncOperationStatus +{ + osDeferred = 1, + osImmediate = 0, + osInvalid = -1 +} diff --git a/ZuneDBApi/ESyncRelationship.cs b/ZuneDBApi/ESyncRelationship.cs new file mode 100644 index 0000000..ba896a5 --- /dev/null +++ b/ZuneDBApi/ESyncRelationship.cs @@ -0,0 +1,7 @@ +public enum ESyncRelationship +{ + srSyncWithOtherMachine = 3, + srSyncWithThisMachine = 2, + srManual_Deprecated = 1, + srNone = 0 +} diff --git a/ZuneDBApi/ESyncState.cs b/ZuneDBApi/ESyncState.cs new file mode 100644 index 0000000..cd91154 --- /dev/null +++ b/ZuneDBApi/ESyncState.cs @@ -0,0 +1,9 @@ +public enum ESyncState +{ + eSyncStateCount = 4, + eSyncStateNone = 3, + eSyncStateExcluded = 2, + eSyncStateOnDevice = 1, + eSyncStateCurrentlySyncing = 0, + eSyncStateInvalid = -1 +} diff --git a/ZuneDBApi/ETelemetryEvent.cs b/ZuneDBApi/ETelemetryEvent.cs new file mode 100644 index 0000000..033fb39 --- /dev/null +++ b/ZuneDBApi/ETelemetryEvent.cs @@ -0,0 +1,25 @@ +public enum ETelemetryEvent +{ + eTelemetryEventConcurrentStreamingDenied = 20, + eTelemetryEventFulfillmentFailure = 19, + eTelemetryEventDownloadFailure = 18, + eTelemetryEventDownloadSuccess = 17, + eTelemetryEventSubscriptionAdd = 0x10, + eTelemetryEventZunePassPurchase = 0xF, + eTelemetryEventAccountCreate = 14, + eTelemetryEventSignIn = 13, + eTelemetryEventZunePassDownload = 12, + eTelemetryEventManualDownload = 11, + eTelemetryEventRentalDownload = 10, + eTelemetryEventDTODownload = 9, + eTelemetryEventPlayback = 8, + eTelemetryEventMediaSyncComplete = 7, + eTelemetryEventSyncStart = 6, + eTelemetryEventDeviceConnect = 5, + eTelemetryEventNowPlaying = 4, + eTelemetryEventQuickMix = 3, + eTelemetryEventMixView = 2, + eTelemetryEventBuildPlaylist = 1, + eTelemetryEventCDBurn = 0, + eTelemetryEventUndefined = -1 +} diff --git a/ZuneDBApi/EThumbBarButtonIcons.cs b/ZuneDBApi/EThumbBarButtonIcons.cs new file mode 100644 index 0000000..112497d --- /dev/null +++ b/ZuneDBApi/EThumbBarButtonIcons.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal enum EThumbBarButtonIcons +{ + +} diff --git a/ZuneDBApi/ETokenType.cs b/ZuneDBApi/ETokenType.cs new file mode 100644 index 0000000..550ce1a --- /dev/null +++ b/ZuneDBApi/ETokenType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal enum ETokenType +{ + +} diff --git a/ZuneDBApi/ETranscodeOptimization.cs b/ZuneDBApi/ETranscodeOptimization.cs new file mode 100644 index 0000000..cdceed9 --- /dev/null +++ b/ZuneDBApi/ETranscodeOptimization.cs @@ -0,0 +1,7 @@ +public enum ETranscodeOptimization +{ + toOptimizeForWVGA = 2, + toOptimizeForQuality = 1, + toOptimizeForSize = 0, + toOptimizeInvalid = -1 +} diff --git a/ZuneDBApi/ETranscodePhotoSetting.cs b/ZuneDBApi/ETranscodePhotoSetting.cs new file mode 100644 index 0000000..28f3966 --- /dev/null +++ b/ZuneDBApi/ETranscodePhotoSetting.cs @@ -0,0 +1,7 @@ +public enum ETranscodePhotoSetting +{ + tsPhotoSettingVGA = 2, + tsPhotoSettingFullResolution = 1, + tsPhotoSettingDevicePreferred = 0, + tsPhotoSettingInvalid = -1 +} diff --git a/ZuneDBApi/ETunerRegisterType.cs b/ZuneDBApi/ETunerRegisterType.cs new file mode 100644 index 0000000..d7fd60f --- /dev/null +++ b/ZuneDBApi/ETunerRegisterType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal enum ETunerRegisterType +{ + +} diff --git a/ZuneDBApi/ETunerType.cs b/ZuneDBApi/ETunerType.cs new file mode 100644 index 0000000..327449e --- /dev/null +++ b/ZuneDBApi/ETunerType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal enum ETunerType +{ + +} diff --git a/ZuneDBApi/EUpdateAction.cs b/ZuneDBApi/EUpdateAction.cs new file mode 100644 index 0000000..699320d --- /dev/null +++ b/ZuneDBApi/EUpdateAction.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal enum EUpdateAction +{ + +} diff --git a/ZuneDBApi/EUserRating.cs b/ZuneDBApi/EUserRating.cs new file mode 100644 index 0000000..fa702f1 --- /dev/null +++ b/ZuneDBApi/EUserRating.cs @@ -0,0 +1,10 @@ +public enum EUserRating +{ + eUserRatingMaxLoveIt = 10, + eUserRatingLoveIt = 8, + eUserRatingMinLoveIt = 6, + eUserRatingMaxDislikeIt = 5, + eUserRatingDislikeIt = 2, + eUserRatingMinDislikeIt = 1, + eUserRatingUnrated = 0 +} diff --git a/ZuneDBApi/EVideoType.cs b/ZuneDBApi/EVideoType.cs new file mode 100644 index 0000000..013ca50 --- /dev/null +++ b/ZuneDBApi/EVideoType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal enum EVideoType +{ + +} diff --git a/ZuneDBApi/EWatchType.cs b/ZuneDBApi/EWatchType.cs new file mode 100644 index 0000000..8802106 --- /dev/null +++ b/ZuneDBApi/EWatchType.cs @@ -0,0 +1,7 @@ +public enum EWatchType +{ + eWatchCount = 3, + eWatching = 2, + eWatched = 1, + eUnWatched = 0 +} diff --git a/ZuneDBApi/EWin7LibraryKind.cs b/ZuneDBApi/EWin7LibraryKind.cs new file mode 100644 index 0000000..22d6ea8 --- /dev/null +++ b/ZuneDBApi/EWin7LibraryKind.cs @@ -0,0 +1,8 @@ +public enum EWin7LibraryKind +{ + eApplicationsLibrary = 4, + ePodcastLibrary = 3, + ePicturesLibrary = 2, + eVideoLibrary = 1, + eMusicLibrary = 0 +} diff --git a/ZuneDBApi/EWindowPositionKeys.cs b/ZuneDBApi/EWindowPositionKeys.cs new file mode 100644 index 0000000..1b2f3a5 --- /dev/null +++ b/ZuneDBApi/EWindowPositionKeys.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal enum EWindowPositionKeys +{ + +} diff --git a/ZuneDBApi/EZuneNetMessagingEventType.cs b/ZuneDBApi/EZuneNetMessagingEventType.cs new file mode 100644 index 0000000..90bf430 --- /dev/null +++ b/ZuneDBApi/EZuneNetMessagingEventType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal enum EZuneNetMessagingEventType +{ + +} diff --git a/ZuneDBApi/EndpointHostManagerMediator.cs b/ZuneDBApi/EndpointHostManagerMediator.cs new file mode 100644 index 0000000..40b0b82 --- /dev/null +++ b/ZuneDBApi/EndpointHostManagerMediator.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 56)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal struct EndpointHostManagerMediator +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/EtwControlerState.cs b/ZuneDBApi/EtwControlerState.cs new file mode 100644 index 0000000..ccb4db3 --- /dev/null +++ b/ZuneDBApi/EtwControlerState.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 40)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct EtwControlerState +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/EventReason.cs b/ZuneDBApi/EventReason.cs new file mode 100644 index 0000000..11fbdaf --- /dev/null +++ b/ZuneDBApi/EventReason.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal enum EventReason +{ + +} diff --git a/ZuneDBApi/Features.cs b/ZuneDBApi/Features.cs new file mode 100644 index 0000000..16bf363 --- /dev/null +++ b/ZuneDBApi/Features.cs @@ -0,0 +1,36 @@ +public enum Features +{ + eLastFeature = 0x20, + eVideoAllHub = 0x1F, + eSocialMarketplace = 30, + eMixview = 29, + eMusic = 28, + eQuickMixZmp = 27, + eQuickMixLocal = 26, + eOptIn = 25, + eMBRPreview = 24, + eMBRPurchase = 23, + eMBRRental = 22, + eFirstLaunchIntroVideo = 21, + eSignInAvailable = 20, + eSubscriptionMusicVideoStreaming = 19, + eSubscriptionMusicDownload = 18, + eSubscriptionTrial = 17, + eSubscriptionFreeTracks = 0x10, + eSubscriptionConfirmation = 0xF, + eSubscription = 14, + eMovieTrailers = 13, + eTV = 12, + eApps = 11, + eGames = 10, + eRadio = 9, + eChannels = 8, + ePodcasts = 7, + eMusicVideos = 6, + eSocial = 5, + eVideos = 4, + ePicks = 3, + eMarketplace = 2, + eDevice = 1, + eQuickplay = 0 +} diff --git a/ZuneDBApi/FileAssociationInfo.cs b/ZuneDBApi/FileAssociationInfo.cs new file mode 100644 index 0000000..64b412e --- /dev/null +++ b/ZuneDBApi/FileAssociationInfo.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 32)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct FileAssociationInfo +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/GasGaugeMediator.cs b/ZuneDBApi/GasGaugeMediator.cs new file mode 100644 index 0000000..3928bd2 --- /dev/null +++ b/ZuneDBApi/GasGaugeMediator.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 32)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal struct GasGaugeMediator +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/HBITMAP__.cs b/ZuneDBApi/HBITMAP__.cs new file mode 100644 index 0000000..0d69304 --- /dev/null +++ b/ZuneDBApi/HBITMAP__.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 4)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct HBITMAP__ +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/HDROP__.cs b/ZuneDBApi/HDROP__.cs new file mode 100644 index 0000000..82c7dfc --- /dev/null +++ b/ZuneDBApi/HDROP__.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 4)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct HDROP__ +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/HICON__.cs b/ZuneDBApi/HICON__.cs new file mode 100644 index 0000000..f84b8e7 --- /dev/null +++ b/ZuneDBApi/HICON__.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 4)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct HICON__ +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/HINSTANCE__.cs b/ZuneDBApi/HINSTANCE__.cs new file mode 100644 index 0000000..1bdb619 --- /dev/null +++ b/ZuneDBApi/HINSTANCE__.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 4)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct HINSTANCE__ +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/HKEY__.cs b/ZuneDBApi/HKEY__.cs new file mode 100644 index 0000000..b0cc000 --- /dev/null +++ b/ZuneDBApi/HKEY__.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 4)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct HKEY__ +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/HMENU__.cs b/ZuneDBApi/HMENU__.cs new file mode 100644 index 0000000..854e7c1 --- /dev/null +++ b/ZuneDBApi/HMENU__.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 4)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct HMENU__ +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/HMONITOR__.cs b/ZuneDBApi/HMONITOR__.cs new file mode 100644 index 0000000..2c177ac --- /dev/null +++ b/ZuneDBApi/HMONITOR__.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 4)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct HMONITOR__ +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/HWND__.cs b/ZuneDBApi/HWND__.cs new file mode 100644 index 0000000..67d18fa --- /dev/null +++ b/ZuneDBApi/HWND__.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 4)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct HWND__ +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IAccountManagement.cs b/ZuneDBApi/IAccountManagement.cs new file mode 100644 index 0000000..b347dd9 --- /dev/null +++ b/ZuneDBApi/IAccountManagement.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IAccountManagement +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IAccountUser.cs b/ZuneDBApi/IAccountUser.cs new file mode 100644 index 0000000..d368f0e --- /dev/null +++ b/ZuneDBApi/IAccountUser.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IAccountUser +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IAddPaymentInstrumentCallback.cs b/ZuneDBApi/IAddPaymentInstrumentCallback.cs new file mode 100644 index 0000000..9b23480 --- /dev/null +++ b/ZuneDBApi/IAddPaymentInstrumentCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IAddPaymentInstrumentCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IAddress.cs b/ZuneDBApi/IAddress.cs new file mode 100644 index 0000000..608b1d0 --- /dev/null +++ b/ZuneDBApi/IAddress.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IAddress +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IAlbumInfo.cs b/ZuneDBApi/IAlbumInfo.cs new file mode 100644 index 0000000..9dd7a34 --- /dev/null +++ b/ZuneDBApi/IAlbumInfo.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IAlbumInfo +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IAppCollection.cs b/ZuneDBApi/IAppCollection.cs new file mode 100644 index 0000000..a9b8aee --- /dev/null +++ b/ZuneDBApi/IAppCollection.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IAppCollection +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IAsyncCallback.cs b/ZuneDBApi/IAsyncCallback.cs new file mode 100644 index 0000000..5911932 --- /dev/null +++ b/ZuneDBApi/IAsyncCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IAsyncCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IAutoPlaylistRules.cs b/ZuneDBApi/IAutoPlaylistRules.cs new file mode 100644 index 0000000..1edd0d5 --- /dev/null +++ b/ZuneDBApi/IAutoPlaylistRules.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IAutoPlaylistRules +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IAvailableZuneTagInformation.cs b/ZuneDBApi/IAvailableZuneTagInformation.cs new file mode 100644 index 0000000..2ee699d --- /dev/null +++ b/ZuneDBApi/IAvailableZuneTagInformation.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IAvailableZuneTagInformation +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IBillingOfferCollection.cs b/ZuneDBApi/IBillingOfferCollection.cs new file mode 100644 index 0000000..36008ea --- /dev/null +++ b/ZuneDBApi/IBillingOfferCollection.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IBillingOfferCollection +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IBurnPublisher.cs b/ZuneDBApi/IBurnPublisher.cs new file mode 100644 index 0000000..bda626f --- /dev/null +++ b/ZuneDBApi/IBurnPublisher.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IBurnPublisher +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IBurnPublisherCallback.cs b/ZuneDBApi/IBurnPublisherCallback.cs new file mode 100644 index 0000000..a095de7 --- /dev/null +++ b/ZuneDBApi/IBurnPublisherCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IBurnPublisherCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IConfigurationManager.cs b/ZuneDBApi/IConfigurationManager.cs new file mode 100644 index 0000000..9c65574 --- /dev/null +++ b/ZuneDBApi/IConfigurationManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal static struct IConfigurationManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IContentRefreshTask.cs b/ZuneDBApi/IContentRefreshTask.cs new file mode 100644 index 0000000..f80d467 --- /dev/null +++ b/ZuneDBApi/IContentRefreshTask.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IContentRefreshTask +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IContextData.cs b/ZuneDBApi/IContextData.cs new file mode 100644 index 0000000..7cc73eb --- /dev/null +++ b/ZuneDBApi/IContextData.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IContextData +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IContributorCollection.cs b/ZuneDBApi/IContributorCollection.cs new file mode 100644 index 0000000..20635a9 --- /dev/null +++ b/ZuneDBApi/IContributorCollection.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IContributorCollection +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ICredential.cs b/ZuneDBApi/ICredential.cs new file mode 100644 index 0000000..3966aac --- /dev/null +++ b/ZuneDBApi/ICredential.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct ICredential +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ICreditCard.cs b/ZuneDBApi/ICreditCard.cs new file mode 100644 index 0000000..68d4e91 --- /dev/null +++ b/ZuneDBApi/ICreditCard.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct ICreditCard +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ICreditCardCollection.cs b/ZuneDBApi/ICreditCardCollection.cs new file mode 100644 index 0000000..87430e6 --- /dev/null +++ b/ZuneDBApi/ICreditCardCollection.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct ICreditCardCollection +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IDList.cs b/ZuneDBApi/IDList.cs new file mode 100644 index 0000000..3178400 --- /dev/null +++ b/ZuneDBApi/IDList.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 16)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct IDList +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IDRMQuery.cs b/ZuneDBApi/IDRMQuery.cs new file mode 100644 index 0000000..fd407b0 --- /dev/null +++ b/ZuneDBApi/IDRMQuery.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IDRMQuery +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IDataObjectEnumerator.cs b/ZuneDBApi/IDataObjectEnumerator.cs new file mode 100644 index 0000000..c67a7fb --- /dev/null +++ b/ZuneDBApi/IDataObjectEnumerator.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal static struct IDataObjectEnumerator +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IDatabaseQueryResults.cs b/ZuneDBApi/IDatabaseQueryResults.cs new file mode 100644 index 0000000..b3358ea --- /dev/null +++ b/ZuneDBApi/IDatabaseQueryResults.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IDatabaseQueryResults +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IDeregisterTunerCallback.cs b/ZuneDBApi/IDeregisterTunerCallback.cs new file mode 100644 index 0000000..08310ff --- /dev/null +++ b/ZuneDBApi/IDeregisterTunerCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IDeregisterTunerCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IDeviceAssetProvider.cs b/ZuneDBApi/IDeviceAssetProvider.cs new file mode 100644 index 0000000..b868937 --- /dev/null +++ b/ZuneDBApi/IDeviceAssetProvider.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IDeviceAssetProvider +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IDeviceContentProvider.cs b/ZuneDBApi/IDeviceContentProvider.cs new file mode 100644 index 0000000..2d9611f --- /dev/null +++ b/ZuneDBApi/IDeviceContentProvider.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IDeviceContentProvider +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IDeviceSyncRulesProvider.cs b/ZuneDBApi/IDeviceSyncRulesProvider.cs new file mode 100644 index 0000000..8be80cd --- /dev/null +++ b/ZuneDBApi/IDeviceSyncRulesProvider.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IDeviceSyncRulesProvider +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IDownloadCallback.cs b/ZuneDBApi/IDownloadCallback.cs new file mode 100644 index 0000000..29500ac --- /dev/null +++ b/ZuneDBApi/IDownloadCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IDownloadCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IDownloadManager.cs b/ZuneDBApi/IDownloadManager.cs new file mode 100644 index 0000000..7a15bac --- /dev/null +++ b/ZuneDBApi/IDownloadManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IDownloadManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IDownloadTask.cs b/ZuneDBApi/IDownloadTask.cs new file mode 100644 index 0000000..b1b4444 --- /dev/null +++ b/ZuneDBApi/IDownloadTask.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IDownloadTask +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IDownloadTaskProgress.cs b/ZuneDBApi/IDownloadTaskProgress.cs new file mode 100644 index 0000000..2c24af5 --- /dev/null +++ b/ZuneDBApi/IDownloadTaskProgress.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IDownloadTaskProgress +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IEndpointHost.cs b/ZuneDBApi/IEndpointHost.cs new file mode 100644 index 0000000..1eeecbf --- /dev/null +++ b/ZuneDBApi/IEndpointHost.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IEndpointHost +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IEndpointHostCollection.cs b/ZuneDBApi/IEndpointHostCollection.cs new file mode 100644 index 0000000..95c2133 --- /dev/null +++ b/ZuneDBApi/IEndpointHostCollection.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IEndpointHostCollection +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IEndpointHostManager.cs b/ZuneDBApi/IEndpointHostManager.cs new file mode 100644 index 0000000..0144fa8 --- /dev/null +++ b/ZuneDBApi/IEndpointHostManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IEndpointHostManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IEndpointHostManagerCallback.cs b/ZuneDBApi/IEndpointHostManagerCallback.cs new file mode 100644 index 0000000..0b0eedf --- /dev/null +++ b/ZuneDBApi/IEndpointHostManagerCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IEndpointHostManagerCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IEndpointManager.cs b/ZuneDBApi/IEndpointManager.cs new file mode 100644 index 0000000..6aaf617 --- /dev/null +++ b/ZuneDBApi/IEndpointManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IEndpointManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IEndpointNotification.cs b/ZuneDBApi/IEndpointNotification.cs new file mode 100644 index 0000000..8e3f062 --- /dev/null +++ b/ZuneDBApi/IEndpointNotification.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IEndpointNotification +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IEndpointStatusCallback.cs b/ZuneDBApi/IEndpointStatusCallback.cs new file mode 100644 index 0000000..618efaa --- /dev/null +++ b/ZuneDBApi/IEndpointStatusCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IEndpointStatusCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IFamilySettingsProvider.cs b/ZuneDBApi/IFamilySettingsProvider.cs new file mode 100644 index 0000000..378c94f --- /dev/null +++ b/ZuneDBApi/IFamilySettingsProvider.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IFamilySettingsProvider +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IFeatureEnablementManager.cs b/ZuneDBApi/IFeatureEnablementManager.cs new file mode 100644 index 0000000..3ccb9c2 --- /dev/null +++ b/ZuneDBApi/IFeatureEnablementManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IFeatureEnablementManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IFileAssociationHandler.cs b/ZuneDBApi/IFileAssociationHandler.cs new file mode 100644 index 0000000..deb8d49 --- /dev/null +++ b/ZuneDBApi/IFileAssociationHandler.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IFileAssociationHandler +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IFileProvider.cs b/ZuneDBApi/IFileProvider.cs new file mode 100644 index 0000000..c5510aa --- /dev/null +++ b/ZuneDBApi/IFileProvider.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IFileProvider +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IFirmwareMetadata.cs b/ZuneDBApi/IFirmwareMetadata.cs new file mode 100644 index 0000000..3a25b2e --- /dev/null +++ b/ZuneDBApi/IFirmwareMetadata.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IFirmwareMetadata +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IFirmwareRestorePoint.cs b/ZuneDBApi/IFirmwareRestorePoint.cs new file mode 100644 index 0000000..bcaaf03 --- /dev/null +++ b/ZuneDBApi/IFirmwareRestorePoint.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IFirmwareRestorePoint +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IFirmwareRestorePointCollection.cs b/ZuneDBApi/IFirmwareRestorePointCollection.cs new file mode 100644 index 0000000..f45d44f --- /dev/null +++ b/ZuneDBApi/IFirmwareRestorePointCollection.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IFirmwareRestorePointCollection +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IFirmwareRestorer.cs b/ZuneDBApi/IFirmwareRestorer.cs new file mode 100644 index 0000000..4cb4b57 --- /dev/null +++ b/ZuneDBApi/IFirmwareRestorer.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IFirmwareRestorer +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IFirmwareUpdateCallback.cs b/ZuneDBApi/IFirmwareUpdateCallback.cs new file mode 100644 index 0000000..f725d1d --- /dev/null +++ b/ZuneDBApi/IFirmwareUpdateCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IFirmwareUpdateCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IFirmwareUpdateCallbackData.cs b/ZuneDBApi/IFirmwareUpdateCallbackData.cs new file mode 100644 index 0000000..b15e965 --- /dev/null +++ b/ZuneDBApi/IFirmwareUpdateCallbackData.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IFirmwareUpdateCallbackData +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IFirmwareUpdateCollection.cs b/ZuneDBApi/IFirmwareUpdateCollection.cs new file mode 100644 index 0000000..a9f21df --- /dev/null +++ b/ZuneDBApi/IFirmwareUpdateCollection.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IFirmwareUpdateCollection +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IFirmwareUpdateErrorInfo.cs b/ZuneDBApi/IFirmwareUpdateErrorInfo.cs new file mode 100644 index 0000000..76469c8 --- /dev/null +++ b/ZuneDBApi/IFirmwareUpdateErrorInfo.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IFirmwareUpdateErrorInfo +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IFirmwareUpdateNotification.cs b/ZuneDBApi/IFirmwareUpdateNotification.cs new file mode 100644 index 0000000..6a2eac6 --- /dev/null +++ b/ZuneDBApi/IFirmwareUpdateNotification.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IFirmwareUpdateNotification +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IFirmwareUpdater.cs b/ZuneDBApi/IFirmwareUpdater.cs new file mode 100644 index 0000000..3d4d548 --- /dev/null +++ b/ZuneDBApi/IFirmwareUpdater.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IFirmwareUpdater +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IFirmwareUpdater2.cs b/ZuneDBApi/IFirmwareUpdater2.cs new file mode 100644 index 0000000..8031104 --- /dev/null +++ b/ZuneDBApi/IFirmwareUpdater2.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IFirmwareUpdater2 +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IFolderProvider.cs b/ZuneDBApi/IFolderProvider.cs new file mode 100644 index 0000000..a4e78fe --- /dev/null +++ b/ZuneDBApi/IFolderProvider.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IFolderProvider +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IGasGauge.cs b/ZuneDBApi/IGasGauge.cs new file mode 100644 index 0000000..6337954 --- /dev/null +++ b/ZuneDBApi/IGasGauge.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IGasGauge +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IGasGaugeCallback.cs b/ZuneDBApi/IGasGaugeCallback.cs new file mode 100644 index 0000000..c69e250 --- /dev/null +++ b/ZuneDBApi/IGasGaugeCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IGasGaugeCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IGetAccountCallback.cs b/ZuneDBApi/IGetAccountCallback.cs new file mode 100644 index 0000000..0ff1eba --- /dev/null +++ b/ZuneDBApi/IGetAccountCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IGetAccountCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IGetBalancesCallback.cs b/ZuneDBApi/IGetBalancesCallback.cs new file mode 100644 index 0000000..acc7a89 --- /dev/null +++ b/ZuneDBApi/IGetBalancesCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IGetBalancesCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IGetBillingOffersCallback.cs b/ZuneDBApi/IGetBillingOffersCallback.cs new file mode 100644 index 0000000..30665d2 --- /dev/null +++ b/ZuneDBApi/IGetBillingOffersCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IGetBillingOffersCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IGetOfferDetailsCallback.cs b/ZuneDBApi/IGetOfferDetailsCallback.cs new file mode 100644 index 0000000..0a36e48 --- /dev/null +++ b/ZuneDBApi/IGetOfferDetailsCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IGetOfferDetailsCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IGetOffersCallback.cs b/ZuneDBApi/IGetOffersCallback.cs new file mode 100644 index 0000000..29c690e --- /dev/null +++ b/ZuneDBApi/IGetOffersCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IGetOffersCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IGetPaymentInstrumentsCallback.cs b/ZuneDBApi/IGetPaymentInstrumentsCallback.cs new file mode 100644 index 0000000..103bc07 --- /dev/null +++ b/ZuneDBApi/IGetPaymentInstrumentsCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IGetPaymentInstrumentsCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IHMESettings.cs b/ZuneDBApi/IHMESettings.cs new file mode 100644 index 0000000..8272215 --- /dev/null +++ b/ZuneDBApi/IHMESettings.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IHMESettings +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IHttpWebRequest.cs b/ZuneDBApi/IHttpWebRequest.cs new file mode 100644 index 0000000..2c5b22d --- /dev/null +++ b/ZuneDBApi/IHttpWebRequest.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IHttpWebRequest +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IHttpWebRequestCallback.cs b/ZuneDBApi/IHttpWebRequestCallback.cs new file mode 100644 index 0000000..03d5975 --- /dev/null +++ b/ZuneDBApi/IHttpWebRequestCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IHttpWebRequestCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IHttpWebResponse.cs b/ZuneDBApi/IHttpWebResponse.cs new file mode 100644 index 0000000..0a6c807 --- /dev/null +++ b/ZuneDBApi/IHttpWebResponse.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IHttpWebResponse +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IInteropNotify.cs b/ZuneDBApi/IInteropNotify.cs new file mode 100644 index 0000000..ebeb71b --- /dev/null +++ b/ZuneDBApi/IInteropNotify.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IInteropNotify +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IJumpList.cs b/ZuneDBApi/IJumpList.cs new file mode 100644 index 0000000..309841f --- /dev/null +++ b/ZuneDBApi/IJumpList.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IJumpList +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IJumpListCategory.cs b/ZuneDBApi/IJumpListCategory.cs new file mode 100644 index 0000000..a55f76c --- /dev/null +++ b/ZuneDBApi/IJumpListCategory.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IJumpListCategory +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IJumpListEntry.cs b/ZuneDBApi/IJumpListEntry.cs new file mode 100644 index 0000000..0b9e0eb --- /dev/null +++ b/ZuneDBApi/IJumpListEntry.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IJumpListEntry +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMCDynamicImage.cs b/ZuneDBApi/IMCDynamicImage.cs new file mode 100644 index 0000000..bad4b09 --- /dev/null +++ b/ZuneDBApi/IMCDynamicImage.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IMCDynamicImage +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMCPlayer.cs b/ZuneDBApi/IMCPlayer.cs new file mode 100644 index 0000000..eb336d3 --- /dev/null +++ b/ZuneDBApi/IMCPlayer.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IMCPlayer +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMCPlayerEvents.cs b/ZuneDBApi/IMCPlayerEvents.cs new file mode 100644 index 0000000..8530210 --- /dev/null +++ b/ZuneDBApi/IMCPlayerEvents.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IMCPlayerEvents +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMCPlayerSetUri.cs b/ZuneDBApi/IMCPlayerSetUri.cs new file mode 100644 index 0000000..ee4f728 --- /dev/null +++ b/ZuneDBApi/IMCPlayerSetUri.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IMCPlayerSetUri +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMCPlayerSetUriEvents.cs b/ZuneDBApi/IMCPlayerSetUriEvents.cs new file mode 100644 index 0000000..35c0829 --- /dev/null +++ b/ZuneDBApi/IMCPlayerSetUriEvents.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IMCPlayerSetUriEvents +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMCTransport.cs b/ZuneDBApi/IMCTransport.cs new file mode 100644 index 0000000..6127953 --- /dev/null +++ b/ZuneDBApi/IMCTransport.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IMCTransport +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMCTransportEvents.cs b/ZuneDBApi/IMCTransportEvents.cs new file mode 100644 index 0000000..cad0fca --- /dev/null +++ b/ZuneDBApi/IMCTransportEvents.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IMCTransportEvents +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMCVolumeControl.cs b/ZuneDBApi/IMCVolumeControl.cs new file mode 100644 index 0000000..79b782d --- /dev/null +++ b/ZuneDBApi/IMCVolumeControl.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IMCVolumeControl +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMSMediaSchemaPropertyList.cs b/ZuneDBApi/IMSMediaSchemaPropertyList.cs new file mode 100644 index 0000000..dab38ee --- /dev/null +++ b/ZuneDBApi/IMSMediaSchemaPropertyList.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IMSMediaSchemaPropertyList +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMSMediaSchemaPropertySet.cs b/ZuneDBApi/IMSMediaSchemaPropertySet.cs new file mode 100644 index 0000000..60ec033 --- /dev/null +++ b/ZuneDBApi/IMSMediaSchemaPropertySet.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IMSMediaSchemaPropertySet +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMediaCollection.cs b/ZuneDBApi/IMediaCollection.cs new file mode 100644 index 0000000..2c97f77 --- /dev/null +++ b/ZuneDBApi/IMediaCollection.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IMediaCollection +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMediaOfferCollection.cs b/ZuneDBApi/IMediaOfferCollection.cs new file mode 100644 index 0000000..14e3ab6 --- /dev/null +++ b/ZuneDBApi/IMediaOfferCollection.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IMediaOfferCollection +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMediaRights.cs b/ZuneDBApi/IMediaRights.cs new file mode 100644 index 0000000..efb4675 --- /dev/null +++ b/ZuneDBApi/IMediaRights.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IMediaRights +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMessagingCallback.cs b/ZuneDBApi/IMessagingCallback.cs new file mode 100644 index 0000000..3b65b6d --- /dev/null +++ b/ZuneDBApi/IMessagingCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IMessagingCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMetadataChangeNotify.cs b/ZuneDBApi/IMetadataChangeNotify.cs new file mode 100644 index 0000000..cf713ac --- /dev/null +++ b/ZuneDBApi/IMetadataChangeNotify.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IMetadataChangeNotify +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMetadataManager.cs b/ZuneDBApi/IMetadataManager.cs new file mode 100644 index 0000000..291e063 --- /dev/null +++ b/ZuneDBApi/IMetadataManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IMetadataManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMultiSortAttributes.cs b/ZuneDBApi/IMultiSortAttributes.cs new file mode 100644 index 0000000..a3f36fb --- /dev/null +++ b/ZuneDBApi/IMultiSortAttributes.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IMultiSortAttributes +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMusicAlbumCollection.cs b/ZuneDBApi/IMusicAlbumCollection.cs new file mode 100644 index 0000000..0df6b54 --- /dev/null +++ b/ZuneDBApi/IMusicAlbumCollection.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IMusicAlbumCollection +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IMusicTrackCollection.cs b/ZuneDBApi/IMusicTrackCollection.cs new file mode 100644 index 0000000..cd65bc0 --- /dev/null +++ b/ZuneDBApi/IMusicTrackCollection.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IMusicTrackCollection +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/INSSDevice.cs b/ZuneDBApi/INSSDevice.cs new file mode 100644 index 0000000..a7f02dc --- /dev/null +++ b/ZuneDBApi/INSSDevice.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct INSSDevice +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/INSSDevices.cs b/ZuneDBApi/INSSDevices.cs new file mode 100644 index 0000000..1676844 --- /dev/null +++ b/ZuneDBApi/INSSDevices.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct INSSDevices +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/INSSManager.cs b/ZuneDBApi/INSSManager.cs new file mode 100644 index 0000000..253fc45 --- /dev/null +++ b/ZuneDBApi/INSSManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct INSSManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/INSSProperties.cs b/ZuneDBApi/INSSProperties.cs new file mode 100644 index 0000000..db2e1a2 --- /dev/null +++ b/ZuneDBApi/INSSProperties.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct INSSProperties +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/INSSProperty.cs b/ZuneDBApi/INSSProperty.cs new file mode 100644 index 0000000..c46bb06 --- /dev/null +++ b/ZuneDBApi/INSSProperty.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct INSSProperty +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/INativeDeferredCallback.cs b/ZuneDBApi/INativeDeferredCallback.cs new file mode 100644 index 0000000..aa3efef --- /dev/null +++ b/ZuneDBApi/INativeDeferredCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct INativeDeferredCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/INewsletterSettings.cs b/ZuneDBApi/INewsletterSettings.cs new file mode 100644 index 0000000..3f06b7d --- /dev/null +++ b/ZuneDBApi/INewsletterSettings.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct INewsletterSettings +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/INotifyManager.cs b/ZuneDBApi/INotifyManager.cs new file mode 100644 index 0000000..3c36b52 --- /dev/null +++ b/ZuneDBApi/INotifyManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct INotifyManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/INotifySubscriber.cs b/ZuneDBApi/INotifySubscriber.cs new file mode 100644 index 0000000..df5240b --- /dev/null +++ b/ZuneDBApi/INotifySubscriber.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct INotifySubscriber +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IPassportIdentity.cs b/ZuneDBApi/IPassportIdentity.cs new file mode 100644 index 0000000..88625e2 --- /dev/null +++ b/ZuneDBApi/IPassportIdentity.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IPassportIdentity +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IPinProvider.cs b/ZuneDBApi/IPinProvider.cs new file mode 100644 index 0000000..272f4a9 --- /dev/null +++ b/ZuneDBApi/IPinProvider.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IPinProvider +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IPlaylist.cs b/ZuneDBApi/IPlaylist.cs new file mode 100644 index 0000000..6fe287e --- /dev/null +++ b/ZuneDBApi/IPlaylist.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IPlaylist +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IPlaylistManager.cs b/ZuneDBApi/IPlaylistManager.cs new file mode 100644 index 0000000..c7bff5f --- /dev/null +++ b/ZuneDBApi/IPlaylistManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IPlaylistManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IPriceInfo.cs b/ZuneDBApi/IPriceInfo.cs new file mode 100644 index 0000000..fb0cd94 --- /dev/null +++ b/ZuneDBApi/IPriceInfo.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IPriceInfo +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IPrivacySettings.cs b/ZuneDBApi/IPrivacySettings.cs new file mode 100644 index 0000000..28823d3 --- /dev/null +++ b/ZuneDBApi/IPrivacySettings.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IPrivacySettings +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IProgressNotify.cs b/ZuneDBApi/IProgressNotify.cs new file mode 100644 index 0000000..d45fa40 --- /dev/null +++ b/ZuneDBApi/IProgressNotify.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IProgressNotify +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IPurchaseOffersCallback.cs b/ZuneDBApi/IPurchaseOffersCallback.cs new file mode 100644 index 0000000..0fa9b1d --- /dev/null +++ b/ZuneDBApi/IPurchaseOffersCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IPurchaseOffersCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IQueryPropertyBag.cs b/ZuneDBApi/IQueryPropertyBag.cs new file mode 100644 index 0000000..2a4bcaa --- /dev/null +++ b/ZuneDBApi/IQueryPropertyBag.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IQueryPropertyBag +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IQuickMixManager.cs b/ZuneDBApi/IQuickMixManager.cs new file mode 100644 index 0000000..3fda3a6 --- /dev/null +++ b/ZuneDBApi/IQuickMixManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IQuickMixManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IQuickMixSession.cs b/ZuneDBApi/IQuickMixSession.cs new file mode 100644 index 0000000..9d7360f --- /dev/null +++ b/ZuneDBApi/IQuickMixSession.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IQuickMixSession +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IQuickMixSessionCallback.cs b/ZuneDBApi/IQuickMixSessionCallback.cs new file mode 100644 index 0000000..4880bb4 --- /dev/null +++ b/ZuneDBApi/IQuickMixSessionCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IQuickMixSessionCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IQuickMixStatusCallback.cs b/ZuneDBApi/IQuickMixStatusCallback.cs new file mode 100644 index 0000000..3eb8008 --- /dev/null +++ b/ZuneDBApi/IQuickMixStatusCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IQuickMixStatusCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IRadioPlaylist.cs b/ZuneDBApi/IRadioPlaylist.cs new file mode 100644 index 0000000..d20d6c3 --- /dev/null +++ b/ZuneDBApi/IRadioPlaylist.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IRadioPlaylist +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IRadioStationManager.cs b/ZuneDBApi/IRadioStationManager.cs new file mode 100644 index 0000000..0e25d3e --- /dev/null +++ b/ZuneDBApi/IRadioStationManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IRadioStationManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IRecordManager.cs b/ZuneDBApi/IRecordManager.cs new file mode 100644 index 0000000..6bbffb9 --- /dev/null +++ b/ZuneDBApi/IRecordManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IRecordManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IRecordManagerCallback.cs b/ZuneDBApi/IRecordManagerCallback.cs new file mode 100644 index 0000000..255b5a2 --- /dev/null +++ b/ZuneDBApi/IRecordManagerCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IRecordManagerCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IRefreshTunerListCallback.cs b/ZuneDBApi/IRefreshTunerListCallback.cs new file mode 100644 index 0000000..1d4aaf2 --- /dev/null +++ b/ZuneDBApi/IRefreshTunerListCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IRefreshTunerListCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IResultSetEvents.cs b/ZuneDBApi/IResultSetEvents.cs new file mode 100644 index 0000000..0e365bb --- /dev/null +++ b/ZuneDBApi/IResultSetEvents.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IResultSetEvents +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IService.cs b/ZuneDBApi/IService.cs new file mode 100644 index 0000000..f6a3738 --- /dev/null +++ b/ZuneDBApi/IService.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IService +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IServiceError.cs b/ZuneDBApi/IServiceError.cs new file mode 100644 index 0000000..d4dcd2a --- /dev/null +++ b/ZuneDBApi/IServiceError.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IServiceError +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ISignInState.cs b/ZuneDBApi/ISignInState.cs new file mode 100644 index 0000000..6305935 --- /dev/null +++ b/ZuneDBApi/ISignInState.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct ISignInState +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IStream.cs b/ZuneDBApi/IStream.cs new file mode 100644 index 0000000..06eea56 --- /dev/null +++ b/ZuneDBApi/IStream.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IStream +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ISubscriptionManager.cs b/ZuneDBApi/ISubscriptionManager.cs new file mode 100644 index 0000000..b119071 --- /dev/null +++ b/ZuneDBApi/ISubscriptionManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct ISubscriptionManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ISubscriptionManagerCredentialProvider.cs b/ZuneDBApi/ISubscriptionManagerCredentialProvider.cs new file mode 100644 index 0000000..8d8da0c --- /dev/null +++ b/ZuneDBApi/ISubscriptionManagerCredentialProvider.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct ISubscriptionManagerCredentialProvider +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ISubscriptionViewer.cs b/ZuneDBApi/ISubscriptionViewer.cs new file mode 100644 index 0000000..328a1b2 --- /dev/null +++ b/ZuneDBApi/ISubscriptionViewer.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct ISubscriptionViewer +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ISubscriptionViewerCallback.cs b/ZuneDBApi/ISubscriptionViewerCallback.cs new file mode 100644 index 0000000..95bd289 --- /dev/null +++ b/ZuneDBApi/ISubscriptionViewerCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct ISubscriptionViewerCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ISyncEngine.cs b/ZuneDBApi/ISyncEngine.cs new file mode 100644 index 0000000..120b8a6 --- /dev/null +++ b/ZuneDBApi/ISyncEngine.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct ISyncEngine +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ISyncProgressCallback.cs b/ZuneDBApi/ISyncProgressCallback.cs new file mode 100644 index 0000000..f55492f --- /dev/null +++ b/ZuneDBApi/ISyncProgressCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct ISyncProgressCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ISyncRulesView.cs b/ZuneDBApi/ISyncRulesView.cs new file mode 100644 index 0000000..d66274f --- /dev/null +++ b/ZuneDBApi/ISyncRulesView.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct ISyncRulesView +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ISyncRulesViewCallback.cs b/ZuneDBApi/ISyncRulesViewCallback.cs new file mode 100644 index 0000000..d93a2f0 --- /dev/null +++ b/ZuneDBApi/ISyncRulesViewCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct ISyncRulesViewCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ITelemetryManager.cs b/ZuneDBApi/ITelemetryManager.cs new file mode 100644 index 0000000..1431c07 --- /dev/null +++ b/ZuneDBApi/ITelemetryManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct ITelemetryManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IThumbBar.cs b/ZuneDBApi/IThumbBar.cs new file mode 100644 index 0000000..e2c9453 --- /dev/null +++ b/ZuneDBApi/IThumbBar.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IThumbBar +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IThumbBarButton.cs b/ZuneDBApi/IThumbBarButton.cs new file mode 100644 index 0000000..563e7bb --- /dev/null +++ b/ZuneDBApi/IThumbBarButton.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IThumbBarButton +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ITokenDetails.cs b/ZuneDBApi/ITokenDetails.cs new file mode 100644 index 0000000..2b7dddb --- /dev/null +++ b/ZuneDBApi/ITokenDetails.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct ITokenDetails +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ITrackInfo.cs b/ZuneDBApi/ITrackInfo.cs new file mode 100644 index 0000000..5497076 --- /dev/null +++ b/ZuneDBApi/ITrackInfo.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct ITrackInfo +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ITunerConfig.cs b/ZuneDBApi/ITunerConfig.cs new file mode 100644 index 0000000..e3ca8bb --- /dev/null +++ b/ZuneDBApi/ITunerConfig.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct ITunerConfig +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IUIThreadCallbackWorker.cs b/ZuneDBApi/IUIThreadCallbackWorker.cs new file mode 100644 index 0000000..0d9f57a --- /dev/null +++ b/ZuneDBApi/IUIThreadCallbackWorker.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IUIThreadCallbackWorker +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IUnknown.cs b/ZuneDBApi/IUnknown.cs new file mode 100644 index 0000000..54b94d8 --- /dev/null +++ b/ZuneDBApi/IUnknown.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IUnknown +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IUpdateManager.cs b/ZuneDBApi/IUpdateManager.cs new file mode 100644 index 0000000..42a2bc9 --- /dev/null +++ b/ZuneDBApi/IUpdateManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IUpdateManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IUpdateProgress.cs b/ZuneDBApi/IUpdateProgress.cs new file mode 100644 index 0000000..2ea0ace --- /dev/null +++ b/ZuneDBApi/IUpdateProgress.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IUpdateProgress +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IUriResourceTracker.cs b/ZuneDBApi/IUriResourceTracker.cs new file mode 100644 index 0000000..29a238b --- /dev/null +++ b/ZuneDBApi/IUriResourceTracker.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IUriResourceTracker +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IUsageDataManager.cs b/ZuneDBApi/IUsageDataManager.cs new file mode 100644 index 0000000..208bdc1 --- /dev/null +++ b/ZuneDBApi/IUsageDataManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IUsageDataManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IUserCredentialManager.cs b/ZuneDBApi/IUserCredentialManager.cs new file mode 100644 index 0000000..afaef84 --- /dev/null +++ b/ZuneDBApi/IUserCredentialManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IUserCredentialManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IUserCredentialManagerProvider.cs b/ZuneDBApi/IUserCredentialManagerProvider.cs new file mode 100644 index 0000000..cda9dda --- /dev/null +++ b/ZuneDBApi/IUserCredentialManagerProvider.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IUserCredentialManagerProvider +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IUserManager.cs b/ZuneDBApi/IUserManager.cs new file mode 100644 index 0000000..7a76371 --- /dev/null +++ b/ZuneDBApi/IUserManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IUserManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IVideoCollection.cs b/ZuneDBApi/IVideoCollection.cs new file mode 100644 index 0000000..e7ec847 --- /dev/null +++ b/ZuneDBApi/IVideoCollection.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IVideoCollection +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IWMISGetAlbumForAlbumIdCallback.cs b/ZuneDBApi/IWMISGetAlbumForAlbumIdCallback.cs new file mode 100644 index 0000000..84cc694 --- /dev/null +++ b/ZuneDBApi/IWMISGetAlbumForAlbumIdCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IWMISGetAlbumForAlbumIdCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IWMPCDDevice.cs b/ZuneDBApi/IWMPCDDevice.cs new file mode 100644 index 0000000..c39de0e --- /dev/null +++ b/ZuneDBApi/IWMPCDDevice.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IWMPCDDevice +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IWMPCDDeviceList.cs b/ZuneDBApi/IWMPCDDeviceList.cs new file mode 100644 index 0000000..5b5e58b --- /dev/null +++ b/ZuneDBApi/IWMPCDDeviceList.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IWMPCDDeviceList +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IWMPCDMediaInfo.cs b/ZuneDBApi/IWMPCDMediaInfo.cs new file mode 100644 index 0000000..6d3163a --- /dev/null +++ b/ZuneDBApi/IWMPCDMediaInfo.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IWMPCDMediaInfo +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IWin7Libraries.cs b/ZuneDBApi/IWin7Libraries.cs new file mode 100644 index 0000000..1d547b4 --- /dev/null +++ b/ZuneDBApi/IWin7Libraries.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IWin7Libraries +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IWin7ShellManager.cs b/ZuneDBApi/IWin7ShellManager.cs new file mode 100644 index 0000000..645ab70 --- /dev/null +++ b/ZuneDBApi/IWin7ShellManager.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IWin7ShellManager +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IWin7ShellManagerMediator.cs b/ZuneDBApi/IWin7ShellManagerMediator.cs new file mode 100644 index 0000000..7a774b6 --- /dev/null +++ b/ZuneDBApi/IWin7ShellManagerMediator.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IWin7ShellManagerMediator +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IWinLiveAvailableInformation.cs b/ZuneDBApi/IWinLiveAvailableInformation.cs new file mode 100644 index 0000000..fab376e --- /dev/null +++ b/ZuneDBApi/IWinLiveAvailableInformation.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IWinLiveAvailableInformation +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IWinLiveInformation.cs b/ZuneDBApi/IWinLiveInformation.cs new file mode 100644 index 0000000..c54099c --- /dev/null +++ b/ZuneDBApi/IWinLiveInformation.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal static struct IWinLiveInformation +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IWinLiveSignup.cs b/ZuneDBApi/IWinLiveSignup.cs new file mode 100644 index 0000000..025adef --- /dev/null +++ b/ZuneDBApi/IWinLiveSignup.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IWinLiveSignup +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IWlanAuthCipherPairList.cs b/ZuneDBApi/IWlanAuthCipherPairList.cs new file mode 100644 index 0000000..0ce8940 --- /dev/null +++ b/ZuneDBApi/IWlanAuthCipherPairList.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IWlanAuthCipherPairList +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IWlanProfile.cs b/ZuneDBApi/IWlanProfile.cs new file mode 100644 index 0000000..dc2b6b8 --- /dev/null +++ b/ZuneDBApi/IWlanProfile.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IWlanProfile +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IWlanProfileList.cs b/ZuneDBApi/IWlanProfileList.cs new file mode 100644 index 0000000..38ec3b3 --- /dev/null +++ b/ZuneDBApi/IWlanProfileList.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IWlanProfileList +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IWlanProvider.cs b/ZuneDBApi/IWlanProvider.cs new file mode 100644 index 0000000..29c8d51 --- /dev/null +++ b/ZuneDBApi/IWlanProvider.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IWlanProvider +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IZuneCDDeviceCallback.cs b/ZuneDBApi/IZuneCDDeviceCallback.cs new file mode 100644 index 0000000..92b9611 --- /dev/null +++ b/ZuneDBApi/IZuneCDDeviceCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IZuneCDDeviceCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IZuneMBRBandwidthTest.cs b/ZuneDBApi/IZuneMBRBandwidthTest.cs new file mode 100644 index 0000000..4d963ea --- /dev/null +++ b/ZuneDBApi/IZuneMBRBandwidthTest.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IZuneMBRBandwidthTest +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IZuneMBRBandwidthTestEventSink.cs b/ZuneDBApi/IZuneMBRBandwidthTestEventSink.cs new file mode 100644 index 0000000..f305c76 --- /dev/null +++ b/ZuneDBApi/IZuneMBRBandwidthTestEventSink.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IZuneMBRBandwidthTestEventSink +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IZuneNetCommentResponse.cs b/ZuneDBApi/IZuneNetCommentResponse.cs new file mode 100644 index 0000000..5ad686c --- /dev/null +++ b/ZuneDBApi/IZuneNetCommentResponse.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal static struct IZuneNetCommentResponse +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IZuneNetMessaging.cs b/ZuneDBApi/IZuneNetMessaging.cs new file mode 100644 index 0000000..9047507 --- /dev/null +++ b/ZuneDBApi/IZuneNetMessaging.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IZuneNetMessaging +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IZuneNetResponse.cs b/ZuneDBApi/IZuneNetResponse.cs new file mode 100644 index 0000000..5e72070 --- /dev/null +++ b/ZuneDBApi/IZuneNetResponse.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal static struct IZuneNetResponse +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IZuneSpectrumMgr.cs b/ZuneDBApi/IZuneSpectrumMgr.cs new file mode 100644 index 0000000..a2ffa23 --- /dev/null +++ b/ZuneDBApi/IZuneSpectrumMgr.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IZuneSpectrumMgr +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IZuneWebHost.cs b/ZuneDBApi/IZuneWebHost.cs new file mode 100644 index 0000000..fe06231 --- /dev/null +++ b/ZuneDBApi/IZuneWebHost.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal static struct IZuneWebHost +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IZuneWebHostEventSink.cs b/ZuneDBApi/IZuneWebHostEventSink.cs new file mode 100644 index 0000000..a0d4eb9 --- /dev/null +++ b/ZuneDBApi/IZuneWebHostEventSink.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal static struct IZuneWebHostEventSink +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/IZuneWlanCallback.cs b/ZuneDBApi/IZuneWlanCallback.cs new file mode 100644 index 0000000..952d341 --- /dev/null +++ b/ZuneDBApi/IZuneWlanCallback.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal static struct IZuneWlanCallback +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/MCHResultAnnouncement.cs b/ZuneDBApi/MCHResultAnnouncement.cs new file mode 100644 index 0000000..b089eb1 --- /dev/null +++ b/ZuneDBApi/MCHResultAnnouncement.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 48)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct MCHResultAnnouncement +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/MCPlayerStatus.cs b/ZuneDBApi/MCPlayerStatus.cs new file mode 100644 index 0000000..675f8bc --- /dev/null +++ b/ZuneDBApi/MCPlayerStatus.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 32)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct MCPlayerStatus +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/MCStreamChangeType.cs b/ZuneDBApi/MCStreamChangeType.cs new file mode 100644 index 0000000..8753d43 --- /dev/null +++ b/ZuneDBApi/MCStreamChangeType.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal enum MCStreamChangeType +{ + +} diff --git a/ZuneDBApi/MCStreamDescriptor.cs b/ZuneDBApi/MCStreamDescriptor.cs new file mode 100644 index 0000000..3b87624 --- /dev/null +++ b/ZuneDBApi/MCStreamDescriptor.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 24)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct MCStreamDescriptor +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/MCTransportStatus.cs b/ZuneDBApi/MCTransportStatus.cs new file mode 100644 index 0000000..d7d6816 --- /dev/null +++ b/ZuneDBApi/MCTransportStatus.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 12)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct MCTransportStatus +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/METADATA_ADD_MEDIA.cs b/ZuneDBApi/METADATA_ADD_MEDIA.cs new file mode 100644 index 0000000..6b7176c --- /dev/null +++ b/ZuneDBApi/METADATA_ADD_MEDIA.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 16)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct METADATA_ADD_MEDIA +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/METADATA_UPDATE_ALBUM.cs b/ZuneDBApi/METADATA_UPDATE_ALBUM.cs new file mode 100644 index 0000000..8fcf110 --- /dev/null +++ b/ZuneDBApi/METADATA_UPDATE_ALBUM.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 16)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct METADATA_UPDATE_ALBUM +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ManagedFirmwareUpdateOperation.cs b/ZuneDBApi/ManagedFirmwareUpdateOperation.cs new file mode 100644 index 0000000..44bc8b9 --- /dev/null +++ b/ZuneDBApi/ManagedFirmwareUpdateOperation.cs @@ -0,0 +1,7 @@ +public enum ManagedFirmwareUpdateOperation +{ + fuoReboot = 3, + fuoTransfer = 2, + fuoDownload = 1, + fuoNone = 0 +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/AccountGuidConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/AccountGuidConfiguration.cs new file mode 100644 index 0000000..c3a4977 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/AccountGuidConfiguration.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class AccountGuidConfiguration : CConfigurationManagedBase + { + public IList RegisteredDevices + { + get + { + return GetStringListProperty("RegisteredDevices"); + } + set + { + SetStringListProperty("RegisteredDevices", value); + } + } + + public DateTime ReportUsageDataDueDate + { + get + { + DateTime defaultValue = new DateTime(1999, 1, 1); + return GetDateTimeProperty("ReportUsageDataDueDate", defaultValue); + } + set + { + SetDateTimeProperty("ReportUsageDataDueDate", value); + } + } + + public DateTime RefreshSubscriptionLicenseDueDate + { + get + { + DateTime defaultValue = new DateTime(1999, 1, 1); + return GetDateTimeProperty("RefreshSubscriptionLicenseDueDate", defaultValue); + } + set + { + SetDateTimeProperty("RefreshSubscriptionLicenseDueDate", value); + } + } + + internal AccountGuidConfiguration(RegistryHive hive) + : base(hive, null, "AccountGuid") + { + } + + public AccountGuidConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/CConfigurationManagedBase.cs b/ZuneDBApi/Microsoft/Zune/Configuration/CConfigurationManagedBase.cs new file mode 100644 index 0000000..10e4776 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/CConfigurationManagedBase.cs @@ -0,0 +1,1008 @@ +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class CConfigurationManagedBase : IDisposable + { + private string m_basePath; + + private string m_instance; + + private object m_lock; + + private unsafe HKEY__* m_hHive; + + private ConfigurationChangeEventHandler m_configurationChangeEventHandler; + + private unsafe NotificationMarshaller* m_pNotificationMarshaller; + + public unsafe string ConfigurationAbsolutePath + { + get + { + //IL_0003: Expected I, but got I8 + //IL_001f: Expected I, but got I8 + IConfigurationManager* ptr = null; + int configurationManagerInstance = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + if (configurationManagerInstance >= 0) + { + IConfigurationManager* intPtr = ptr; + return string.Concat(new string((char*)((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 192)))((nint)intPtr)) + "\\", ConfigurationPath); + } + throw new ApplicationException(_003CModule_003E.GetErrorDescription(configurationManagerInstance)); + } + } + + public string ConfigurationPath => (!(m_basePath == (string)null)) ? string.Concat(m_basePath + "\\", m_instance) : m_instance; + + [SpecialName] + public unsafe event ConfigurationChangeEventHandler OnConfigurationChanged + { + add + { + try + { + Monitor.Enter(m_lock); + if (null == m_configurationChangeEventHandler) + { + Subscribe(OnNativeConfigChangedCallback); + } + m_configurationChangeEventHandler = (ConfigurationChangeEventHandler)Delegate.Combine(m_configurationChangeEventHandler, value); + } + finally + { + Monitor.Exit(m_lock); + } + } + remove + { + try + { + Monitor.Enter(m_lock); + if (null == (m_configurationChangeEventHandler = (ConfigurationChangeEventHandler)Delegate.Remove(m_configurationChangeEventHandler, value))) + { + Unsubscribe(); + } + } + finally + { + Monitor.Exit(m_lock); + } + } + } + + public unsafe CConfigurationManagedBase(RegistryHive hive, string basePath, string instance) + { + //IL_0016: Expected I, but got I8 + //IL_0046: Expected I, but got I8 + //IL_0057: Expected I, but got I8 + m_basePath = basePath; + m_instance = instance; + m_pNotificationMarshaller = null; + base._002Ector(); + switch (hive) + { + default: + throw new ArgumentException("hive"); + case RegistryHive.LocalMachine: + m_hHive = (HKEY__*)18446744071562067970uL; + break; + case RegistryHive.CurrentUser: + m_hHive = (HKEY__*)18446744071562067969uL; + break; + } + m_lock = new object(); + } + + private void _007ECConfigurationManagedBase() + { + _0021CConfigurationManagedBase(); + } + + private unsafe void _0021CConfigurationManagedBase() + { + //IL_0017: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + NotificationMarshaller* pNotificationMarshaller = m_pNotificationMarshaller; + if (pNotificationMarshaller != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pNotificationMarshaller + 16)))((nint)pNotificationMarshaller); + m_pNotificationMarshaller = null; + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool GetBoolProperty(string propertyName, [MarshalAs(UnmanagedType.U1)] bool defaultValue) + { + //IL_0028: Expected I, but got I8 + //IL_0051: Expected I, but got I8 + int num = 0; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + IConfigurationManager* ptr = null; + int num2 = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + if (num2 >= 0) + { + long num3 = *(long*)ptr + 8; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)intPtr, hHive, ptr2, ptr3, ptr4, &num, defaultValue ? 1 : 0); + if (num2 >= 0) + { + return (num != 0) ? true : false; + } + } + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num2)); + } + } + } + } + + public unsafe void SetBoolProperty(string propertyName, [MarshalAs(UnmanagedType.U1)] bool value) + { + //IL_0024: Expected I, but got I8 + //IL_004b: Expected I, but got I8 + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + IConfigurationManager* ptr = null; + int num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + if (num < 0) + { + goto IL_0050; + } + long num2 = *(long*)ptr + 16; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, hHive, ptr2, ptr3, ptr4, value ? 1 : 0); + if (num < 0) + { + goto IL_0050; + } + goto end_IL_0023; + IL_0050: + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + end_IL_0023:; + } + } + } + } + + public unsafe int GetIntProperty(string propertyName, int defaultValue) + { + //IL_0027: Expected I, but got I8 + //IL_0050: Expected I, but got I8 + int result = 0; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + IConfigurationManager* ptr = null; + int num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + if (num >= 0) + { + long num2 = *(long*)ptr + 32; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, hHive, ptr2, ptr3, ptr4, &result, defaultValue); + if (num >= 0) + { + return result; + } + } + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + } + } + } + } + + public unsafe void SetIntProperty(string propertyName, int value) + { + //IL_0024: Expected I, but got I8 + //IL_004b: Expected I, but got I8 + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + IConfigurationManager* ptr = null; + int num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + if (num < 0) + { + goto IL_0050; + } + long num2 = *(long*)ptr + 40; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, hHive, ptr2, ptr3, ptr4, value); + if (num < 0) + { + goto IL_0050; + } + goto end_IL_0023; + IL_0050: + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + end_IL_0023:; + } + } + } + } + + public unsafe long GetInt64Property(string propertyName, long defaultValue) + { + //IL_0028: Expected I, but got I8 + //IL_0051: Expected I, but got I8 + long result = 0L; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + IConfigurationManager* ptr = null; + int num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + if (num >= 0) + { + long num2 = *(long*)ptr + 56; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, hHive, ptr2, ptr3, ptr4, &result, defaultValue); + if (num >= 0) + { + return result; + } + } + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + } + } + } + } + + public unsafe void SetInt64Property(string propertyName, long value) + { + //IL_0024: Expected I, but got I8 + //IL_004b: Expected I, but got I8 + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + IConfigurationManager* ptr = null; + int num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + if (num < 0) + { + goto IL_0050; + } + long num2 = *(long*)ptr + 64; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, hHive, ptr2, ptr3, ptr4, value); + if (num < 0) + { + goto IL_0050; + } + goto end_IL_0023; + IL_0050: + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + end_IL_0023:; + } + } + } + } + + public unsafe double GetDoubleProperty(string propertyName, double defaultValue) + { + //IL_002f: Expected I, but got I8 + //IL_0058: Expected I, but got I8 + double result = 0.0; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + IConfigurationManager* ptr = null; + int num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + if (num >= 0) + { + long num2 = *(long*)ptr + 80; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, hHive, ptr2, ptr3, ptr4, &result, defaultValue); + if (num >= 0) + { + return result; + } + } + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + } + } + } + } + + public unsafe void SetDoubleProperty(string propertyName, double value) + { + //IL_0024: Expected I, but got I8 + //IL_004b: Expected I, but got I8 + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + IConfigurationManager* ptr = null; + int num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + if (num < 0) + { + goto IL_0050; + } + long num2 = *(long*)ptr + 88; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, hHive, ptr2, ptr3, ptr4, value); + if (num < 0) + { + goto IL_0050; + } + goto end_IL_0023; + IL_0050: + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + end_IL_0023:; + } + } + } + } + + public unsafe DateTime GetDateTimeProperty(string propertyName, DateTime defaultValue) + { + //IL_0018: Expected I4, but got I8 + //IL_0047: Expected I, but got I8 + //IL_0072: Expected I, but got I8 + DateTime dateTime = default(DateTime); + _FILETIME fILETIME; + *(int*)(&fILETIME) = 0; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref fILETIME, 4), 0, 4); + _FILETIME fILETIME2; + *(long*)(&fILETIME2) = defaultValue.ToFileTimeUtc(); + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + IConfigurationManager* ptr = null; + int num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + if (num >= 0) + { + long num2 = *(long*)ptr + 104; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + _003F val = ptr2; + _003F val2 = ptr3; + _003F val3 = ptr4; + _FILETIME fILETIME3 = fILETIME2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, hHive, (ushort*)(nint)val, (ushort*)(nint)val2, (ushort*)(nint)val3, &fILETIME, fILETIME3); + if (num >= 0) + { + return DateTime.FromFileTimeUtc(*(long*)(&fILETIME)); + } + } + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + } + } + } + } + + public unsafe void SetDateTimeProperty(string propertyName, DateTime value) + { + //IL_002e: Expected I, but got I8 + //IL_0056: Expected I, but got I8 + _FILETIME fILETIME; + *(long*)(&fILETIME) = value.ToFileTimeUtc(); + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + IConfigurationManager* ptr = null; + int num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + if (num < 0) + { + goto IL_005b; + } + long num2 = *(long*)ptr + 112; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + _003F val = ptr2; + _003F val2 = ptr3; + _003F val3 = ptr4; + _FILETIME fILETIME2 = fILETIME; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, hHive, (ushort*)(nint)val, (ushort*)(nint)val2, (ushort*)(nint)val3, fILETIME2); + if (num < 0) + { + goto IL_005b; + } + goto end_IL_002d; + IL_005b: + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + end_IL_002d:; + } + } + } + } + + public unsafe string GetStringProperty(string propertyName, string defaultValue) + { + //IL_002f: Expected I, but got I8 + //IL_0066: Expected I, but got I8 + //IL_0066: Expected I, but got I8 + //IL_00ad: Expected I, but got I8 + string result = null; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(defaultValue))) + { + IConfigurationManager* ptr = null; + int num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + uint num2 = 0u; + if (num >= 0) + { + long num3 = *(long*)ptr + 128; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)intPtr, hHive, ptr2, ptr3, ptr4, null, &num2, ptr5); + if (num >= 0) + { + ushort* ptr6 = (ushort*)_003CModule_003E.new_005B_005D((ulong)num2 * 2uL); + num = (((long)(nint)ptr6 == 0) ? (-2147024882) : num); + if (num >= 0) + { + long num4 = *(long*)ptr + 128; + IConfigurationManager* intPtr2 = ptr; + HKEY__* hHive2 = m_hHive; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, hHive2, ptr2, ptr3, ptr4, ptr6, &num2, ptr5); + if (num >= 0) + { + result = new string((char*)ptr6); + } + } + if (ptr6 != null) + { + _003CModule_003E.delete_005B_005D(ptr6); + } + if (num >= 0) + { + return result; + } + } + } + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + } + } + } + } + } + + public unsafe void SetStringProperty(string propertyName, string value) + { + //IL_002c: Expected I, but got I8 + //IL_0057: Expected I, but got I8 + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(value))) + { + IConfigurationManager* ptr = null; + int num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + if (num < 0) + { + goto IL_005c; + } + long num2 = *(long*)ptr + 136; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, hHive, ptr2, ptr3, ptr4, ptr5); + if (num < 0) + { + goto IL_005c; + } + goto end_IL_002b; + IL_005c: + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + end_IL_002b:; + } + } + } + } + } + + public unsafe IList GetStringListProperty(string propertyName) + { + //IL_0028: Expected I, but got I8 + //IL_0033: Expected I, but got I8 + //IL_0061: Expected I, but got I8 + //IL_0061: Expected I, but got I8 + //IL_00aa: Expected I, but got I8 + //IL_00dc: Expected I, but got I8 + List list = null; + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + IConfigurationManager* ptr = null; + int num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + ushort* ptr2 = null; + uint num2 = 0u; + if (num >= 0) + { + long num3 = *(long*)ptr + 144; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)intPtr, hHive, ptr3, ptr4, ptr5, null, &num2); + if (num >= 0) + { + ptr2 = (ushort*)_003CModule_003E.new_005B_005D((ulong)num2 * 2uL); + num = (((long)(nint)ptr2 == 0) ? (-2147024882) : num); + if (num >= 0) + { + long num4 = *(long*)ptr + 144; + IConfigurationManager* intPtr2 = ptr; + HKEY__* hHive2 = m_hHive; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, hHive2, ptr3, ptr4, ptr5, ptr2, &num2); + if (num >= 0) + { + list = new List(); + ushort* ptr6 = ptr2; + if (*ptr2 != 0) + { + do + { + string item = new string((char*)ptr6); + list.Add(item); + ptr6 = (ushort*)((long)(_003CModule_003E.lstrlenW(ptr6) + 1) * 2L + (nint)ptr6); + } + while (*ptr6 != 0); + } + goto IL_00ef; + } + } + } + } + if (num == -2147024894) + { + num = 0; + list = null; + } + goto IL_00ef; + IL_00ef: + if (ptr2 != null) + { + _003CModule_003E.delete_005B_005D(ptr2); + } + if (num < 0) + { + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + } + return list; + } + } + } + } + + public unsafe void SetStringListProperty(string propertyName, IList value) + { + //IL_0026: Expected I, but got I8 + //IL_008f: Expected I4, but got I8 + //IL_00e1: Expected I, but got I8 + //IL_0133: Expected I, but got I8 + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + IConfigurationManager* ptr = null; + int num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + uint num2 = 0u; + if (num < 0) + { + goto IL_0141; + } + int num3 = 0; + if (0 < value.Count) + { + do + { + num2 += (uint)(value[num3].Length + 1); + num3++; + } + while (num3 < value.Count); + } + num2++; + ulong num4 = (ulong)num2 * 2uL; + ushort* ptr2 = (ushort*)_003CModule_003E.new_005B_005D(num4); + if (ptr2 == null) + { + num = -2147024882; + } + else + { + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ptr2, 0, num4); + ushort* ptr3 = ptr2; + int num5 = 0; + if (0 < value.Count) + { + do + { + int length = value[num5].Length; + fixed (ushort* s = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(value[num5]))) + { + try + { + if (_003CModule_003E.wmemcpy_s(ptr3, num2, s, (ulong)length) == 0) + { + num2 += (uint)(-1 - length); + ptr3 = (ushort*)((long)length * 2L + (nint)ptr3 + 2); + goto IL_00ee; + } + } + catch + { + //try-fault + s = null; + throw; + } + try + { + num = -2147418113; + } + catch + { + //try-fault + s = null; + throw; + } + } + break; + IL_00ee: + num5++; + } + while (num5 < value.Count); + } + if (num >= 0) + { + long num6 = *(long*)ptr + 152; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num6))((nint)intPtr, hHive, ptr4, ptr5, ptr6, ptr2); + } + } + if (ptr2 != null) + { + _003CModule_003E.delete_005B_005D(ptr2); + } + if (num < 0) + { + goto IL_0141; + } + goto end_IL_0024; + IL_0141: + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + end_IL_0024:; + } + } + } + } + + public unsafe byte[] GetBinaryProperty(string propertyName) + { + //IL_0025: Expected I, but got I8 + //IL_0058: Expected I, but got I8 + //IL_0058: Expected I, but got I8 + //IL_0090: Expected I, but got I8 + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + IConfigurationManager* ptr = null; + int num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + uint num2 = 0u; + if (num >= 0) + { + long num3 = *(long*)ptr + 160; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)intPtr, hHive, ptr2, ptr3, ptr4, null, &num2); + if (num >= 0) + { + byte[] array = new byte[num2]; + fixed (byte* ptr5 = &array[0]) + { + try + { + long num4 = *(long*)ptr + 160; + IConfigurationManager* intPtr2 = ptr; + HKEY__* hHive2 = m_hHive; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, hHive2, ptr2, ptr3, ptr4, ptr5, &num2); + } + catch + { + //try-fault + ptr5 = null; + throw; + } + } + if (num >= 0) + { + return array; + } + } + } + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + } + } + } + } + + public unsafe void SetBinaryProperty(string propertyName, byte[] value) + { + //IL_0034: Expected I, but got I8 + //IL_0061: Expected I, but got I8 + //The blocks IL_0031, IL_0040, IL_0066 are reachable both inside and outside the pinned region starting at IL_0030. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + /*pinned*/ref byte reference = ref *(byte*)null; + IConfigurationManager* ptr; + IConfigurationManager* intPtr; + HKEY__* hHive; + _003F val; + _003F val2; + _003F val3; + ref byte val4; + IntPtr intPtr2; + int num; + if (value.Length != 0) + { + fixed (byte* ptr5 = &value[0]) + { + ptr = null; + num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + if (num < 0) + { + goto IL_0066; + } + long num2 = *(long*)ptr + 168; + intPtr = ptr; + hHive = m_hHive; + val = ptr2; + val2 = ptr3; + val3 = ptr4; + val4 = ptr5; + intPtr2 = (nint)value.LongLength; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, hHive, (ushort*)(nint)val, (ushort*)(nint)val2, (ushort*)(nint)val3, (byte*)(nint)val4, (uint)(nint)intPtr2); + if (num < 0) + { + goto IL_0066; + } + goto end_IL_0031; + IL_0066: + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + end_IL_0031:; + } + } + else + { + ptr = null; + num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + if (num < 0) + { + goto IL_0066_2; + } + long num2 = *(long*)ptr + 168; + intPtr = ptr; + hHive = m_hHive; + val = ptr2; + val2 = ptr3; + val3 = ptr4; + val4 = ref reference; + intPtr2 = (nint)value.LongLength; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, hHive, (ushort*)(nint)val, (ushort*)(nint)val2, (ushort*)(nint)val3, (byte*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val4), (uint)(nint)intPtr2); + if (num < 0) + { + goto IL_0066_2; + } + } + goto end_IL_0024; + IL_0066_2: + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + end_IL_0024:; + } + } + } + } + + [SpecialName] + public void raise_OnConfigurationChanged(object sender, ConfigurationChangeEventArgs args) + { + ConfigurationChangeEventHandler configurationChangeEventHandler = m_configurationChangeEventHandler; + if (configurationChangeEventHandler != null) + { + configurationChangeEventHandler(sender, args); + } + } + + private unsafe void OnNativeConfigChangedCallback(ushort* pwszPropertyName) + { + string propertyName = new string((char*)pwszPropertyName); + raise_OnConfigurationChanged(this, new ConfigurationChangeEventArgs(propertyName)); + } + + private unsafe void Subscribe(NativeConfigurationChangeEventHandler handler) + { + //IL_0005: Expected I, but got I8 + //IL_0065: Expected I, but got I8 + //IL_00a6: Expected I, but got I8 + int num = 0; + IConfigurationManager* ptr = null; + if (m_pNotificationMarshaller != null) + { + _003CModule_003E._ZuneShipAssert(1004u, 1181u); + num = -2147418113; + } + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + if (num < 0) + { + goto IL_00ab; + } + num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + if (num < 0) + { + goto IL_00ab; + } + NotificationMarshaller* ptr2 = (NotificationMarshaller*)_003CModule_003E.@new(24uL); + NotificationMarshaller* ptr3; + try + { + ptr3 = ((ptr2 == null) ? null : _003CModule_003E.Microsoft_002EZune_002EConfiguration_002ENotificationMarshaller_002E_007Bctor_007D(ptr2, handler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr2); + throw; + } + m_pNotificationMarshaller = ptr3; + num = (((long)(nint)ptr3 == 0) ? (-2147024882) : num); + if (num < 0) + { + goto IL_00ab; + } + long num2 = *(long*)ptr + 176; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, hHive, ptr4, ptr5, (INotifySubscriber*)ptr3); + if (num < 0) + { + goto IL_00ab; + } + goto end_IL_003e; + IL_00ab: + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + end_IL_003e:; + } + } + } + + private unsafe void Unsubscribe() + { + //IL_0005: Expected I, but got I8 + //IL_0064: Expected I, but got I8 + //IL_008c: Expected I, but got I8 + //IL_0095: Expected I, but got I8 + int num = 0; + IConfigurationManager* ptr = null; + num = (((long)(nint)m_pNotificationMarshaller == 0) ? (-2147418113) : num); + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_basePath))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_instance))) + { + if (num < 0) + { + goto IL_0069; + } + num = _003CModule_003E.GetConfigurationManagerInstance(&ptr); + if (num < 0) + { + goto IL_0069; + } + long num2 = *(long*)ptr + 184; + IConfigurationManager* intPtr = ptr; + HKEY__* hHive = m_hHive; + _003F val = ptr2; + _003F val2 = ptr3; + NotificationMarshaller* pNotificationMarshaller = m_pNotificationMarshaller; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, hHive, (ushort*)(nint)val, (ushort*)(nint)val2, (INotifySubscriber*)pNotificationMarshaller); + if (num < 0) + { + goto IL_0069; + } + NotificationMarshaller* pNotificationMarshaller2 = m_pNotificationMarshaller; + if (pNotificationMarshaller2 != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pNotificationMarshaller2 + 16)))((nint)pNotificationMarshaller2); + m_pNotificationMarshaller = null; + } + goto end_IL_0034; + IL_0069: + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + end_IL_0034:; + } + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021CConfigurationManagedBase(); + return; + } + try + { + _0021CConfigurationManagedBase(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CConfigurationManagedBase() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/CDBurnConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/CDBurnConfiguration.cs new file mode 100644 index 0000000..4acc43c --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/CDBurnConfiguration.cs @@ -0,0 +1,222 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class CDBurnConfiguration : CConfigurationManagedBase + { + public bool CheckDRM + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("CheckDRM", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("CheckDRM", value); + } + } + + public bool CDRecordJitterCorrect + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("CDRecordJitterCorrect", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("CDRecordJitterCorrect", value); + } + } + + public bool WasImapi2Checked + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("WasImapi2Checked", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("WasImapi2Checked", value); + } + } + + public bool DataCDCreateFolders + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("DataCDCreateFolders", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("DataCDCreateFolders", value); + } + } + + public int DataCDTranscodeMode + { + get + { + return GetIntProperty("DataCDTranscodeMode", -1); + } + set + { + SetIntProperty("DataCDTranscodeMode", value); + } + } + + public bool SimulatedBurn + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("SimulatedBurn", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("SimulatedBurn", value); + } + } + + public bool AutoEject + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("AutoEject", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("AutoEject", value); + } + } + + public int BurnSpeed + { + get + { + return GetIntProperty("BurnSpeed", 0); + } + set + { + SetIntProperty("BurnSpeed", value); + } + } + + public int MeasureErasing + { + get + { + return GetIntProperty("MeasureErasing", 20000); + } + set + { + SetIntProperty("MeasureErasing", value); + } + } + + public int MeasureAudioBurn + { + get + { + return GetIntProperty("MeasureAudioBurn", 600); + } + set + { + SetIntProperty("MeasureAudioBurn", value); + } + } + + public int MeasureDataBurn + { + get + { + return GetIntProperty("MeasureDataBurn", 1200); + } + set + { + SetIntProperty("MeasureDataBurn", value); + } + } + + public int MeasureClosingDisc + { + get + { + return GetIntProperty("MeasureClosingDisc", 10000); + } + set + { + SetIntProperty("MeasureClosingDisc", value); + } + } + + public int MeasureDataXcode + { + get + { + return GetIntProperty("MeasureDataXcode", 2000); + } + set + { + SetIntProperty("MeasureDataXcode", value); + } + } + + public int MeasureAudioXcode + { + get + { + return GetIntProperty("MeasureAudioXcode", 500); + } + set + { + SetIntProperty("MeasureAudioXcode", value); + } + } + + public int MeasureAudioTAO + { + get + { + return GetIntProperty("MeasureAudioTAO", 1100); + } + set + { + SetIntProperty("MeasureAudioTAO", value); + } + } + + public int DiscFormat + { + get + { + return GetIntProperty("DiscFormat", 0); + } + set + { + SetIntProperty("DiscFormat", value); + } + } + + internal CDBurnConfiguration(RegistryHive hive) + : base(hive, null, "CDBurn") + { + } + + public CDBurnConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/ChannelsConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/ChannelsConfiguration.cs new file mode 100644 index 0000000..ff70960 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/ChannelsConfiguration.cs @@ -0,0 +1,17 @@ +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class ChannelsConfiguration : CConfigurationManagedBase + { + internal ChannelsConfiguration(RegistryHive hive) + : base(hive, null, "Channels") + { + } + + public ChannelsConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/ClientConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/ClientConfiguration.cs new file mode 100644 index 0000000..524979e --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/ClientConfiguration.cs @@ -0,0 +1,131 @@ +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class ClientConfiguration + { + private static CDBurnConfiguration m_CDBurn = new CDBurnConfiguration(RegistryHive.CurrentUser); + + private static DevicesConfiguration m_Devices = new DevicesConfiguration(RegistryHive.CurrentUser); + + private static DRMConfiguration m_DRM = new DRMConfiguration(RegistryHive.CurrentUser); + + private static FeaturesConfiguration m_Features = new FeaturesConfiguration(RegistryHive.CurrentUser); + + private static FeaturesOverrideConfiguration m_FeaturesOverride = new FeaturesOverrideConfiguration(RegistryHive.CurrentUser); + + private static FirmwareUpdateConfiguration m_FirmwareUpdate = new FirmwareUpdateConfiguration(RegistryHive.CurrentUser); + + private static FUEConfiguration m_FUE = new FUEConfiguration(RegistryHive.CurrentUser); + + private static GeneralSettingsConfiguration m_GeneralSettings = new GeneralSettingsConfiguration(RegistryHive.CurrentUser); + + private static GrovelerConfiguration m_Groveler = new GrovelerConfiguration(RegistryHive.CurrentUser); + + private static MBRConfiguration m_MBR = new MBRConfiguration(RegistryHive.CurrentUser); + + private static MediaStoreConfiguration m_MediaStore = new MediaStoreConfiguration(RegistryHive.CurrentUser); + + private static MessagingConfiguration m_Messaging = new MessagingConfiguration(RegistryHive.CurrentUser); + + private static NSSConfiguration m_NSS = new NSSConfiguration(RegistryHive.CurrentUser); + + private static PicksConfiguration m_Picks = new PicksConfiguration(RegistryHive.CurrentUser); + + private static PicturesConfiguration m_Pictures = new PicturesConfiguration(RegistryHive.CurrentUser); + + private static PlaybackConfiguration m_Playback = new PlaybackConfiguration(RegistryHive.CurrentUser); + + private static QuickMixConfiguration m_QuickMix = new QuickMixConfiguration(RegistryHive.CurrentUser); + + private static QuickplayConfiguration m_Quickplay = new QuickplayConfiguration(RegistryHive.CurrentUser); + + private static RecorderConfiguration m_Recorder = new RecorderConfiguration(RegistryHive.CurrentUser); + + private static SeriesConfiguration m_Series = new SeriesConfiguration(RegistryHive.CurrentUser); + + private static ChannelsConfiguration m_Channels = new ChannelsConfiguration(RegistryHive.CurrentUser); + + private static ServiceConfiguration m_Service = new ServiceConfiguration(RegistryHive.CurrentUser); + + private static ShellConfiguration m_Shell = new ShellConfiguration(RegistryHive.CurrentUser); + + private static ShipAssertsConfiguration m_ShipAsserts = new ShipAssertsConfiguration(RegistryHive.CurrentUser); + + private static SocialConfiguration m_Social = new SocialConfiguration(RegistryHive.CurrentUser); + + private static SQMConfiguration m_SQM = new SQMConfiguration(RegistryHive.CurrentUser); + + private static SubscriptionConfiguration m_Subscription = new SubscriptionConfiguration(RegistryHive.CurrentUser); + + private static TranscodeConfiguration m_Transcode = new TranscodeConfiguration(RegistryHive.CurrentUser); + + private static UnitTestConfiguration m_UnitTest = new UnitTestConfiguration(RegistryHive.CurrentUser); + + private static UsageDataConfiguration m_UsageData = new UsageDataConfiguration(RegistryHive.CurrentUser); + + private static UserCardsConfiguration m_UserCards = new UserCardsConfiguration(RegistryHive.CurrentUser); + + public static UserCardsConfiguration UserCards => m_UserCards; + + public static UsageDataConfiguration UsageData => m_UsageData; + + public static UnitTestConfiguration UnitTest => m_UnitTest; + + public static TranscodeConfiguration Transcode => m_Transcode; + + public static SubscriptionConfiguration Subscription => m_Subscription; + + public static SQMConfiguration SQM => m_SQM; + + public static SocialConfiguration Social => m_Social; + + public static ShipAssertsConfiguration ShipAsserts => m_ShipAsserts; + + public static ShellConfiguration Shell => m_Shell; + + public static ServiceConfiguration Service => m_Service; + + public static ChannelsConfiguration Channels => m_Channels; + + public static SeriesConfiguration Series => m_Series; + + public static RecorderConfiguration Recorder => m_Recorder; + + public static QuickplayConfiguration Quickplay => m_Quickplay; + + public static QuickMixConfiguration QuickMix => m_QuickMix; + + public static PlaybackConfiguration Playback => m_Playback; + + public static PicturesConfiguration Pictures => m_Pictures; + + public static PicksConfiguration Picks => m_Picks; + + public static NSSConfiguration NSS => m_NSS; + + public static MessagingConfiguration Messaging => m_Messaging; + + public static MediaStoreConfiguration MediaStore => m_MediaStore; + + public static MBRConfiguration MBR => m_MBR; + + public static GrovelerConfiguration Groveler => m_Groveler; + + public static GeneralSettingsConfiguration GeneralSettings => m_GeneralSettings; + + public static FUEConfiguration FUE => m_FUE; + + public static FirmwareUpdateConfiguration FirmwareUpdate => m_FirmwareUpdate; + + public static FeaturesOverrideConfiguration FeaturesOverride => m_FeaturesOverride; + + public static FeaturesConfiguration Features => m_Features; + + public static DRMConfiguration DRM => m_DRM; + + public static DevicesConfiguration Devices => m_Devices; + + public static CDBurnConfiguration CDBurn => m_CDBurn; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/ConfigurationChangeEventArgs.cs b/ZuneDBApi/Microsoft/Zune/Configuration/ConfigurationChangeEventArgs.cs new file mode 100644 index 0000000..fc34ba0 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/ConfigurationChangeEventArgs.cs @@ -0,0 +1,16 @@ +using System; + +namespace Microsoft.Zune.Configuration +{ + public class ConfigurationChangeEventArgs : EventArgs + { + private string m_propertyName; + + public string PropertyName => m_propertyName; + + public ConfigurationChangeEventArgs(string propertyName) + { + m_propertyName = propertyName; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/ConfigurationChangeEventHandler.cs b/ZuneDBApi/Microsoft/Zune/Configuration/ConfigurationChangeEventHandler.cs new file mode 100644 index 0000000..1ca56d9 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/ConfigurationChangeEventHandler.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Configuration +{ + public delegate void ConfigurationChangeEventHandler(object sender, ConfigurationChangeEventArgs e); +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/DRMConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/DRMConfiguration.cs new file mode 100644 index 0000000..ccc175b --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/DRMConfiguration.cs @@ -0,0 +1,94 @@ +using System; +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class DRMConfiguration : CConfigurationManagedBase + { + public DateTime LastFullRefresh + { + get + { + DateTime defaultValue = new DateTime(1999, 1, 1); + return GetDateTimeProperty("LastFullRefresh", defaultValue); + } + set + { + SetDateTimeProperty("LastFullRefresh", value); + } + } + + public int TimeBetweenRefreshSessionsMins + { + get + { + return GetIntProperty("TimeBetweenRefreshSessionsMins", 10080); + } + set + { + SetIntProperty("TimeBetweenRefreshSessionsMins", value); + } + } + + public int TimeBetweenRefreshms + { + get + { + return GetIntProperty("TimeBetweenRefreshms", 25); + } + set + { + SetIntProperty("TimeBetweenRefreshms", value); + } + } + + public int SyncLicenseMinCount + { + get + { + return GetIntProperty("SyncLicenseMinCount", 1); + } + set + { + SetIntProperty("SyncLicenseMinCount", value); + } + } + + public int SyncLicenseMinHours + { + get + { + return GetIntProperty("SyncLicenseMinHours", 384); + } + set + { + SetIntProperty("SyncLicenseMinHours", value); + } + } + + public bool SilentDRMConfiguration + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("SilentDRMConfiguration", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("SilentDRMConfiguration", value); + } + } + + internal DRMConfiguration(RegistryHive hive) + : base(hive, null, "DRM") + { + } + + public DRMConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/DeregisterCallback.cs b/ZuneDBApi/Microsoft/Zune/Configuration/DeregisterCallback.cs new file mode 100644 index 0000000..81fd38a --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/DeregisterCallback.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Configuration +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [MiscellaneousBits(64)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct DeregisterCallback + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/DevicesConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/DevicesConfiguration.cs new file mode 100644 index 0000000..a9113df --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/DevicesConfiguration.cs @@ -0,0 +1,664 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class DevicesConfiguration : CConfigurationManagedBase + { + public bool HasPhoneBeenConnected + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("HasPhoneBeenConnected", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("HasPhoneBeenConnected", value); + } + } + + public bool AlwaysUpdatePlaylists + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("AlwaysUpdatePlaylists", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("AlwaysUpdatePlaylists", value); + } + } + + public int ConnectionsUntilWirelessSyncBannerDisplay + { + get + { + return GetIntProperty("ConnectionsUntilWirelessSyncBannerDisplay", -1); + } + set + { + SetIntProperty("ConnectionsUntilWirelessSyncBannerDisplay", value); + } + } + + public bool ShowExcludeFromSyncWarning + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowExcludeFromSyncWarning", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowExcludeFromSyncWarning", value); + } + } + + public bool ShowSyncInstructionsToast + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowSyncInstructionsToast", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowSyncInstructionsToast", value); + } + } + + public int FormatAsyncTimeoutMs + { + get + { + return GetIntProperty("FormatAsyncTimeoutMs", 600000); + } + set + { + SetIntProperty("FormatAsyncTimeoutMs", value); + } + } + + public int FormatAsyncPollingFrequencyMs + { + get + { + return GetIntProperty("FormatAsyncPollingFrequencyMs", 1000); + } + set + { + SetIntProperty("FormatAsyncPollingFrequencyMs", value); + } + } + + public string DeviceAssetCabPathOem + { + get + { + return GetStringProperty("DeviceAssetCabPathOem", ""); + } + set + { + SetStringProperty("DeviceAssetCabPathOem", value); + } + } + + public string DeviceAssetCabPathMicrosoft + { + get + { + return GetStringProperty("DeviceAssetCabPathMicrosoft", ""); + } + set + { + SetStringProperty("DeviceAssetCabPathMicrosoft", value); + } + } + + public int CloudSyncIdleTimeout + { + get + { + return GetIntProperty("CloudSyncIdleTimeout", 90000); + } + set + { + SetIntProperty("CloudSyncIdleTimeout", value); + } + } + + public bool CloudSyncEnabled + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("CloudSyncEnabled", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("CloudSyncEnabled", value); + } + } + + public bool RebootDeviceAfterFormat + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("RebootDeviceAfterFormat", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("RebootDeviceAfterFormat", value); + } + } + + public bool EnableSummaryRestore + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("EnableSummaryRestore", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("EnableSummaryRestore", value); + } + } + + public int SyncRelationshipOverrideValue + { + get + { + return GetIntProperty("SyncRelationshipOverrideValue", 0); + } + set + { + SetIntProperty("SyncRelationshipOverrideValue", value); + } + } + + public bool OverrideSyncRelationship + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("OverrideSyncRelationship", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("OverrideSyncRelationship", value); + } + } + + public bool AbortTasksWhenCanceled + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("AbortTasksWhenCanceled", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("AbortTasksWhenCanceled", value); + } + } + + public bool DisplayTitlesForMetadataUpdates + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("DisplayTitlesForMetadataUpdates", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("DisplayTitlesForMetadataUpdates", value); + } + } + + public int WlanTestTimeout + { + get + { + return GetIntProperty("WlanTestTimeout", 60000); + } + set + { + SetIntProperty("WlanTestTimeout", value); + } + } + + public bool PreserveStaleDeviceContentOnConnect + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("PreserveStaleDeviceContentOnConnect", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("PreserveStaleDeviceContentOnConnect", value); + } + } + + public int CurrentDeviceID + { + get + { + return GetIntProperty("CurrentDeviceID", 0); + } + set + { + SetIntProperty("CurrentDeviceID", value); + } + } + + public bool TraceIntSet + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("TraceIntSet", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("TraceIntSet", value); + } + } + + public bool SyncInProgress + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("SyncInProgress", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("SyncInProgress", value); + } + } + + public int EstimatedArtistSizeInKB + { + get + { + return GetIntProperty("EstimatedArtistSizeInKB", 500); + } + set + { + SetIntProperty("EstimatedArtistSizeInKB", value); + } + } + + public int SmallDeviceSizeInGigs + { + get + { + return GetIntProperty("SmallDeviceSizeInGigs", 17); + } + set + { + SetIntProperty("SmallDeviceSizeInGigs", value); + } + } + + public bool DefaultWpOptimizationForWvga + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("DefaultWpOptimizationForWvga", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("DefaultWpOptimizationForWvga", value); + } + } + + public bool DefaultHdOptimizationForQuality + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("DefaultHdOptimizationForQuality", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("DefaultHdOptimizationForQuality", value); + } + } + + public bool NotifyRemoteSessionsOnArrival + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("NotifyRemoteSessionsOnArrival", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("NotifyRemoteSessionsOnArrival", value); + } + } + + public bool BreakOnSyncError + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("BreakOnSyncError", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("BreakOnSyncError", value); + } + } + + public int SyncProgressInterval + { + get + { + return GetIntProperty("SyncProgressInterval", 250); + } + set + { + SetIntProperty("SyncProgressInterval", value); + } + } + + public int LiveSyncHeartbeatPeriod + { + get + { + return GetIntProperty("LiveSyncHeartbeatPeriod", 15000); + } + set + { + SetIntProperty("LiveSyncHeartbeatPeriod", value); + } + } + + public int LiveSyncThrottlingPeriod + { + get + { + return GetIntProperty("LiveSyncThrottlingPeriod", 60000); + } + set + { + SetIntProperty("LiveSyncThrottlingPeriod", value); + } + } + + public long FakeAvailableSpace + { + get + { + return GetInt64Property("FakeAvailableSpace", 0L); + } + set + { + SetInt64Property("FakeAvailableSpace", value); + } + } + + public int FakeLastFirmwareUpdateError + { + get + { + return GetIntProperty("FakeLastFirmwareUpdateError", 0); + } + set + { + SetIntProperty("FakeLastFirmwareUpdateError", value); + } + } + + public string FakeFirmwareVersion + { + get + { + return GetStringProperty("FakeFirmwareVersion", ""); + } + set + { + SetStringProperty("FakeFirmwareVersion", value); + } + } + + public int FakeProtocolCompatibilityVersion + { + get + { + return GetIntProperty("FakeProtocolCompatibilityVersion", 0); + } + set + { + SetIntProperty("FakeProtocolCompatibilityVersion", value); + } + } + + public bool ForceMetering + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ForceMetering", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ForceMetering", value); + } + } + + public string DeviceLastAvailable + { + get + { + return GetStringProperty("DeviceLastAvailable", ""); + } + set + { + SetStringProperty("DeviceLastAvailable", value); + } + } + + public int DeviceAvailableInterval + { + get + { + return GetIntProperty("DeviceAvailableInterval", 168); + } + set + { + SetIntProperty("DeviceAvailableInterval", value); + } + } + + public string ZMDBSaveToFile + { + get + { + return GetStringProperty("ZMDBSaveToFile", ""); + } + set + { + SetStringProperty("ZMDBSaveToFile", value); + } + } + + public string ZMDBLoadFromFile + { + get + { + return GetStringProperty("ZMDBLoadFromFile", ""); + } + set + { + SetStringProperty("ZMDBLoadFromFile", value); + } + } + + public bool ReingestZMDB + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ReingestZMDB", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ReingestZMDB", value); + } + } + + public string DeviceCapsSaveToFile + { + get + { + return GetStringProperty("DeviceCapsSaveToFile", ""); + } + set + { + SetStringProperty("DeviceCapsSaveToFile", value); + } + } + + public int DeviceCapsInitializeTimeout + { + get + { + return GetIntProperty("DeviceCapsInitializeTimeout", 45000); + } + set + { + SetIntProperty("DeviceCapsInitializeTimeout", value); + } + } + + public int DeviceGetAvailableSpaceTimeout + { + get + { + return GetIntProperty("DeviceGetAvailableSpaceTimeout", 3000); + } + set + { + SetIntProperty("DeviceGetAvailableSpaceTimeout", value); + } + } + + public int SetDeviceRelationshipIDTimeout + { + get + { + return GetIntProperty("SetDeviceRelationshipIDTimeout", 20000); + } + set + { + SetIntProperty("SetDeviceRelationshipIDTimeout", value); + } + } + + public bool IgnoreSyncOnConnect + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("IgnoreSyncOnConnect", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("IgnoreSyncOnConnect", value); + } + } + + public bool InvestigateDevicePresence + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("InvestigateDevicePresence", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("InvestigateDevicePresence", value); + } + } + + public bool CheckCRNOnIncrement + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("CheckCRNOnIncrement", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("CheckCRNOnIncrement", value); + } + } + + public string AutoLaunchZuneParams + { + get + { + return GetStringProperty("AutoLaunchZuneParams", ""); + } + set + { + SetStringProperty("AutoLaunchZuneParams", value); + } + } + + public bool AutoLaunchZuneOnConnect + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("AutoLaunchZuneOnConnect", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("AutoLaunchZuneOnConnect", value); + } + } + + internal DevicesConfiguration(RegistryHive hive) + : base(hive, null, "Devices") + { + } + + public DevicesConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/EventArgsHR.cs b/ZuneDBApi/Microsoft/Zune/Configuration/EventArgsHR.cs new file mode 100644 index 0000000..57777cc --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/EventArgsHR.cs @@ -0,0 +1,26 @@ +using System; + +namespace Microsoft.Zune.Configuration +{ + public class EventArgsHR : EventArgs + { + private int _003Cbacking_store_003EHResult; + + public int HResult + { + get + { + return _003Cbacking_store_003EHResult; + } + set + { + _003Cbacking_store_003EHResult = value; + } + } + + public EventArgsHR() + { + HResult = 0; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/FUEConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/FUEConfiguration.cs new file mode 100644 index 0000000..f7316ce --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/FUEConfiguration.cs @@ -0,0 +1,112 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class FUEConfiguration : CConfigurationManagedBase + { + public bool ShowPhoneFUEDeviceLandOptions + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowPhoneFUEDeviceLandOptions", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowPhoneFUEDeviceLandOptions", value); + } + } + + public bool ShowArtistChooser + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowArtistChooser", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowArtistChooser", value); + } + } + + public string FirstLaunchVideo + { + get + { + return GetStringProperty("FirstLaunchVideo", ""); + } + set + { + SetStringProperty("FirstLaunchVideo", value); + } + } + + public double SettingsVersion + { + get + { + return GetDoubleProperty("SettingsVersion", 0.0); + } + set + { + SetDoubleProperty("SettingsVersion", value); + } + } + + public bool ShowFirstLaunchVideo + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowFirstLaunchVideo", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowFirstLaunchVideo", value); + } + } + + public bool ShowFUE + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowFUE", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowFUE", value); + } + } + + public bool AcceptedPrivacyStatement + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("AcceptedPrivacyStatement", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("AcceptedPrivacyStatement", value); + } + } + + internal FUEConfiguration(RegistryHive hive) + : base(hive, null, "FUE") + { + } + + public FUEConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/FeaturesConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/FeaturesConfiguration.cs new file mode 100644 index 0000000..493beb9 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/FeaturesConfiguration.cs @@ -0,0 +1,401 @@ +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class FeaturesConfiguration : CConfigurationManagedBase + { + public string VideoAllHub + { + get + { + return GetStringProperty("VideoAllHub", "CA,US"); + } + set + { + SetStringProperty("VideoAllHub", value); + } + } + + public string Videos + { + get + { + return GetStringProperty("Videos", "AT,AU,BE,CA,CH,DE,DK,ES,FI,FR,GB,IE,IT,JP,MX,NL,NO,NZ,SE,US"); + } + set + { + SetStringProperty("Videos", value); + } + } + + public string TV + { + get + { + return GetStringProperty("TV", "CA,US"); + } + set + { + SetStringProperty("TV", value); + } + } + + public string SubscriptionMusicVideoStreaming + { + get + { + return GetStringProperty("SubscriptionMusicVideoStreaming", "US"); + } + set + { + SetStringProperty("SubscriptionMusicVideoStreaming", value); + } + } + + public string SubscriptionMusicDownload + { + get + { + return GetStringProperty("SubscriptionMusicDownload", "US"); + } + set + { + SetStringProperty("SubscriptionMusicDownload", value); + } + } + + public string SubscriptionTrial + { + get + { + return GetStringProperty("SubscriptionTrial", "ES,FR,GB,IT,US"); + } + set + { + SetStringProperty("SubscriptionTrial", value); + } + } + + public string SubscriptionFreeTracks + { + get + { + return GetStringProperty("SubscriptionFreeTracks", "US"); + } + set + { + SetStringProperty("SubscriptionFreeTracks", value); + } + } + + public string SubscriptionConfirmation + { + get + { + return GetStringProperty("SubscriptionConfirmation", "US"); + } + set + { + SetStringProperty("SubscriptionConfirmation", value); + } + } + + public string Subscription + { + get + { + return GetStringProperty("Subscription", "ES,FR,GB,IT,US"); + } + set + { + SetStringProperty("Subscription", value); + } + } + + public string SocialMarketplace + { + get + { + return GetStringProperty("SocialMarketplace", "CA,DE,ES,FR,GB,IT,US"); + } + set + { + SetStringProperty("SocialMarketplace", value); + } + } + + public string Social + { + get + { + return GetStringProperty("Social", "CA,DE,ES,FR,GB,IT,US"); + } + set + { + SetStringProperty("Social", value); + } + } + + public string SignInAvailable + { + get + { + return GetStringProperty("SignInAvailable", "AT,AU,BE,BR,CA,CH,CL,CO,CZ,DE,DK,ES,FI,FR,GB,GR,HK,HU,IE,IT,JP,MX,NL,NO,NZ,PL,PT,RU,SE,SG,TW,US,ZA"); + } + set + { + SetStringProperty("SignInAvailable", value); + } + } + + public string Radio + { + get + { + return GetStringProperty("Radio", "all"); + } + set + { + SetStringProperty("Radio", value); + } + } + + public string Quickplay + { + get + { + return GetStringProperty("Quickplay", "all"); + } + set + { + SetStringProperty("Quickplay", value); + } + } + + public string QuickMixZmp + { + get + { + return GetStringProperty("QuickMixZmp", "ES,FR,GB,IT,US"); + } + set + { + SetStringProperty("QuickMixZmp", value); + } + } + + public string QuickMixLocal + { + get + { + return GetStringProperty("QuickMixLocal", "ES,FR,GB,IT,US"); + } + set + { + SetStringProperty("QuickMixLocal", value); + } + } + + public string Podcasts + { + get + { + return GetStringProperty("Podcasts", "US"); + } + set + { + SetStringProperty("Podcasts", value); + } + } + + public string Picks + { + get + { + return GetStringProperty("Picks", "US"); + } + set + { + SetStringProperty("Picks", value); + } + } + + public string OptIn + { + get + { + return GetStringProperty("OptIn", "CA,US"); + } + set + { + SetStringProperty("OptIn", value); + } + } + + public string MusicVideos + { + get + { + return GetStringProperty("MusicVideos", "DE,ES,FR,GB,IT,US"); + } + set + { + SetStringProperty("MusicVideos", value); + } + } + + public string Music + { + get + { + return GetStringProperty("Music", "DE,ES,FR,GB,IT,US"); + } + set + { + SetStringProperty("Music", value); + } + } + + public string MovieTrailers + { + get + { + return GetStringProperty("MovieTrailers", "US"); + } + set + { + SetStringProperty("MovieTrailers", value); + } + } + + public string Mixview + { + get + { + return GetStringProperty("Mixview", "US"); + } + set + { + SetStringProperty("Mixview", value); + } + } + + public string Marketplace + { + get + { + return GetStringProperty("Marketplace", "AT,AU,BE,BR,CA,CH,CL,CO,CZ,DE,DK,ES,FI,FR,GB,GR,HK,HU,IE,IT,JP,MX,NL,NO,NZ,PL,PT,RU,SE,SG,TW,US,ZA"); + } + set + { + SetStringProperty("Marketplace", value); + } + } + + public string MBRRental + { + get + { + return GetStringProperty("MBRRental", "all"); + } + set + { + SetStringProperty("MBRRental", value); + } + } + + public string MBRPurchase + { + get + { + return GetStringProperty("MBRPurchase", "all"); + } + set + { + SetStringProperty("MBRPurchase", value); + } + } + + public string MBRPreview + { + get + { + return GetStringProperty("MBRPreview", "all"); + } + set + { + SetStringProperty("MBRPreview", value); + } + } + + public string Games + { + get + { + return GetStringProperty("Games", "US"); + } + set + { + SetStringProperty("Games", value); + } + } + + public string FirstLaunchIntroVideo + { + get + { + return GetStringProperty("FirstLaunchIntroVideo", "all"); + } + set + { + SetStringProperty("FirstLaunchIntroVideo", value); + } + } + + public string Device + { + get + { + return GetStringProperty("Device", "all"); + } + set + { + SetStringProperty("Device", value); + } + } + + public string Channels + { + get + { + return GetStringProperty("Channels", "ES,FR,GB,IT,US"); + } + set + { + SetStringProperty("Channels", value); + } + } + + public string Apps + { + get + { + return GetStringProperty("Apps", "AT,AU,BE,BR,CA,CH,CL,CO,CZ,DE,DK,ES,FI,FR,GB,GR,HK,HU,IE,IT,JP,MX,NL,NO,NZ,PL,PT,RU,SE,SG,TW,US,ZA"); + } + set + { + SetStringProperty("Apps", value); + } + } + + internal FeaturesConfiguration(RegistryHive hive) + : base(hive, null, "Features") + { + } + + public FeaturesConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/FeaturesOverrideConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/FeaturesOverrideConfiguration.cs new file mode 100644 index 0000000..2da59a6 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/FeaturesOverrideConfiguration.cs @@ -0,0 +1,401 @@ +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class FeaturesOverrideConfiguration : CConfigurationManagedBase + { + public int VideoAllHub + { + get + { + return GetIntProperty("VideoAllHub", 2); + } + set + { + SetIntProperty("VideoAllHub", value); + } + } + + public int SubscriptionConfirmation + { + get + { + return GetIntProperty("SubscriptionConfirmation", 2); + } + set + { + SetIntProperty("SubscriptionConfirmation", value); + } + } + + public int SocialMarketplace + { + get + { + return GetIntProperty("SocialMarketplace", 2); + } + set + { + SetIntProperty("SocialMarketplace", value); + } + } + + public int Mixview + { + get + { + return GetIntProperty("Mixview", 2); + } + set + { + SetIntProperty("Mixview", value); + } + } + + public int Music + { + get + { + return GetIntProperty("Music", 2); + } + set + { + SetIntProperty("Music", value); + } + } + + public int QuickMixZmp + { + get + { + return GetIntProperty("QuickMixZmp", 2); + } + set + { + SetIntProperty("QuickMixZmp", value); + } + } + + public int QuickMixLocal + { + get + { + return GetIntProperty("QuickMixLocal", 2); + } + set + { + SetIntProperty("QuickMixLocal", value); + } + } + + public int MBRPreview + { + get + { + return GetIntProperty("MBRPreview", 1); + } + set + { + SetIntProperty("MBRPreview", value); + } + } + + public int MBRPurchase + { + get + { + return GetIntProperty("MBRPurchase", 1); + } + set + { + SetIntProperty("MBRPurchase", value); + } + } + + public int MBRRental + { + get + { + return GetIntProperty("MBRRental", 1); + } + set + { + SetIntProperty("MBRRental", value); + } + } + + public int FirstLaunchIntroVideo + { + get + { + return GetIntProperty("FirstLaunchIntroVideo", 2); + } + set + { + SetIntProperty("FirstLaunchIntroVideo", value); + } + } + + public int OptIn + { + get + { + return GetIntProperty("OptIn", 2); + } + set + { + SetIntProperty("OptIn", value); + } + } + + public int SignInAvailable + { + get + { + return GetIntProperty("SignInAvailable", 2); + } + set + { + SetIntProperty("SignInAvailable", value); + } + } + + public int SubscriptionMusicVideoStreaming + { + get + { + return GetIntProperty("SubscriptionMusicVideoStreaming", 2); + } + set + { + SetIntProperty("SubscriptionMusicVideoStreaming", value); + } + } + + public int SubscriptionMusicDownload + { + get + { + return GetIntProperty("SubscriptionMusicDownload", 2); + } + set + { + SetIntProperty("SubscriptionMusicDownload", value); + } + } + + public int SubscriptionFreeTracks + { + get + { + return GetIntProperty("SubscriptionFreeTracks", 2); + } + set + { + SetIntProperty("SubscriptionFreeTracks", value); + } + } + + public int SubscriptionTrial + { + get + { + return GetIntProperty("SubscriptionTrial", 2); + } + set + { + SetIntProperty("SubscriptionTrial", value); + } + } + + public int Subscription + { + get + { + return GetIntProperty("Subscription", 2); + } + set + { + SetIntProperty("Subscription", value); + } + } + + public int MovieTrailers + { + get + { + return GetIntProperty("MovieTrailers", 2); + } + set + { + SetIntProperty("MovieTrailers", value); + } + } + + public int TV + { + get + { + return GetIntProperty("TV", 2); + } + set + { + SetIntProperty("TV", value); + } + } + + public int Apps + { + get + { + return GetIntProperty("Apps", 2); + } + set + { + SetIntProperty("Apps", value); + } + } + + public int Games + { + get + { + return GetIntProperty("Games", 2); + } + set + { + SetIntProperty("Games", value); + } + } + + public int Radio + { + get + { + return GetIntProperty("Radio", 0); + } + set + { + SetIntProperty("Radio", value); + } + } + + public int Channels + { + get + { + return GetIntProperty("Channels", 2); + } + set + { + SetIntProperty("Channels", value); + } + } + + public int Podcasts + { + get + { + return GetIntProperty("Podcasts", 2); + } + set + { + SetIntProperty("Podcasts", value); + } + } + + public int MusicVideos + { + get + { + return GetIntProperty("MusicVideos", 2); + } + set + { + SetIntProperty("MusicVideos", value); + } + } + + public int Social + { + get + { + return GetIntProperty("Social", 2); + } + set + { + SetIntProperty("Social", value); + } + } + + public int Videos + { + get + { + return GetIntProperty("Videos", 2); + } + set + { + SetIntProperty("Videos", value); + } + } + + public int Picks + { + get + { + return GetIntProperty("Picks", 2); + } + set + { + SetIntProperty("Picks", value); + } + } + + public int Marketplace + { + get + { + return GetIntProperty("Marketplace", 2); + } + set + { + SetIntProperty("Marketplace", value); + } + } + + public int Device + { + get + { + return GetIntProperty("Device", 2); + } + set + { + SetIntProperty("Device", value); + } + } + + public int Quickplay + { + get + { + return GetIntProperty("Quickplay", 2); + } + set + { + SetIntProperty("Quickplay", value); + } + } + + internal FeaturesOverrideConfiguration(RegistryHive hive) + : base(hive, null, "FeaturesOverride") + { + } + + public FeaturesOverrideConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/FileAssociationHandlerFactory.cs b/ZuneDBApi/Microsoft/Zune/Configuration/FileAssociationHandlerFactory.cs new file mode 100644 index 0000000..b667f02 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/FileAssociationHandlerFactory.cs @@ -0,0 +1,35 @@ +using System; + +namespace Microsoft.Zune.Configuration +{ + public class FileAssociationHandlerFactory + { + public unsafe static IFileAssociationHandler CreateFileAssociationHandler() + { + //IL_0005: Expected I, but got I8 + //IL_001b: Expected I, but got I8 + //IL_003b: Expected I, but got I8 + FileAssociationHandlerWrapper fileAssociationHandlerWrapper = null; + global::IFileAssociationHandler* ptr = null; + try + { + int num = _003CModule_003E.ZuneLibraryExports_002ECreateNativeFileAssociationHandler((void**)(&ptr)); + if (num >= 0) + { + fileAssociationHandlerWrapper = new FileAssociationHandlerWrapper(ptr); + ptr = null; + return fileAssociationHandlerWrapper; + } + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + } + finally + { + if (ptr != null) + { + global::IFileAssociationHandler* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + } + } + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/FileAssociationHandlerWrapper.cs b/ZuneDBApi/Microsoft/Zune/Configuration/FileAssociationHandlerWrapper.cs new file mode 100644 index 0000000..ef9315f --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/FileAssociationHandlerWrapper.cs @@ -0,0 +1,214 @@ +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Configuration +{ + internal class FileAssociationHandlerWrapper : IFileAssociationHandler, IDisposable + { + private unsafe global::IFileAssociationHandler* m_pFileAssociationHandler; + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe virtual bool CanAssociationBeChanged() + { + //IL_0012: Expected I, but got I8 + global::IFileAssociationHandler* pFileAssociationHandler = m_pFileAssociationHandler; + return (byte)((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pFileAssociationHandler + 40)))((nint)pFileAssociationHandler) != 0) ? 1u : 0u) != 0; + } + + public unsafe virtual int GetFileAssociationInfoList(out IList fileAssociationInfoList) + { + //IL_0003: Expected I, but got I8 + //IL_0025: Expected I, but got I8 + //IL_0025: Expected I, but got I8 + //IL_0053: Expected I4, but got I8 + //IL_006a: Expected I, but got I8 + //IL_007d: Expected I, but got I8 + //IL_0088: Expected I, but got I8 + //IL_0092: Expected I, but got I8 + //IL_009b: Expected I, but got I8 + //IL_00d3: Expected I, but got I8 + global::FileAssociationInfo* ptr = null; + uint num = 0u; + fileAssociationInfoList = new List(); + global::IFileAssociationHandler* pFileAssociationHandler = m_pFileAssociationHandler; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pFileAssociationHandler + 24)))((nint)pFileAssociationHandler, null, &num); + if (num2 >= 0) + { + ptr = (global::FileAssociationInfo*)_003CModule_003E.new_005B_005D((ulong)num * 32uL); + if (ptr == null) + { + num2 = -2147024882; + } + else + { + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ptr, 0, (long)num * 32L); + pFileAssociationHandler = m_pFileAssociationHandler; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pFileAssociationHandler + 24)))((nint)pFileAssociationHandler, ptr, &num); + if (num2 >= 0) + { + uint num3 = 0u; + if (0 < num) + { + global::FileAssociationInfo* ptr2 = (global::FileAssociationInfo*)((ulong)(nint)ptr + 16uL); + do + { + FileAssociationInfo item = new FileAssociationInfo(new string((char*)(*(ulong*)((ulong)(nint)ptr2 - 16uL))), new string((char*)(*(ulong*)((ulong)(nint)ptr2 - 8uL))), new string((char*)(*(ulong*)ptr2)), isCurrentlyOwned: (*(int*)((ulong)(nint)ptr2 + 8uL) != 0) ? true : false, mediaType: *(EMediaTypes*)((ulong)(nint)ptr2 + 12uL)); + fileAssociationInfoList.Add(item); + num3++; + ptr2 = (global::FileAssociationInfo*)((ulong)(nint)ptr2 + 32uL); + } + while (num3 < num); + } + } + } + } + CleanupFileInfoArray(ptr, num); + return num2; + } + + public unsafe virtual int SetFileAssociationInfo(IList fileAssociationInfoList) + { + //IL_0039: Expected I, but got I8 + //IL_005f: Expected I, but got I8 + uint count = (uint)fileAssociationInfoList.Count; + global::FileAssociationInfo* ptr = (global::FileAssociationInfo*)_003CModule_003E.new_005B_005D((ulong)count * 32uL); + int num; + if (ptr == null) + { + num = -2147024882; + } + else + { + uint num2 = 0u; + if (0 >= count) + { + goto IL_0046; + } + while (true) + { + num = FileInfoToStruct(fileAssociationInfoList[(int)num2], (global::FileAssociationInfo*)((long)num2 * 32L + (nint)ptr)); + if (num < 0) + { + break; + } + num2++; + if (num2 < count) + { + continue; + } + goto IL_0046; + } + } + goto IL_0060; + IL_0046: + global::IFileAssociationHandler* pFileAssociationHandler = m_pFileAssociationHandler; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pFileAssociationHandler + 32)))((nint)pFileAssociationHandler, ptr, count); + goto IL_0060; + IL_0060: + CleanupFileInfoArray(ptr, count); + return num; + } + + private unsafe void _007EFileAssociationHandlerWrapper() + { + //IL_0017: Expected I, but got I8 + global::IFileAssociationHandler* pFileAssociationHandler = m_pFileAssociationHandler; + if (pFileAssociationHandler != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pFileAssociationHandler + 16)))((nint)pFileAssociationHandler); + } + } + + internal unsafe FileAssociationHandlerWrapper(global::IFileAssociationHandler* pFilessociationManager) + { + m_pFileAssociationHandler = pFilessociationManager; + } + + internal unsafe int FileInfoToStruct(FileAssociationInfo fileAssocInfo, global::FileAssociationInfo* pFileAssocInfo) + { + //IL_002c: Expected I8, but got I + //IL_0037: Expected I8, but got I + //IL_0045: Expected I8, but got I + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(fileAssocInfo.Extension))) + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(fileAssocInfo.ProgId))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(fileAssocInfo.Description))) + { + *(long*)pFileAssocInfo = (nint)_003CModule_003E.SysAllocString(ptr); + *(long*)((ulong)(nint)pFileAssocInfo + 8uL) = (nint)_003CModule_003E.SysAllocString(ptr2); + ushort* ptr4 = _003CModule_003E.SysAllocString(ptr3); + *(long*)((ulong)(nint)pFileAssocInfo + 16uL) = (nint)ptr4; + *(int*)((ulong)(nint)pFileAssocInfo + 24uL) = (fileAssocInfo.IsCurrentlyOwned ? 1 : 0); + if (*(long*)pFileAssocInfo != 0L && *(long*)((ulong)(nint)pFileAssocInfo + 8uL) != 0L && ptr4 != null) + { + return 0; + } + return -2147024882; + } + } + } + } + + internal unsafe void CleanupFileInfoArray(global::FileAssociationInfo* rgFileInfo, uint cFileInfo) + { + //IL_000d: Expected I, but got I8 + //IL_0022: Expected I, but got I8 + //IL_0031: Expected I, but got I8 + //IL_003d: Expected I, but got I8 + //IL_0043: Expected I, but got I8 + if (rgFileInfo == null) + { + return; + } + if (0 < cFileInfo) + { + global::FileAssociationInfo* ptr = (global::FileAssociationInfo*)((ulong)(nint)rgFileInfo + 16uL); + uint num = cFileInfo; + do + { + long num2 = *(long*)((ulong)(nint)ptr - 16uL); + if (num2 != 0L) + { + _003CModule_003E.SysFreeString((ushort*)num2); + } + long num3 = *(long*)((ulong)(nint)ptr - 8uL); + if (num3 != 0L) + { + _003CModule_003E.SysFreeString((ushort*)num3); + } + ulong num4 = *(ulong*)ptr; + if (num4 != 0L) + { + _003CModule_003E.SysFreeString((ushort*)num4); + } + ptr = (global::FileAssociationInfo*)((ulong)(nint)ptr + 32uL); + num += uint.MaxValue; + } + while (num != 0); + } + _003CModule_003E.delete_005B_005D(rgFileInfo); + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _007EFileAssociationHandlerWrapper(); + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/FileAssociationInfo.cs b/ZuneDBApi/Microsoft/Zune/Configuration/FileAssociationInfo.cs new file mode 100644 index 0000000..5abd783 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/FileAssociationInfo.cs @@ -0,0 +1,48 @@ +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Configuration +{ + public class FileAssociationInfo + { + private string m_extension; + + private string m_progId; + + private string m_description; + + private EMediaTypes m_eMediaType; + + private bool m_isCurrentlyOwned; + + public bool IsCurrentlyOwned + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_isCurrentlyOwned; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + m_isCurrentlyOwned = value; + } + } + + public EMediaTypes MediaType => m_eMediaType; + + public string Description => m_description; + + public string ProgId => m_progId; + + public string Extension => m_extension; + + internal FileAssociationInfo(string extension, string progId, string description, EMediaTypes mediaType, [MarshalAs(UnmanagedType.U1)] bool isCurrentlyOwned) + { + m_extension = extension; + m_progId = progId; + m_description = description; + m_eMediaType = mediaType; + m_isCurrentlyOwned = isCurrentlyOwned; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/FirmwareUpdateConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/FirmwareUpdateConfiguration.cs new file mode 100644 index 0000000..49a94a5 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/FirmwareUpdateConfiguration.cs @@ -0,0 +1,131 @@ +using System.Collections.Generic; +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class FirmwareUpdateConfiguration : CConfigurationManagedBase + { + public bool IgnorePhoneSyncErrors + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("IgnorePhoneSyncErrors", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("IgnorePhoneSyncErrors", value); + } + } + + public IList PendingFirmwareUpdates + { + get + { + return GetStringListProperty("PendingFirmwareUpdates"); + } + set + { + SetStringListProperty("PendingFirmwareUpdates", value); + } + } + + public int CancelFirmwareTimeout + { + get + { + return GetIntProperty("CancelFirmwareTimeout", 600000); + } + set + { + SetIntProperty("CancelFirmwareTimeout", value); + } + } + + public int CommitDelay + { + get + { + return GetIntProperty("CommitDelay", 1000); + } + set + { + SetIntProperty("CommitDelay", value); + } + } + + public int FirmwareUpdateRequestFrequency + { + get + { + return GetIntProperty("FirmwareUpdateRequestFrequency", 259200); + } + set + { + SetIntProperty("FirmwareUpdateRequestFrequency", value); + } + } + + public int FirmwareServerRequestTimeout + { + get + { + return GetIntProperty("FirmwareServerRequestTimeout", 45000); + } + set + { + SetIntProperty("FirmwareServerRequestTimeout", value); + } + } + + public int FirmwareUpdateConnectionThreshold + { + get + { + return GetIntProperty("FirmwareUpdateConnectionThreshold", 2592000); + } + set + { + SetIntProperty("FirmwareUpdateConnectionThreshold", value); + } + } + + public bool UseLocalFirmwareUpdate + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("UseLocalFirmwareUpdate", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("UseLocalFirmwareUpdate", value); + } + } + + public string FirmwareManagerVersion + { + get + { + return GetStringProperty("FirmwareManagerVersion", ""); + } + set + { + SetStringProperty("FirmwareManagerVersion", value); + } + } + + internal FirmwareUpdateConfiguration(RegistryHive hive) + : base(hive, null, "FirmwareUpdate") + { + } + + public FirmwareUpdateConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/GeneralSettingsConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/GeneralSettingsConfiguration.cs new file mode 100644 index 0000000..ae5d366 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/GeneralSettingsConfiguration.cs @@ -0,0 +1,370 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class GeneralSettingsConfiguration : CConfigurationManagedBase + { + public bool ShowDebugAssertDialogs + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowDebugAssertDialogs", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowDebugAssertDialogs", value); + } + } + + public bool DebugDRM + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("DebugDRM", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("DebugDRM", value); + } + } + + public int AccessMediaHangTimeoutSec + { + get + { + return GetIntProperty("AccessMediaHangTimeoutSec", 5); + } + set + { + SetIntProperty("AccessMediaHangTimeoutSec", value); + } + } + + public int BandwidthTestTimeoutSec + { + get + { + return GetIntProperty("BandwidthTestTimeoutSec", 20); + } + set + { + SetIntProperty("BandwidthTestTimeoutSec", value); + } + } + + public int SBEGraphPauseDelayMs + { + get + { + return GetIntProperty("SBEGraphPauseDelayMs", 100); + } + set + { + SetIntProperty("SBEGraphPauseDelayMs", value); + } + } + + public int VirusScanTimeOutSec + { + get + { + return GetIntProperty("VirusScanTimeOutSec", 30); + } + set + { + SetIntProperty("VirusScanTimeOutSec", value); + } + } + + public bool TaskbarInstalledWin7 + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("TaskbarInstalledWin7", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("TaskbarInstalledWin7", value); + } + } + + public bool TaskbarInstalledVista + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("TaskbarInstalledVista", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("TaskbarInstalledVista", value); + } + } + + public bool TaskbarInstalledXP + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("TaskbarInstalledXP", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("TaskbarInstalledXP", value); + } + } + + public bool CompactModeAlwaysOnTop + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("CompactModeAlwaysOnTop", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("CompactModeAlwaysOnTop", value); + } + } + + public bool ShowTaskbarPlayerPrompt + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowTaskbarPlayerPrompt", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowTaskbarPlayerPrompt", value); + } + } + + public bool ProxyAuthenticationEnabled + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ProxyAuthenticationEnabled", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ProxyAuthenticationEnabled", value); + } + } + + public long MaxChunkDownloadSizeBytes + { + get + { + return GetInt64Property("MaxChunkDownloadSizeBytes", 20971520L); + } + set + { + SetInt64Property("MaxChunkDownloadSizeBytes", value); + } + } + + public bool ForceChunkDownloadForWMV + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ForceChunkDownloadForWMV", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ForceChunkDownloadForWMV", value); + } + } + + public bool ForceChunkDownload + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ForceChunkDownload", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ForceChunkDownload", value); + } + } + + public int MaxParallelDownloadFileSizeKB + { + get + { + return GetIntProperty("MaxParallelDownloadFileSizeKB", 30720); + } + set + { + SetIntProperty("MaxParallelDownloadFileSizeKB", value); + } + } + + public int MaxBackgroundSimultaneousDownloads + { + get + { + return GetIntProperty("MaxBackgroundSimultaneousDownloads", 5); + } + set + { + SetIntProperty("MaxBackgroundSimultaneousDownloads", value); + } + } + + public int MaxSimultaneousDownloads + { + get + { + return GetIntProperty("MaxSimultaneousDownloads", 2); + } + set + { + SetIntProperty("MaxSimultaneousDownloads", value); + } + } + + public int UNCTimeout + { + get + { + return GetIntProperty("UNCTimeout", 4000); + } + set + { + SetIntProperty("UNCTimeout", value); + } + } + + public int UNCRetryTimeout + { + get + { + return GetIntProperty("UNCRetryTimeout", 4000); + } + set + { + SetIntProperty("UNCRetryTimeout", value); + } + } + + public int SlideShowSpeed + { + get + { + return GetIntProperty("SlideShowSpeed", 5000); + } + set + { + SetIntProperty("SlideShowSpeed", value); + } + } + + public bool ReevaluateVideoSettings + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ReevaluateVideoSettings", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ReevaluateVideoSettings", value); + } + } + + public bool AnimationsEnabled + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("AnimationsEnabled", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("AnimationsEnabled", value); + } + } + + public int RenderingQuality + { + get + { + return GetIntProperty("RenderingQuality", 1); + } + set + { + SetIntProperty("RenderingQuality", value); + } + } + + public int RenderingType + { + get + { + return GetIntProperty("RenderingType", 2); + } + set + { + SetIntProperty("RenderingType", value); + } + } + + public bool UseGDI + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("UseGDI", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("UseGDI", value); + } + } + + public bool AVIEnabled + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("AVIEnabled", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("AVIEnabled", value); + } + } + + internal GeneralSettingsConfiguration(RegistryHive hive) + : base(hive, null, "GeneralSettings") + { + } + + public GeneralSettingsConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/GrovelerConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/GrovelerConfiguration.cs new file mode 100644 index 0000000..eb705a4 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/GrovelerConfiguration.cs @@ -0,0 +1,219 @@ +using System.Collections.Generic; +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class GrovelerConfiguration : CConfigurationManagedBase + { + public int LibrarySync + { + get + { + return GetIntProperty("LibrarySync", 0); + } + set + { + SetIntProperty("LibrarySync", value); + } + } + + public int Configuration + { + get + { + return GetIntProperty("Configuration", 1); + } + set + { + SetIntProperty("Configuration", value); + } + } + + public bool AllowDVRMSOnMediaCenter + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("AllowDVRMSOnMediaCenter", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("AllowDVRMSOnMediaCenter", value); + } + } + + public bool AllowDiscMedia + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("AllowDiscMedia", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("AllowDiscMedia", value); + } + } + + public bool ScanRemovedFiles + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ScanRemovedFiles", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ScanRemovedFiles", value); + } + } + + public bool LegacyImportComplete + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("LegacyImportComplete", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("LegacyImportComplete", value); + } + } + + public string ApplicationsDownloadFolder + { + get + { + return GetStringProperty("ApplicationsDownloadFolder", ""); + } + set + { + SetStringProperty("ApplicationsDownloadFolder", value); + } + } + + public string PodcastMediaFolder + { + get + { + return GetStringProperty("PodcastMediaFolder", ""); + } + set + { + SetStringProperty("PodcastMediaFolder", value); + } + } + + public string PhotoMediaFolder + { + get + { + return GetStringProperty("PhotoMediaFolder", ""); + } + set + { + SetStringProperty("PhotoMediaFolder", value); + } + } + + public string VideoMediaFolder + { + get + { + return GetStringProperty("VideoMediaFolder", ""); + } + set + { + SetStringProperty("VideoMediaFolder", value); + } + } + + public string RipDirectory + { + get + { + return GetStringProperty("RipDirectory", ""); + } + set + { + SetStringProperty("RipDirectory", value); + } + } + + public IList MonitoredApplicationsFolders + { + get + { + return GetStringListProperty("MonitoredApplicationsFolders"); + } + set + { + SetStringListProperty("MonitoredApplicationsFolders", value); + } + } + + public IList MonitoredVideoFolders + { + get + { + return GetStringListProperty("MonitoredVideoFolders"); + } + set + { + SetStringListProperty("MonitoredVideoFolders", value); + } + } + + public IList MonitoredPodcastFolders + { + get + { + return GetStringListProperty("MonitoredPodcastFolders"); + } + set + { + SetStringListProperty("MonitoredPodcastFolders", value); + } + } + + public IList MonitoredPhotoFolders + { + get + { + return GetStringListProperty("MonitoredPhotoFolders"); + } + set + { + SetStringListProperty("MonitoredPhotoFolders", value); + } + } + + public IList MonitoredAudioFolders + { + get + { + return GetStringListProperty("MonitoredAudioFolders"); + } + set + { + SetStringListProperty("MonitoredAudioFolders", value); + } + } + + internal GrovelerConfiguration(RegistryHive hive) + : base(hive, null, "Groveler") + { + } + + public GrovelerConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/HMEConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/HMEConfiguration.cs new file mode 100644 index 0000000..4003220 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/HMEConfiguration.cs @@ -0,0 +1,110 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class HMEConfiguration : CConfigurationManagedBase + { + public int LastUsedUID + { + get + { + return GetIntProperty("LastUsedUID", 0); + } + set + { + SetIntProperty("LastUsedUID", value); + } + } + + public int CurrentSharingUID + { + get + { + return GetIntProperty("CurrentSharingUID", 0); + } + set + { + SetIntProperty("CurrentSharingUID", value); + } + } + + public int StallServiceStartup + { + get + { + return GetIntProperty("StallServiceStartup", 0); + } + set + { + SetIntProperty("StallServiceStartup", value); + } + } + + public bool ResetDatabase + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ResetDatabase", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ResetDatabase", value); + } + } + + public bool TraceResults + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("TraceResults", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("TraceResults", value); + } + } + + public bool UsageTracking + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("UsageTracking", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("UsageTracking", value); + } + } + + public bool SetupCompleted + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("SetupCompleted", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("SetupCompleted", value); + } + } + + internal HMEConfiguration(RegistryHive hive) + : base(hive, null, "HME") + { + } + + public HMEConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/HMESQMConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/HMESQMConfiguration.cs new file mode 100644 index 0000000..12b8158 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/HMESQMConfiguration.cs @@ -0,0 +1,68 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class HMESQMConfiguration : CConfigurationManagedBase + { + public int BrowseCount + { + get + { + return GetIntProperty("BrowseCount", 0); + } + set + { + SetIntProperty("BrowseCount", value); + } + } + + public int SearchCount + { + get + { + return GetIntProperty("SearchCount", 0); + } + set + { + SetIntProperty("SearchCount", value); + } + } + + public int NumberOfUsersSharing + { + get + { + return GetIntProperty("NumberOfUsersSharing", 0); + } + set + { + SetIntProperty("NumberOfUsersSharing", value); + } + } + + public bool SharingEnabled + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("SharingEnabled", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("SharingEnabled", value); + } + } + + internal HMESQMConfiguration(RegistryHive hive) + : base(hive, null, "HMESQM") + { + } + + public HMESQMConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/IFileAssociationHandler.cs b/ZuneDBApi/Microsoft/Zune/Configuration/IFileAssociationHandler.cs new file mode 100644 index 0000000..43ea753 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/IFileAssociationHandler.cs @@ -0,0 +1,15 @@ +using System.Collections.Generic; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Configuration +{ + public interface IFileAssociationHandler + { + [return: MarshalAs(UnmanagedType.U1)] + bool CanAssociationBeChanged(); + + int GetFileAssociationInfoList(out IList fileAssociationInfoList); + + int SetFileAssociationInfo(IList fileAssociationInfoList); + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/ITunerInfoHandler.cs b/ZuneDBApi/Microsoft/Zune/Configuration/ITunerInfoHandler.cs new file mode 100644 index 0000000..0b2b8ea --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/ITunerInfoHandler.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Configuration +{ + public interface ITunerInfoHandler + { + [SpecialName] + event EventHandler OnChanged; + + [return: MarshalAs(UnmanagedType.U1)] + bool CanQueryTunerList(); + + IList GetPCsList(); + + IList GetDevicesList(); + + IList GetAppStoreDevicesList(); + + DateTime GetNextPCDeregistrationDate(); + + DateTime GetNextSubscriptionDeviceDeregistrationDate(); + + DateTime GetNextAppStoreDeviceDeregistrationDate(); + + void RefreshTunerList(); + + void DeregisterTuner(TunerInfo info); + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/MBRConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/MBRConfiguration.cs new file mode 100644 index 0000000..1c220aa --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/MBRConfiguration.cs @@ -0,0 +1,77 @@ +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class MBRConfiguration : CConfigurationManagedBase + { + public int MaxMissingOrCorruptedChunks + { + get + { + return GetIntProperty("MaxMissingOrCorruptedChunks", 10); + } + set + { + SetIntProperty("MaxMissingOrCorruptedChunks", value); + } + } + + public int ExcessiveBufferingPositionThresholdMs + { + get + { + return GetIntProperty("ExcessiveBufferingPositionThresholdMs", 7000); + } + set + { + SetIntProperty("ExcessiveBufferingPositionThresholdMs", value); + } + } + + public int ExcessiveBufferingMaxAttempts + { + get + { + return GetIntProperty("ExcessiveBufferingMaxAttempts", 3); + } + set + { + SetIntProperty("ExcessiveBufferingMaxAttempts", value); + } + } + + public int ExcessiveBufferingTimeoutMs + { + get + { + return GetIntProperty("ExcessiveBufferingTimeoutMs", 7000); + } + set + { + SetIntProperty("ExcessiveBufferingTimeoutMs", value); + } + } + + public int OpenTimeoutMs + { + get + { + return GetIntProperty("OpenTimeoutMs", 40000); + } + set + { + SetIntProperty("OpenTimeoutMs", value); + } + } + + internal MBRConfiguration(RegistryHive hive) + : base(hive, null, "MBR") + { + } + + public MBRConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/MachineConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/MachineConfiguration.cs new file mode 100644 index 0000000..a2aad0f --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/MachineConfiguration.cs @@ -0,0 +1,27 @@ +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class MachineConfiguration + { + private static HMEConfiguration m_HME = new HMEConfiguration(RegistryHive.LocalMachine); + + private static HMESQMConfiguration m_HMESQM = new HMESQMConfiguration(RegistryHive.LocalMachine); + + private static SetupConfiguration m_Setup = new SetupConfiguration(RegistryHive.LocalMachine); + + private static UnitTestConfiguration m_UnitTest = new UnitTestConfiguration(RegistryHive.LocalMachine); + + private static WindowsPhoneConfiguration m_WindowsPhone = new WindowsPhoneConfiguration(RegistryHive.LocalMachine); + + public static WindowsPhoneConfiguration WindowsPhone => m_WindowsPhone; + + public static UnitTestConfiguration UnitTest => m_UnitTest; + + public static SetupConfiguration Setup => m_Setup; + + public static HMESQMConfiguration HMESQM => m_HMESQM; + + public static HMEConfiguration HME => m_HME; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/MediaStoreConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/MediaStoreConfiguration.cs new file mode 100644 index 0000000..4cea137 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/MediaStoreConfiguration.cs @@ -0,0 +1,538 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class MediaStoreConfiguration : CConfigurationManagedBase + { + public bool EnableLongMutexHoldMiniDump + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("EnableLongMutexHoldMiniDump", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("EnableLongMutexHoldMiniDump", value); + } + } + + public int DBMutextLongHoldTresholdMS + { + get + { + return GetIntProperty("DBMutextLongHoldTresholdMS", 2000); + } + set + { + SetIntProperty("DBMutextLongHoldTresholdMS", value); + } + } + + public bool EnableLongQueriesLog + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("EnableLongQueriesLog", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("EnableLongQueriesLog", value); + } + } + + public int LongQueryThresholdMS + { + get + { + return GetIntProperty("LongQueryThresholdMS", 2000); + } + set + { + SetIntProperty("LongQueryThresholdMS", value); + } + } + + public int AutoPlaylistQueryThresholdMS + { + get + { + return GetIntProperty("AutoPlaylistQueryThresholdMS", 5000); + } + set + { + SetIntProperty("AutoPlaylistQueryThresholdMS", value); + } + } + + public int ArtistMetadataLookupBackoff + { + get + { + return GetIntProperty("ArtistMetadataLookupBackoff", 250); + } + set + { + SetIntProperty("ArtistMetadataLookupBackoff", value); + } + } + + public bool UseOldRequeryCompare + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("UseOldRequeryCompare", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("UseOldRequeryCompare", value); + } + } + + public bool SharedUserRatings + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("SharedUserRatings", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("SharedUserRatings", value); + } + } + + public int HiddenContentCleanupIntervalMinutes + { + get + { + return GetIntProperty("HiddenContentCleanupIntervalMinutes", 1440); + } + set + { + SetIntProperty("HiddenContentCleanupIntervalMinutes", value); + } + } + + public double HiddenContentCleanupTime + { + get + { + return GetDoubleProperty("HiddenContentCleanupTime", 0.0); + } + set + { + SetDoubleProperty("HiddenContentCleanupTime", value); + } + } + + public bool EnableFuzzyMatching + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("EnableFuzzyMatching", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("EnableFuzzyMatching", value); + } + } + + public string LastServiceIdFlushDate + { + get + { + return GetStringProperty("LastServiceIdFlushDate", ""); + } + set + { + SetStringProperty("LastServiceIdFlushDate", value); + } + } + + public bool AlertSyncAllFriendsBehavior + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("AlertSyncAllFriendsBehavior", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("AlertSyncAllFriendsBehavior", value); + } + } + + public int ArtCheckRunTimeMs + { + get + { + return GetIntProperty("ArtCheckRunTimeMs", 60000); + } + set + { + SetIntProperty("ArtCheckRunTimeMs", value); + } + } + + public int CachedAllTracksCount + { + get + { + return GetIntProperty("CachedAllTracksCount", 10000); + } + set + { + SetIntProperty("CachedAllTracksCount", value); + } + } + + public bool ComputeFingerprints + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ComputeFingerprints", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ComputeFingerprints", value); + } + } + + public bool RanUnknownTrackCheck + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("RanUnknownTrackCheck", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("RanUnknownTrackCheck", value); + } + } + + public bool SaveMDQCD + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("SaveMDQCD", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("SaveMDQCD", value); + } + } + + public bool SaveMDRCD + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("SaveMDRCD", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("SaveMDRCD", value); + } + } + + public int LifecycleTimeoutMs + { + get + { + return GetIntProperty("LifecycleTimeoutMs", 600000); + } + set + { + SetIntProperty("LifecycleTimeoutMs", value); + } + } + + public bool WriteOutMetadata + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("WriteOutMetadata", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("WriteOutMetadata", value); + } + } + + public int AutoOrganize + { + get + { + return GetIntProperty("AutoOrganize", 0); + } + set + { + SetIntProperty("AutoOrganize", value); + } + } + + public int AutoRename + { + get + { + return GetIntProperty("AutoRename", 0); + } + set + { + SetIntProperty("AutoRename", value); + } + } + + public int AutoUpdateMetadata + { + get + { + return GetIntProperty("AutoUpdateMetadata", 1); + } + set + { + SetIntProperty("AutoUpdateMetadata", value); + } + } + + public bool OverwriteAllMetadata + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("OverwriteAllMetadata", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("OverwriteAllMetadata", value); + } + } + + public bool ConnectToInternetForAlbumMetadata + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ConnectToInternetForAlbumMetadata", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ConnectToInternetForAlbumMetadata", value); + } + } + + public bool ConfirmPasteAlbumArt + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ConfirmPasteAlbumArt", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ConfirmPasteAlbumArt", value); + } + } + + public bool ConfirmMultiVideoEdit + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ConfirmMultiVideoEdit", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ConfirmMultiVideoEdit", value); + } + } + + public bool ConfirmMultiSongEdit + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ConfirmMultiSongEdit", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ConfirmMultiSongEdit", value); + } + } + + public bool ConfirmMultiAlbumEdit + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ConfirmMultiAlbumEdit", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ConfirmMultiAlbumEdit", value); + } + } + + public bool ConfirmDeviceMediaDeletion + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ConfirmDeviceMediaDeletion", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ConfirmDeviceMediaDeletion", value); + } + } + + public bool ConfirmAccountDevicePortableDeletion + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ConfirmAccountDevicePortableDeletion", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ConfirmAccountDevicePortableDeletion", value); + } + } + + public bool ConfirmAccountDevicePCDeletion + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ConfirmAccountDevicePCDeletion", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ConfirmAccountDevicePCDeletion", value); + } + } + + public int PlaylistDefaultDeleteChoice + { + get + { + return GetIntProperty("PlaylistDefaultDeleteChoice", 0); + } + set + { + SetIntProperty("PlaylistDefaultDeleteChoice", value); + } + } + + public int LibraryDefaultDeleteChoice + { + get + { + return GetIntProperty("LibraryDefaultDeleteChoice", 0); + } + set + { + SetIntProperty("LibraryDefaultDeleteChoice", value); + } + } + + public int MaxSearchResults + { + get + { + return GetIntProperty("MaxSearchResults", 200); + } + set + { + SetIntProperty("MaxSearchResults", value); + } + } + + public string IgnoredChars + { + get + { + return GetStringProperty("IgnoredChars", "\"%\n\t"); + } + set + { + SetStringProperty("IgnoredChars", value); + } + } + + public int GrovelTimeListUpdateMinimumFrequency + { + get + { + return GetIntProperty("GrovelTimeListUpdateMinimumFrequency", 5000); + } + set + { + SetIntProperty("GrovelTimeListUpdateMinimumFrequency", value); + } + } + + public int FileOpenWatchdog + { + get + { + return GetIntProperty("FileOpenWatchdog", 10000); + } + set + { + SetIntProperty("FileOpenWatchdog", value); + } + } + + public int ListUpdateMinimumFrequency + { + get + { + return GetIntProperty("ListUpdateMinimumFrequency", 500); + } + set + { + SetIntProperty("ListUpdateMinimumFrequency", value); + } + } + + internal MediaStoreConfiguration(RegistryHive hive) + : base(hive, null, "MediaStore") + { + } + + public MediaStoreConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/MessagingConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/MessagingConfiguration.cs new file mode 100644 index 0000000..d77a354 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/MessagingConfiguration.cs @@ -0,0 +1,113 @@ +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class MessagingConfiguration : CConfigurationManagedBase + { + public int MaxServerCartItems + { + get + { + return GetIntProperty("MaxServerCartItems", 50); + } + set + { + SetIntProperty("MaxServerCartItems", value); + } + } + + public int MaxSubMessagesPerMessage + { + get + { + return GetIntProperty("MaxSubMessagesPerMessage", 10); + } + set + { + SetIntProperty("MaxSubMessagesPerMessage", value); + } + } + + public int MaxTracksPerMessage + { + get + { + return GetIntProperty("MaxTracksPerMessage", 200); + } + set + { + SetIntProperty("MaxTracksPerMessage", value); + } + } + + public int MaxPhotosPerMessage + { + get + { + return GetIntProperty("MaxPhotosPerMessage", 30); + } + set + { + SetIntProperty("MaxPhotosPerMessage", value); + } + } + + public int MessageMaxSize + { + get + { + return GetIntProperty("MessageMaxSize", 5242880); + } + set + { + SetIntProperty("MessageMaxSize", value); + } + } + + public int LastMessageId + { + get + { + return GetIntProperty("LastMessageId", 0); + } + set + { + SetIntProperty("LastMessageId", value); + } + } + + public int ServiceThrottlingInterval + { + get + { + return GetIntProperty("ServiceThrottlingInterval", 5000); + } + set + { + SetIntProperty("ServiceThrottlingInterval", value); + } + } + + public int UnreadMessageCountPollInterval + { + get + { + return GetIntProperty("UnreadMessageCountPollInterval", 600000); + } + set + { + SetIntProperty("UnreadMessageCountPollInterval", value); + } + } + + internal MessagingConfiguration(RegistryHive hive) + : base(hive, null, "Messaging") + { + } + + public MessagingConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/MessagingUserGuidConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/MessagingUserGuidConfiguration.cs new file mode 100644 index 0000000..9371ee8 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/MessagingUserGuidConfiguration.cs @@ -0,0 +1,29 @@ +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class MessagingUserGuidConfiguration : CConfigurationManagedBase + { + public int CartItemsToUploadCount + { + get + { + return GetIntProperty("CartItemsToUploadCount", -1); + } + set + { + SetIntProperty("CartItemsToUploadCount", value); + } + } + + internal MessagingUserGuidConfiguration(RegistryHive hive) + : base(hive, null, "MessagingUserGuid") + { + } + + public MessagingUserGuidConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/NSSConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/NSSConfiguration.cs new file mode 100644 index 0000000..444acfa --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/NSSConfiguration.cs @@ -0,0 +1,78 @@ +using System.Collections.Generic; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class NSSConfiguration : CConfigurationManagedBase + { + public int UnShareFoldersProcessed + { + get + { + return GetIntProperty("UnShareFoldersProcessed", 0); + } + set + { + SetIntProperty("UnShareFoldersProcessed", value); + } + } + + public int ShareFoldersProcessed + { + get + { + return GetIntProperty("ShareFoldersProcessed", 0); + } + set + { + SetIntProperty("ShareFoldersProcessed", value); + } + } + + public IList ErrorFolders + { + get + { + return GetStringListProperty("ErrorFolders"); + } + set + { + SetStringListProperty("ErrorFolders", value); + } + } + + public IList UnShareFolders + { + get + { + return GetStringListProperty("UnShareFolders"); + } + set + { + SetStringListProperty("UnShareFolders", value); + } + } + + public IList ShareFolders + { + get + { + return GetStringListProperty("ShareFolders"); + } + set + { + SetStringListProperty("ShareFolders", value); + } + } + + internal NSSConfiguration(RegistryHive hive) + : base(hive, null, "NSS") + { + } + + public NSSConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/NativeConfigurationChangeEventHandler.cs b/ZuneDBApi/Microsoft/Zune/Configuration/NativeConfigurationChangeEventHandler.cs new file mode 100644 index 0000000..31a8114 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/NativeConfigurationChangeEventHandler.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Configuration +{ + public unsafe delegate void NativeConfigurationChangeEventHandler(ushort* pwszPropertyName); +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/NotificationMarshaller.cs b/ZuneDBApi/Microsoft/Zune/Configuration/NotificationMarshaller.cs new file mode 100644 index 0000000..61256f0 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/NotificationMarshaller.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Configuration +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [MiscellaneousBits(64)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct NotificationMarshaller + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/PicksConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/PicksConfiguration.cs new file mode 100644 index 0000000..ddef93d --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/PicksConfiguration.cs @@ -0,0 +1,56 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class PicksConfiguration : CConfigurationManagedBase + { + public string UsersWhoHaveUploadedArtists + { + get + { + return GetStringProperty("UsersWhoHaveUploadedArtists", ""); + } + set + { + SetStringProperty("UsersWhoHaveUploadedArtists", value); + } + } + + public bool ShowPlayAndRate + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowPlayAndRate", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowPlayAndRate", value); + } + } + + public int CacheRefreshMinutes + { + get + { + return GetIntProperty("CacheRefreshMinutes", 60); + } + set + { + SetIntProperty("CacheRefreshMinutes", value); + } + } + + internal PicksConfiguration(RegistryHive hive) + : base(hive, null, "Picks") + { + } + + public PicksConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/PicturesConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/PicturesConfiguration.cs new file mode 100644 index 0000000..40ef654 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/PicturesConfiguration.cs @@ -0,0 +1,104 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class PicturesConfiguration : CConfigurationManagedBase + { + public int WinLivePhotoGalleryMinorVersion + { + get + { + return GetIntProperty("WinLivePhotoGalleryMinorVersion", 0); + } + set + { + SetIntProperty("WinLivePhotoGalleryMinorVersion", value); + } + } + + public int WinLivePhotoGalleryMajorVersion + { + get + { + return GetIntProperty("WinLivePhotoGalleryMajorVersion", 14); + } + set + { + SetIntProperty("WinLivePhotoGalleryMajorVersion", value); + } + } + + public string WinLivePhotoGalleryUpgradeCode + { + get + { + return GetStringProperty("WinLivePhotoGalleryUpgradeCode", "F81F501C-236B-4B4A-8E92-0575EAAD06FA"); + } + set + { + SetStringProperty("WinLivePhotoGalleryUpgradeCode", value); + } + } + + public int WinLiveMovieMakerMinorVersion + { + get + { + return GetIntProperty("WinLiveMovieMakerMinorVersion", 0); + } + set + { + SetIntProperty("WinLiveMovieMakerMinorVersion", value); + } + } + + public int WinLiveMovieMakerMajorVersion + { + get + { + return GetIntProperty("WinLiveMovieMakerMajorVersion", 14); + } + set + { + SetIntProperty("WinLiveMovieMakerMajorVersion", value); + } + } + + public string WinLiveMovieMakerUpgradeCode + { + get + { + return GetStringProperty("WinLiveMovieMakerUpgradeCode", "D12D72AE-1B05-4DD3-8EAD-06A40BE6E02F"); + } + set + { + SetStringProperty("WinLiveMovieMakerUpgradeCode", value); + } + } + + public bool DisplayAutouploadNotification + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("DisplayAutouploadNotification", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("DisplayAutouploadNotification", value); + } + } + + internal PicturesConfiguration(RegistryHive hive) + : base(hive, null, "Pictures") + { + } + + public PicturesConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/PlaybackConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/PlaybackConfiguration.cs new file mode 100644 index 0000000..e914153 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/PlaybackConfiguration.cs @@ -0,0 +1,324 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class PlaybackConfiguration : CConfigurationManagedBase + { + public int FSDKCloseReaderThresholdMs + { + get + { + return GetIntProperty("FSDKCloseReaderThresholdMs", 10000); + } + set + { + SetIntProperty("FSDKCloseReaderThresholdMs", value); + } + } + + public bool ShowNowPlayingClipAnimations + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowNowPlayingClipAnimations", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowNowPlayingClipAnimations", value); + } + } + + public bool NotifyIncludePodcasts + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("NotifyIncludePodcasts", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("NotifyIncludePodcasts", value); + } + } + + public bool NotifyIncludeVideos + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("NotifyIncludeVideos", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("NotifyIncludeVideos", value); + } + } + + public bool NotifyIMClient + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("NotifyIMClient", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("NotifyIMClient", value); + } + } + + public bool CDPlayJitterCorrect + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("CDPlayJitterCorrect", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("CDPlayJitterCorrect", value); + } + } + + public bool ShowNowPlayingList + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowNowPlayingList", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowNowPlayingList", value); + } + } + + public bool ShowTotalTime + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowTotalTime", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowTotalTime", value); + } + } + + public bool ModeLoop + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ModeLoop", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ModeLoop", value); + } + } + + public bool ModeShuffle + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ModeShuffle", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ModeShuffle", value); + } + } + + public bool Mute + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("Mute", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("Mute", value); + } + } + + public int Volume + { + get + { + return GetIntProperty("Volume", 50); + } + set + { + SetIntProperty("Volume", value); + } + } + + public int DXVAMaximumFPS + { + get + { + return GetIntProperty("DXVAMaximumFPS", 31); + } + set + { + SetIntProperty("DXVAMaximumFPS", value); + } + } + + public int ForceDeinterlaceMode + { + get + { + return GetIntProperty("ForceDeinterlaceMode", 0); + } + set + { + SetIntProperty("ForceDeinterlaceMode", value); + } + } + + public int ApproximateSeekBitrate + { + get + { + return GetIntProperty("ApproximateSeekBitrate", 0); + } + set + { + SetIntProperty("ApproximateSeekBitrate", value); + } + } + + public int ApproximateSeekDuration + { + get + { + return GetIntProperty("ApproximateSeekDuration", 1800); + } + set + { + SetIntProperty("ApproximateSeekDuration", value); + } + } + + public bool AllowApproximateSeekingOnShinyDiscOnly + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("AllowApproximateSeekingOnShinyDiscOnly", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("AllowApproximateSeekingOnShinyDiscOnly", value); + } + } + + public bool ForceApproximateSeeking + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ForceApproximateSeeking", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ForceApproximateSeeking", value); + } + } + + public bool AllowApproximateSeeking + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("AllowApproximateSeeking", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("AllowApproximateSeeking", value); + } + } + + public int DynamicRangeControl + { + get + { + return GetIntProperty("DynamicRangeControl", 0); + } + set + { + SetIntProperty("DynamicRangeControl", value); + } + } + + public bool DisableMediaQueuing + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("DisableMediaQueuing", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("DisableMediaQueuing", value); + } + } + + public bool DumpErrorInfo + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("DumpErrorInfo", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("DumpErrorInfo", value); + } + } + + public int MP4DropFramesIfLateByInMilliseconds + { + get + { + return GetIntProperty("MP4DropFramesIfLateByInMilliseconds", 750); + } + set + { + SetIntProperty("MP4DropFramesIfLateByInMilliseconds", value); + } + } + + internal PlaybackConfiguration(RegistryHive hive) + : base(hive, null, "Playback") + { + } + + public PlaybackConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/QuickMixConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/QuickMixConfiguration.cs new file mode 100644 index 0000000..b83b970 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/QuickMixConfiguration.cs @@ -0,0 +1,184 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class QuickMixConfiguration : CConfigurationManagedBase + { + public bool AlwaysRefreshSmartDJ + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("AlwaysRefreshSmartDJ", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("AlwaysRefreshSmartDJ", value); + } + } + + public double AlgorithmThresholdAverage + { + get + { + return GetDoubleProperty("AlgorithmThresholdAverage", 0.2); + } + set + { + SetDoubleProperty("AlgorithmThresholdAverage", value); + } + } + + public byte[] AlgorithmThresholds + { + get + { + return GetBinaryProperty("AlgorithmThresholds"); + } + set + { + SetBinaryProperty("AlgorithmThresholds", value); + } + } + + public byte[] AlgorithmWeights + { + get + { + return GetBinaryProperty("AlgorithmWeights"); + } + set + { + SetBinaryProperty("AlgorithmWeights", value); + } + } + + public bool OnlyEnableItemsWithQuickMix + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("OnlyEnableItemsWithQuickMix", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("OnlyEnableItemsWithQuickMix", value); + } + } + + public bool RetrieveRelatedArtistsMetadata + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("RetrieveRelatedArtistsMetadata", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("RetrieveRelatedArtistsMetadata", value); + } + } + + public int DefaultPlaylistLength + { + get + { + return GetIntProperty("DefaultPlaylistLength", 30); + } + set + { + SetIntProperty("DefaultPlaylistLength", value); + } + } + + public int MinimumPlaylistLength + { + get + { + return GetIntProperty("MinimumPlaylistLength", 10); + } + set + { + SetIntProperty("MinimumPlaylistLength", value); + } + } + + public int InitializationLevel + { + get + { + return GetIntProperty("InitializationLevel", 0); + } + set + { + SetIntProperty("InitializationLevel", value); + } + } + + public bool ForceInitialize + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ForceInitialize", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ForceInitialize", value); + } + } + + public int DisableInLibraryCheck + { + get + { + return GetIntProperty("DisableInLibraryCheck", 0); + } + set + { + SetIntProperty("DisableInLibraryCheck", value); + } + } + + public bool Debug + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("Debug", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("Debug", value); + } + } + + public int CriticalMass + { + get + { + return GetIntProperty("CriticalMass", 80); + } + set + { + SetIntProperty("CriticalMass", value); + } + } + + internal QuickMixConfiguration(RegistryHive hive) + : base(hive, null, "QuickMix") + { + } + + public QuickMixConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/QuickplayConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/QuickplayConfiguration.cs new file mode 100644 index 0000000..6311bbc --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/QuickplayConfiguration.cs @@ -0,0 +1,110 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class QuickplayConfiguration : CConfigurationManagedBase + { + public bool QuickplayInForeground + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("QuickplayInForeground", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("QuickplayInForeground", value); + } + } + + public bool ShowQuickMixDeletionIcon + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowQuickMixDeletionIcon", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowQuickMixDeletionIcon", value); + } + } + + public bool ShowFUE + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowFUE", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowFUE", value); + } + } + + public bool CheckUseCount + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("CheckUseCount", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("CheckUseCount", value); + } + } + + public int MaxUnusedCount + { + get + { + return GetIntProperty("MaxUnusedCount", 3); + } + set + { + SetIntProperty("MaxUnusedCount", value); + } + } + + public int UnusedCount + { + get + { + return GetIntProperty("UnusedCount", 0); + } + set + { + SetIntProperty("UnusedCount", value); + } + } + + public string FavoredExperience + { + get + { + return GetStringProperty("FavoredExperience", ""); + } + set + { + SetStringProperty("FavoredExperience", value); + } + } + + internal QuickplayConfiguration(RegistryHive hive) + : base(hive, null, "Quickplay") + { + } + + public QuickplayConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/RecorderConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/RecorderConfiguration.cs new file mode 100644 index 0000000..bbb82c3 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/RecorderConfiguration.cs @@ -0,0 +1,116 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class RecorderConfiguration : CConfigurationManagedBase + { + public int AutoEjectCD + { + get + { + return GetIntProperty("AutoEjectCD", 0); + } + set + { + SetIntProperty("AutoEjectCD", value); + } + } + + public int AutoCopyCD + { + get + { + return GetIntProperty("AutoCopyCD", 0); + } + set + { + SetIntProperty("AutoCopyCD", value); + } + } + + public string PreferredCodecPath + { + get + { + return GetStringProperty("PreferredCodecPath", ""); + } + set + { + SetStringProperty("PreferredCodecPath", value); + } + } + + public bool UseTrackNumberInFileName + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("UseTrackNumberInFileName", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("UseTrackNumberInFileName", value); + } + } + + public int WMARecordRate + { + get + { + return GetIntProperty("WMARecordRate", 192000); + } + set + { + SetIntProperty("WMARecordRate", value); + } + } + + public int WMAVBRRecordQuality + { + get + { + return GetIntProperty("WMAVBRRecordQuality", 75); + } + set + { + SetIntProperty("WMAVBRRecordQuality", value); + } + } + + public int MP3RecordRate + { + get + { + return GetIntProperty("MP3RecordRate", 192000); + } + set + { + SetIntProperty("MP3RecordRate", value); + } + } + + public int RecordMode + { + get + { + return GetIntProperty("RecordMode", 2); + } + set + { + SetIntProperty("RecordMode", value); + } + } + + internal RecorderConfiguration(RegistryHive hive) + : base(hive, null, "Recorder") + { + } + + public RecorderConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/RefreshCallback.cs b/ZuneDBApi/Microsoft/Zune/Configuration/RefreshCallback.cs new file mode 100644 index 0000000..d9821b4 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/RefreshCallback.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Configuration +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [MiscellaneousBits(64)] + [DebugInfoInPDB] + [NativeCppClass] + internal struct RefreshCallback + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/SQMConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/SQMConfiguration.cs new file mode 100644 index 0000000..eb173e3 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/SQMConfiguration.cs @@ -0,0 +1,100 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class SQMConfiguration : CConfigurationManagedBase + { + public bool UsePredictableSQMFile + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("UsePredictableSQMFile", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("UsePredictableSQMFile", value); + } + } + + public bool WriteSQMLogFile + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("WriteSQMLogFile", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("WriteSQMLogFile", value); + } + } + + public int SQMLaunchIndex + { + get + { + return GetIntProperty("SQMLaunchIndex", 0); + } + set + { + SetIntProperty("SQMLaunchIndex", value); + } + } + + public bool SQMTest + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("SQMTest", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("SQMTest", value); + } + } + + public bool ForceUsageTracking + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ForceUsageTracking", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ForceUsageTracking", value); + } + } + + public bool UsageTracking + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("UsageTracking", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("UsageTracking", value); + } + } + + internal SQMConfiguration(RegistryHive hive) + : base(hive, null, "SQM") + { + } + + public SQMConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/SeriesConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/SeriesConfiguration.cs new file mode 100644 index 0000000..57809f6 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/SeriesConfiguration.cs @@ -0,0 +1,65 @@ +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class SeriesConfiguration : CConfigurationManagedBase + { + public int PodcastLastSelectedSeriesIndex + { + get + { + return GetIntProperty("PodcastLastSelectedSeriesIndex", 0); + } + set + { + SetIntProperty("PodcastLastSelectedSeriesIndex", value); + } + } + + public int PodcastDefaultUnsubscribeChoice + { + get + { + return GetIntProperty("PodcastDefaultUnsubscribeChoice", 0); + } + set + { + SetIntProperty("PodcastDefaultUnsubscribeChoice", value); + } + } + + public int PodcastDefaultPlaybackOrder + { + get + { + return GetIntProperty("PodcastDefaultPlaybackOrder", 0); + } + set + { + SetIntProperty("PodcastDefaultPlaybackOrder", value); + } + } + + public int PodcastDefaultKeepEpisodes + { + get + { + return GetIntProperty("PodcastDefaultKeepEpisodes", 3); + } + set + { + SetIntProperty("PodcastDefaultKeepEpisodes", value); + } + } + + internal SeriesConfiguration(RegistryHive hive) + : base(hive, null, "Series") + { + } + + public SeriesConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/ServiceConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/ServiceConfiguration.cs new file mode 100644 index 0000000..58f462d --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/ServiceConfiguration.cs @@ -0,0 +1,332 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class ServiceConfiguration : CConfigurationManagedBase + { + public string RootLicenseFirstRefreshDate + { + get + { + return GetStringProperty("RootLicenseFirstRefreshDate", ""); + } + set + { + SetStringProperty("RootLicenseFirstRefreshDate", value); + } + } + + public string MBRTelemetryEndpoint + { + get + { + return GetStringProperty("MBRTelemetryEndpoint", ""); + } + set + { + SetStringProperty("MBRTelemetryEndpoint", value); + } + } + + public int RefreshPCLicenseResult + { + get + { + return GetIntProperty("RefreshPCLicenseResult", 0); + } + set + { + SetIntProperty("RefreshPCLicenseResult", value); + } + } + + public int RefreshDeviceLicenseResult + { + get + { + return GetIntProperty("RefreshDeviceLicenseResult", 0); + } + set + { + SetIntProperty("RefreshDeviceLicenseResult", value); + } + } + + public int AutoRefreshQueryFallback + { + get + { + return GetIntProperty("AutoRefreshQueryFallback", 1800000); + } + set + { + SetIntProperty("AutoRefreshQueryFallback", value); + } + } + + public bool PurchaseHD + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("PurchaseHD", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("PurchaseHD", value); + } + } + + public int RecommendationsMaxTrackCount + { + get + { + return GetIntProperty("RecommendationsMaxTrackCount", 25); + } + set + { + SetIntProperty("RecommendationsMaxTrackCount", value); + } + } + + public bool InhibitReviewRefreshWarning + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("InhibitReviewRefreshWarning", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("InhibitReviewRefreshWarning", value); + } + } + + public bool InhibitWinPhoneAppPurchaseConfirmation + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("InhibitWinPhoneAppPurchaseConfirmation", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("InhibitWinPhoneAppPurchaseConfirmation", value); + } + } + + public bool InhibitSubscriptionFreePurchasePrompt + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("InhibitSubscriptionFreePurchasePrompt", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("InhibitSubscriptionFreePurchasePrompt", value); + } + } + + public bool InhibitSubscriptionEndingWarning + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("InhibitSubscriptionEndingWarning", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("InhibitSubscriptionEndingWarning", value); + } + } + + public bool InhibitSubscriptionBillingViolationSignInWarning + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("InhibitSubscriptionBillingViolationSignInWarning", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("InhibitSubscriptionBillingViolationSignInWarning", value); + } + } + + public bool InhibitSubscriptionMachineCountExceededSignInWarning + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("InhibitSubscriptionMachineCountExceededSignInWarning", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("InhibitSubscriptionMachineCountExceededSignInWarning", value); + } + } + + public string TimeTravel + { + get + { + return GetStringProperty("TimeTravel", ""); + } + set + { + SetStringProperty("TimeTravel", value); + } + } + + public string MarketplaceCulture + { + get + { + return GetStringProperty("MarketplaceCulture", ""); + } + set + { + SetStringProperty("MarketplaceCulture", value); + } + } + + public string LastSignedInUserGuid + { + get + { + return GetStringProperty("LastSignedInUserGuid", ""); + } + set + { + SetStringProperty("LastSignedInUserGuid", value); + } + } + + public int ReportUsageDataDuration + { + get + { + return GetIntProperty("ReportUsageDataDuration", 7); + } + set + { + SetIntProperty("ReportUsageDataDuration", value); + } + } + + public int RefreshSubscriptionLicenseDuration + { + get + { + return GetIntProperty("RefreshSubscriptionLicenseDuration", 7); + } + set + { + SetIntProperty("RefreshSubscriptionLicenseDuration", value); + } + } + + public string SignInAtStartupUser + { + get + { + return GetStringProperty("SignInAtStartupUser", ""); + } + set + { + SetStringProperty("SignInAtStartupUser", value); + } + } + + public string CommerceEndpoint + { + get + { + return GetStringProperty("CommerceEndpoint", ""); + } + set + { + SetStringProperty("CommerceEndpoint", value); + } + } + + public string WindowsLiveSignupEndpoint + { + get + { + return GetStringProperty("WindowsLiveSignupEndpoint", ""); + } + set + { + SetStringProperty("WindowsLiveSignupEndpoint", value); + } + } + + public string BillingEndpoint + { + get + { + return GetStringProperty("BillingEndpoint", ""); + } + set + { + SetStringProperty("BillingEndpoint", value); + } + } + + public string TelemetryEndpoint + { + get + { + return GetStringProperty("TelemetryEndpoint", ""); + } + set + { + SetStringProperty("TelemetryEndpoint", value); + } + } + + public string WMISPartner + { + get + { + return GetStringProperty("WMISPartner", ""); + } + set + { + SetStringProperty("WMISPartner", value); + } + } + + public string WMISEndpoints + { + get + { + return GetStringProperty("WMISEndpoints", ""); + } + set + { + SetStringProperty("WMISEndpoints", value); + } + } + + internal ServiceConfiguration(RegistryHive hive) + : base(hive, null, "Service") + { + } + + public ServiceConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/ServiceUserGuidConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/ServiceUserGuidConfiguration.cs new file mode 100644 index 0000000..6e6876e --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/ServiceUserGuidConfiguration.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class ServiceUserGuidConfiguration : CConfigurationManagedBase + { + public long SubscriptionId + { + get + { + return GetInt64Property("SubscriptionId", 0L); + } + set + { + SetInt64Property("SubscriptionId", value); + } + } + + public bool ActiveSubscription + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ActiveSubscription", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ActiveSubscription", value); + } + } + + public int Seed + { + get + { + return GetIntProperty("Seed", 0); + } + set + { + SetIntProperty("Seed", value); + } + } + + public DateTime RecommendationsRefreshDate + { + get + { + DateTime defaultValue = new DateTime(1999, 1, 1); + return GetDateTimeProperty("RecommendationsRefreshDate", defaultValue); + } + set + { + SetDateTimeProperty("RecommendationsRefreshDate", value); + } + } + + public DateTime RecommendationsDate + { + get + { + DateTime defaultValue = new DateTime(1999, 1, 1); + return GetDateTimeProperty("RecommendationsDate", defaultValue); + } + set + { + SetDateTimeProperty("RecommendationsDate", value); + } + } + + internal ServiceUserGuidConfiguration(RegistryHive hive) + : base(hive, null, "ServiceUserGuid") + { + } + + public ServiceUserGuidConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/SetupConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/SetupConfiguration.cs new file mode 100644 index 0000000..2028a93 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/SetupConfiguration.cs @@ -0,0 +1,178 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class SetupConfiguration : CConfigurationManagedBase + { + public bool ReinitializeFirmwareTable + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ReinitializeFirmwareTable", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ReinitializeFirmwareTable", value); + } + } + + public int InstallPreReqTime + { + get + { + return GetIntProperty("InstallPreReqTime", 0); + } + set + { + SetIntProperty("InstallPreReqTime", value); + } + } + + public int InstallSearchTime + { + get + { + return GetIntProperty("InstallSearchTime", 0); + } + set + { + SetIntProperty("InstallSearchTime", value); + } + } + + public int InstallUserTime + { + get + { + return GetIntProperty("InstallUserTime", 0); + } + set + { + SetIntProperty("InstallUserTime", value); + } + } + + public int InstallZuneTime + { + get + { + return GetIntProperty("InstallZuneTime", 0); + } + set + { + SetIntProperty("InstallZuneTime", value); + } + } + + public int TotalInstallTime + { + get + { + return GetIntProperty("TotalInstallTime", 0); + } + set + { + SetIntProperty("TotalInstallTime", value); + } + } + + public string WTProfile + { + get + { + return GetStringProperty("WTProfile", "Installer.zune.setup"); + } + set + { + SetStringProperty("WTProfile", value); + } + } + + public bool CodecInfoSent + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("CodecInfoSent", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("CodecInfoSent", value); + } + } + + public int ServicePack + { + get + { + return GetIntProperty("ServicePack", 2); + } + set + { + SetIntProperty("ServicePack", value); + } + } + + public int OSVersion + { + get + { + return GetIntProperty("OSVersion", 501); + } + set + { + SetIntProperty("OSVersion", value); + } + } + + public string OldVersion + { + get + { + return GetStringProperty("OldVersion", ""); + } + set + { + SetStringProperty("OldVersion", value); + } + } + + public string InstallationSource + { + get + { + return GetStringProperty("InstallationSource", ""); + } + set + { + SetStringProperty("InstallationSource", value); + } + } + + public int UpdateCheckFrequency + { + get + { + return GetIntProperty("UpdateCheckFrequency", 3); + } + set + { + SetIntProperty("UpdateCheckFrequency", value); + } + } + + internal SetupConfiguration(RegistryHive hive) + : base(hive, null, "Setup") + { + } + + public SetupConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/ShellConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/ShellConfiguration.cs new file mode 100644 index 0000000..cb1cd80 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/ShellConfiguration.cs @@ -0,0 +1,316 @@ +using System; +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class ShellConfiguration : CConfigurationManagedBase + { + public DateTime LastUpdateCheck + { + get + { + DateTime defaultValue = new DateTime(1999, 1, 1); + return GetDateTimeProperty("LastUpdateCheck", defaultValue); + } + set + { + SetDateTimeProperty("LastUpdateCheck", value); + } + } + + public string LastMarketplaceCulture + { + get + { + return GetStringProperty("LastMarketplaceCulture", ""); + } + set + { + SetStringProperty("LastMarketplaceCulture", value); + } + } + + public string LastClientCulture + { + get + { + return GetStringProperty("LastClientCulture", ""); + } + set + { + SetStringProperty("LastClientCulture", value); + } + } + + public bool ShowAppsCollectionNotification + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowAppsCollectionNotification", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowAppsCollectionNotification", value); + } + } + + public bool ShowApplicationPivot + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowApplicationPivot", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowApplicationPivot", value); + } + } + + public int CompactModePivot + { + get + { + return GetIntProperty("CompactModePivot", 0); + } + set + { + SetIntProperty("CompactModePivot", value); + } + } + + public bool ShowSongInfoInWindowTitle + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowSongInfoInWindowTitle", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowSongInfoInWindowTitle", value); + } + } + + public bool ShowAppsForWindowsPhoneOnlyHeader + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowAppsForWindowsPhoneOnlyHeader", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowAppsForWindowsPhoneOnlyHeader", value); + } + } + + public bool ShowAppsForZuneHDOnlyHeader + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowAppsForZuneHDOnlyHeader", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowAppsForZuneHDOnlyHeader", value); + } + } + + public bool ShowContentTypes + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowContentTypes", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowContentTypes", value); + } + } + + public string StartupPage + { + get + { + return GetStringProperty("StartupPage", "Collection\\Default"); + } + set + { + SetStringProperty("StartupPage", value); + } + } + + public bool MixFixedRandom + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("MixFixedRandom", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("MixFixedRandom", value); + } + } + + public int MixIdleTimeoutMS + { + get + { + return GetIntProperty("MixIdleTimeoutMS", 30000); + } + set + { + SetIntProperty("MixIdleTimeoutMS", value); + } + } + + public bool ShowWhatsNew + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowWhatsNew", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowWhatsNew", value); + } + } + + public int ShowNowPlayingBackgroundOnIdleTimeout + { + get + { + return GetIntProperty("ShowNowPlayingBackgroundOnIdleTimeout", 90); + } + set + { + SetIntProperty("ShowNowPlayingBackgroundOnIdleTimeout", value); + } + } + + public bool ShowPlayInfoInTaskbar + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ShowPlayInfoInTaskbar", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ShowPlayInfoInTaskbar", value); + } + } + + public long InitializationSequence + { + get + { + return GetInt64Property("InitializationSequence", 0L); + } + set + { + SetInt64Property("InitializationSequence", value); + } + } + + public bool Sounds + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("Sounds", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("Sounds", value); + } + } + + public int BackgroundColor + { + get + { + return GetIntProperty("BackgroundColor", 0); + } + set + { + SetIntProperty("BackgroundColor", value); + } + } + + public string BackgroundImage + { + get + { + return GetStringProperty("BackgroundImage", ""); + } + set + { + SetStringProperty("BackgroundImage", value); + } + } + + public int VideoCollectionView + { + get + { + return GetIntProperty("VideoCollectionView", 0); + } + set + { + SetIntProperty("VideoCollectionView", value); + } + } + + public int MusicDeviceView + { + get + { + return GetIntProperty("MusicDeviceView", 0); + } + set + { + SetIntProperty("MusicDeviceView", value); + } + } + + public int MusicCollectionView + { + get + { + return GetIntProperty("MusicCollectionView", 0); + } + set + { + SetIntProperty("MusicCollectionView", value); + } + } + + internal ShellConfiguration(RegistryHive hive) + : base(hive, null, "Shell") + { + } + + public ShellConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/ShipAssertsConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/ShipAssertsConfiguration.cs new file mode 100644 index 0000000..9508ebc --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/ShipAssertsConfiguration.cs @@ -0,0 +1,79 @@ +using System; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class ShipAssertsConfiguration : CConfigurationManagedBase + { + public int ConfigSerialNumber + { + get + { + return GetIntProperty("ConfigSerialNumber", 0); + } + set + { + SetIntProperty("ConfigSerialNumber", value); + } + } + + public int DefaultExpirationDays + { + get + { + return GetIntProperty("DefaultExpirationDays", 14); + } + set + { + SetIntProperty("DefaultExpirationDays", value); + } + } + + public int CaptureDumpTimeOutSec + { + get + { + return GetIntProperty("CaptureDumpTimeOutSec", 120); + } + set + { + SetIntProperty("CaptureDumpTimeOutSec", value); + } + } + + public int UpdateFrequency + { + get + { + return GetIntProperty("UpdateFrequency", 1440); + } + set + { + SetIntProperty("UpdateFrequency", value); + } + } + + public DateTime LastConfigDownload + { + get + { + DateTime defaultValue = new DateTime(1999, 1, 1); + return GetDateTimeProperty("LastConfigDownload", defaultValue); + } + set + { + SetDateTimeProperty("LastConfigDownload", value); + } + } + + internal ShipAssertsConfiguration(RegistryHive hive) + : base(hive, null, "ShipAsserts") + { + } + + public ShipAssertsConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/SocialConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/SocialConfiguration.cs new file mode 100644 index 0000000..ff1d00a --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/SocialConfiguration.cs @@ -0,0 +1,46 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class SocialConfiguration : CConfigurationManagedBase + { + public bool ConfirmDeleteFriend + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ConfirmDeleteFriend", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ConfirmDeleteFriend", value); + } + } + + public bool ConfirmAcceptFriend + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("ConfirmAcceptFriend", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("ConfirmAcceptFriend", value); + } + } + + internal SocialConfiguration(RegistryHive hive) + : base(hive, null, "Social") + { + } + + public SocialConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/SocialUserGuidConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/SocialUserGuidConfiguration.cs new file mode 100644 index 0000000..895bc5e --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/SocialUserGuidConfiguration.cs @@ -0,0 +1,56 @@ +using System; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class SocialUserGuidConfiguration : CConfigurationManagedBase + { + public DateTime ProfileCommentsLastRead + { + get + { + DateTime defaultValue = new DateTime(1999, 1, 1); + return GetDateTimeProperty("ProfileCommentsLastRead", defaultValue); + } + set + { + SetDateTimeProperty("ProfileCommentsLastRead", value); + } + } + + public DateTime ProfilePlayCountUpdated + { + get + { + DateTime defaultValue = new DateTime(1999, 1, 1); + return GetDateTimeProperty("ProfilePlayCountUpdated", defaultValue); + } + set + { + SetDateTimeProperty("ProfilePlayCountUpdated", value); + } + } + + public int ProfilePlayCount + { + get + { + return GetIntProperty("ProfilePlayCount", -1); + } + set + { + SetIntProperty("ProfilePlayCount", value); + } + } + + internal SocialUserGuidConfiguration(RegistryHive hive) + : base(hive, null, "SocialUserGuid") + { + } + + public SocialUserGuidConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/SubscriptionConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/SubscriptionConfiguration.cs new file mode 100644 index 0000000..28fa7b6 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/SubscriptionConfiguration.cs @@ -0,0 +1,92 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class SubscriptionConfiguration : CConfigurationManagedBase + { + public bool DisableAutomaticManagement + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("DisableAutomaticManagement", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("DisableAutomaticManagement", value); + } + } + + public int RefreshInterval + { + get + { + return GetIntProperty("RefreshInterval", 180); + } + set + { + SetIntProperty("RefreshInterval", value); + } + } + + public int MaximumValueLength + { + get + { + return GetIntProperty("MaximumValueLength", 65536); + } + set + { + SetIntProperty("MaximumValueLength", value); + } + } + + public int MaximumDocumentNestingLevels + { + get + { + return GetIntProperty("MaximumDocumentNestingLevels", 15); + } + set + { + SetIntProperty("MaximumDocumentNestingLevels", value); + } + } + + public int MaximumFeedItems + { + get + { + return GetIntProperty("MaximumFeedItems", 512); + } + set + { + SetIntProperty("MaximumFeedItems", value); + } + } + + public int MaximumFeedSizeKBytes + { + get + { + return GetIntProperty("MaximumFeedSizeKBytes", 20480); + } + set + { + SetIntProperty("MaximumFeedSizeKBytes", value); + } + } + + internal SubscriptionConfiguration(RegistryHive hive) + : base(hive, null, "Subscription") + { + } + + public SubscriptionConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/TranscodeConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/TranscodeConfiguration.cs new file mode 100644 index 0000000..c25b186 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/TranscodeConfiguration.cs @@ -0,0 +1,332 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class TranscodeConfiguration : CConfigurationManagedBase + { + public int AudioTargetBitRate + { + get + { + return GetIntProperty("AudioTargetBitRate", 192); + } + set + { + SetIntProperty("AudioTargetBitRate", value); + } + } + + public int AudioThresholdBitRate + { + get + { + return GetIntProperty("AudioThresholdBitRate", 320); + } + set + { + SetIntProperty("AudioThresholdBitRate", value); + } + } + + public string TranscodedFilesCachePath + { + get + { + return GetStringProperty("TranscodedFilesCachePath", ""); + } + set + { + SetStringProperty("TranscodedFilesCachePath", value); + } + } + + public int TranscodedVideoComplexity + { + get + { + return GetIntProperty("TranscodedVideoComplexity", 20); + } + set + { + SetIntProperty("TranscodedVideoComplexity", value); + } + } + + public int TranscodedFilesCacheSize + { + get + { + return GetIntProperty("TranscodedFilesCacheSize", 2048); + } + set + { + SetIntProperty("TranscodedFilesCacheSize", value); + } + } + + public int ThumbnailSize + { + get + { + return GetIntProperty("ThumbnailSize", 240); + } + set + { + SetIntProperty("ThumbnailSize", value); + } + } + + public int MinimumTranscodeFPTS + { + get + { + return GetIntProperty("MinimumTranscodeFPTS", 1000); + } + set + { + SetIntProperty("MinimumTranscodeFPTS", value); + } + } + + public int DiskFreeSpaceBuffer + { + get + { + return GetIntProperty("DiskFreeSpaceBuffer", 200); + } + set + { + SetIntProperty("DiskFreeSpaceBuffer", value); + } + } + + public int DefaultBitsPerSample + { + get + { + return GetIntProperty("DefaultBitsPerSample", 16); + } + set + { + SetIntProperty("DefaultBitsPerSample", value); + } + } + + public int DefaultTranscodeChannels + { + get + { + return GetIntProperty("DefaultTranscodeChannels", 2); + } + set + { + SetIntProperty("DefaultTranscodeChannels", value); + } + } + + public int DefaultTranscodeAudioFormatTag + { + get + { + return GetIntProperty("DefaultTranscodeAudioFormatTag", 353); + } + set + { + SetIntProperty("DefaultTranscodeAudioFormatTag", value); + } + } + + public int DefaultTranscodeHeight + { + get + { + return GetIntProperty("DefaultTranscodeHeight", 30000000); + } + set + { + SetIntProperty("DefaultTranscodeHeight", value); + } + } + + public int DefaultTranscodeWidth + { + get + { + return GetIntProperty("DefaultTranscodeWidth", 40000000); + } + set + { + SetIntProperty("DefaultTranscodeWidth", value); + } + } + + public int BackgroundTranscodeRepeatTimeout + { + get + { + return GetIntProperty("BackgroundTranscodeRepeatTimeout", 180000); + } + set + { + SetIntProperty("BackgroundTranscodeRepeatTimeout", value); + } + } + + public bool BackgroundTranscode + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("BackgroundTranscode", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("BackgroundTranscode", value); + } + } + + public bool PhotoTranscodeUseWIC + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("PhotoTranscodeUseWIC", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("PhotoTranscodeUseWIC", value); + } + } + + public int DefaultTranscodeFourCC + { + get + { + return GetIntProperty("DefaultTranscodeFourCC", 861293911); + } + set + { + SetIntProperty("DefaultTranscodeFourCC", value); + } + } + + public int DefaultTranscodeSecPerKey + { + get + { + return GetIntProperty("DefaultTranscodeSecPerKey", 4); + } + set + { + SetIntProperty("DefaultTranscodeSecPerKey", value); + } + } + + public int DefaultTranscodeQuality + { + get + { + return GetIntProperty("DefaultTranscodeQuality", 50); + } + set + { + SetIntProperty("DefaultTranscodeQuality", value); + } + } + + public int AudioBitrateThreshold + { + get + { + return GetIntProperty("AudioBitrateThreshold", 64000); + } + set + { + SetIntProperty("AudioBitrateThreshold", value); + } + } + + public bool TraceMatchParameter + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("TraceMatchParameter", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("TraceMatchParameter", value); + } + } + + public bool DumpTranscodeProfile + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("DumpTranscodeProfile", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("DumpTranscodeProfile", value); + } + } + + public bool DumpGetTranscodeProfile + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("DumpGetTranscodeProfile", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("DumpGetTranscodeProfile", value); + } + } + + public bool DisableFileConverterRecovery + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("DisableFileConverterRecovery", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("DisableFileConverterRecovery", value); + } + } + + public bool DeinterlaceVideo + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("DeinterlaceVideo", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("DeinterlaceVideo", value); + } + } + + internal TranscodeConfiguration(RegistryHive hive) + : base(hive, null, "Transcode") + { + } + + public TranscodeConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/TunerInfo.cs b/ZuneDBApi/Microsoft/Zune/Configuration/TunerInfo.cs new file mode 100644 index 0000000..f7c8faa --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/TunerInfo.cs @@ -0,0 +1,60 @@ +using System; + +namespace Microsoft.Zune.Configuration +{ + public class TunerInfo + { + private string m_name; + + private string m_tunerVersion; + + private DateTime m_dtCreated; + + private DateTime m_dtLastUsed; + + private TunerType m_tunerType; + + private TunerRegisterType m_tunerRegisterType; + + internal string m_tunerId; + + public TunerRegisterType TunerRegisterType => m_tunerRegisterType; + + public DateTime DateLastUsed => m_dtLastUsed; + + public DateTime DateCreated => m_dtCreated; + + public TunerType TunerType => m_tunerType; + + public string TunerVersion => m_tunerVersion; + + public string TunerName + { + get + { + if (!(m_name == (string)null) && m_name.Length != 0) + { + return m_name; + } + return m_tunerId; + } + } + + internal TunerInfo(string name, string tunerId, string tunerVersion, TunerType tunerType, TunerRegisterType tunerRegisterType, string dateCreated, string dateLastUsed) + { + m_name = name; + m_tunerId = tunerId; + m_tunerType = tunerType; + m_tunerRegisterType = tunerRegisterType; + m_tunerVersion = tunerVersion; + if (dateCreated == (string)null || !DateTime.TryParse(dateCreated, out m_dtCreated)) + { + m_dtCreated = DateTime.MinValue; + } + if (dateLastUsed == (string)null || !DateTime.TryParse(dateLastUsed, out m_dtLastUsed)) + { + m_dtLastUsed = DateTime.MinValue; + } + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/TunerInfoHandler.cs b/ZuneDBApi/Microsoft/Zune/Configuration/TunerInfoHandler.cs new file mode 100644 index 0000000..9cfd30e --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/TunerInfoHandler.cs @@ -0,0 +1,356 @@ +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Configuration +{ + internal class TunerInfoHandler : ITunerInfoHandler, IDisposable + { + private EventHandler _003Cbacking_store_003EOnChanged; + + private IList m_PCsList; + + private IList m_devicesList; + + private IList m_appStoreDevicesList; + + private DateTime m_nextPCDeregistrationDate; + + private DateTime m_nextSubscriptionDeviceDeregistrationDate; + + private DateTime m_nextAppStoreDeviceDeregistrationDate; + + [SpecialName] + public virtual event EventHandler OnChanged + { + [MethodImpl(MethodImplOptions.Synchronized)] + add + { + _003Cbacking_store_003EOnChanged = (EventHandler)Delegate.Combine(_003Cbacking_store_003EOnChanged, value); + } + [MethodImpl(MethodImplOptions.Synchronized)] + remove + { + _003Cbacking_store_003EOnChanged = (EventHandler)Delegate.Remove(_003Cbacking_store_003EOnChanged, value); + } + } + + public TunerInfoHandler() + { + m_PCsList = new List(); + m_devicesList = new List(); + m_appStoreDevicesList = new List(); + } + + private void _007ETunerInfoHandler() + { + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe virtual bool CanQueryTunerList() + { + //IL_0003: Expected I, but got I8 + //IL_0024: Expected I, but got I8 + //IL_0034: Expected I, but got I8 + IService* ptr = null; + int num = 0; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&ptr)) >= 0) + { + IService* intPtr = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 200)))((nint)intPtr); + } + if (ptr != null) + { + IService* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + return (byte)((num != 0) ? 1u : 0u) != 0; + } + + public virtual IList GetPCsList() + { + return m_PCsList; + } + + public virtual IList GetDevicesList() + { + return m_devicesList; + } + + public virtual IList GetAppStoreDevicesList() + { + return m_appStoreDevicesList; + } + + public virtual DateTime GetNextPCDeregistrationDate() + { + return m_nextPCDeregistrationDate; + } + + public virtual DateTime GetNextSubscriptionDeviceDeregistrationDate() + { + return m_nextSubscriptionDeviceDeregistrationDate; + } + + public virtual DateTime GetNextAppStoreDeviceDeregistrationDate() + { + return m_nextAppStoreDeviceDeregistrationDate; + } + + public unsafe virtual void RefreshTunerList() + { + //IL_0003: Expected I, but got I8 + //IL_0029: Expected I, but got I8 + //IL_0055: Expected I, but got I8 + //IL_0066: Expected I, but got I8 + //IL_0077: Expected I, but got I8 + //IL_007b: Expected I, but got I8 + IService* ptr = null; + int singleton = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&ptr)); + RefreshCallback* ptr2 = (RefreshCallback*)_003CModule_003E.@new(24uL); + RefreshCallback* ptr3; + try + { + ptr3 = ((ptr2 == null) ? null : _003CModule_003E.Microsoft_002EZune_002EConfiguration_002ERefreshCallback_002E_007Bctor_007D(ptr2, this)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr2); + throw; + } + singleton = (((long)(nint)ptr3 == 0) ? (-2147024882) : singleton); + if (singleton >= 0) + { + IService* intPtr = ptr; + singleton = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 552)))((nint)intPtr, (IRefreshTunerListCallback*)ptr3); + } + if (ptr3 != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr3 + 16)))((nint)ptr3); + } + if (ptr != null) + { + IService* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + ptr = null; + } + if (singleton < 0 && _003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 156uL)) & (true ? 1u : 0u)) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 153uL)) >= 5u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 144uL), 10, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x2af74624_002EWPP_RegisteredDevicesApi_cpp_Traceguids), (uint)singleton); + } + } + + public unsafe virtual void DeregisterTuner(TunerInfo info) + { + //IL_0003: Expected I, but got I8 + //IL_002c: Expected I, but got I8 + //IL_0076: Expected I, but got I8 + //IL_0090: Expected I, but got I8 + //IL_0094: Expected I, but got I8 + IService* ptr = null; + int singleton = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&ptr)); + DeregisterCallback* ptr2 = (DeregisterCallback*)_003CModule_003E.@new(24uL); + DeregisterCallback* ptr3; + try + { + ptr3 = ((ptr2 == null) ? null : _003CModule_003E.Microsoft_002EZune_002EConfiguration_002EDeregisterCallback_002E_007Bctor_007D(ptr2, this)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr2); + throw; + } + singleton = (((long)(nint)ptr3 == 0) ? (-2147024882) : singleton); + if (singleton >= 0) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(info.m_tunerId))) + { + try + { + long num = *(long*)ptr + 560; + IService* intPtr = ptr; + _003F val = ptr4; + TunerType tunerType = info.TunerType; + TunerRegisterType tunerRegisterType = info.TunerRegisterType; + singleton = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)intPtr, (ushort*)(nint)val, (ETunerType)tunerType, (ETunerRegisterType)tunerRegisterType, (IDeregisterTunerCallback*)ptr3); + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + if (ptr != null) + { + IService* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + ptr = null; + } + if (singleton < 0 && _003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 156uL)) & (true ? 1u : 0u)) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 153uL)) >= 5u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 144uL), 11, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x2af74624_002EWPP_RegisteredDevicesApi_cpp_Traceguids), (uint)singleton); + } + } + + [SpecialName] + protected virtual void raise_OnChanged(object value0, EventArgs value1) + { + _003Cbacking_store_003EOnChanged?.Invoke(value0, value1); + } + + internal unsafe void UpdateTunerInfoLists(int cTunerInfo, global::TunerInfo* rgTunerInfo, ushort* pwszNextPCDeregistrationDate, ushort* pwszNextSubscriptionDeviceDeregistrationDate, ushort* pwszNextAppStoreDeviceDeregistrationDate) + { + //IL_0034: Expected I, but got I8 + //IL_0042: Expected I, but got I8 + //IL_0049: Expected I, but got I8 + //IL_0055: Expected I, but got I8 + //IL_0062: Expected I, but got I8 + //IL_006f: Expected I, but got I8 + //IL_00cf: Expected I, but got I8 + m_PCsList.Clear(); + m_devicesList.Clear(); + m_appStoreDevicesList.Clear(); + long num = cTunerInfo; + if (0 < num) + { + global::TunerInfo* ptr = (global::TunerInfo*)((ulong)(nint)rgTunerInfo + 16uL); + ulong num2 = (ulong)num; + do + { + string name = new string((char*)(*(ulong*)((ulong)(nint)ptr - 8uL))); + string tunerId = new string((char*)(*(ulong*)ptr)); + string tunerVersion = new string((char*)(*(ulong*)((ulong)(nint)ptr + 8uL))); + string dateCreated = new string((char*)(*(ulong*)((ulong)(nint)ptr + 16uL))); + string dateLastUsed = new string((char*)(*(ulong*)((ulong)(nint)ptr + 24uL))); + TunerType tunerType = *(TunerType*)((ulong)(nint)ptr - 16uL); + TunerRegisterType tunerRegisterType = *(TunerRegisterType*)((ulong)(nint)ptr - 12uL); + TunerInfo item = new TunerInfo(name, tunerId, tunerVersion, tunerType, tunerRegisterType, dateCreated, dateLastUsed); + switch (tunerType) + { + case TunerType.PC: + m_PCsList.Add(item); + break; + case TunerType.ZuneDevice: + case TunerType.MobileDevice: + switch (tunerRegisterType) + { + case TunerRegisterType.Subscription: + m_devicesList.Add(item); + break; + case TunerRegisterType.AppStore: + m_appStoreDevicesList.Add(item); + break; + } + break; + } + ptr = (global::TunerInfo*)((ulong)(nint)ptr + 48uL); + num2--; + } + while (num2 != 0); + } + if (pwszNextPCDeregistrationDate == null || !DateTime.TryParse(new string((char*)pwszNextPCDeregistrationDate), out m_nextPCDeregistrationDate)) + { + m_nextPCDeregistrationDate = DateTime.MinValue; + } + if (pwszNextSubscriptionDeviceDeregistrationDate == null || !DateTime.TryParse(new string((char*)pwszNextSubscriptionDeviceDeregistrationDate), out m_nextSubscriptionDeviceDeregistrationDate)) + { + m_nextSubscriptionDeviceDeregistrationDate = DateTime.MinValue; + } + if (pwszNextAppStoreDeviceDeregistrationDate == null || !DateTime.TryParse(new string((char*)pwszNextAppStoreDeviceDeregistrationDate), out m_nextAppStoreDeviceDeregistrationDate)) + { + m_nextAppStoreDeviceDeregistrationDate = DateTime.MinValue; + } + raise_OnChanged(this, null); + } + + internal unsafe void FinishRemoveTunerInfo(ushort* pwszTunerId, TunerType tunerType, TunerRegisterType tunerRegisterType) + { + IList list = null; + switch (tunerType) + { + case TunerType.PC: + list = m_PCsList; + break; + case TunerType.ZuneDevice: + case TunerType.MobileDevice: + switch (tunerRegisterType) + { + case TunerRegisterType.Subscription: + list = m_devicesList; + break; + case TunerRegisterType.AppStore: + list = m_appStoreDevicesList; + break; + } + break; + } + int num = 0; + if (0 >= list.Count) + { + return; + } + do + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(list[num].m_tunerId))) + { + try + { + if (2 == _003CModule_003E.CompareStringW(1033u, 1u, pwszTunerId, -1, ptr, -1)) + { + goto IL_0076; + } + } + catch + { + //try-fault + ptr = null; + throw; + } + goto end_IL_004a; + IL_0076: + try + { + list.RemoveAt(num); + raise_OnChanged(this, null); + } + catch + { + //try-fault + ptr = null; + throw; + } + return; + end_IL_004a:; + } + num++; + } + while (num < list.Count); + } + + internal void ReportError(int hrError) + { + EventArgsHR eventArgsHR = new EventArgsHR(); + eventArgsHR.HResult = hrError; + raise_OnChanged(this, eventArgsHR); + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (!P_0) + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/TunerInfoHandlerFactory.cs b/ZuneDBApi/Microsoft/Zune/Configuration/TunerInfoHandlerFactory.cs new file mode 100644 index 0000000..db86690 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/TunerInfoHandlerFactory.cs @@ -0,0 +1,10 @@ +namespace Microsoft.Zune.Configuration +{ + public class TunerInfoHandlerFactory + { + public static ITunerInfoHandler CreateTunerInfoHandler() + { + return new TunerInfoHandler(); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/TunerRegisterType.cs b/ZuneDBApi/Microsoft/Zune/Configuration/TunerRegisterType.cs new file mode 100644 index 0000000..75cabc0 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/TunerRegisterType.cs @@ -0,0 +1,8 @@ +namespace Microsoft.Zune.Configuration +{ + public enum TunerRegisterType + { + AppStore = 1, + Subscription = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/TunerType.cs b/ZuneDBApi/Microsoft/Zune/Configuration/TunerType.cs new file mode 100644 index 0000000..ae410eb --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/TunerType.cs @@ -0,0 +1,9 @@ +namespace Microsoft.Zune.Configuration +{ + public enum TunerType + { + MobileDevice = 2, + ZuneDevice = 1, + PC = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/UnitTestConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/UnitTestConfiguration.cs new file mode 100644 index 0000000..b00a5d7 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/UnitTestConfiguration.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class UnitTestConfiguration : CConfigurationManagedBase + { + public byte[] MyBinaryValue + { + get + { + return GetBinaryProperty("MyBinaryValue"); + } + set + { + SetBinaryProperty("MyBinaryValue", value); + } + } + + public IList MyStringListValue + { + get + { + return GetStringListProperty("MyStringListValue"); + } + set + { + SetStringListProperty("MyStringListValue", value); + } + } + + public string MyStringValue + { + get + { + return GetStringProperty("MyStringValue", "Test String"); + } + set + { + SetStringProperty("MyStringValue", value); + } + } + + public DateTime MyDateValue + { + get + { + DateTime defaultValue = new DateTime(2007, 3, 18); + return GetDateTimeProperty("MyDateValue", defaultValue); + } + set + { + SetDateTimeProperty("MyDateValue", value); + } + } + + public double MyDoubleValue + { + get + { + return GetDoubleProperty("MyDoubleValue", 0.1); + } + set + { + SetDoubleProperty("MyDoubleValue", value); + } + } + + public long MyInt64Value + { + get + { + return GetInt64Property("MyInt64Value", 1L); + } + set + { + SetInt64Property("MyInt64Value", value); + } + } + + public int MyIntValue + { + get + { + return GetIntProperty("MyIntValue", 1); + } + set + { + SetIntProperty("MyIntValue", value); + } + } + + public bool MyBoolValue + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("MyBoolValue", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("MyBoolValue", value); + } + } + + internal UnitTestConfiguration(RegistryHive hive) + : base(hive, null, "UnitTest") + { + } + + public UnitTestConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/UsageDataConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/UsageDataConfiguration.cs new file mode 100644 index 0000000..d5e4dae --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/UsageDataConfiguration.cs @@ -0,0 +1,17 @@ +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class UsageDataConfiguration : CConfigurationManagedBase + { + internal UsageDataConfiguration(RegistryHive hive) + : base(hive, null, "UsageData") + { + } + + public UsageDataConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/UserCardsConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/UserCardsConfiguration.cs new file mode 100644 index 0000000..57b6801 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/UserCardsConfiguration.cs @@ -0,0 +1,56 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class UserCardsConfiguration : CConfigurationManagedBase + { + public bool CleanupCompleted + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("CleanupCompleted", defaultValue: false); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("CleanupCompleted", value); + } + } + + public long EstimatedUserCardSizeInMB + { + get + { + return GetInt64Property("EstimatedUserCardSizeInMB", 90L); + } + set + { + SetInt64Property("EstimatedUserCardSizeInMB", value); + } + } + + public string FriendsFeedUrl + { + get + { + return GetStringProperty("FriendsFeedUrl", ""); + } + set + { + SetStringProperty("FriendsFeedUrl", value); + } + } + + internal UserCardsConfiguration(RegistryHive hive) + : base(hive, null, "UserCards") + { + } + + public UserCardsConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/VersionInfo.cs b/ZuneDBApi/Microsoft/Zune/Configuration/VersionInfo.cs new file mode 100644 index 0000000..6149df6 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/VersionInfo.cs @@ -0,0 +1,7 @@ +namespace Microsoft.Zune.Configuration +{ + public class VersionInfo + { + public static string BuildNumber => "4.8.2345.0"; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Configuration/WindowsPhoneConfiguration.cs b/ZuneDBApi/Microsoft/Zune/Configuration/WindowsPhoneConfiguration.cs new file mode 100644 index 0000000..7ac02d3 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Configuration/WindowsPhoneConfiguration.cs @@ -0,0 +1,46 @@ +using System.Runtime.InteropServices; +using Microsoft.Win32; + +namespace Microsoft.Zune.Configuration +{ + public class WindowsPhoneConfiguration : CConfigurationManagedBase + { + public bool DTPTAllowed + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("DTPTAllowed", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("DTPTAllowed", value); + } + } + + public bool IPAllowed + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return GetBoolProperty("IPAllowed", defaultValue: true); + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + SetBoolProperty("IPAllowed", value); + } + } + + internal WindowsPhoneConfiguration(RegistryHive hive) + : base(hive, null, "WindowsPhone") + { + } + + public WindowsPhoneConfiguration(RegistryHive hive, string basePath, string instance) + : base(hive, basePath, instance) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/ErrorMapperApi/ErrorMapperApi.cs b/ZuneDBApi/Microsoft/Zune/ErrorMapperApi/ErrorMapperApi.cs new file mode 100644 index 0000000..6a5aa0e --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/ErrorMapperApi/ErrorMapperApi.cs @@ -0,0 +1,35 @@ +namespace Microsoft.Zune.ErrorMapperApi +{ + public class ErrorMapperApi + { + public unsafe static ErrorMapperResult GetMappedErrorDescriptionAndUrl(int hrOrig, eErrorCondition eCondition) + { + //IL_0009: Expected I, but got I8 + //IL_000c: Expected I, but got I8 + ErrorMapperResult errorMapperResult = new ErrorMapperResult(); + ushort* ptr = null; + ushort* ptr2 = null; + int hr = 0; + if (_003CModule_003E.ZuneLibraryExports_002EGetMappedErrorDescriptionAndUrl(hrOrig, eCondition, &hr, &ptr, &ptr2) < 0) + { + errorMapperResult.Hr = hrOrig; + errorMapperResult.Description = ""; + errorMapperResult.Description = ""; + } + else + { + errorMapperResult.Hr = hr; + errorMapperResult.Description = new string((char*)ptr); + errorMapperResult.WebHelpUrl = new string((char*)ptr2); + } + _003CModule_003E.SysFreeString(ptr); + _003CModule_003E.SysFreeString(ptr2); + return errorMapperResult; + } + + public static ErrorMapperResult GetMappedErrorDescriptionAndUrl(int hrOrig) + { + return GetMappedErrorDescriptionAndUrl(hrOrig, eErrorCondition.eEC_None); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/ErrorMapperApi/ErrorMapperResult.cs b/ZuneDBApi/Microsoft/Zune/ErrorMapperApi/ErrorMapperResult.cs new file mode 100644 index 0000000..8289c51 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/ErrorMapperApi/ErrorMapperResult.cs @@ -0,0 +1,47 @@ +namespace Microsoft.Zune.ErrorMapperApi +{ + public class ErrorMapperResult + { + private int hr; + + private string strDescription; + + private string strWebHelpUrl; + + public string WebHelpUrl + { + get + { + return strWebHelpUrl; + } + set + { + strWebHelpUrl = value; + } + } + + public string Description + { + get + { + return strDescription; + } + set + { + strDescription = value; + } + } + + public int Hr + { + get + { + return hr; + } + set + { + hr = value; + } + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Messaging/AddCommentCallbackWrapper.cs b/ZuneDBApi/Microsoft/Zune/Messaging/AddCommentCallbackWrapper.cs new file mode 100644 index 0000000..c03fd4d --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Messaging/AddCommentCallbackWrapper.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Messaging +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [MiscellaneousBits(64)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct AddCommentCallbackWrapper + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Messaging/CommentCallback.cs b/ZuneDBApi/Microsoft/Zune/Messaging/CommentCallback.cs new file mode 100644 index 0000000..e450ef1 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Messaging/CommentCallback.cs @@ -0,0 +1,7 @@ +using System; +using ZuneUI; + +namespace Microsoft.Zune.Messaging +{ + public delegate void CommentCallback(HRESULT hr, Guid commentId); +} diff --git a/ZuneDBApi/Microsoft/Zune/Messaging/ComposeCompletedHandler.cs b/ZuneDBApi/Microsoft/Zune/Messaging/ComposeCompletedHandler.cs new file mode 100644 index 0000000..f53e78f --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Messaging/ComposeCompletedHandler.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Messaging +{ + public delegate void ComposeCompletedHandler(int iResourceId); +} diff --git a/ZuneDBApi/Microsoft/Zune/Messaging/DeviceItemsPostedHandler.cs b/ZuneDBApi/Microsoft/Zune/Messaging/DeviceItemsPostedHandler.cs new file mode 100644 index 0000000..cba5aef --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Messaging/DeviceItemsPostedHandler.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Messaging +{ + public delegate void DeviceItemsPostedHandler(int iNewItemCount); +} diff --git a/ZuneDBApi/Microsoft/Zune/Messaging/FavoritesAction.cs b/ZuneDBApi/Microsoft/Zune/Messaging/FavoritesAction.cs new file mode 100644 index 0000000..d590f5a --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Messaging/FavoritesAction.cs @@ -0,0 +1,9 @@ +namespace Microsoft.Zune.Messaging +{ + public enum FavoritesAction + { + Remove = 2, + Add = 1, + None = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Messaging/FriendAction.cs b/ZuneDBApi/Microsoft/Zune/Messaging/FriendAction.cs new file mode 100644 index 0000000..fcd1cba --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Messaging/FriendAction.cs @@ -0,0 +1,8 @@ +namespace Microsoft.Zune.Messaging +{ + public enum FriendAction + { + Delete = 1, + None = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Messaging/IPropertySetMessageData.cs b/ZuneDBApi/Microsoft/Zune/Messaging/IPropertySetMessageData.cs new file mode 100644 index 0000000..127f8ff --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Messaging/IPropertySetMessageData.cs @@ -0,0 +1,9 @@ +using System; + +namespace Microsoft.Zune.Messaging +{ + public interface IPropertySetMessageData : IDisposable + { + unsafe int GetPropertySet(IMSMediaSchemaPropertySet** ppPropSet); + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Messaging/MessagingCallback.cs b/ZuneDBApi/Microsoft/Zune/Messaging/MessagingCallback.cs new file mode 100644 index 0000000..02fb7b8 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Messaging/MessagingCallback.cs @@ -0,0 +1,6 @@ +using ZuneUI; + +namespace Microsoft.Zune.Messaging +{ + public delegate void MessagingCallback(HRESULT hr, object state); +} diff --git a/ZuneDBApi/Microsoft/Zune/Messaging/MessagingCallbackWrapper.cs b/ZuneDBApi/Microsoft/Zune/Messaging/MessagingCallbackWrapper.cs new file mode 100644 index 0000000..829e2f3 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Messaging/MessagingCallbackWrapper.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Messaging +{ + [StructLayout(LayoutKind.Sequential, Size = 32)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(64)] + internal struct MessagingCallbackWrapper + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Messaging/MessagingNotifier.cs b/ZuneDBApi/Microsoft/Zune/Messaging/MessagingNotifier.cs new file mode 100644 index 0000000..ab8c6ce --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Messaging/MessagingNotifier.cs @@ -0,0 +1,184 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Messaging +{ + public class MessagingNotifier : IDisposable + { + private unsafe MessagingSubscriber* m_pMessagingSubscriber; + + private DeviceItemsPostedHandler OnDeviceCartItemsPostedInternal; + + private DeviceItemsPostedHandler OnDeviceMessagesPostedInternal; + + private ComposeCompletedHandler OnComposeCompletedInternal; + + [SpecialName] + public unsafe event ComposeCompletedHandler OnComposeCompleted + { + add + { + if (OnComposeCompletedInternal == null) + { + _003CModule_003E.Microsoft_002EZune_002EMessaging_002EMessagingSubscriber_002ESubscribe(m_pMessagingSubscriber, (EZuneNetMessagingEventType)2); + } + OnComposeCompletedInternal = (ComposeCompletedHandler)Delegate.Combine(OnComposeCompletedInternal, value); + } + remove + { + if ((OnComposeCompletedInternal = (ComposeCompletedHandler)Delegate.Remove(OnComposeCompletedInternal, value)) == null) + { + _003CModule_003E.Microsoft_002EZune_002EMessaging_002EMessagingSubscriber_002EUnsubscribe(m_pMessagingSubscriber, (EZuneNetMessagingEventType)2); + } + } + } + + [SpecialName] + public unsafe event DeviceItemsPostedHandler OnDeviceMessagesPosted + { + add + { + if (OnDeviceMessagesPostedInternal == null) + { + _003CModule_003E.Microsoft_002EZune_002EMessaging_002EMessagingSubscriber_002ESubscribe(m_pMessagingSubscriber, (EZuneNetMessagingEventType)1); + } + OnDeviceMessagesPostedInternal = (DeviceItemsPostedHandler)Delegate.Combine(OnDeviceMessagesPostedInternal, value); + } + remove + { + if ((OnDeviceMessagesPostedInternal = (DeviceItemsPostedHandler)Delegate.Remove(OnDeviceMessagesPostedInternal, value)) == null) + { + _003CModule_003E.Microsoft_002EZune_002EMessaging_002EMessagingSubscriber_002EUnsubscribe(m_pMessagingSubscriber, (EZuneNetMessagingEventType)1); + } + } + } + + [SpecialName] + public unsafe event DeviceItemsPostedHandler OnDeviceCartItemsPosted + { + add + { + if (OnDeviceCartItemsPostedInternal == null) + { + _003CModule_003E.Microsoft_002EZune_002EMessaging_002EMessagingSubscriber_002ESubscribe(m_pMessagingSubscriber, (EZuneNetMessagingEventType)3); + } + OnDeviceCartItemsPostedInternal = (DeviceItemsPostedHandler)Delegate.Combine(OnDeviceCartItemsPostedInternal, value); + } + remove + { + if ((OnDeviceCartItemsPostedInternal = (DeviceItemsPostedHandler)Delegate.Remove(OnDeviceCartItemsPostedInternal, value)) == null) + { + _003CModule_003E.Microsoft_002EZune_002EMessaging_002EMessagingSubscriber_002EUnsubscribe(m_pMessagingSubscriber, (EZuneNetMessagingEventType)3); + } + } + } + + public unsafe MessagingNotifier() + { + //IL_001f: Expected I, but got I8 + //IL_003b: Expected I, but got I8 + MessagingSubscriber* ptr = (MessagingSubscriber*)_003CModule_003E.@new(24uL); + MessagingSubscriber* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EMessaging_002EMessagingSubscriber_002E_007Bctor_007D(ptr, this)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + m_pMessagingSubscriber = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 8)))((nint)ptr2); + } + + public void DeviceCartItemsPosted(int iNewDeviceCartItems) + { + raise_OnDeviceCartItemsPosted(iNewDeviceCartItems); + } + + public void DeviceMessagesPosted(int iNewDeviceMessages) + { + raise_OnDeviceMessagesPosted(iNewDeviceMessages); + } + + public void ComposeCompleted(int iResourceId) + { + raise_OnComposeCompleted(iResourceId); + } + + private void _007EMessagingNotifier() + { + _0021MessagingNotifier(); + } + + private unsafe void _0021MessagingNotifier() + { + //IL_0019: Expected I, but got I8 + //IL_0022: Expected I, but got I8 + MessagingSubscriber* pMessagingSubscriber = m_pMessagingSubscriber; + if (0L != (nint)pMessagingSubscriber) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pMessagingSubscriber + 16)))((nint)pMessagingSubscriber); + m_pMessagingSubscriber = null; + } + } + + [SpecialName] + public void raise_OnDeviceCartItemsPosted(int iNewDeviceCartItems) + { + if (OnDeviceCartItemsPostedInternal != null) + { + OnDeviceCartItemsPostedInternal(iNewDeviceCartItems); + } + } + + [SpecialName] + public void raise_OnDeviceMessagesPosted(int iNewDeviceMessages) + { + if (OnDeviceMessagesPostedInternal != null) + { + OnDeviceMessagesPostedInternal(iNewDeviceMessages); + } + } + + [SpecialName] + public void raise_OnComposeCompleted(int iResourceId) + { + if (OnComposeCompletedInternal != null) + { + OnComposeCompletedInternal(iResourceId); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021MessagingNotifier(); + return; + } + try + { + _0021MessagingNotifier(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~MessagingNotifier() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Messaging/MessagingService.cs b/ZuneDBApi/Microsoft/Zune/Messaging/MessagingService.cs new file mode 100644 index 0000000..c66128c --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Messaging/MessagingService.cs @@ -0,0 +1,1005 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using MicrosoftZuneLibrary; + +namespace Microsoft.Zune.Messaging +{ + public class MessagingService : IDisposable + { + private static MessagingService m_singletonInstance = null; + + private unsafe IZuneNetMessaging* m_pMessaging = null; + + public static bool HasInstance + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return (byte)((m_singletonInstance != null) ? 1u : 0u) != 0; + } + } + + public static MessagingService Instance + { + get + { + if (m_singletonInstance == null) + { + m_singletonInstance = new MessagingService(); + } + return m_singletonInstance; + } + } + + private unsafe MessagingService() + { + //IL_0008: Expected I, but got I8 + //IL_0011: Expected I, but got I8 + IZuneNetMessaging* pMessaging = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_bf368f0d_4743_439c_9142_e487c9534104, (void**)(&pMessaging)) >= 0) + { + m_pMessaging = pMessaging; + } + } + + private void _007EMessagingService() + { + _0021MessagingService(); + } + + private unsafe void _0021MessagingService() + { + //IL_0017: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + IZuneNetMessaging* pMessaging = m_pMessaging; + if (pMessaging != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pMessaging + 16)))((nint)pMessaging); + m_pMessaging = null; + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool MessageSetRead(string strMessageUrl) + { + //IL_002b: Expected I, but got I8 + bool result = false; + if (m_pMessaging != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strMessageUrl))) + { + try + { + long num = *(long*)m_pMessaging + 24; + IZuneNetMessaging* pMessaging = m_pMessaging; + result = (byte)((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pMessaging, ptr) >= 0) ? 1u : 0u) != 0; + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool MessageDelete(string strMessageUrl) + { + //IL_002b: Expected I, but got I8 + bool result = false; + if (m_pMessaging != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strMessageUrl))) + { + try + { + long num = *(long*)m_pMessaging + 32; + IZuneNetMessaging* pMessaging = m_pMessaging; + result = (byte)((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pMessaging, ptr) >= 0) ? 1u : 0u) != 0; + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool AcceptFriend(string strPostUrl) + { + //IL_002b: Expected I, but got I8 + bool result = false; + if (m_pMessaging != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strPostUrl))) + { + try + { + long num = *(long*)m_pMessaging + 40; + IZuneNetMessaging* pMessaging = m_pMessaging; + result = (byte)((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pMessaging, ptr) >= 0) ? 1u : 0u) != 0; + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool RejectFriend(string strPostUrl) + { + //IL_002b: Expected I, but got I8 + bool result = false; + if (m_pMessaging != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strPostUrl))) + { + try + { + long num = *(long*)m_pMessaging + 48; + IZuneNetMessaging* pMessaging = m_pMessaging; + result = (byte)((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pMessaging, ptr) >= 0) ? 1u : 0u) != 0; + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool ManageFriend(FriendAction eAction, string strPostUrl, string strZuneTag) + { + //IL_0034: Expected I, but got I8 + bool result = false; + if (m_pMessaging != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strPostUrl))) + { + try + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strZuneTag))) + { + try + { + long num = *(long*)m_pMessaging + 56; + IZuneNetMessaging* pMessaging = m_pMessaging; + result = (byte)((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pMessaging, (EFriendAction)eAction, ptr, ptr2) >= 0) ? 1u : 0u) != 0; + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool AddComment(string strPostUrl, string strZuneTag, string strMessage, CommentCallback callback) + { + //IL_0061: Expected I, but got I8 + //IL_0061: Expected I, but got I8 + bool result = false; + if (m_pMessaging != null) + { + CComPtrNtv_003CIMessagingCallback_003E cComPtrNtv_003CIMessagingCallback_003E; + *(long*)(&cComPtrNtv_003CIMessagingCallback_003E) = 0L; + try + { + int num; + if (callback != null) + { + num = _003CModule_003E.Microsoft_002EZune_002EMessaging_002EAddCommentCallbackWrapper_002ECreateInstance(callback, (IMessagingCallback**)(&cComPtrNtv_003CIMessagingCallback_003E)); + if (num < 0) + { + goto IL_0086; + } + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strPostUrl))) + { + try + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strZuneTag))) + { + try + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strMessage))) + { + try + { + long num2 = *(long*)m_pMessaging + 112; + IZuneNetMessaging* pMessaging = m_pMessaging; + _003F val = ptr; + _003F val2 = ptr2; + _003F val3 = ptr3; + long num3 = *(long*)(&cComPtrNtv_003CIMessagingCallback_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pMessaging, (ushort*)(nint)val, (ushort*)(nint)val2, (ushort*)(nint)val3, (IMessagingCallback*)num3); + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + if (num < 0) + { + goto IL_0086; + } + int num4 = 1; + goto IL_0089; + IL_0089: + result = (byte)num4 != 0; + goto end_IL_0013; + IL_0086: + num4 = 0; + goto IL_0089; + end_IL_0013:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIMessagingCallback_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIMessagingCallback_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIMessagingCallback_003E_002ERelease(&cComPtrNtv_003CIMessagingCallback_003E); + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool DeleteComment(string strPostUrl, string strZuneTag, MessagingCallback callback) + { + //IL_0058: Expected I, but got I8 + //IL_0058: Expected I, but got I8 + bool result = false; + if (m_pMessaging != null) + { + CComPtrNtv_003CIMessagingCallback_003E cComPtrNtv_003CIMessagingCallback_003E; + *(long*)(&cComPtrNtv_003CIMessagingCallback_003E) = 0L; + try + { + int num; + if (callback != null) + { + num = _003CModule_003E.Microsoft_002EZune_002EMessaging_002EMessagingCallbackWrapper_002ECreateInstance(callback, null, (IMessagingCallback**)(&cComPtrNtv_003CIMessagingCallback_003E)); + if (num < 0) + { + goto IL_0073; + } + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strPostUrl))) + { + try + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strZuneTag))) + { + try + { + long num2 = *(long*)m_pMessaging + 120; + IZuneNetMessaging* pMessaging = m_pMessaging; + _003F val = ptr; + _003F val2 = ptr2; + long num3 = *(long*)(&cComPtrNtv_003CIMessagingCallback_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pMessaging, (ushort*)(nint)val, (ushort*)(nint)val2, (IMessagingCallback*)num3); + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + if (num < 0) + { + goto IL_0073; + } + int num4 = 1; + goto IL_0075; + IL_0075: + result = (byte)num4 != 0; + goto end_IL_0013; + IL_0073: + num4 = 0; + goto IL_0075; + end_IL_0013:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIMessagingCallback_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIMessagingCallback_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIMessagingCallback_003E_002ERelease(&cComPtrNtv_003CIMessagingCallback_003E); + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool Compose(string strPostUrl, string strMessage, string strRecipientZuneTags, string strRequestType, IPropertySetMessageData messageData, MessagingCallback callback, object state) + { + //IL_0019: Expected I, but got I8 + //IL_0027: Expected I, but got I8 + //IL_008a: Expected I, but got I8 + //IL_00d4: Expected I, but got I8 + bool result = false; + IMessagingCallback* ptr2; + int num3; + if (messageData != null && m_pMessaging != null) + { + IMSMediaSchemaPropertySet* ptr = null; + int num = messageData.GetPropertySet(&ptr); + ptr2 = null; + if (num >= 0) + { + if (callback != null) + { + num = _003CModule_003E.Microsoft_002EZune_002EMessaging_002EMessagingCallbackWrapper_002ECreateInstance(callback, state, &ptr2); + } + if (num >= 0) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strPostUrl))) + { + try + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strMessage))) + { + try + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strRecipientZuneTags))) + { + try + { + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strRequestType))) + { + try + { + long num2 = *(long*)m_pMessaging + 64; + IZuneNetMessaging* pMessaging = m_pMessaging; + _003F val = ptr3; + _003F val2 = ptr4; + _003F val3 = ptr5; + _003F val4 = ptr6; + IMSMediaSchemaPropertySet* intPtr = ptr; + IMessagingCallback* intPtr2 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pMessaging, (ushort*)(nint)val, (ushort*)(nint)val2, (ushort*)(nint)val3, (ushort*)(nint)val4, intPtr, intPtr2); + } + catch + { + //try-fault + ptr6 = null; + throw; + } + } + } + catch + { + //try-fault + ptr5 = null; + throw; + } + } + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + if (num >= 0) + { + num3 = 1; + goto IL_00bd; + } + } + } + num3 = 0; + goto IL_00bd; + } + goto IL_00d5; + IL_00bd: + result = (byte)num3 != 0; + if (ptr2 != null) + { + IMessagingCallback* intPtr3 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + } + goto IL_00d5; + IL_00d5: + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool Compose(string strPostUrl, string strMessage, MessagingCallback callback, object state) + { + //IL_0059: Expected I, but got I8 + //IL_0059: Expected I, but got I8 + bool result = false; + if (m_pMessaging != null) + { + CComPtrNtv_003CIMessagingCallback_003E cComPtrNtv_003CIMessagingCallback_003E; + *(long*)(&cComPtrNtv_003CIMessagingCallback_003E) = 0L; + try + { + int num; + if (callback != null) + { + num = _003CModule_003E.Microsoft_002EZune_002EMessaging_002EMessagingCallbackWrapper_002ECreateInstance(callback, state, (IMessagingCallback**)(&cComPtrNtv_003CIMessagingCallback_003E)); + if (num < 0) + { + goto IL_0074; + } + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strPostUrl))) + { + try + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strMessage))) + { + try + { + long num2 = *(long*)m_pMessaging + 72; + IZuneNetMessaging* pMessaging = m_pMessaging; + _003F val = ptr; + _003F val2 = ptr2; + long num3 = *(long*)(&cComPtrNtv_003CIMessagingCallback_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pMessaging, (ushort*)(nint)val, (ushort*)(nint)val2, (IMessagingCallback*)num3); + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + if (num < 0) + { + goto IL_0074; + } + int num4 = 1; + goto IL_0076; + IL_0076: + result = (byte)num4 != 0; + goto end_IL_0013; + IL_0074: + num4 = 0; + goto IL_0076; + end_IL_0013:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIMessagingCallback_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIMessagingCallback_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIMessagingCallback_003E_002ERelease(&cComPtrNtv_003CIMessagingCallback_003E); + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool ManageFavorites(FavoritesAction eAction, string strFavoritesUrl, string strInstructions, MessagingCallback callback, object state) + { + //IL_0011: Expected I, but got I8 + //IL_0058: Expected I, but got I8 + //IL_008c: Expected I, but got I8 + bool result = false; + IMessagingCallback* ptr; + int num3; + if (m_pMessaging != null) + { + ptr = null; + int num; + if (callback != null) + { + num = _003CModule_003E.Microsoft_002EZune_002EMessaging_002EMessagingCallbackWrapper_002ECreateInstance(callback, state, &ptr); + if (num < 0) + { + goto IL_0074; + } + } + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strFavoritesUrl))) + { + try + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strInstructions))) + { + try + { + long num2 = *(long*)m_pMessaging + 80; + IZuneNetMessaging* pMessaging = m_pMessaging; + _003F val = ptr2; + _003F val2 = ptr3; + IMessagingCallback* intPtr = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pMessaging, (EFavoritesAction)eAction, (ushort*)(nint)val, (ushort*)(nint)val2, intPtr); + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + if (num < 0) + { + goto IL_0074; + } + num3 = 1; + goto IL_0077; + } + goto IL_008d; + IL_0077: + result = (byte)num3 != 0; + if (ptr != null) + { + IMessagingCallback* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + goto IL_008d; + IL_0074: + num3 = 0; + goto IL_0077; + IL_008d: + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool ManageProfile(string strProfileUrl, string strFieldValue, MessagingCallback callback, object state) + { + //IL_0011: Expected I, but got I8 + //IL_0055: Expected I, but got I8 + //IL_0089: Expected I, but got I8 + bool result = false; + IMessagingCallback* ptr; + int num3; + if (m_pMessaging != null) + { + ptr = null; + int num; + if (callback != null) + { + num = _003CModule_003E.Microsoft_002EZune_002EMessaging_002EMessagingCallbackWrapper_002ECreateInstance(callback, state, &ptr); + if (num < 0) + { + goto IL_0071; + } + } + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strProfileUrl))) + { + try + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strFieldValue))) + { + try + { + long num2 = *(long*)m_pMessaging + 88; + IZuneNetMessaging* pMessaging = m_pMessaging; + _003F val = ptr2; + _003F val2 = ptr3; + IMessagingCallback* intPtr = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pMessaging, (ushort*)(nint)val, (ushort*)(nint)val2, intPtr); + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + if (num < 0) + { + goto IL_0071; + } + num3 = 1; + goto IL_0074; + } + goto IL_008a; + IL_0074: + result = (byte)num3 != 0; + if (ptr != null) + { + IMessagingCallback* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + goto IL_008a; + IL_0071: + num3 = 0; + goto IL_0074; + IL_008a: + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool ManageProfileImage(string strProfileImageUrl, string strProfileImageResource, MessagingCallback callback, object state) + { + //IL_0071: Expected I, but got I8 + //IL_0071: Expected I, but got I8 + bool result = false; + if (m_pMessaging != null && strProfileImageResource != (string)null && strProfileImageUrl != (string)null) + { + CComPtrNtv_003CIMessagingCallback_003E cComPtrNtv_003CIMessagingCallback_003E; + *(long*)(&cComPtrNtv_003CIMessagingCallback_003E) = 0L; + try + { + int num; + if (callback != null) + { + num = _003CModule_003E.Microsoft_002EZune_002EMessaging_002EMessagingCallbackWrapper_002ECreateInstance(callback, state, (IMessagingCallback**)(&cComPtrNtv_003CIMessagingCallback_003E)); + if (num < 0) + { + goto IL_008c; + } + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strProfileImageUrl))) + { + try + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strProfileImageResource))) + { + try + { + long num2 = *(long*)m_pMessaging + 96; + IZuneNetMessaging* pMessaging = m_pMessaging; + _003F val = ptr; + _003F val2 = ptr2; + long num3 = *(long*)(&cComPtrNtv_003CIMessagingCallback_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pMessaging, (ushort*)(nint)val, (ushort*)(nint)val2, (IMessagingCallback*)num3); + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + if (num < 0) + { + goto IL_008c; + } + int num4 = 1; + goto IL_008e; + IL_008e: + result = (byte)num4 != 0; + goto end_IL_002b; + IL_008c: + num4 = 0; + goto IL_008e; + end_IL_002b:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIMessagingCallback_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIMessagingCallback_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIMessagingCallback_003E_002ERelease(&cComPtrNtv_003CIMessagingCallback_003E); + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool ManageProfileImage(string strProfileImageUrl, SafeBitmap profileImage, MessagingCallback callback, object state) + { + //IL_006f: Expected I, but got I8 + //IL_0090: Expected I, but got I8 + //IL_0090: Expected I, but got I8 + bool result = false; + if (m_pMessaging != null && profileImage != null && strProfileImageUrl != (string)null) + { + int num = 0; + CComPtrNtv_003CIMessagingCallback_003E cComPtrNtv_003CIMessagingCallback_003E; + *(long*)(&cComPtrNtv_003CIMessagingCallback_003E) = 0L; + try + { + if (callback != null) + { + num = _003CModule_003E.Microsoft_002EZune_002EMessaging_002EMessagingCallbackWrapper_002ECreateInstance(callback, state, (IMessagingCallback**)(&cComPtrNtv_003CIMessagingCallback_003E)); + } + bool success = false; + int num4; + if (num >= 0) + { + profileImage.DangerousAddRef(ref success); + num = ((!success) ? (-2147467259) : num); + if (num >= 0) + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strProfileImageUrl))) + { + try + { + HBITMAP__* ptr = (HBITMAP__*)(int)profileImage.DangerousGetHandle(); + long num2 = *(long*)m_pMessaging + 104; + IZuneNetMessaging* pMessaging = m_pMessaging; + _003F val = ptr2; + long num3 = *(long*)(&cComPtrNtv_003CIMessagingCallback_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pMessaging, (ushort*)(nint)val, ptr, (IMessagingCallback*)num3); + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + if (success) + { + profileImage.DangerousRelease(); + } + if (num >= 0) + { + num4 = 1; + goto IL_00ad; + } + } + num4 = 0; + goto IL_00ad; + IL_00ad: + result = (byte)num4 != 0; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIMessagingCallback_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIMessagingCallback_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIMessagingCallback_003E_002ERelease(&cComPtrNtv_003CIMessagingCallback_003E); + } + return result; + } + + public unsafe string GetInboxPhotoUrl(string title, string collectionName) + { + //IL_000d: Expected I, but got I8 + //IL_0042: Expected I, but got I8 + string result = null; + if (m_pMessaging != null) + { + ushort* ptr = null; + int num = 0; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(title))) + { + try + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(collectionName))) + { + try + { + long num2 = *(long*)m_pMessaging + 152; + IZuneNetMessaging* pMessaging = m_pMessaging; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pMessaging, ptr2, ptr3, &ptr, &num) >= 0 && num != 0) + { + result = new string((char*)ptr); + } + if (ptr != null) + { + _003CModule_003E.SysFreeString(ptr); + } + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool AddInboxPhoto(string title, string collectionName, string localFilePath) + { + //IL_0040: Expected I, but got I8 + bool result = false; + if (m_pMessaging != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(title))) + { + try + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(collectionName))) + { + try + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(localFilePath))) + { + try + { + long num = *(long*)m_pMessaging + 144; + IZuneNetMessaging* pMessaging = m_pMessaging; + result = (byte)((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pMessaging, ptr, ptr2, ptr3) >= 0) ? 1u : 0u) != 0; + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return result; + } + + public unsafe int GetInboxDownloadFolderId(string collectionName) + { + //IL_0030: Expected I, but got I8 + int num = 0; + if (m_pMessaging != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(collectionName))) + { + try + { + long num2 = *(long*)m_pMessaging + 160; + IZuneNetMessaging* pMessaging = m_pMessaging; + num = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pMessaging, ptr, &num) >= 0) ? num : 0); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return num; + } + + public unsafe void InitiateUploadDeviceCartItems() + { + //IL_001c: Expected I, but got I8 + //IL_001c: Expected I, but got I8 + IZuneNetMessaging* pMessaging = m_pMessaging; + if (pMessaging != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pMessaging + 136)))((nint)pMessaging, null); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021MessagingService(); + return; + } + try + { + _0021MessagingService(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~MessagingService() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Messaging/MessagingSubscriber.cs b/ZuneDBApi/Microsoft/Zune/Messaging/MessagingSubscriber.cs new file mode 100644 index 0000000..bdb52c7 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Messaging/MessagingSubscriber.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Messaging +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [NativeCppClass] + [MiscellaneousBits(64)] + [DebugInfoInPDB] + internal struct MessagingSubscriber + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Messaging/PlaylistMessageData.cs b/ZuneDBApi/Microsoft/Zune/Messaging/PlaylistMessageData.cs new file mode 100644 index 0000000..70bdbb1 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Messaging/PlaylistMessageData.cs @@ -0,0 +1,278 @@ +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.Iris; + +namespace Microsoft.Zune.Messaging +{ + public class PlaylistMessageData : IPropertySetMessageData + { + private string m_title; + + private string m_author; + + private IList m_tracks; + + private unsafe IMSMediaSchemaPropertySet* m_pPlaylistPropSet; + + public unsafe PlaylistMessageData(string title, string author, IList tracks) + { + //IL_0023: Expected I, but got I8 + m_title = title; + m_author = author; + m_tracks = tracks; + m_pPlaylistPropSet = null; + } + + private void _007EPlaylistMessageData() + { + _0021PlaylistMessageData(); + } + + private unsafe void _0021PlaylistMessageData() + { + //IL_0019: Expected I, but got I8 + //IL_0022: Expected I, but got I8 + IMSMediaSchemaPropertySet* pPlaylistPropSet = m_pPlaylistPropSet; + if (0L != (nint)pPlaylistPropSet) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPlaylistPropSet + 16)))((nint)pPlaylistPropSet); + m_pPlaylistPropSet = null; + } + } + + public unsafe virtual int GetPropertySet(IMSMediaSchemaPropertySet** ppPropSet) + { + //IL_001b: Expected I, but got I8 + //IL_003c: Expected I, but got I8 + //IL_006b: Expected I4, but got I8 + //IL_007b: Expected I8, but got I + //IL_0093: Expected I, but got I8 + //IL_00c5: Expected I4, but got I8 + //IL_00d5: Expected I8, but got I + //IL_00ed: Expected I, but got I8 + //IL_010e: Expected I4, but got I8 + //IL_011d: Expected I8, but got I + //IL_0133: Expected I, but got I8 + //IL_0142: Expected I8, but got I + //IL_0156: Expected I, but got I8 + //IL_015a: Expected I, but got I8 + //IL_016e: Expected I, but got I8 + //IL_0172: Expected I, but got I8 + if (ppPropSet == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 141u); + return -2147467261; + } + IMSMediaSchemaPropertyList* ptr = null; + int num = _003CModule_003E.ZuneLibraryExports_002ECreatePropertySetList((_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.ID_MS_MEDIA_SCHEMA_PLAYLIST), 3229617665u, &ptr); + if (num >= 0) + { + num = AddTracksToPropList(ptr); + } + IMSMediaSchemaPropertySet* ptr2 = null; + if (num >= 0) + { + num = _003CModule_003E.ZuneLibraryExports_002ECreatePropertySet((_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.ID_MS_MEDIA_SCHEMA_PLAYLIST), 3229617665u, &ptr2); + } + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_title))) + { + if (num >= 0) + { + CComPropVariant cComPropVariant; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + try + { + *(short*)(&cComPropVariant) = 8; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant, 8)) = (nint)_003CModule_003E.SysAllocString(ptr3); + tagPROPVARIANT tagPROPVARIANT = (tagPROPVARIANT)cComPropVariant; + IMSMediaSchemaPropertySet* intPtr = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 56)))((nint)intPtr, 16777217u, tagPROPVARIANT); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + } + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_author))) + { + if (num >= 0) + { + CComPropVariant cComPropVariant2; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant2, 0, 24); + try + { + *(short*)(&cComPropVariant2) = 8; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant2, 8)) = (nint)_003CModule_003E.SysAllocString(ptr4); + tagPROPVARIANT tagPROPVARIANT2 = (tagPROPVARIANT)cComPropVariant2; + IMSMediaSchemaPropertySet* intPtr2 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 56)))((nint)intPtr2, 16777219u, tagPROPVARIANT2); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant2); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant2); + } + CComPropVariant cComPropVariant3; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant3, 0, 24); + try + { + if (num < 0) + { + goto IL_0144; + } + *(short*)(&cComPropVariant3) = 13; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant3, 8)) = (nint)ptr; + tagPROPVARIANT tagPROPVARIANT3 = (tagPROPVARIANT)cComPropVariant3; + IMSMediaSchemaPropertySet* intPtr3 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 56)))((nint)intPtr3, 3229617665u, tagPROPVARIANT3); + if (num < 0) + { + goto IL_0144; + } + m_pPlaylistPropSet = ptr2; + *(long*)ppPropSet = (nint)ptr2; + goto end_IL_010e; + IL_0144: + if (0L != (nint)ptr) + { + IMSMediaSchemaPropertyList* intPtr4 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr4 + 16)))((nint)intPtr4); + ptr = null; + } + if (0L != (nint)ptr2) + { + IMSMediaSchemaPropertySet* intPtr5 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr5 + 16)))((nint)intPtr5); + ptr2 = null; + } + end_IL_010e:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant3); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant3); + return num; + } + } + } + + private unsafe int AddTracksToPropList(IMSMediaSchemaPropertyList* pPropList) + { + //IL_00fc: Expected I, but got I8 + //IL_0122: Expected I4, but got I8 + //IL_0132: Expected I8, but got I + //IL_014a: Expected I, but got I8 + //IL_0178: Expected I, but got I8 + //IL_0178: Expected I, but got I8 + //IL_018b: Expected I, but got I8 + //IL_018f: Expected I, but got I8 + //The blocks IL_0024, IL_0035, IL_004d, IL_0063, IL_0075, IL_0091, IL_0098, IL_018f, IL_019a are reachable both inside and outside the pinned region starting at IL_009f. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + //The blocks IL_0024, IL_0035, IL_004d, IL_0063, IL_0075, IL_0091, IL_0098, IL_018f, IL_019a are reachable both inside and outside the pinned region starting at IL_00cb. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + //The blocks IL_0024, IL_0035, IL_004d, IL_0063, IL_0075, IL_0091, IL_0098, IL_018f, IL_019a are reachable both inside and outside the pinned region starting at IL_00f7. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + if (pPropList == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 45u); + return -2147467261; + } + int num = 0; + if (m_tracks != null) + { + int num2 = 0; + while (num2 < m_tracks.Count) + { + DataProviderObject dataProviderObject = m_tracks[num2] as DataProviderObject; + if (dataProviderObject != null) + { + _GUID gUID = _003CModule_003E.GUID_NULL; + object property = dataProviderObject.GetProperty("ZuneMediaId"); + if (property != null) + { + gUID = _003CModule_003E.GuidToGUID((Guid)property); + } + string text = dataProviderObject.GetProperty("Title") as string; + object s = ((!(text == (string)null)) ? text : ""); + while (true) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars((string)s))) + { + while (true) + { + if (num2 < m_tracks.Count) + { + dataProviderObject = m_tracks[num2] as DataProviderObject; + if (dataProviderObject != null) + { + break; + } + num2++; + if (num >= 0) + { + continue; + } + } + return num; + } + gUID = _003CModule_003E.GUID_NULL; + property = dataProviderObject.GetProperty("ZuneMediaId"); + if (property != null) + { + gUID = _003CModule_003E.GuidToGUID((Guid)property); + } + text = dataProviderObject.GetProperty("Title") as string; + s = ((!(text == (string)null)) ? text : ""); + } + } + } + num2++; + if (num < 0) + { + break; + } + } + } + return num; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021PlaylistMessageData(); + return; + } + try + { + _0021PlaylistMessageData(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~PlaylistMessageData() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Playlist/AtomRules.cs b/ZuneDBApi/Microsoft/Zune/Playlist/AtomRules.cs new file mode 100644 index 0000000..83792d4 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Playlist/AtomRules.cs @@ -0,0 +1,21 @@ +using System.Collections; + +namespace Microsoft.Zune.Playlist +{ + public class AtomRules + { + internal IList values; + + internal IList operators; + + public IList Operators => operators; + + public IList Values => values; + + internal AtomRules() + { + values = new ArrayList(); + operators = new ArrayList(); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Playlist/AutoPlaylistBuilder.cs b/ZuneDBApi/Microsoft/Zune/Playlist/AutoPlaylistBuilder.cs new file mode 100644 index 0000000..1654438 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Playlist/AutoPlaylistBuilder.cs @@ -0,0 +1,438 @@ +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; +using MicrosoftZuneLibrary; +using ZuneUI; + +namespace Microsoft.Zune.Playlist +{ + public class AutoPlaylistBuilder : IDisposable + { + private unsafe IAutoPlaylistRules* m_pAutoPlaylistRules; + + private int m_currentRuleSetGroup; + + private Dictionary m_groupAndAtomToRules; + + private EMediaTypes m_type; + + public EMediaTypes Schema => m_type; + + public unsafe AutoPlaylistBuilder(int playlistId) + { + //IL_002b: Expected I, but got I8 + //IL_0059: Expected I4, but got I8 + //IL_0074: Expected I, but got I8 + //IL_00d4: Expected I4, but got I8 + //IL_00e6: Expected I, but got I8 + //IL_0136: Expected I4, but got I8 + //IL_0149: Expected I, but got I8 + m_currentRuleSetGroup = 0; + IPlaylistManager* nativePlaylistManager = PlaylistManager.Instance.NativePlaylistManager; + IAutoPlaylistRules* ptr; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)nativePlaylistManager + 112)))((nint)nativePlaylistManager, playlistId, &ptr) < 0) + { + return; + } + m_pAutoPlaylistRules = ptr; + PlaylistManager.Instance.GetAutoPlaylistSchema(playlistId, out m_type); + int num = 0; + int num2 = 0; + bool flag = true; + do + { + CComPropVariant cComPropVariant; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + try + { + IAutoPlaylistRules* intPtr = ptr; + EMediaTypes type = m_type; + uint atom; + EAutoPlaylistRuleOperators op; + int num3 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 40)))((nint)intPtr, type, (uint)num, (uint)num2, &atom, &op, (tagPROPVARIANT*)(&cComPropVariant)); + if (num3 >= 0) + { + if (num3 == 1) + { + if (num2 == 0) + { + flag = false; + } + else + { + num2 = 0; + num++; + } + } + else + { + CacheCriterion(num, (int)atom, (tagPROPVARIANT*)(&cComPropVariant), op); + num2++; + } + goto IL_00b3; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + break; + IL_00b3: + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + } + while (flag); + int num4 = 0; + CComPropVariant cComPropVariant2; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant2, 0, 24); + int num5; + uint atom2; + try + { + IAutoPlaylistRules* intPtr2 = ptr; + num5 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 72)))((nint)intPtr2, 0u, &atom2, (tagPROPVARIANT*)(&cComPropVariant2)); + if (num5 < 0) + { + goto IL_0160; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant2); + throw; + } + while (true) + { + try + { + if (num5 == 1) + { + break; + } + CacheCriterion(0, (int)atom2, (tagPROPVARIANT*)(&cComPropVariant2), (EAutoPlaylistRuleOperators)8); + num4++; + goto IL_0126; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant2); + throw; + } + IL_0126: + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant2); + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant2, 0, 24); + try + { + IAutoPlaylistRules* intPtr3 = ptr; + num5 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 72)))((nint)intPtr3, (uint)num4, &atom2, (tagPROPVARIANT*)(&cComPropVariant2)); + if (num5 >= 0) + { + continue; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant2); + throw; + } + break; + } + goto IL_0160; + IL_0160: + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant2); + } + + public AutoPlaylistBuilder(EMediaTypes type) + { + InitializeNewBuilder(type); + } + + public AutoPlaylistBuilder() + { + InitializeNewBuilder(EMediaTypes.eMediaTypeAudio); + } + + private unsafe void _007EAutoPlaylistBuilder() + { + //IL_0019: Expected I, but got I8 + //IL_0022: Expected I, but got I8 + IAutoPlaylistRules* pAutoPlaylistRules = m_pAutoPlaylistRules; + if (0L != (nint)pAutoPlaylistRules) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAutoPlaylistRules + 16)))((nint)pAutoPlaylistRules); + m_pAutoPlaylistRules = null; + } + } + + public unsafe void Clear() + { + //IL_0019: Expected I, but got I8 + //IL_0022: Expected I4, but got I8 + //IL_0054: Expected I, but got I8 + m_currentRuleSetGroup = 0; + IAutoPlaylistRules* pAutoPlaylistRules = m_pAutoPlaylistRules; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAutoPlaylistRules + 24)))((nint)pAutoPlaylistRules); + CComPropVariant cComPropVariant; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + try + { + *(short*)(&cComPropVariant) = 3; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant, 8)) = 1; + IAutoPlaylistRules* pAutoPlaylistRules2 = m_pAutoPlaylistRules; + EMediaTypes type = m_type; + int currentRuleSetGroup = m_currentRuleSetGroup; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAutoPlaylistRules2 + 32)))((nint)pAutoPlaylistRules2, type, (uint)currentRuleSetGroup, 204u, (EAutoPlaylistRuleOperators)1, (tagPROPVARIANT*)(&cComPropVariant)); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + } + + public unsafe HRESULT AddCriterion(string atomName, PlaylistRuleOperator op, object value) + { + //IL_000f: Expected I4, but got I8 + //IL_0041: Expected I, but got I8 + int num = ZuneQueryList.AtomNameToAtom(atomName); + CComPropVariant cComPropVariant; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + HRESULT result; + try + { + int num2 = ZuneQueryList.ConvertTypeToPropVariant(null, value, (tagPROPVARIANT*)(&cComPropVariant)); + if (num2 >= 0) + { + IAutoPlaylistRules* pAutoPlaylistRules = m_pAutoPlaylistRules; + EMediaTypes type = m_type; + int currentRuleSetGroup = m_currentRuleSetGroup; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAutoPlaylistRules + 32)))((nint)pAutoPlaylistRules, type, (uint)currentRuleSetGroup, (uint)num, (EAutoPlaylistRuleOperators)op, (tagPROPVARIANT*)(&cComPropVariant)); + } + result = num2; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + return result; + } + + public unsafe HRESULT AddSort(string sort) + { + //IL_004a: Expected I, but got I8 + bool[] ascendings = null; + string[] sorts = null; + int num = 0; + if (LibraryDataProvider.GetSortAttributes(sort, out sorts, out ascendings)) + { + int num2 = 0; + if (0 < (nint)sorts.LongLength) + { + do + { + int num3 = ZuneQueryList.AtomNameToAtom(sorts[num2]); + IAutoPlaylistRules* pAutoPlaylistRules = m_pAutoPlaylistRules; + EMediaTypes type = m_type; + int currentRuleSetGroup = m_currentRuleSetGroup; + bool num4 = ascendings[num2]; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAutoPlaylistRules + 48)))((nint)pAutoPlaylistRules, type, (uint)currentRuleSetGroup, (uint)num3, num4 ? 1 : 0); + if (num < 0) + { + break; + } + num2++; + } + while (num2 < (nint)sorts.LongLength); + } + } + return num; + } + + public unsafe HRESULT AddFilter(string atomName, object value) + { + //IL_000f: Expected I4, but got I8 + //IL_0034: Expected I, but got I8 + int num = ZuneQueryList.AtomNameToAtom(atomName); + CComPropVariant cComPropVariant; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + HRESULT result; + try + { + int num2 = ZuneQueryList.ConvertTypeToPropVariant(null, value, (tagPROPVARIANT*)(&cComPropVariant)); + if (num2 >= 0) + { + IAutoPlaylistRules* pAutoPlaylistRules = m_pAutoPlaylistRules; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAutoPlaylistRules + 64)))((nint)pAutoPlaylistRules, (uint)num, (tagPROPVARIANT*)(&cComPropVariant)); + } + result = num2; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + return result; + } + + public unsafe HRESULT SetRules(int playlistId) + { + //IL_001f: Expected I, but got I8 + IPlaylistManager* nativePlaylistManager = PlaylistManager.Instance.NativePlaylistManager; + IAutoPlaylistRules* pAutoPlaylistRules = m_pAutoPlaylistRules; + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)nativePlaylistManager + 120)))((nint)nativePlaylistManager, playlistId, pAutoPlaylistRules); + } + + public AtomRules GetCriterionByAtomName(int ruleSetGroup, string atomName) + { + AtomRules value = null; + GroupAndAtom key = new GroupAndAtom(ruleSetGroup, ZuneQueryList.AtomNameToAtom(atomName)); + Dictionary groupAndAtomToRules = m_groupAndAtomToRules; + if (groupAndAtomToRules != null && groupAndAtomToRules.TryGetValue(key, out value)) + { + return value; + } + return null; + } + + public object GetFilterByAtomName(string atomName) + { + return GetCriterionByAtomName(0, atomName)?.values[0]; + } + + public unsafe string GetSort(int ruleSetGroup) + { + //IL_0024: Expected I, but got I8 + //IL_0091: Expected I, but got I8 + StringBuilder stringBuilder = null; + int num = 0; + IAutoPlaylistRules* pAutoPlaylistRules = m_pAutoPlaylistRules; + IAutoPlaylistRules* intPtr = pAutoPlaylistRules; + EMediaTypes type = m_type; + uint atom; + int num2; + int num3 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAutoPlaylistRules + 56)))((nint)intPtr, type, (uint)ruleSetGroup, 0u, &atom, &num2); + if (num3 >= 0) + { + while (num3 != 1) + { + string value = ((num2 == 0) ? "-" : "+") + ZuneQueryList.AtomToAtomName((int)atom); + if (stringBuilder == null) + { + stringBuilder = new StringBuilder(value); + } + else + { + stringBuilder.Append(","); + stringBuilder.Append(value); + } + num++; + pAutoPlaylistRules = m_pAutoPlaylistRules; + IAutoPlaylistRules* intPtr2 = pAutoPlaylistRules; + EMediaTypes type2 = m_type; + num3 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAutoPlaylistRules + 56)))((nint)intPtr2, type2, (uint)ruleSetGroup, (uint)num, &atom, &num2); + if (num3 < 0) + { + break; + } + } + } + return stringBuilder?.ToString(); + } + + private unsafe void InitializeNewBuilder(EMediaTypes type) + { + //IL_001d: Expected I, but got I8 + IPlaylistManager* nativePlaylistManager = PlaylistManager.Instance.NativePlaylistManager; + IAutoPlaylistRules* pAutoPlaylistRules; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)nativePlaylistManager + 128)))((nint)nativePlaylistManager, &pAutoPlaylistRules); + m_pAutoPlaylistRules = pAutoPlaylistRules; + m_currentRuleSetGroup = 0; + m_type = type; + if (num < 0) + { + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + } + } + + private unsafe void CacheCriterion(int group, int atom, tagPROPVARIANT* vtValue, EAutoPlaylistRuleOperators op) + { + AtomRules value = null; + if (m_groupAndAtomToRules == null) + { + m_groupAndAtomToRules = new Dictionary(); + } + GroupAndAtom key = new GroupAndAtom(group, atom); + if (!m_groupAndAtomToRules.TryGetValue(key, out value)) + { + value = new AtomRules(); + m_groupAndAtomToRules[key] = value; + } + object value2 = PropVariantToObject(vtValue); + value.values.Add(value2); + value.operators.Add((PlaylistRuleOperator)op); + } + + private unsafe static object PropVariantToObject(tagPROPVARIANT* pvtValue) + { + Type type; + switch (*(ushort*)pvtValue) + { + case 8: + type = typeof(string); + break; + case 3: + type = typeof(int); + break; + case 0: + case 1: + return null; + default: + type = null; + break; + } + if (type != null) + { + return ZuneQueryList.MarshalResult(type, pvtValue, null); + } + return null; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _007EAutoPlaylistBuilder(); + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Playlist/CreatePlaylistOption.cs b/ZuneDBApi/Microsoft/Zune/Playlist/CreatePlaylistOption.cs new file mode 100644 index 0000000..a92c739 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Playlist/CreatePlaylistOption.cs @@ -0,0 +1,12 @@ +namespace Microsoft.Zune.Playlist +{ + public enum CreatePlaylistOption + { + SyncRule = 0x10, + AutoPlaylist = 8, + OverwriteOnConflict = 4, + RenameOnConflict = 2, + PrivatePlaylist = 1, + None = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Playlist/GroupAndAtom.cs b/ZuneDBApi/Microsoft/Zune/Playlist/GroupAndAtom.cs new file mode 100644 index 0000000..513ec90 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Playlist/GroupAndAtom.cs @@ -0,0 +1,16 @@ +namespace Microsoft.Zune.Playlist +{ + internal struct GroupAndAtom + { + private int groupAndAtom; + + public int Group => (ushort)((ulong)groupAndAtom >> 16); + + public int Atom => (ushort)groupAndAtom; + + public GroupAndAtom(int group, int atom) + { + groupAndAtom = ((ushort)group << 16) | (ushort)atom; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistAsyncOperation.cs b/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistAsyncOperation.cs new file mode 100644 index 0000000..c717d5d --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistAsyncOperation.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Playlist +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [NativeCppClass] + [DebugInfoInPDB] + [MiscellaneousBits(64)] + internal struct PlaylistAsyncOperation + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistAsyncOperationCompleted.cs b/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistAsyncOperationCompleted.cs new file mode 100644 index 0000000..b018f73 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistAsyncOperationCompleted.cs @@ -0,0 +1,6 @@ +using ZuneUI; + +namespace Microsoft.Zune.Playlist +{ + public delegate void PlaylistAsyncOperationCompleted(HRESULT); +} diff --git a/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistLimitType.cs b/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistLimitType.cs new file mode 100644 index 0000000..8d2ae67 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistLimitType.cs @@ -0,0 +1,9 @@ +namespace Microsoft.Zune.Playlist +{ + public enum PlaylistLimitType + { + Count = 2, + Unlimited = 0, + Seconds = 1 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistManager.cs b/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistManager.cs new file mode 100644 index 0000000..dac9bf5 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistManager.cs @@ -0,0 +1,496 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using ZuneUI; + +namespace Microsoft.Zune.Playlist +{ + public class PlaylistManager : IDisposable + { + private unsafe IPlaylistManager* m_pPlaylistManager; + + private static PlaylistManager sm_instance = null; + + private static object sm_lock = new object(); + + internal unsafe IPlaylistManager* NativePlaylistManager => m_pPlaylistManager; + + public static PlaylistManager Instance + { + get + { + if (sm_instance == null) + { + try + { + Monitor.Enter(sm_lock); + if (sm_instance == null) + { + PlaylistManager playlistManager = new PlaylistManager(); + Thread.MemoryBarrier(); + sm_instance = playlistManager; + } + } + finally + { + Monitor.Exit(sm_lock); + } + } + return sm_instance; + } + } + + private void _007EPlaylistManager() + { + _0021PlaylistManager(); + } + + private unsafe void _0021PlaylistManager() + { + //IL_0017: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + IPlaylistManager* pPlaylistManager = m_pPlaylistManager; + if (pPlaylistManager != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPlaylistManager + 16)))((nint)pPlaylistManager); + m_pPlaylistManager = null; + } + } + + public unsafe HRESULT CreatePlaylist(string title, string author, [In] ValueType serviceMediaId, CreatePlaylistOption options, out int playlistId) + { + //IL_0097: Expected I4, but got I8 + //IL_00e8: Incompatible stack types: I8 vs Ref + //IL_0115: Expected I, but got I8 + //IL_0115: Expected I, but got I8 + bool flag = (options & CreatePlaylistOption.PrivatePlaylist) > CreatePlaylistOption.None; + bool flag2 = (options & CreatePlaylistOption.AutoPlaylist) > CreatePlaylistOption.None; + bool flag3 = (options & CreatePlaylistOption.SyncRule) > CreatePlaylistOption.None; + bool flag4 = (options & CreatePlaylistOption.OverwriteOnConflict) > CreatePlaylistOption.None; + bool flag5 = (options & CreatePlaylistOption.RenameOnConflict) > CreatePlaylistOption.None; + int hr; + if ((flag && (flag2 || flag3)) || (flag4 && flag5)) + { + hr = -2147024809; + } + else if (m_pPlaylistManager == null) + { + hr = -2147467261; + } + else + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(title))) + { + try + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(author))) + { + try + { + EPlaylistCreateConflictAction ePlaylistCreateConflictAction = (EPlaylistCreateConflictAction)0; + if (flag5) + { + ePlaylistCreateConflictAction = (EPlaylistCreateConflictAction)2; + } + else if (flag || flag4) + { + ePlaylistCreateConflictAction = (EPlaylistCreateConflictAction)1; + } + _GUID gUID; + *(int*)(&gUID) = 0; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref gUID, 4), 0, 12); + if (serviceMediaId != null) + { + gUID = _003CModule_003E.GuidToGUID((Guid)serviceMediaId); + } + bool flag6 = ((!(flag3 || flag)) ? true : false); + EPlaylistType ePlaylistType; + if (flag) + { + ePlaylistType = (EPlaylistType)4; + } + else + { + EPlaylistType ePlaylistType2; + if (flag3) + { + ePlaylistType2 = (EPlaylistType)3; + } + else + { + EPlaylistType ePlaylistType3 = (flag2 ? ((EPlaylistType)1) : ((EPlaylistType)0)); + ePlaylistType2 = ePlaylistType3; + } + ePlaylistType = ePlaylistType2; + } + _GUID* ptr = (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref serviceMediaId != null ? ref gUID : ref *(_GUID*)null); + long num = *(long*)m_pPlaylistManager + 24; + IPlaylistManager* pPlaylistManager = m_pPlaylistManager; + int num2; + hr = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pPlaylistManager, ptr2, ptr3, ptr, &num2, ePlaylistType, ePlaylistCreateConflictAction, flag6 ? 1 : 0, null); + playlistId = num2; + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + return new HRESULT(hr); + } + + public unsafe HRESULT AddMediaToPlaylist(int playlistId, int cMediaCount, int[] mediaIds, int[] mediaTypeIds, int insertPos, [Out] int[] playlistContentIds) + { + //IL_0019: Incompatible stack types: I8 vs Ref + //IL_002a: Incompatible stack types: I8 vs Ref + //IL_003b: Incompatible stack types: I8 vs Ref + //IL_0063: Expected I, but got I8 + int hr; + if (m_pPlaylistManager == null) + { + hr = -2147467261; + } + else + { + fixed (int* ptr = &(mediaIds != null ? ref mediaIds[0] : ref *(int*)null)) + { + try + { + fixed (int* ptr2 = &(mediaTypeIds != null ? ref mediaTypeIds[0] : ref *(int*)null)) + { + try + { + fixed (int* ptr3 = &(playlistContentIds != null ? ref playlistContentIds[0] : ref *(int*)null)) + { + try + { + long num = *(long*)m_pPlaylistManager + 40; + IPlaylistManager* pPlaylistManager = m_pPlaylistManager; + hr = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pPlaylistManager, playlistId, cMediaCount, ptr, ptr2, insertPos, ptr3); + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return new HRESULT(hr); + } + + public unsafe void RemoveMediaFromPlaylist(int playlistId, int cIdCount, int[] playlistContentIds) + { + //IL_0011: Incompatible stack types: I8 vs Ref + //IL_0033: Expected I, but got I8 + if (m_pPlaylistManager == null) + { + return; + } + fixed (int* ptr = &(playlistContentIds != null ? ref playlistContentIds[0] : ref *(int*)null)) + { + try + { + long num = *(long*)m_pPlaylistManager + 48; + IPlaylistManager* pPlaylistManager = m_pPlaylistManager; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pPlaylistManager, playlistId, cIdCount, ptr); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + + public unsafe HRESULT UpdateMediaPositionInPlaylist(int playlistId, int cPlaylistContentCount, int[] playlistContentIds, int newPosition) + { + //IL_0019: Incompatible stack types: I8 vs Ref + //IL_003d: Expected I, but got I8 + int hr; + if (m_pPlaylistManager == null) + { + hr = -2147467261; + } + else + { + fixed (int* ptr = &(playlistContentIds != null ? ref playlistContentIds[0] : ref *(int*)null)) + { + try + { + long num = *(long*)m_pPlaylistManager + 64; + IPlaylistManager* pPlaylistManager = m_pPlaylistManager; + hr = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pPlaylistManager, playlistId, cPlaylistContentCount, ptr, newPosition); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return new HRESULT(hr); + } + + public unsafe void DedupPlaylist(int playlistId) + { + //IL_0018: Expected I, but got I8 + IPlaylistManager* pPlaylistManager = m_pPlaylistManager; + if (pPlaylistManager != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPlaylistManager + 104)))((nint)pPlaylistManager, playlistId); + } + } + + public unsafe HRESULT RenamePlaylist(int playlistId, string newTitle) + { + //IL_0032: Expected I, but got I8 + int hr; + if (m_pPlaylistManager == null) + { + hr = -2147467261; + } + else + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(newTitle))) + { + try + { + long num = *(long*)m_pPlaylistManager + 72; + IPlaylistManager* pPlaylistManager = m_pPlaylistManager; + hr = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pPlaylistManager, playlistId, ptr); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return new HRESULT(hr); + } + + public unsafe HRESULT SavePlaylistAsStatic(int playlistId, PlaylistAsyncOperationCompleted playlistAsyncOperationCompleted) + { + //IL_002b: Expected I, but got I8 + if (m_pPlaylistManager == null) + { + return -2147467261; + } + PlaylistAsyncOperation* ptr = (PlaylistAsyncOperation*)_003CModule_003E.@new(24uL); + PlaylistAsyncOperation* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EPlaylist_002EPlaylistAsyncOperation_002E_007Bctor_007D(ptr)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + int num = (((long)(nint)ptr2 == 0) ? (-2147024882) : 0); + int num2 = num; + if (num >= 0) + { + num2 = _003CModule_003E.Microsoft_002EZune_002EPlaylist_002EPlaylistAsyncOperation_002EAsyncSavePlaylistAsStatic(ptr2, playlistId, m_pPlaylistManager, playlistAsyncOperationCompleted); + if (num2 >= 0) + { + goto IL_0066; + } + } + if (ptr2 != null) + { + _003CModule_003E.Microsoft_002EZune_002EPlaylist_002EPlaylistAsyncOperation_002E__delDtor(ptr2, 1u); + } + goto IL_0066; + IL_0066: + return new HRESULT(num2); + } + + public unsafe string GetUniquePlaylistTitle(string candidateTitle) + { + //IL_0019: Expected I4, but got I8 + //IL_003a: Expected I, but got I8 + //IL_0045: Expected I, but got I8 + string result = candidateTitle; + if (m_pPlaylistManager != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(candidateTitle))) + { + try + { + CComPropVariant cComPropVariant; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + try + { + long num = *(long*)m_pPlaylistManager + 136; + IPlaylistManager* pPlaylistManager = m_pPlaylistManager; + int num2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pPlaylistManager, ptr, &num2, (tagPROPVARIANT*)(&cComPropVariant)); + result = new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant, 8))); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return result; + } + + public unsafe HRESULT GetPlaylistByServiceMediaId(Guid serviceMediaId, out int playlistId) + { + //IL_0034: Expected I, but got I8 + int hr; + if (m_pPlaylistManager == null) + { + hr = -2147467261; + } + else + { + int num = -1; + _GUID gUID = _003CModule_003E.GuidToGUID(serviceMediaId); + IPlaylistManager* pPlaylistManager = m_pPlaylistManager; + hr = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPlaylistManager + 168)))((nint)pPlaylistManager, gUID, &num); + playlistId = num; + } + return new HRESULT(hr); + } + + public unsafe HRESULT GetAutoPlaylistSchema(int playlistId, out EMediaTypes schema) + { + //IL_0033: Expected I, but got I8 + EMediaTypes eMediaTypes = EMediaTypes.eMediaTypeInvalid; + int num; + if (playlistId < 0) + { + num = -2147418113; + } + else + { + IPlaylistManager* pPlaylistManager = m_pPlaylistManager; + if (pPlaylistManager == null) + { + num = -2147467261; + } + else + { + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPlaylistManager + 144)))((nint)pPlaylistManager, playlistId, &eMediaTypes); + if (num >= 0) + { + schema = eMediaTypes; + } + } + } + return new HRESULT(num); + } + + public unsafe HRESULT EnableAutomaticRefresh(int playlistId) + { + //IL_0023: Expected I, but got I8 + IPlaylistManager* pPlaylistManager = m_pPlaylistManager; + int hr = ((pPlaylistManager != null) ? ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPlaylistManager + 152)))((nint)pPlaylistManager, playlistId) : (-2147467261)); + return new HRESULT(hr); + } + + public unsafe HRESULT DisableAutomaticRefresh(int playlistId) + { + //IL_0023: Expected I, but got I8 + IPlaylistManager* pPlaylistManager = m_pPlaylistManager; + int hr = ((pPlaylistManager != null) ? ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPlaylistManager + 160)))((nint)pPlaylistManager, playlistId) : (-2147467261)); + return new HRESULT(hr); + } + + public unsafe HRESULT RefreshAutoPlaylist(int playlistId) + { + //IL_0020: Expected I, but got I8 + IPlaylistManager* pPlaylistManager = m_pPlaylistManager; + int hr = ((pPlaylistManager != null) ? ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPlaylistManager + 88)))((nint)pPlaylistManager, playlistId) : (-2147467261)); + return new HRESULT(hr); + } + + private unsafe PlaylistManager() + { + //IL_0009: Expected I, but got I8 + IPlaylistManager* pPlaylistManager = null; + int singleton = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_c2d9122b_f648_4b95_92fc_11f2e7f326d7, (void**)(&pPlaylistManager)); + if (singleton >= 0) + { + m_pPlaylistManager = pPlaylistManager; + return; + } + throw new ApplicationException(_003CModule_003E.GetErrorDescription(singleton)); + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021PlaylistManager(); + return; + } + try + { + _0021PlaylistManager(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~PlaylistManager() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistRuleOperator.cs b/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistRuleOperator.cs new file mode 100644 index 0000000..ee45d52 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistRuleOperator.cs @@ -0,0 +1,16 @@ +namespace Microsoft.Zune.Playlist +{ + public enum PlaylistRuleOperator + { + IsNotNull = 10, + IsNull = 9, + LessThanOrEqual = 8, + LessThan = 7, + GreaterThanOrEqual = 6, + GreaterThan = 5, + NotContains = 4, + Contains = 3, + NotEquals = 2, + Equals = 1 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistType.cs b/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistType.cs new file mode 100644 index 0000000..662f3dc --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Playlist/PlaylistType.cs @@ -0,0 +1,14 @@ +namespace Microsoft.Zune.Playlist +{ + public enum PlaylistType + { + Auto = 1, + QuickMix = 7, + PersonalChannel = 6, + Channel = 5, + Temp = 4, + UserCard = 2, + Static = 0, + SyncRules = 3 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/QuickMix/BatchEndHandler.cs b/ZuneDBApi/Microsoft/Zune/QuickMix/BatchEndHandler.cs new file mode 100644 index 0000000..b9ed356 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/QuickMix/BatchEndHandler.cs @@ -0,0 +1,6 @@ +using ZuneUI; + +namespace Microsoft.Zune.QuickMix +{ + public delegate void BatchEndHandler(HRESULT hr); +} diff --git a/ZuneDBApi/Microsoft/Zune/QuickMix/QuickMix.cs b/ZuneDBApi/Microsoft/Zune/QuickMix/QuickMix.cs new file mode 100644 index 0000000..b1e0c65 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/QuickMix/QuickMix.cs @@ -0,0 +1,298 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using ZuneUI; + +namespace Microsoft.Zune.QuickMix +{ + public class QuickMix + { + private static object sm_lock = new object(); + + private static QuickMix sm_instance; + + private QuickMixProgressHandler m_onProgressHandler; + + public unsafe bool IsReady + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_0018: Expected I4, but got I8 + //IL_003e: Expected I, but got I8 + //IL_003e: Expected I, but got I8 + bool flag = false; + CComPtrNtv_003CIQuickMixManager_003E cComPtrNtv_003CIQuickMixManager_003E; + *(long*)(&cComPtrNtv_003CIQuickMixManager_003E) = 0L; + try + { + QUICK_MIX_STATUS_INFO qUICK_MIX_STATUS_INFO; + *(sbyte*)(&qUICK_MIX_STATUS_INFO) = 0; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref qUICK_MIX_STATUS_INFO, 1), 0, 15); + int singleton = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_d69e22ae_7e21_4959_be6e_14462eb96f64, (void**)(&cComPtrNtv_003CIQuickMixManager_003E)); + if (singleton >= 0) + { + long num = *(long*)(&cComPtrNtv_003CIQuickMixManager_003E); + singleton = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIQuickMixManager_003E)) + 56)))((nint)num, &qUICK_MIX_STATUS_INFO); + flag = ((singleton >= 0) ? (*(bool*)(&qUICK_MIX_STATUS_INFO)) : flag); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIQuickMixManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIQuickMixManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIQuickMixManager_003E_002ERelease(&cComPtrNtv_003CIQuickMixManager_003E); + return flag; + } + } + + public static QuickMix Instance + { + get + { + if (sm_instance == null) + { + try + { + Monitor.Enter(sm_lock); + if (sm_instance == null) + { + QuickMix quickMix = new QuickMix(); + int num = quickMix.Initialize(); + Thread.MemoryBarrier(); + if (num >= 0) + { + sm_instance = quickMix; + } + } + } + finally + { + Monitor.Exit(sm_lock); + } + } + return sm_instance; + } + } + + [SpecialName] + public unsafe event QuickMixProgressHandler OnProgress + { + add + { + //IL_002d: Expected I4, but got I8 + //IL_004f: Expected I, but got I8 + //IL_004f: Expected I, but got I8 + m_onProgressHandler = (QuickMixProgressHandler)Delegate.Combine(m_onProgressHandler, value); + CComPtrNtv_003CIQuickMixManager_003E cComPtrNtv_003CIQuickMixManager_003E; + *(long*)(&cComPtrNtv_003CIQuickMixManager_003E) = 0L; + try + { + QUICK_MIX_STATUS_INFO qUICK_MIX_STATUS_INFO; + *(sbyte*)(&qUICK_MIX_STATUS_INFO) = 0; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref qUICK_MIX_STATUS_INFO, 1), 0, 15); + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_d69e22ae_7e21_4959_be6e_14462eb96f64, (void**)(&cComPtrNtv_003CIQuickMixManager_003E)) >= 0) + { + long num = *(long*)(&cComPtrNtv_003CIQuickMixManager_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIQuickMixManager_003E)) + 56)))((nint)num, &qUICK_MIX_STATUS_INFO); + } + value(System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref qUICK_MIX_STATUS_INFO, 4)), System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref qUICK_MIX_STATUS_INFO, 12))); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIQuickMixManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIQuickMixManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIQuickMixManager_003E_002ERelease(&cComPtrNtv_003CIQuickMixManager_003E); + } + remove + { + m_onProgressHandler = (QuickMixProgressHandler)Delegate.Remove(m_onProgressHandler, value); + } + } + + public unsafe HRESULT CreateSession(EQuickMixMode eQuickMixMode, Guid serviceMediaId, EMediaTypes eMediaType, string mediaTitle, out QuickMixSession quickMixSession) + { + //IL_0045: Expected I, but got I8 + //IL_0045: Expected I, but got I8 + //IL_005d: Expected I, but got I8 + CComPtrNtv_003CIQuickMixManager_003E cComPtrNtv_003CIQuickMixManager_003E; + *(long*)(&cComPtrNtv_003CIQuickMixManager_003E) = 0L; + HRESULT result; + try + { + CComPtrNtv_003CIQuickMixSession_003E cComPtrNtv_003CIQuickMixSession_003E; + *(long*)(&cComPtrNtv_003CIQuickMixSession_003E) = 0L; + try + { + int num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_d69e22ae_7e21_4959_be6e_14462eb96f64, (void**)(&cComPtrNtv_003CIQuickMixManager_003E)); + if (num >= 0) + { + _GUID gUID = _003CModule_003E.GuidToGUID(serviceMediaId); + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(mediaTitle))) + { + try + { + long num2 = *(long*)(*(ulong*)(&cComPtrNtv_003CIQuickMixManager_003E)) + 24; + long num3 = *(long*)(&cComPtrNtv_003CIQuickMixManager_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)num3, eQuickMixMode, &gUID, eMediaType, ptr, (IQuickMixSession**)(&cComPtrNtv_003CIQuickMixSession_003E)); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + if (num >= 0) + { + quickMixSession = new QuickMixSession((IQuickMixSession*)(*(ulong*)(&cComPtrNtv_003CIQuickMixSession_003E))); + } + } + result = num; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIQuickMixSession_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIQuickMixSession_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIQuickMixSession_003E_002ERelease(&cComPtrNtv_003CIQuickMixSession_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIQuickMixManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIQuickMixManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIQuickMixManager_003E_002ERelease(&cComPtrNtv_003CIQuickMixManager_003E); + return result; + } + + public unsafe HRESULT CreateSession(EQuickMixMode eQuickMixMode, int[] seedMediaIds, EMediaTypes eMediaType, out QuickMixSession quickMixSession) + { + //IL_003d: Expected I, but got I8 + //IL_003d: Expected I, but got I8 + //IL_0055: Expected I, but got I8 + CComPtrNtv_003CIQuickMixManager_003E cComPtrNtv_003CIQuickMixManager_003E; + *(long*)(&cComPtrNtv_003CIQuickMixManager_003E) = 0L; + HRESULT result; + try + { + CComPtrNtv_003CIQuickMixSession_003E cComPtrNtv_003CIQuickMixSession_003E; + *(long*)(&cComPtrNtv_003CIQuickMixSession_003E) = 0L; + try + { + int num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_d69e22ae_7e21_4959_be6e_14462eb96f64, (void**)(&cComPtrNtv_003CIQuickMixManager_003E)); + if (num >= 0) + { + fixed (int* ptr = &seedMediaIds[0]) + { + try + { + long num2 = *(long*)(*(ulong*)(&cComPtrNtv_003CIQuickMixManager_003E)) + 32; + long num3 = *(long*)(&cComPtrNtv_003CIQuickMixManager_003E); + IntPtr intPtr = (nint)seedMediaIds.LongLength; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)num3, eQuickMixMode, (int)(nint)intPtr, ptr, eMediaType, (IQuickMixSession**)(&cComPtrNtv_003CIQuickMixSession_003E)); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + if (num >= 0) + { + quickMixSession = new QuickMixSession((IQuickMixSession*)(*(ulong*)(&cComPtrNtv_003CIQuickMixSession_003E))); + } + } + result = num; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIQuickMixSession_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIQuickMixSession_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIQuickMixSession_003E_002ERelease(&cComPtrNtv_003CIQuickMixSession_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIQuickMixManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIQuickMixManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIQuickMixManager_003E_002ERelease(&cComPtrNtv_003CIQuickMixManager_003E); + return result; + } + + private QuickMix() + { + } + + private unsafe int Initialize() + { + //IL_002d: Expected I, but got I8 + //IL_0066: Expected I, but got I8 + //IL_006b: Expected I, but got I8 + //IL_007d: Expected I, but got I8 + //IL_007d: Expected I, but got I8 + //IL_0090: Expected I, but got I8 + CComPtrNtv_003CIQuickMixManager_003E cComPtrNtv_003CIQuickMixManager_003E; + *(long*)(&cComPtrNtv_003CIQuickMixManager_003E) = 0L; + int num2; + try + { + QuickMixProgressHandler progressHandler = QuickMixProgressHandlerInternal; + QuickMixCallbackProxy* ptr = (QuickMixCallbackProxy*)_003CModule_003E.@new(48uL); + QuickMixCallbackProxy* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EQuickMix_002EQuickMixCallbackProxy_002E_007Bctor_007D(ptr, progressHandler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + int num = (((long)(nint)ptr2 == 0) ? (-2147024882) : 0); + num2 = num; + if (num >= 0) + { + num2 = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_d69e22ae_7e21_4959_be6e_14462eb96f64, (void**)(&cComPtrNtv_003CIQuickMixManager_003E)); + if (num2 >= 0) + { + QuickMixCallbackProxy* ptr3 = (QuickMixCallbackProxy*)((ptr2 == null) ? 0 : ((ulong)(nint)ptr2 + 8uL)); + long num3 = *(long*)(&cComPtrNtv_003CIQuickMixManager_003E); + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIQuickMixManager_003E)) + 72)))((nint)num3, (IQuickMixStatusCallback*)ptr3); + } + } + if (ptr2 != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIQuickMixManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIQuickMixManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIQuickMixManager_003E_002ERelease(&cComPtrNtv_003CIQuickMixManager_003E); + return num2; + } + + private void QuickMixProgressHandlerInternal(float progress, int secondsRemaining) + { + m_onProgressHandler?.Invoke(progress, secondsRemaining); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/QuickMix/QuickMixCallbackProxy.cs b/ZuneDBApi/Microsoft/Zune/QuickMix/QuickMixCallbackProxy.cs new file mode 100644 index 0000000..aad206a --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/QuickMix/QuickMixCallbackProxy.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.QuickMix +{ + [StructLayout(LayoutKind.Sequential, Size = 48)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(64)] + internal struct QuickMixCallbackProxy + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/QuickMix/QuickMixItem.cs b/ZuneDBApi/Microsoft/Zune/QuickMix/QuickMixItem.cs new file mode 100644 index 0000000..066011f --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/QuickMix/QuickMixItem.cs @@ -0,0 +1,59 @@ +using System; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.QuickMix +{ + public class QuickMixItem + { + private int m_mediaId; + + private int m_durationSeconds; + + private bool m_inCollection; + + private string m_title; + + private string m_artistName; + + private Guid m_serviceMediaId; + + public bool InCollection + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_inCollection; + } + } + + public int DurationSeconds => m_durationSeconds; + + public Guid ServiceMediaId => m_serviceMediaId; + + public string ArtistName => m_artistName; + + public string Title => m_title; + + public int MediaId => m_mediaId; + + public QuickMixItem(int mediaId, string title, string artistName, int durationSeconds, [MarshalAs(UnmanagedType.U1)] bool inCollection, Guid serviceMediaId) + { + m_mediaId = mediaId; + m_title = title; + m_artistName = artistName; + m_durationSeconds = durationSeconds; + m_inCollection = inCollection; + m_serviceMediaId = serviceMediaId; + } + + public override string ToString() + { + object[] array = new object[5] { m_title, m_artistName, null, null, null }; + Guid serviceMediaId = m_serviceMediaId; + array[2] = serviceMediaId; + array[3] = m_mediaId; + array[4] = m_inCollection; + return string.Format("Title:{0}\n\tArtist:{1}\n\tServiceMediaId:{2}\n\tMedia Id:{3}\tInCollection:{4}", array); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/QuickMix/QuickMixProgressHandler.cs b/ZuneDBApi/Microsoft/Zune/QuickMix/QuickMixProgressHandler.cs new file mode 100644 index 0000000..2b7aad0 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/QuickMix/QuickMixProgressHandler.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.QuickMix +{ + public delegate void QuickMixProgressHandler(float progress, int secondsRemaining); +} diff --git a/ZuneDBApi/Microsoft/Zune/QuickMix/QuickMixSession.cs b/ZuneDBApi/Microsoft/Zune/QuickMix/QuickMixSession.cs new file mode 100644 index 0000000..d95e954 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/QuickMix/QuickMixSession.cs @@ -0,0 +1,286 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.Zune.Playlist; +using ZuneUI; + +namespace Microsoft.Zune.QuickMix +{ + public class QuickMixSession : IDisposable + { + private readonly CComPtrMgd_003CIQuickMixSession_003E m_spSession; + + public unsafe QuickMixSession(IQuickMixSession* pSession) + { + CComPtrMgd_003CIQuickMixSession_003E spSession = new CComPtrMgd_003CIQuickMixSession_003E(); + try + { + m_spSession = spSession; + base._002Ector(); + m_spSession.op_Assign(pSession); + } + catch + { + //try-fault + ((IDisposable)m_spSession).Dispose(); + throw; + } + } + + private void _007EQuickMixSession() + { + _0021QuickMixSession(); + } + + private unsafe void _0021QuickMixSession() + { + //IL_001c: Expected I, but got I8 + //IL_002a: Expected I, but got I8 + IQuickMixSession* p = m_spSession.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 80)))((nint)p); + m_spSession.op_Assign(null); + } + } + + public unsafe EQuickMixType GetQuickMixType() + { + //IL_0017: Expected I, but got I8 + IQuickMixSession* p = m_spSession.p; + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p); + } + + public unsafe HRESULT SetQuickMixType(EQuickMixType eQuickMixType) + { + //IL_001a: Expected I, but got I8 + IQuickMixSession* p = m_spSession.p; + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)p, eQuickMixType); + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool GetQuickMixTypeAvailable(EQuickMixType eQuickMixType) + { + //IL_001a: Expected I, but got I8 + IQuickMixSession* p = m_spSession.p; + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p, eQuickMixType) != 0; + } + + public unsafe HRESULT GetSimilarMedia(uint maxBatchTracks, TimeSpan maxBatchTimeout, SimilarMediaBatchHandler similarBatchHandler, BatchEndHandler batchEndHandler) + { + //IL_0030: Expected I, but got I8 + //IL_0075: Expected I, but got I8 + //IL_0085: Expected I, but got I8 + if (null == batchEndHandler) + { + return -2147467261; + } + QuickMixCallbackProxy* ptr = (QuickMixCallbackProxy*)_003CModule_003E.@new(48uL); + QuickMixCallbackProxy* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EQuickMix_002EQuickMixCallbackProxy_002E_007Bctor_007D(ptr, similarBatchHandler, batchEndHandler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + int num = (((long)(nint)ptr2 == 0) ? (-2147024882) : 0); + int num2 = num; + if (num >= 0) + { + IQuickMixSession* p = m_spSession.p; + long num3 = *(long*)p + 48; + double totalMilliseconds = maxBatchTimeout.TotalMilliseconds; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)p, (EPlaylistLimitType)2, maxBatchTracks, (uint)totalMilliseconds, (IQuickMixSessionCallback*)ptr2); + } + if (ptr2 != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + return num2; + } + + public unsafe HRESULT GetSimilarMedia(TimeSpan maxBatchDuration, TimeSpan maxBatchTimeout, SimilarMediaBatchHandler similarBatchHandler, BatchEndHandler batchEndHandler) + { + //IL_0030: Expected I, but got I8 + //IL_007c: Expected I, but got I8 + //IL_008c: Expected I, but got I8 + if (null == batchEndHandler) + { + return -2147467261; + } + QuickMixCallbackProxy* ptr = (QuickMixCallbackProxy*)_003CModule_003E.@new(48uL); + QuickMixCallbackProxy* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EQuickMix_002EQuickMixCallbackProxy_002E_007Bctor_007D(ptr, similarBatchHandler, batchEndHandler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + int num = (((long)(nint)ptr2 == 0) ? (-2147024882) : 0); + int num2 = num; + if (num >= 0) + { + IQuickMixSession* p = m_spSession.p; + long num3 = *(long*)p + 48; + uint num4 = (uint)maxBatchDuration.TotalSeconds; + double totalMilliseconds = maxBatchTimeout.TotalMilliseconds; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)p, (EPlaylistLimitType)1, num4, (uint)totalMilliseconds, (IQuickMixSessionCallback*)ptr2); + } + if (ptr2 != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + return num2; + } + + public unsafe HRESULT Refresh(TimeSpan maxBatchTimeout, [MarshalAs(UnmanagedType.U1)] bool reloadSettings, SimilarMediaBatchHandler similarBatchHandler, BatchEndHandler batchEndHandler) + { + //IL_0030: Expected I, but got I8 + //IL_0074: Expected I, but got I8 + //IL_0084: Expected I, but got I8 + if (null == batchEndHandler) + { + return -2147467261; + } + QuickMixCallbackProxy* ptr = (QuickMixCallbackProxy*)_003CModule_003E.@new(48uL); + QuickMixCallbackProxy* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EQuickMix_002EQuickMixCallbackProxy_002E_007Bctor_007D(ptr, similarBatchHandler, batchEndHandler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + int num = (((long)(nint)ptr2 == 0) ? (-2147024882) : 0); + int num2 = num; + if (num >= 0) + { + IQuickMixSession* p = m_spSession.p; + long num3 = *(long*)p + 56; + double totalMilliseconds = maxBatchTimeout.TotalMilliseconds; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)p, (uint)totalMilliseconds, reloadSettings ? ((byte)1) : ((byte)0), (IQuickMixSessionCallback*)ptr2); + } + if (ptr2 != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + return num2; + } + + public unsafe HRESULT GetPlaylistTitle(out string playlistTitle) + { + //IL_0023: Expected I, but got I8 + //IL_0031: Expected I, but got I8 + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + HRESULT result; + try + { + IQuickMixSession* p = m_spSession.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 64)))((nint)p, (ushort**)(&wBSTRString)); + if (num >= 0) + { + playlistTitle = new string((char*)(*(ulong*)(&wBSTRString))); + } + result = num; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + return result; + } + + public unsafe HRESULT SaveAsPlaylist(string playlistTitle, CreatePlaylistOption createOption, out int playlistId) + { + //IL_0048: Expected I, but got I8 + int num = -1; + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(playlistTitle))) + { + int num2; + EPlaylistCreateConflictAction ePlaylistCreateConflictAction; + if (createOption != 0) + { + if (createOption != CreatePlaylistOption.RenameOnConflict) + { + if (createOption != CreatePlaylistOption.OverwriteOnConflict) + { + num2 = -2147418113; + goto IL_0051; + } + ePlaylistCreateConflictAction = (EPlaylistCreateConflictAction)1; + } + else + { + ePlaylistCreateConflictAction = (EPlaylistCreateConflictAction)2; + } + } + else + { + ePlaylistCreateConflictAction = (EPlaylistCreateConflictAction)0; + } + IQuickMixSession* p = m_spSession.p; + long num3 = *(long*)p + 72; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)p, ptr, ePlaylistCreateConflictAction, &num); + if (num2 >= 0) + { + playlistId = num; + } + goto IL_0051; + IL_0051: + return num2; + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _0021QuickMixSession(); + } + finally + { + ((IDisposable)m_spSession).Dispose(); + } + } + else + { + try + { + _0021QuickMixSession(); + } + finally + { + base.Finalize(); + } + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~QuickMixSession() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/QuickMix/SimilarMediaBatchHandler.cs b/ZuneDBApi/Microsoft/Zune/QuickMix/SimilarMediaBatchHandler.cs new file mode 100644 index 0000000..0611b83 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/QuickMix/SimilarMediaBatchHandler.cs @@ -0,0 +1,6 @@ +using System.Collections; + +namespace Microsoft.Zune.QuickMix +{ + public delegate void SimilarMediaBatchHandler(IList itemList); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/AccountManagement.cs b/ZuneDBApi/Microsoft/Zune/Service/AccountManagement.cs new file mode 100644 index 0000000..82aa1d4 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/AccountManagement.cs @@ -0,0 +1,1635 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using ZuneUI; + +namespace Microsoft.Zune.Service +{ + public class AccountManagement : IDisposable + { + private readonly CComPtrMgd_003CIAccountManagement_003E m_spAccountManagement; + + public AccountManagement() + { + CComPtrMgd_003CIAccountManagement_003E spAccountManagement = new CComPtrMgd_003CIAccountManagement_003E(); + try + { + m_spAccountManagement = spAccountManagement; + base._002Ector(); + } + catch + { + //try-fault + ((IDisposable)m_spAccountManagement).Dispose(); + throw; + } + } + + public unsafe HRESULT CreateAccount(PassportIdentity passportIdentity, string zuneTag, string locale, DateTime birthday, string firstName, string lastName, string email, Address address, AccountSettings accountSettings, PassportIdentity parentPassportIdentity, CreditCard parentCreditCard, out ServiceError serviceError) + { + //IL_0112: Expected I, but got I8 + //IL_0112: Expected I, but got I8 + //IL_0112: Expected I, but got I8 + //IL_0112: Expected I, but got I8 + //IL_0112: Expected I, but got I8 + //IL_0112: Expected I, but got I8 + //IL_0112: Expected I, but got I8 + //IL_0153: Expected I, but got I8 + int num = CreateComObject(); + CComPtrNtv_003CINewsletterSettings_003E cComPtrNtv_003CINewsletterSettings_003E; + _003CModule_003E.CComPtrNtv_003CINewsletterSettings_003E_002E_007Bctor_007D(&cComPtrNtv_003CINewsletterSettings_003E); + HRESULT result; + try + { + CComPtrNtv_003CIPrivacySettings_003E cComPtrNtv_003CIPrivacySettings_003E; + _003CModule_003E.CComPtrNtv_003CIPrivacySettings_003E_002E_007Bctor_007D(&cComPtrNtv_003CIPrivacySettings_003E); + try + { + if (num >= 0 && accountSettings != null) + { + num = CreateAccountSettings(accountSettings, _003CModule_003E.CComPtrNtv_003CINewsletterSettings_003E_002E_0026(&cComPtrNtv_003CINewsletterSettings_003E), _003CModule_003E.CComPtrNtv_003CIPrivacySettings_003E_002E_0026(&cComPtrNtv_003CIPrivacySettings_003E)); + } + CComPtrNtv_003CIPassportIdentity_003E cComPtrNtv_003CIPassportIdentity_003E; + _003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002E_007Bctor_007D(&cComPtrNtv_003CIPassportIdentity_003E); + try + { + if (num >= 0 && passportIdentity != null) + { + num = passportIdentity.GetComPointer((IPassportIdentity**)(&cComPtrNtv_003CIPassportIdentity_003E)); + } + CComPtrNtv_003CIPassportIdentity_003E cComPtrNtv_003CIPassportIdentity_003E2; + _003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002E_007Bctor_007D(&cComPtrNtv_003CIPassportIdentity_003E2); + try + { + if (num >= 0 && parentPassportIdentity != null) + { + num = parentPassportIdentity.GetComPointer((IPassportIdentity**)(&cComPtrNtv_003CIPassportIdentity_003E2)); + } + CComPtrNtv_003CICreditCard_003E cComPtrNtv_003CICreditCard_003E; + *(long*)(&cComPtrNtv_003CICreditCard_003E) = 0L; + try + { + if (num >= 0 && parentCreditCard != null) + { + num = CreateCreditCard(parentCreditCard, (ICreditCard**)(&cComPtrNtv_003CICreditCard_003E)); + } + CComPtrNtv_003CIAddress_003E cComPtrNtv_003CIAddress_003E; + *(long*)(&cComPtrNtv_003CIAddress_003E) = 0L; + try + { + if (num >= 0 && address != null) + { + num = CreateAddress(address, (IAddress**)(&cComPtrNtv_003CIAddress_003E)); + } + CComPtrNtv_003CIServiceError_003E cComPtrNtv_003CIServiceError_003E; + *(long*)(&cComPtrNtv_003CIServiceError_003E) = 0L; + try + { + if (num >= 0) + { + _SYSTEMTIME sYSTEMTIME = _003CModule_003E.DateTimeToSystemTime(birthday); + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(firstName))) + { + try + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(lastName))) + { + try + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(zuneTag))) + { + try + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(email))) + { + try + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(locale))) + { + try + { + IAccountManagement* p = m_spAccountManagement.p; + long num2 = *(long*)p + 72; + long num3 = *(long*)(&cComPtrNtv_003CIPassportIdentity_003E); + _003F val = ptr; + _003F val2 = ptr2; + _003F val3 = ptr3; + _003F val4 = ptr4; + _003F val5 = ptr5; + long num4 = *(long*)(&cComPtrNtv_003CIAddress_003E); + long num5 = *(long*)(&cComPtrNtv_003CINewsletterSettings_003E); + long num6 = *(long*)(&cComPtrNtv_003CIPrivacySettings_003E); + long num7 = *(long*)(&cComPtrNtv_003CIPassportIdentity_003E2); + long num8 = *(long*)(&cComPtrNtv_003CICreditCard_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)p, (IPassportIdentity*)num3, (ushort*)(nint)val, (ushort*)(nint)val2, &sYSTEMTIME, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, (IAddress*)num4, (INewsletterSettings*)num5, (IPrivacySettings*)num6, (IPassportIdentity*)num7, (ICreditCard*)num8, (IServiceError**)(&cComPtrNtv_003CIServiceError_003E)); + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + catch + { + //try-fault + ptr5 = null; + throw; + } + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + if (*(long*)(&cComPtrNtv_003CIServiceError_003E) != 0L) + { + serviceError = new ServiceError((IServiceError*)(*(ulong*)(&cComPtrNtv_003CIServiceError_003E))); + } + result = new HRESULT(num); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIServiceError_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIServiceError_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIServiceError_003E_002ERelease(&cComPtrNtv_003CIServiceError_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIAddress_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIAddress_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIAddress_003E_002ERelease(&cComPtrNtv_003CIAddress_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CICreditCard_003E_002E_007Bdtor_007D), &cComPtrNtv_003CICreditCard_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CICreditCard_003E_002ERelease(&cComPtrNtv_003CICreditCard_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPassportIdentity_003E2); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002ERelease(&cComPtrNtv_003CIPassportIdentity_003E2); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPassportIdentity_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002ERelease(&cComPtrNtv_003CIPassportIdentity_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPrivacySettings_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPrivacySettings_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPrivacySettings_003E_002ERelease(&cComPtrNtv_003CIPrivacySettings_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CINewsletterSettings_003E_002E_007Bdtor_007D), &cComPtrNtv_003CINewsletterSettings_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CINewsletterSettings_003E_002ERelease(&cComPtrNtv_003CINewsletterSettings_003E); + return result; + } + + public unsafe HRESULT ReserveZuneTag(string zuneTag, string countryCode, out IList suggestedNames, out ServiceError serviceError) + { + //IL_004e: Expected I, but got I8 + //IL_007c: Expected I, but got I8 + //IL_007c: Expected I, but got I8 + //IL_008f: Expected I, but got I8 + //IL_00a3: Expected I, but got I8 + //IL_00a3: Expected I, but got I8 + //IL_00d9: Expected I, but got I8 + int num = CreateComObject(); + suggestedNames = null; + CComPtrNtv_003CIAvailableZuneTagInformation_003E cComPtrNtv_003CIAvailableZuneTagInformation_003E; + *(long*)(&cComPtrNtv_003CIAvailableZuneTagInformation_003E) = 0L; + HRESULT result; + try + { + CComPtrNtv_003CIServiceError_003E cComPtrNtv_003CIServiceError_003E; + *(long*)(&cComPtrNtv_003CIServiceError_003E) = 0L; + try + { + if (num >= 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(zuneTag))) + { + try + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(countryCode))) + { + try + { + IAccountManagement* p = m_spAccountManagement.p; + long num2 = *(long*)p + 80; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)p, ptr, ptr2, (IAvailableZuneTagInformation**)(&cComPtrNtv_003CIAvailableZuneTagInformation_003E), (IServiceError**)(&cComPtrNtv_003CIServiceError_003E)); + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + if (num == -1056857549) + { + long num3 = *(long*)(&cComPtrNtv_003CIAvailableZuneTagInformation_003E); + int num4 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIAvailableZuneTagInformation_003E)) + 48)))((nint)num3); + suggestedNames = new ArrayList(num4); + int num5 = 0; + if (0 < num4) + { + do + { + ushort* ptr3 = null; + long num6 = *(long*)(&cComPtrNtv_003CIAvailableZuneTagInformation_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIAvailableZuneTagInformation_003E)) + 56)))((nint)num6, num5, &ptr3); + if (num >= 0) + { + suggestedNames.Add(new string((char*)ptr3)); + } + _003CModule_003E.SysFreeString(ptr3); + if (num < 0) + { + break; + } + num5++; + } + while (num5 < num4); + } + } + if (*(long*)(&cComPtrNtv_003CIServiceError_003E) != 0L) + { + serviceError = new ServiceError((IServiceError*)(*(ulong*)(&cComPtrNtv_003CIServiceError_003E))); + } + result = num; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIServiceError_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIServiceError_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIServiceError_003E_002ERelease(&cComPtrNtv_003CIServiceError_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIAvailableZuneTagInformation_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIAvailableZuneTagInformation_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIAvailableZuneTagInformation_003E_002ERelease(&cComPtrNtv_003CIAvailableZuneTagInformation_003E); + return result; + } + + public unsafe HRESULT ValidateCreditCard(PassportIdentity parentPassportIdentity, CreditCard creditCard, out ServiceError serviceError) + { + //IL_005c: Expected I, but got I8 + //IL_005c: Expected I, but got I8 + //IL_005c: Expected I, but got I8 + //IL_006b: Expected I, but got I8 + int num = CreateComObject(); + CComPtrNtv_003CICreditCard_003E cComPtrNtv_003CICreditCard_003E; + *(long*)(&cComPtrNtv_003CICreditCard_003E) = 0L; + HRESULT result; + try + { + if (num >= 0 && creditCard != null) + { + num = CreateCreditCard(creditCard, (ICreditCard**)(&cComPtrNtv_003CICreditCard_003E)); + } + CComPtrNtv_003CIPassportIdentity_003E cComPtrNtv_003CIPassportIdentity_003E; + *(long*)(&cComPtrNtv_003CIPassportIdentity_003E) = 0L; + try + { + if (num >= 0 && parentPassportIdentity != null) + { + num = parentPassportIdentity.GetComPointer((IPassportIdentity**)(&cComPtrNtv_003CIPassportIdentity_003E)); + } + CComPtrNtv_003CIServiceError_003E cComPtrNtv_003CIServiceError_003E; + *(long*)(&cComPtrNtv_003CIServiceError_003E) = 0L; + try + { + if (num >= 0) + { + IAccountManagement* p = m_spAccountManagement.p; + long num2 = *(long*)(&cComPtrNtv_003CIPassportIdentity_003E); + long num3 = *(long*)(&cComPtrNtv_003CICreditCard_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 88)))((nint)p, (IPassportIdentity*)num2, (ICreditCard*)num3, (IServiceError**)(&cComPtrNtv_003CIServiceError_003E)); + } + if (*(long*)(&cComPtrNtv_003CIServiceError_003E) != 0L) + { + serviceError = new ServiceError((IServiceError*)(*(ulong*)(&cComPtrNtv_003CIServiceError_003E))); + } + result = new HRESULT(num); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIServiceError_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIServiceError_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIServiceError_003E_002ERelease(&cComPtrNtv_003CIServiceError_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPassportIdentity_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002ERelease(&cComPtrNtv_003CIPassportIdentity_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CICreditCard_003E_002E_007Bdtor_007D), &cComPtrNtv_003CICreditCard_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CICreditCard_003E_002ERelease(&cComPtrNtv_003CICreditCard_003E); + return result; + } + + public unsafe HRESULT GetAccount(PassportIdentity passportIdentity, GetAccountCompleteCallback onSuccess, AccountManagementErrorCallback onError) + { + //IL_000a: Expected I, but got I8 + //IL_0028: Expected I, but got I8 + //IL_007a: Expected I, but got I8 + //IL_007a: Expected I, but got I8 + //IL_008b: Expected I, but got I8 + int num = CreateComObject(); + GetAccountCallbackWrapper* ptr = null; + if (num >= 0) + { + GetAccountCallbackWrapper* ptr2 = (GetAccountCallbackWrapper*)_003CModule_003E.@new(32uL); + GetAccountCallbackWrapper* ptr3; + try + { + ptr3 = ((ptr2 == null) ? null : _003CModule_003E.Microsoft_002EZune_002EService_002EGetAccountCallbackWrapper_002E_007Bctor_007D(ptr2, onSuccess, onError)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr2); + throw; + } + ptr = ptr3; + num = (((long)(nint)ptr3 == 0) ? (-2147024882) : num); + } + CComPtrNtv_003CIPassportIdentity_003E cComPtrNtv_003CIPassportIdentity_003E; + *(long*)(&cComPtrNtv_003CIPassportIdentity_003E) = 0L; + HRESULT result; + try + { + if (num >= 0) + { + if (passportIdentity != null) + { + num = passportIdentity.GetComPointer((IPassportIdentity**)(&cComPtrNtv_003CIPassportIdentity_003E)); + } + if (num >= 0) + { + IAccountManagement* p = m_spAccountManagement.p; + long num2 = *(long*)(&cComPtrNtv_003CIPassportIdentity_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 96)))((nint)p, (IPassportIdentity*)num2, (IGetAccountCallback*)ptr); + } + } + if (ptr != null) + { + GetAccountCallbackWrapper* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + } + result = new HRESULT(num); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPassportIdentity_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002ERelease(&cComPtrNtv_003CIPassportIdentity_003E); + return result; + } + + public unsafe HRESULT GetAccount(PassportIdentity passportIdentity, out AccountUser accountUser, out ServiceError serviceError) + { + //IL_004a: Expected I, but got I8 + //IL_004a: Expected I, but got I8 + //IL_0059: Expected I, but got I8 + //IL_0068: Expected I, but got I8 + int num = CreateComObject(); + CComPtrNtv_003CIPassportIdentity_003E cComPtrNtv_003CIPassportIdentity_003E; + *(long*)(&cComPtrNtv_003CIPassportIdentity_003E) = 0L; + HRESULT result; + try + { + if (num >= 0 && passportIdentity != null) + { + num = passportIdentity.GetComPointer((IPassportIdentity**)(&cComPtrNtv_003CIPassportIdentity_003E)); + } + CComPtrNtv_003CIAccountUser_003E cComPtrNtv_003CIAccountUser_003E; + *(long*)(&cComPtrNtv_003CIAccountUser_003E) = 0L; + try + { + CComPtrNtv_003CIServiceError_003E cComPtrNtv_003CIServiceError_003E; + *(long*)(&cComPtrNtv_003CIServiceError_003E) = 0L; + try + { + if (num >= 0) + { + IAccountManagement* p = m_spAccountManagement.p; + long num2 = *(long*)(&cComPtrNtv_003CIPassportIdentity_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 104)))((nint)p, (IPassportIdentity*)num2, (IAccountUser**)(&cComPtrNtv_003CIAccountUser_003E), (IServiceError**)(&cComPtrNtv_003CIServiceError_003E)); + } + if (*(long*)(&cComPtrNtv_003CIServiceError_003E) != 0L) + { + serviceError = new ServiceError((IServiceError*)(*(ulong*)(&cComPtrNtv_003CIServiceError_003E))); + } + if (*(long*)(&cComPtrNtv_003CIAccountUser_003E) != 0L) + { + accountUser = new AccountUser((IAccountUser*)(*(ulong*)(&cComPtrNtv_003CIAccountUser_003E))); + } + result = new HRESULT(num); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIServiceError_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIServiceError_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIServiceError_003E_002ERelease(&cComPtrNtv_003CIServiceError_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIAccountUser_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIAccountUser_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIAccountUser_003E_002ERelease(&cComPtrNtv_003CIAccountUser_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPassportIdentity_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002ERelease(&cComPtrNtv_003CIPassportIdentity_003E); + return result; + } + + public unsafe HRESULT SetAccount(PassportIdentity passportIdentity, AccountUser accountUser, out ServiceError serviceError) + { + //IL_005c: Expected I, but got I8 + //IL_005c: Expected I, but got I8 + //IL_005c: Expected I, but got I8 + //IL_006b: Expected I, but got I8 + int num = CreateComObject(); + CComPtrNtv_003CIPassportIdentity_003E cComPtrNtv_003CIPassportIdentity_003E; + *(long*)(&cComPtrNtv_003CIPassportIdentity_003E) = 0L; + HRESULT result; + try + { + if (num >= 0 && passportIdentity != null) + { + num = passportIdentity.GetComPointer((IPassportIdentity**)(&cComPtrNtv_003CIPassportIdentity_003E)); + } + CComPtrNtv_003CIAccountUser_003E cComPtrNtv_003CIAccountUser_003E; + *(long*)(&cComPtrNtv_003CIAccountUser_003E) = 0L; + try + { + if (num >= 0 && accountUser != null) + { + num = CreateAccountUser(accountUser, (IAccountUser**)(&cComPtrNtv_003CIAccountUser_003E)); + } + CComPtrNtv_003CIServiceError_003E cComPtrNtv_003CIServiceError_003E; + *(long*)(&cComPtrNtv_003CIServiceError_003E) = 0L; + try + { + if (num >= 0) + { + IAccountManagement* p = m_spAccountManagement.p; + long num2 = *(long*)(&cComPtrNtv_003CIPassportIdentity_003E); + long num3 = *(long*)(&cComPtrNtv_003CIAccountUser_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 112)))((nint)p, (IPassportIdentity*)num2, (IAccountUser*)num3, (IServiceError**)(&cComPtrNtv_003CIServiceError_003E)); + } + if (*(long*)(&cComPtrNtv_003CIServiceError_003E) != 0L) + { + serviceError = new ServiceError((IServiceError*)(*(ulong*)(&cComPtrNtv_003CIServiceError_003E))); + } + result = new HRESULT(num); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIServiceError_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIServiceError_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIServiceError_003E_002ERelease(&cComPtrNtv_003CIServiceError_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIAccountUser_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIAccountUser_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIAccountUser_003E_002ERelease(&cComPtrNtv_003CIAccountUser_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPassportIdentity_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002ERelease(&cComPtrNtv_003CIPassportIdentity_003E); + return result; + } + + public unsafe HRESULT SetNewsLetterSettings(AccountSettings accountSettings, out ServiceError serviceError) + { + //IL_001e: Expected I, but got I8 + //IL_0046: Expected I, but got I8 + //IL_0046: Expected I, but got I8 + //IL_0055: Expected I, but got I8 + int num = CreateComObject(); + CComPtrNtv_003CINewsletterSettings_003E cComPtrNtv_003CINewsletterSettings_003E; + *(long*)(&cComPtrNtv_003CINewsletterSettings_003E) = 0L; + HRESULT result; + try + { + if (num >= 0 && accountSettings != null) + { + num = CreateAccountSettings(accountSettings, (INewsletterSettings**)(&cComPtrNtv_003CINewsletterSettings_003E), null); + } + CComPtrNtv_003CIServiceError_003E cComPtrNtv_003CIServiceError_003E; + *(long*)(&cComPtrNtv_003CIServiceError_003E) = 0L; + try + { + if (num >= 0) + { + IAccountManagement* p = m_spAccountManagement.p; + long num2 = *(long*)(&cComPtrNtv_003CINewsletterSettings_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 120)))((nint)p, (INewsletterSettings*)num2, (IServiceError**)(&cComPtrNtv_003CIServiceError_003E)); + } + if (*(long*)(&cComPtrNtv_003CIServiceError_003E) != 0L) + { + serviceError = new ServiceError((IServiceError*)(*(ulong*)(&cComPtrNtv_003CIServiceError_003E))); + } + result = new HRESULT(num); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIServiceError_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIServiceError_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIServiceError_003E_002ERelease(&cComPtrNtv_003CIServiceError_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CINewsletterSettings_003E_002E_007Bdtor_007D), &cComPtrNtv_003CINewsletterSettings_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CINewsletterSettings_003E_002ERelease(&cComPtrNtv_003CINewsletterSettings_003E); + return result; + } + + public unsafe HRESULT SetPrivacySettings(AccountSettings accountSettings, PassportIdentity parentPassportIdentity, out ServiceError serviceError) + { + //IL_001e: Expected I, but got I8 + //IL_0061: Expected I, but got I8 + //IL_0061: Expected I, but got I8 + //IL_0061: Expected I, but got I8 + //IL_0070: Expected I, but got I8 + int num = CreateComObject(); + CComPtrNtv_003CIPrivacySettings_003E cComPtrNtv_003CIPrivacySettings_003E; + *(long*)(&cComPtrNtv_003CIPrivacySettings_003E) = 0L; + HRESULT result; + try + { + if (num >= 0 && accountSettings != null) + { + num = CreateAccountSettings(accountSettings, null, (IPrivacySettings**)(&cComPtrNtv_003CIPrivacySettings_003E)); + } + CComPtrNtv_003CIPassportIdentity_003E cComPtrNtv_003CIPassportIdentity_003E; + *(long*)(&cComPtrNtv_003CIPassportIdentity_003E) = 0L; + try + { + if (num >= 0 && parentPassportIdentity != null) + { + num = parentPassportIdentity.GetComPointer((IPassportIdentity**)(&cComPtrNtv_003CIPassportIdentity_003E)); + } + CComPtrNtv_003CIServiceError_003E cComPtrNtv_003CIServiceError_003E; + *(long*)(&cComPtrNtv_003CIServiceError_003E) = 0L; + try + { + if (num >= 0) + { + IAccountManagement* p = m_spAccountManagement.p; + long num2 = *(long*)(&cComPtrNtv_003CIPrivacySettings_003E); + long num3 = *(long*)(&cComPtrNtv_003CIPassportIdentity_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 128)))((nint)p, (IPrivacySettings*)num2, (IPassportIdentity*)num3, (IServiceError**)(&cComPtrNtv_003CIServiceError_003E)); + } + if (*(long*)(&cComPtrNtv_003CIServiceError_003E) != 0L) + { + serviceError = new ServiceError((IServiceError*)(*(ulong*)(&cComPtrNtv_003CIServiceError_003E))); + } + result = new HRESULT(num); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIServiceError_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIServiceError_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIServiceError_003E_002ERelease(&cComPtrNtv_003CIServiceError_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPassportIdentity_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002ERelease(&cComPtrNtv_003CIPassportIdentity_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPrivacySettings_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPrivacySettings_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPrivacySettings_003E_002ERelease(&cComPtrNtv_003CIPrivacySettings_003E); + return result; + } + + public unsafe HRESULT UpgradeAccount(PassportIdentity passportIdentity, AccountSettings accountSettings, PassportIdentity parentPassportIdentity, out ServiceError serviceError) + { + //IL_0081: Expected I, but got I8 + //IL_0081: Expected I, but got I8 + //IL_0081: Expected I, but got I8 + //IL_0081: Expected I, but got I8 + //IL_0081: Expected I, but got I8 + //IL_0091: Expected I, but got I8 + int num = CreateComObject(); + CComPtrNtv_003CINewsletterSettings_003E cComPtrNtv_003CINewsletterSettings_003E; + *(long*)(&cComPtrNtv_003CINewsletterSettings_003E) = 0L; + HRESULT result; + try + { + CComPtrNtv_003CIPrivacySettings_003E cComPtrNtv_003CIPrivacySettings_003E; + *(long*)(&cComPtrNtv_003CIPrivacySettings_003E) = 0L; + try + { + if (num >= 0 && accountSettings != null) + { + num = CreateAccountSettings(accountSettings, (INewsletterSettings**)(&cComPtrNtv_003CINewsletterSettings_003E), (IPrivacySettings**)(&cComPtrNtv_003CIPrivacySettings_003E)); + } + CComPtrNtv_003CIPassportIdentity_003E cComPtrNtv_003CIPassportIdentity_003E; + *(long*)(&cComPtrNtv_003CIPassportIdentity_003E) = 0L; + try + { + if (num >= 0 && passportIdentity != null) + { + num = passportIdentity.GetComPointer((IPassportIdentity**)(&cComPtrNtv_003CIPassportIdentity_003E)); + } + CComPtrNtv_003CIPassportIdentity_003E cComPtrNtv_003CIPassportIdentity_003E2; + *(long*)(&cComPtrNtv_003CIPassportIdentity_003E2) = 0L; + try + { + if (num >= 0 && parentPassportIdentity != null) + { + num = parentPassportIdentity.GetComPointer((IPassportIdentity**)(&cComPtrNtv_003CIPassportIdentity_003E2)); + } + CComPtrNtv_003CIServiceError_003E cComPtrNtv_003CIServiceError_003E; + *(long*)(&cComPtrNtv_003CIServiceError_003E) = 0L; + try + { + if (num >= 0) + { + IAccountManagement* p = m_spAccountManagement.p; + long num2 = *(long*)(&cComPtrNtv_003CIPassportIdentity_003E); + long num3 = *(long*)(&cComPtrNtv_003CINewsletterSettings_003E); + long num4 = *(long*)(&cComPtrNtv_003CIPrivacySettings_003E); + long num5 = *(long*)(&cComPtrNtv_003CIPassportIdentity_003E2); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 136)))((nint)p, (IPassportIdentity*)num2, (INewsletterSettings*)num3, (IPrivacySettings*)num4, (IPassportIdentity*)num5, (IServiceError**)(&cComPtrNtv_003CIServiceError_003E)); + } + if (*(long*)(&cComPtrNtv_003CIServiceError_003E) != 0L) + { + serviceError = new ServiceError((IServiceError*)(*(ulong*)(&cComPtrNtv_003CIServiceError_003E))); + } + result = new HRESULT(num); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIServiceError_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIServiceError_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIServiceError_003E_002ERelease(&cComPtrNtv_003CIServiceError_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPassportIdentity_003E2); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002ERelease(&cComPtrNtv_003CIPassportIdentity_003E2); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPassportIdentity_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002ERelease(&cComPtrNtv_003CIPassportIdentity_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPrivacySettings_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPrivacySettings_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPrivacySettings_003E_002ERelease(&cComPtrNtv_003CIPrivacySettings_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CINewsletterSettings_003E_002E_007Bdtor_007D), &cComPtrNtv_003CINewsletterSettings_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CINewsletterSettings_003E_002ERelease(&cComPtrNtv_003CINewsletterSettings_003E); + return result; + } + + public unsafe HRESULT GetTermsOfService(string languageCode, string countryCode, out string termsOfService) + { + //IL_0045: Expected I, but got I8 + //IL_0065: Expected I, but got I8 + int num = CreateComObject(); + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + HRESULT result; + try + { + if (num >= 0) + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(countryCode))) + { + try + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(languageCode))) + { + try + { + IAccountManagement* p = m_spAccountManagement.p; + long num2 = *(long*)p + 144; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)p, ptr, ptr2, (ushort**)(&wBSTRString)); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + if (num >= 0) + { + termsOfService = new string((char*)(*(ulong*)(&wBSTRString))); + } + } + result = new HRESULT(num); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + return result; + } + + public unsafe HRESULT GetSubscriptionDetails(string offerId, out ArrayList bulletStrings) + { + //IL_000a: Expected I, but got I8 + //IL_003d: Expected I, but got I8 + //IL_0086: Expected I, but got I8 + int num = CreateComObject(); + tagSAFEARRAY* ptr = null; + if (num >= 0) + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(offerId))) + { + try + { + IAccountManagement* p = m_spAccountManagement.p; + long num2 = *(long*)p + 152; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)p, ptr2, &ptr); + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + int num3 = 0; + if (num >= 0) + { + num = _003CModule_003E.SafeArrayGetUBound(ptr, 1u, &num3); + } + int num4 = 0; + if (num >= 0) + { + num = _003CModule_003E.SafeArrayGetLBound(ptr, 1u, &num4); + if (num >= 0) + { + bulletStrings = new ArrayList(num3 - num4 + 1); + int num5 = num4; + if (num4 <= num3) + { + do + { + ushort* value = null; + num = _003CModule_003E.SafeArrayGetElement(ptr, &num5, &value); + if (num < 0) + { + break; + } + bulletStrings.Add(new string((char*)value)); + num5++; + } + while (num5 <= num3); + } + } + } + if (ptr != null) + { + _003CModule_003E.SafeArrayDestroy(ptr); + } + return new HRESULT(num); + } + + private unsafe int CreateAddress(Address address, IAddress** ppAddress) + { + //IL_0033: Expected I, but got I8 + //IL_00a6: Expected I, but got I8 + //IL_00a6: Expected I, but got I8 + //IL_00f3: Expected I, but got I8 + //IL_00fc: Expected I8, but got I + int num = CreateComObject(); + CComPtrNtv_003CIAddress_003E cComPtrNtv_003CIAddress_003E; + *(long*)(&cComPtrNtv_003CIAddress_003E) = 0L; + try + { + if (num >= 0) + { + IAccountManagement* p = m_spAccountManagement.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)p, (IAddress**)(&cComPtrNtv_003CIAddress_003E)); + if (num >= 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(address.Street1))) + { + try + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(address.Street2))) + { + try + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(address.City))) + { + try + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(address.State))) + { + try + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(address.District))) + { + try + { + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(address.PostalCode))) + { + try + { + long num2 = *(long*)(*(ulong*)(&cComPtrNtv_003CIAddress_003E)) + 24; + long num3 = *(long*)(&cComPtrNtv_003CIAddress_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)num3, ptr, ptr2, ptr3, ptr4, ptr5, ptr6); + } + catch + { + //try-fault + ptr6 = null; + throw; + } + } + } + catch + { + //try-fault + ptr5 = null; + throw; + } + } + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + if (num >= 0 && ppAddress != null) + { + IAddress* ptr7 = (IAddress*)(*(ulong*)(&cComPtrNtv_003CIAddress_003E)); + *(long*)(&cComPtrNtv_003CIAddress_003E) = 0L; + *(long*)ppAddress = (nint)ptr7; + } + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIAddress_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIAddress_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIAddress_003E_002ERelease(&cComPtrNtv_003CIAddress_003E); + return num; + } + + private unsafe int CreateCreditCard(CreditCard creditCard, ICreditCard** ppCreditCard) + { + //IL_002e: Expected I, but got I8 + //IL_00f4: Expected I, but got I8 + //IL_00f4: Expected I, but got I8 + //IL_00f4: Expected I, but got I8 + //IL_0164: Expected I, but got I8 + //IL_0164: Expected I, but got I8 + //IL_016f: Expected I, but got I8 + //IL_0178: Expected I8, but got I + int num = CreateComObject(); + CComPtrNtv_003CICreditCard_003E cComPtrNtv_003CICreditCard_003E; + *(long*)(&cComPtrNtv_003CICreditCard_003E) = 0L; + try + { + if (num >= 0) + { + IAccountManagement* p = m_spAccountManagement.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p, (ICreditCard**)(&cComPtrNtv_003CICreditCard_003E)); + } + CComPtrNtv_003CIAddress_003E cComPtrNtv_003CIAddress_003E; + *(long*)(&cComPtrNtv_003CIAddress_003E) = 0L; + try + { + if (num >= 0) + { + num = CreateAddress(creditCard.Address, (IAddress**)(&cComPtrNtv_003CIAddress_003E)); + if (num >= 0) + { + _SYSTEMTIME sYSTEMTIME = _003CModule_003E.DateTimeToSystemTime(creditCard.ExpirationDate); + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.AccountHolderName))) + { + try + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.AccountNumber))) + { + try + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.CCVNumber))) + { + try + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.Locale))) + { + try + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.PhoneNumber))) + { + try + { + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.Email))) + { + try + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.ContactFirstName))) + { + try + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.ContactLastName))) + { + try + { + long num2 = *(long*)(*(ulong*)(&cComPtrNtv_003CICreditCard_003E)) + 24; + long num3 = *(long*)(&cComPtrNtv_003CICreditCard_003E); + long num4 = *(long*)(&cComPtrNtv_003CIAddress_003E); + CreditCardType creditCardType = creditCard.CreditCardType; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)num3, (IAddress*)num4, (ECreditCardType)creditCardType, ptr, ptr2, ptr3, ptr4, ptr5, ptr6, ptr7, ptr8, &sYSTEMTIME); + } + catch + { + //try-fault + ptr8 = null; + throw; + } + } + } + catch + { + //try-fault + ptr7 = null; + throw; + } + } + } + catch + { + //try-fault + ptr6 = null; + throw; + } + } + } + catch + { + //try-fault + ptr5 = null; + throw; + } + } + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + if (num >= 0) + { + long num5 = *(long*)(&cComPtrNtv_003CICreditCard_003E); + bool parentCreditCard = creditCard.ParentCreditCard; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CICreditCard_003E)) + 40)))((nint)num5, parentCreditCard ? ((byte)1) : ((byte)0)); + if (ppCreditCard != null) + { + ICreditCard* ptr9 = (ICreditCard*)(*(ulong*)(&cComPtrNtv_003CICreditCard_003E)); + *(long*)(&cComPtrNtv_003CICreditCard_003E) = 0L; + *(long*)ppCreditCard = (nint)ptr9; + } + } + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIAddress_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIAddress_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIAddress_003E_002ERelease(&cComPtrNtv_003CIAddress_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CICreditCard_003E_002E_007Bdtor_007D), &cComPtrNtv_003CICreditCard_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CICreditCard_003E_002ERelease(&cComPtrNtv_003CICreditCard_003E); + return num; + } + + private unsafe int CreateAccountSettings(AccountSettings accountSettings, INewsletterSettings** ppNewsletterSettings, IPrivacySettings** ppPrivacySettings) + { + //IL_002b: Expected I, but got I8 + //IL_0062: Expected I, but got I8 + //IL_0062: Expected I, but got I8 + //IL_009a: Expected I, but got I8 + //IL_00ec: Expected I, but got I8 + //IL_00ec: Expected I, but got I8 + //IL_010f: Expected I, but got I8 + //IL_0118: Expected I8, but got I + //IL_0127: Expected I, but got I8 + //IL_0130: Expected I8, but got I + int num = CreateComObject(); + CComPtrNtv_003CINewsletterSettings_003E cComPtrNtv_003CINewsletterSettings_003E; + *(long*)(&cComPtrNtv_003CINewsletterSettings_003E) = 0L; + try + { + if (num >= 0) + { + IAccountManagement* p = m_spAccountManagement.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 48)))((nint)p, (INewsletterSettings**)(&cComPtrNtv_003CINewsletterSettings_003E)); + if (num >= 0) + { + NewsletterOptions newsletterOptions; + *(EmailFormat*)(&newsletterOptions) = accountSettings.EmailFormat; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref newsletterOptions, 4)) = (accountSettings.AllowZuneEmails ? 1 : 0); + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref newsletterOptions, 8)) = (accountSettings.AllowPartnerEmails ? 1 : 0); + long num2 = *(long*)(&cComPtrNtv_003CINewsletterSettings_003E); + NewsletterOptions newsletterOptions2 = newsletterOptions; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CINewsletterSettings_003E)) + 24)))((nint)num2, newsletterOptions2); + } + } + CComPtrNtv_003CIPrivacySettings_003E cComPtrNtv_003CIPrivacySettings_003E; + *(long*)(&cComPtrNtv_003CIPrivacySettings_003E) = 0L; + try + { + if (num >= 0) + { + if (accountSettings.PrivacySettings.Count > 0) + { + IAccountManagement* p2 = m_spAccountManagement.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p2 + 56)))((nint)p2, (IPrivacySettings**)(&cComPtrNtv_003CIPrivacySettings_003E)); + } + if (num >= 0) + { + if (*(long*)(&cComPtrNtv_003CIPrivacySettings_003E) != 0L) + { + foreach (KeyValuePair privacySetting in accountSettings.PrivacySettings) + { + EPrivacySettingId key = (EPrivacySettingId)privacySetting.Key; + EPrivacySettingValue value = (EPrivacySettingValue)privacySetting.Value; + long num3 = *(long*)(&cComPtrNtv_003CIPrivacySettings_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIPrivacySettings_003E)) + 24)))((nint)num3, key, value); + if (num >= 0) + { + continue; + } + break; + } + } + if (num >= 0) + { + if (ppNewsletterSettings != null) + { + INewsletterSettings* ptr = (INewsletterSettings*)(*(ulong*)(&cComPtrNtv_003CINewsletterSettings_003E)); + *(long*)(&cComPtrNtv_003CINewsletterSettings_003E) = 0L; + *(long*)ppNewsletterSettings = (nint)ptr; + } + if (ppPrivacySettings != null) + { + if (*(long*)(&cComPtrNtv_003CIPrivacySettings_003E) != 0L) + { + IPrivacySettings* ptr2 = (IPrivacySettings*)(*(ulong*)(&cComPtrNtv_003CIPrivacySettings_003E)); + *(long*)(&cComPtrNtv_003CIPrivacySettings_003E) = 0L; + *(long*)ppPrivacySettings = (nint)ptr2; + } + else + { + *(long*)ppPrivacySettings = 0L; + } + } + } + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPrivacySettings_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPrivacySettings_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPrivacySettings_003E_002ERelease(&cComPtrNtv_003CIPrivacySettings_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CINewsletterSettings_003E_002E_007Bdtor_007D), &cComPtrNtv_003CINewsletterSettings_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CINewsletterSettings_003E_002ERelease(&cComPtrNtv_003CINewsletterSettings_003E); + return num; + } + + private unsafe int CreateAccountUser(AccountUser accountUser, IAccountUser** ppAccountUser) + { + //IL_002e: Expected I, but got I8 + //IL_0147: Incompatible stack types: I8 vs Ref + //IL_017c: Expected I, but got I8 + //IL_017c: Expected I, but got I8 + //IL_017c: Expected I, but got I8 + //IL_017c: Expected I, but got I8 + //IL_017c: Expected I, but got I8 + //IL_017c: Expected I, but got I8 + //IL_017c: Expected I, but got I8 + //IL_01d4: Expected I, but got I8 + //IL_01dd: Expected I8, but got I + int num = CreateComObject(); + CComPtrNtv_003CIAccountUser_003E cComPtrNtv_003CIAccountUser_003E; + *(long*)(&cComPtrNtv_003CIAccountUser_003E) = 0L; + try + { + if (num >= 0) + { + IAccountManagement* p = m_spAccountManagement.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 64)))((nint)p, (IAccountUser**)(&cComPtrNtv_003CIAccountUser_003E)); + } + CComPtrNtv_003CIAddress_003E cComPtrNtv_003CIAddress_003E; + *(long*)(&cComPtrNtv_003CIAddress_003E) = 0L; + try + { + if (num >= 0 && accountUser.Address != null) + { + num = CreateAddress(accountUser.Address, (IAddress**)(&cComPtrNtv_003CIAddress_003E)); + } + CComPtrNtv_003CINewsletterSettings_003E cComPtrNtv_003CINewsletterSettings_003E; + *(long*)(&cComPtrNtv_003CINewsletterSettings_003E) = 0L; + try + { + CComPtrNtv_003CIPrivacySettings_003E cComPtrNtv_003CIPrivacySettings_003E; + *(long*)(&cComPtrNtv_003CIPrivacySettings_003E) = 0L; + try + { + if (num >= 0 && accountUser.AccountSettings != null) + { + num = CreateAccountSettings(accountUser.AccountSettings, (INewsletterSettings**)(&cComPtrNtv_003CINewsletterSettings_003E), (IPrivacySettings**)(&cComPtrNtv_003CIPrivacySettings_003E)); + } + CComPtrNtv_003CICreditCard_003E cComPtrNtv_003CICreditCard_003E; + *(long*)(&cComPtrNtv_003CICreditCard_003E) = 0L; + try + { + if (num >= 0 && accountUser.ParentCreditCard != null) + { + num = CreateCreditCard(accountUser.ParentCreditCard, (ICreditCard**)(&cComPtrNtv_003CICreditCard_003E)); + } + CComPtrNtv_003CIPassportIdentity_003E cComPtrNtv_003CIPassportIdentity_003E; + *(long*)(&cComPtrNtv_003CIPassportIdentity_003E) = 0L; + try + { + if (num >= 0) + { + if (accountUser.ParentPassportIdentity != null) + { + num = accountUser.ParentPassportIdentity.GetComPointer((IPassportIdentity**)(&cComPtrNtv_003CIPassportIdentity_003E)); + } + if (num >= 0) + { + bool flag = accountUser.Birthday != DateTime.MinValue; + _SYSTEMTIME sYSTEMTIME; + if (flag) + { + sYSTEMTIME = _003CModule_003E.DateTimeToSystemTime(accountUser.Birthday); + } + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(accountUser.ZuneTag))) + { + try + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(accountUser.Locale))) + { + try + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(accountUser.FirstName))) + { + try + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(accountUser.LastName))) + { + try + { + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(accountUser.Email))) + { + try + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(accountUser.PhoneNumber))) + { + try + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(accountUser.MobilePhoneNumber))) + { + try + { + _SYSTEMTIME* ptr = (_SYSTEMTIME*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref flag ? ref sYSTEMTIME : ref *(_SYSTEMTIME*)null); + long num2 = *(long*)(*(ulong*)(&cComPtrNtv_003CIAccountUser_003E)) + 24; + long num3 = *(long*)(&cComPtrNtv_003CIAccountUser_003E); + _003F val = ptr2; + _003F val2 = ptr3; + _003F val3 = ptr4; + _003F val4 = ptr5; + _003F val5 = ptr6; + _003F val6 = ptr7; + _003F val7 = ptr8; + long num4 = *(long*)(&cComPtrNtv_003CIAddress_003E); + long num5 = *(long*)(&cComPtrNtv_003CINewsletterSettings_003E); + long num6 = *(long*)(&cComPtrNtv_003CIPrivacySettings_003E); + long num7 = *(long*)(&cComPtrNtv_003CIPassportIdentity_003E); + long num8 = *(long*)(&cComPtrNtv_003CICreditCard_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)num3, (ushort*)(nint)val, (ushort*)(nint)val2, ptr, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, (ushort*)(nint)val6, (ushort*)(nint)val7, (IAddress*)num4, (INewsletterSettings*)num5, (IPrivacySettings*)num6, (IPassportIdentity*)num7, (ICreditCard*)num8); + } + catch + { + //try-fault + ptr8 = null; + throw; + } + } + } + catch + { + //try-fault + ptr7 = null; + throw; + } + } + } + catch + { + //try-fault + ptr6 = null; + throw; + } + } + } + catch + { + //try-fault + ptr5 = null; + throw; + } + } + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + if (num >= 0 && ppAccountUser != null) + { + IAccountUser* ptr9 = (IAccountUser*)(*(ulong*)(&cComPtrNtv_003CIAccountUser_003E)); + *(long*)(&cComPtrNtv_003CIAccountUser_003E) = 0L; + *(long*)ppAccountUser = (nint)ptr9; + } + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPassportIdentity_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002ERelease(&cComPtrNtv_003CIPassportIdentity_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CICreditCard_003E_002E_007Bdtor_007D), &cComPtrNtv_003CICreditCard_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CICreditCard_003E_002ERelease(&cComPtrNtv_003CICreditCard_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPrivacySettings_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPrivacySettings_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPrivacySettings_003E_002ERelease(&cComPtrNtv_003CIPrivacySettings_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CINewsletterSettings_003E_002E_007Bdtor_007D), &cComPtrNtv_003CINewsletterSettings_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CINewsletterSettings_003E_002ERelease(&cComPtrNtv_003CINewsletterSettings_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIAddress_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIAddress_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIAddress_003E_002ERelease(&cComPtrNtv_003CIAddress_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIAccountUser_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIAccountUser_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIAccountUser_003E_002ERelease(&cComPtrNtv_003CIAccountUser_003E); + return num; + } + + private unsafe int CreateComObject() + { + //IL_0045: Expected I, but got I8 + //IL_0045: Expected I, but got I8 + //IL_0075: Expected I, but got I8 + //IL_0075: Expected I, but got I8 + //IL_0075: Expected I, but got I8 + //IL_008a: Expected I, but got I8 + int num = 0; + if ((long)(nint)m_spAccountManagement.p == 0) + { + CComPtrNtv_003CIService_003E cComPtrNtv_003CIService_003E; + *(long*)(&cComPtrNtv_003CIService_003E) = 0L; + try + { + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&cComPtrNtv_003CIService_003E)); + CComPtrNtv_003CIUnknown_003E cComPtrNtv_003CIUnknown_003E; + *(long*)(&cComPtrNtv_003CIUnknown_003E) = 0L; + try + { + if (num >= 0) + { + long num2 = *(long*)(&cComPtrNtv_003CIService_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIService_003E)) + 104)))((nint)num2, (IUnknown**)(&cComPtrNtv_003CIUnknown_003E)); + } + CComPtrNtv_003CIAccountManagement_003E cComPtrNtv_003CIAccountManagement_003E; + *(long*)(&cComPtrNtv_003CIAccountManagement_003E) = 0L; + try + { + if (num >= 0) + { + num = _003CModule_003E.CComPtrNtv_003CIUnknown_003E_002EQueryInterface_003Cstruct_0020IAccountManagement_003E(&cComPtrNtv_003CIUnknown_003E, (IAccountManagement**)(&cComPtrNtv_003CIAccountManagement_003E)); + if (num >= 0) + { + long num3 = *(long*)(&cComPtrNtv_003CIAccountManagement_003E); + long num4 = *(long*)(&cComPtrNtv_003CIService_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIAccountManagement_003E)) + 24)))((nint)num3, (IService*)num4); + if (num >= 0) + { + m_spAccountManagement.op_Assign((IAccountManagement*)(*(ulong*)(&cComPtrNtv_003CIAccountManagement_003E))); + } + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIAccountManagement_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIAccountManagement_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIAccountManagement_003E_002ERelease(&cComPtrNtv_003CIAccountManagement_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIUnknown_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIUnknown_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIUnknown_003E_002ERelease(&cComPtrNtv_003CIUnknown_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIService_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIService_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIService_003E_002ERelease(&cComPtrNtv_003CIService_003E); + } + return num; + } + + public void _007EAccountManagement() + { + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + } + finally + { + ((IDisposable)m_spAccountManagement).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/AccountManagementErrorCallback.cs b/ZuneDBApi/Microsoft/Zune/Service/AccountManagementErrorCallback.cs new file mode 100644 index 0000000..caba962 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/AccountManagementErrorCallback.cs @@ -0,0 +1,6 @@ +using ZuneUI; + +namespace Microsoft.Zune.Service +{ + public delegate void AccountManagementErrorCallback(HRESULT hr, ServiceError serviceError); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/AccountSettings.cs b/ZuneDBApi/Microsoft/Zune/Service/AccountSettings.cs new file mode 100644 index 0000000..cfa222c --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/AccountSettings.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class AccountSettings + { + private IDictionary m_privacySettings; + + private EmailFormat m_emailFormat; + + private bool m_allowZuneEmails; + + private bool m_allowPartnerEmails; + + public IDictionary PrivacySettings + { + get + { + if (m_privacySettings == null) + { + m_privacySettings = new Dictionary(); + } + return m_privacySettings; + } + } + + public bool AllowPartnerEmails + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_allowPartnerEmails; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + m_allowPartnerEmails = value; + } + } + + public bool AllowZuneEmails + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_allowZuneEmails; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + m_allowZuneEmails = value; + } + } + + public EmailFormat EmailFormat + { + get + { + return m_emailFormat; + } + set + { + m_emailFormat = value; + } + } + + internal unsafe AccountSettings(INewsletterSettings* pNewsletterSettings, IPrivacySettings* pPrivacySettings) + { + //IL_0021: Expected I, but got I8 + //IL_0066: Expected I, but got I8 + //IL_007f: Expected I, but got I8 + NewsletterOptions newsletterOptions; + if (pNewsletterSettings == null || pPrivacySettings == null || ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pNewsletterSettings + 32)))((nint)pNewsletterSettings, &newsletterOptions) < 0) + { + return; + } + m_emailFormat = *(EmailFormat*)(&newsletterOptions); + bool flag = (m_allowZuneEmails = ((System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref newsletterOptions, 4)) != 0) ? true : false)); + bool flag2 = (m_allowPartnerEmails = ((System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref newsletterOptions, 8)) != 0) ? true : false)); + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPrivacySettings + 32)))((nint)pPrivacySettings); + int num2 = 0; + if (0 >= num) + { + return; + } + EPrivacySettingId key; + EPrivacySettingValue value; + while (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPrivacySettings + 40)))((nint)pPrivacySettings, num2, &key, &value) >= 0) + { + PrivacySettings[(PrivacySettingId)key] = (PrivacySettingValue)value; + num2++; + if (num2 >= num) + { + break; + } + } + } + + public AccountSettings() + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/AccountUser.cs b/ZuneDBApi/Microsoft/Zune/Service/AccountUser.cs new file mode 100644 index 0000000..3d6280e --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/AccountUser.cs @@ -0,0 +1,362 @@ +using System; +using System.Runtime.CompilerServices; + +namespace Microsoft.Zune.Service +{ + public class AccountUser + { + private string m_zuneTag; + + private string m_locale; + + private string m_firstName; + + private string m_lastName; + + private string m_email; + + private string m_phoneNumber; + + private string m_mobilePhoneNumber; + + private DateTime m_birthday; + + private Address m_address; + + private AccountSettings m_accountSettings; + + private PassportIdentity m_parentPassportIdentity; + + private CreditCard m_parentCreditCard; + + private AccountUserType m_accountUserType; + + public AccountUserType AccountUserType + { + get + { + return m_accountUserType; + } + set + { + m_accountUserType = value; + } + } + + public CreditCard ParentCreditCard + { + get + { + return m_parentCreditCard; + } + set + { + m_parentCreditCard = value; + } + } + + public PassportIdentity ParentPassportIdentity + { + get + { + return m_parentPassportIdentity; + } + set + { + m_parentPassportIdentity = value; + } + } + + public AccountSettings AccountSettings + { + get + { + return m_accountSettings; + } + set + { + m_accountSettings = value; + } + } + + public Address Address + { + get + { + return m_address; + } + set + { + m_address = value; + } + } + + public DateTime Birthday + { + get + { + return m_birthday; + } + set + { + m_birthday = value; + } + } + + public string MobilePhoneNumber + { + get + { + return m_mobilePhoneNumber; + } + set + { + m_mobilePhoneNumber = value; + } + } + + public string PhoneNumber + { + get + { + return m_phoneNumber; + } + set + { + m_phoneNumber = value; + } + } + + public string Email + { + get + { + return m_email; + } + set + { + m_email = value; + } + } + + public string LastName + { + get + { + return m_lastName; + } + set + { + m_lastName = value; + } + } + + public string FirstName + { + get + { + return m_firstName; + } + set + { + m_firstName = value; + } + } + + public string Locale + { + get + { + return m_locale; + } + set + { + m_locale = value; + } + } + + public string ZuneTag + { + get + { + return m_zuneTag; + } + set + { + m_zuneTag = value; + } + } + + internal unsafe AccountUser(IAccountUser* pAccountUser) + { + //IL_0055: Expected I4, but got I8 + //IL_008b: Expected I, but got I8 + //IL_008b: Expected I, but got I8 + //IL_008b: Expected I, but got I8 + //IL_009c: Expected I, but got I8 + //IL_00aa: Expected I, but got I8 + //IL_00b8: Expected I, but got I8 + //IL_00c6: Expected I, but got I8 + //IL_00d4: Expected I, but got I8 + //IL_00e2: Expected I, but got I8 + //IL_00f0: Expected I, but got I8 + //IL_0111: Expected I, but got I8 + //IL_0124: Expected I, but got I8 + //IL_0143: Expected I, but got I8 + //IL_0143: Expected I, but got I8 + if (pAccountUser == null) + { + return; + } + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + try + { + WBSTRString wBSTRString2; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString2); + try + { + WBSTRString wBSTRString3; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString3); + try + { + WBSTRString wBSTRString4; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString4); + try + { + WBSTRString wBSTRString5; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString5); + try + { + WBSTRString wBSTRString6; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString6); + try + { + WBSTRString wBSTRString7; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString7); + try + { + _SYSTEMTIME stValue; + *(short*)(&stValue) = 0; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref stValue, 2), 0, 14); + CComPtrNtv_003CIAddress_003E cComPtrNtv_003CIAddress_003E; + *(long*)(&cComPtrNtv_003CIAddress_003E) = 0L; + try + { + CComPtrNtv_003CINewsletterSettings_003E cComPtrNtv_003CINewsletterSettings_003E; + *(long*)(&cComPtrNtv_003CINewsletterSettings_003E) = 0L; + try + { + CComPtrNtv_003CIPrivacySettings_003E cComPtrNtv_003CIPrivacySettings_003E; + *(long*)(&cComPtrNtv_003CIPrivacySettings_003E) = 0L; + try + { + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAccountUser + 32)))((nint)pAccountUser, (ushort**)(&wBSTRString), (ushort**)(&wBSTRString2), &stValue, (ushort**)(&wBSTRString3), (ushort**)(&wBSTRString4), (ushort**)(&wBSTRString5), (ushort**)(&wBSTRString6), (ushort**)(&wBSTRString7), (IAddress**)(&cComPtrNtv_003CIAddress_003E), (INewsletterSettings**)(&cComPtrNtv_003CINewsletterSettings_003E), (IPrivacySettings**)(&cComPtrNtv_003CIPrivacySettings_003E), null, null) >= 0) + { + m_zuneTag = new string((char*)(*(ulong*)(&wBSTRString))); + m_locale = new string((char*)(*(ulong*)(&wBSTRString2))); + m_firstName = new string((char*)(*(ulong*)(&wBSTRString3))); + m_lastName = new string((char*)(*(ulong*)(&wBSTRString4))); + m_email = new string((char*)(*(ulong*)(&wBSTRString5))); + m_phoneNumber = new string((char*)(*(ulong*)(&wBSTRString6))); + m_mobilePhoneNumber = new string((char*)(*(ulong*)(&wBSTRString7))); + DateTime dateTime = (m_birthday = _003CModule_003E.SystemTimeToDateTime(stValue)); + m_accountUserType = (AccountUserType)((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAccountUser + 48)))((nint)pAccountUser); + if (*(long*)(&cComPtrNtv_003CIAddress_003E) != 0L) + { + m_address = new Address((IAddress*)(*(ulong*)(&cComPtrNtv_003CIAddress_003E))); + } + if (*(long*)(&cComPtrNtv_003CINewsletterSettings_003E) != 0L && *(long*)(&cComPtrNtv_003CIPrivacySettings_003E) != 0L) + { + m_accountSettings = new AccountSettings((INewsletterSettings*)(*(ulong*)(&cComPtrNtv_003CINewsletterSettings_003E)), (IPrivacySettings*)(*(ulong*)(&cComPtrNtv_003CIPrivacySettings_003E))); + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPrivacySettings_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPrivacySettings_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPrivacySettings_003E_002ERelease(&cComPtrNtv_003CIPrivacySettings_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CINewsletterSettings_003E_002E_007Bdtor_007D), &cComPtrNtv_003CINewsletterSettings_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CINewsletterSettings_003E_002ERelease(&cComPtrNtv_003CINewsletterSettings_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIAddress_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIAddress_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIAddress_003E_002ERelease(&cComPtrNtv_003CIAddress_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString7); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString7); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString6); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString6); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString5); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString5); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString4); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString4); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString3); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString2); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString2); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + } + + public AccountUser() + { + m_accountUserType = AccountUserType.Unknown; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/AccountUserType.cs b/ZuneDBApi/Microsoft/Zune/Service/AccountUserType.cs new file mode 100644 index 0000000..b2fbbaa --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/AccountUserType.cs @@ -0,0 +1,10 @@ +namespace Microsoft.Zune.Service +{ + public enum AccountUserType + { + Unknown = -1, + ChildWithoutSocial = 2, + ChildWithSocial = 1, + Adult = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/AddPaymentInstrumentCallbackWrapper.cs b/ZuneDBApi/Microsoft/Zune/Service/AddPaymentInstrumentCallbackWrapper.cs new file mode 100644 index 0000000..d3b0603 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/AddPaymentInstrumentCallbackWrapper.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Service +{ + [StructLayout(LayoutKind.Sequential, Size = 40)] + [MiscellaneousBits(64)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct AddPaymentInstrumentCallbackWrapper + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/AddPaymentInstrumentCompleteCallback.cs b/ZuneDBApi/Microsoft/Zune/Service/AddPaymentInstrumentCompleteCallback.cs new file mode 100644 index 0000000..c338c25 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/AddPaymentInstrumentCompleteCallback.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Service +{ + public delegate void AddPaymentInstrumentCompleteCallback(PaymentInstrument paymentInstrument); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/AddPaymentInstrumentErrorCallback.cs b/ZuneDBApi/Microsoft/Zune/Service/AddPaymentInstrumentErrorCallback.cs new file mode 100644 index 0000000..dd23788 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/AddPaymentInstrumentErrorCallback.cs @@ -0,0 +1,6 @@ +using ZuneUI; + +namespace Microsoft.Zune.Service +{ + public delegate void AddPaymentInstrumentErrorCallback(HRESULT hr); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/Address.cs b/ZuneDBApi/Microsoft/Zune/Service/Address.cs new file mode 100644 index 0000000..315ab3d --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/Address.cs @@ -0,0 +1,201 @@ +using System; + +namespace Microsoft.Zune.Service +{ + public class Address + { + private string m_street1; + + private string m_street2; + + private string m_city; + + private string m_district; + + private string m_state; + + private string m_postalCode; + + public string PostalCode + { + get + { + return m_postalCode; + } + set + { + m_postalCode = value; + } + } + + public string State + { + get + { + return m_state; + } + set + { + m_state = value; + } + } + + public string District + { + get + { + return m_district; + } + set + { + m_district = value; + } + } + + public string City + { + get + { + return m_city; + } + set + { + m_city = value; + } + } + + public string Street2 + { + get + { + return m_street2; + } + set + { + m_street2 = value; + } + } + + public string Street1 + { + get + { + return m_street1; + } + set + { + m_street1 = value; + } + } + + internal unsafe Address(IAddress* pAddress) + { + //IL_0055: Expected I, but got I8 + //IL_0063: Expected I, but got I8 + //IL_0071: Expected I, but got I8 + //IL_007f: Expected I, but got I8 + //IL_008d: Expected I, but got I8 + //IL_009b: Expected I, but got I8 + //IL_00a9: Expected I, but got I8 + if (pAddress == null) + { + return; + } + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + try + { + WBSTRString wBSTRString2; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString2); + try + { + WBSTRString wBSTRString3; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString3); + try + { + WBSTRString wBSTRString4; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString4); + try + { + WBSTRString wBSTRString5; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString5); + try + { + WBSTRString wBSTRString6; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString6); + try + { + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAddress + 32)))((nint)pAddress, (ushort**)(&wBSTRString), (ushort**)(&wBSTRString2), (ushort**)(&wBSTRString3), (ushort**)(&wBSTRString4), (ushort**)(&wBSTRString5), (ushort**)(&wBSTRString6)) >= 0) + { + m_street1 = new string((char*)(*(ulong*)(&wBSTRString))); + m_street2 = new string((char*)(*(ulong*)(&wBSTRString2))); + m_city = new string((char*)(*(ulong*)(&wBSTRString3))); + m_state = new string((char*)(*(ulong*)(&wBSTRString4))); + m_district = new string((char*)(*(ulong*)(&wBSTRString5))); + m_postalCode = new string((char*)(*(ulong*)(&wBSTRString6))); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString6); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString6); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString5); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString5); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString4); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString4); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString3); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString2); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString2); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + } + + public Address(string street1, string street2, string city, string district, string state, string postalCode) + { + m_street1 = street1; + m_street2 = street2; + m_city = city; + m_district = district; + m_state = state; + m_postalCode = postalCode; + } + + public Address() + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/AlbumOffer.cs b/ZuneDBApi/Microsoft/Zune/Service/AlbumOffer.cs new file mode 100644 index 0000000..fe04642 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/AlbumOffer.cs @@ -0,0 +1,54 @@ +using System; +using System.Runtime.InteropServices; +using Microsoft.Iris; + +namespace Microsoft.Zune.Service +{ + public class AlbumOffer : Offer + { + private Image m_coverArt; + + private string m_coverArtUrl; + + private string m_genre; + + private int m_releaseYear; + + private bool m_premium; + + public bool Premium + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_premium; + } + } + + public string Genre => m_genre; + + public int ReleaseYear => m_releaseYear; + + public Image CoverArt + { + get + { + if (m_coverArt == null && m_coverArtUrl != (string)null) + { + m_coverArt = new Image(m_coverArtUrl); + } + return m_coverArt; + } + } + + public AlbumOffer(Guid id, string title, string artist, string genre, int releaseYear, string coverArtUrl, PriceInfo priceInfo, [MarshalAs(UnmanagedType.U1)] bool isMP3, [MarshalAs(UnmanagedType.U1)] bool premium, [MarshalAs(UnmanagedType.U1)] bool previouslyPurchased, [MarshalAs(UnmanagedType.U1)] bool inCollection, string serviceContext) + : base(id, title, artist, priceInfo, isMP3, previouslyPurchased, inCollection, serviceContext) + { + m_coverArtUrl = coverArtUrl; + m_coverArt = null; + m_genre = genre; + m_releaseYear = releaseYear; + m_premium = premium; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/AlbumOfferCollection.cs b/ZuneDBApi/Microsoft/Zune/Service/AlbumOfferCollection.cs new file mode 100644 index 0000000..a139ac6 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/AlbumOfferCollection.cs @@ -0,0 +1,199 @@ +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class AlbumOfferCollection : OfferCollection, IDisposable + { + private IList m_items; + + private unsafe IMusicAlbumCollection* m_pCollection; + + public IList Items => m_items; + + internal unsafe AlbumOfferCollection() + : this() + { + //IL_0015: Expected I, but got I8 + m_items = null; + m_pCollection = null; + } + + private void _007EAlbumOfferCollection() + { + _0021AlbumOfferCollection(); + } + + private unsafe void _0021AlbumOfferCollection() + { + //IL_0017: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + IMusicAlbumCollection* pCollection = m_pCollection; + if (pCollection != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 16)))((nint)pCollection); + m_pCollection = null; + } + m_items = null; + } + + internal unsafe int Init(IMusicAlbumCollection* pCollection, IDictionary mapIdToContext) + { + //IL_000f: Expected I, but got I8 + //IL_0044: Expected I, but got I8 + //IL_0073: Expected I, but got I8 + //IL_0073: Expected I, but got I8 + //IL_0091: Expected I, but got I8 + //IL_0091: Expected I, but got I8 + //IL_00ac: Expected I, but got I8 + //IL_00ac: Expected I, but got I8 + //IL_00c0: Expected I, but got I8 + //IL_00e7: Expected I, but got I8 + //IL_00e7: Expected I, but got I8 + //IL_0115: Expected I, but got I8 + //IL_0115: Expected I, but got I8 + //IL_017f: Expected I, but got I8 + //IL_018a: Expected I, but got I8 + //IL_0195: Expected I, but got I8 + //IL_01a2: Expected I, but got I8 + //IL_01aa: Expected I, but got I8 + //IL_022e: Expected I, but got I8 + int num = 0; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 24)))((nint)pCollection); + IList list = new ArrayList(num2); + int num3 = 0; + if (0 < num2) + { + do + { + MusicAlbumMetadata musicAlbumMetadata; + _003CModule_003E.MusicAlbumMetadata_002E_007Bctor_007D(&musicAlbumMetadata); + try + { + CComPtrNtv_003CIContextData_003E cComPtrNtv_003CIContextData_003E; + *(long*)(&cComPtrNtv_003CIContextData_003E) = 0L; + try + { + if (num >= 0) + { + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 32)))((nint)pCollection, num3, &musicAlbumMetadata, (IContextData**)(&cComPtrNtv_003CIContextData_003E)); + } + CComPtrNtv_003CIPriceInfo_003E cComPtrNtv_003CIPriceInfo_003E; + _003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_007Bctor_007D(&cComPtrNtv_003CIPriceInfo_003E); + try + { + int releaseYear = 0; + if (num >= 0) + { + long num4 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 88)); + int num5 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 88)) + 144)))((nint)num4); + long num6 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 88)); + int num7 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 88)) + 176)))((nint)num6, 1, 1); + long num8 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 88)); + int num9 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 88)) + 72)))((nint)num8, (EMediaRights)4, (EMediaFormat)0); + if (System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 64)) != 0L) + { + releaseYear = _003CModule_003E._wtoi((ushort*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 64))); + } + EMediaFormat eMediaFormat = ((num9 == 0) ? ((EMediaFormat)1) : ((EMediaFormat)0)); + long num10 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 88)); + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 88)) + 72)))((nint)num10, (EMediaRights)4, eMediaFormat) != 0) + { + EMediaFormat eMediaFormat2 = ((num9 == 0) ? ((EMediaFormat)1) : ((EMediaFormat)0)); + long num11 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 88)); + IPriceInfo** intPtr = _003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_0026(&cComPtrNtv_003CIPriceInfo_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 88)) + 104)))((nint)num11, (EMediaRights)4, eMediaFormat2, intPtr); + } + if (num >= 0) + { + Guid id = _003CModule_003E.GUIDToGuid(System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 8))); + string recommendationContext = GetRecommendationContext(id, mapIdToContext, _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E)); + bool inCollection = ((num5 != 0) ? true : false); + bool previouslyPurchased = ((num7 != 0) ? true : false); + bool premium = ((System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 84)) != 0) ? true : false); + bool isMP = ((num9 != 0) ? true : false); + list.Add(new AlbumOffer(id, new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 40))), new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 48))), new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 56))), releaseYear, new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 72))), new PriceInfo((IPriceInfo*)(*(ulong*)(&cComPtrNtv_003CIPriceInfo_003E))), isMP, premium, previouslyPurchased, inCollection, recommendationContext)); + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPriceInfo_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIPriceInfo_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.MusicAlbumMetadata_002E_007Bdtor_007D), &musicAlbumMetadata); + throw; + } + _003CModule_003E.MusicAlbumMetadata_002E_007Bdtor_007D(&musicAlbumMetadata); + num3++; + } + while (num3 < num2); + if (num < 0) + { + goto IL_022f; + } + } + m_items = list; + m_pCollection = pCollection; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 8)))((nint)pCollection); + goto IL_022f; + IL_022f: + return num; + } + + internal unsafe IMusicAlbumCollection* GetCollection() + { + //IL_0016: Expected I, but got I8 + IMusicAlbumCollection* pCollection = m_pCollection; + if (pCollection != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 8)))((nint)pCollection); + } + return m_pCollection; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021AlbumOfferCollection(); + return; + } + try + { + _0021AlbumOfferCollection(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~AlbumOfferCollection() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/AppOffer.cs b/ZuneDBApi/Microsoft/Zune/Service/AppOffer.cs new file mode 100644 index 0000000..79e6ba4 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/AppOffer.cs @@ -0,0 +1,88 @@ +using System; +using System.Runtime.InteropServices; +using Microsoft.Iris; + +namespace Microsoft.Zune.Service +{ + public class AppOffer : Offer + { + private string m_publisher; + + private string m_developer; + + private string m_genre; + + private string m_version; + + private string m_previewImageUrl; + + private string m_ratingImageUrl; + + private Image m_previewImage; + + private Image m_ratingImage; + + private DateTime m_releaseDateTime; + + private EClientTypeFlags m_clientTypes; + + private bool m_isTrialPurchase; + + public bool IsTrialPurchase + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_isTrialPurchase; + } + } + + public Image RatingImage + { + get + { + if (m_ratingImage == null && m_ratingImageUrl != (string)null) + { + m_ratingImage = new Image(m_ratingImageUrl); + } + return m_ratingImage; + } + } + + public Image CoverArt + { + get + { + if (m_previewImage == null && m_previewImageUrl != (string)null) + { + m_previewImage = new Image(m_previewImageUrl); + } + return m_previewImage; + } + } + + public DateTime ReleaseDate => m_releaseDateTime; + + public string Version => m_version; + + public string Genre => m_genre; + + public string Developer => m_developer; + + public string Publisher => m_publisher; + + public AppOffer(Guid id, string title, string publisher, string developer, string genre, string version, string previewImageUrl, string ratingImageUrl, PriceInfo priceInfo, DateTime releaseDateTime, [MarshalAs(UnmanagedType.U1)] bool previouslyPurchased, [MarshalAs(UnmanagedType.U1)] bool inCollection, [MarshalAs(UnmanagedType.U1)] bool isTrialPurchase) + : base(id, title, null, priceInfo, isMP3: false, previouslyPurchased, inCollection, null) + { + m_publisher = publisher; + m_developer = developer; + m_genre = genre; + m_version = version; + m_previewImageUrl = previewImageUrl; + m_ratingImageUrl = ratingImageUrl; + m_releaseDateTime = releaseDateTime; + m_previewImage = null; + m_isTrialPurchase = isTrialPurchase; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/AppOfferCollection.cs b/ZuneDBApi/Microsoft/Zune/Service/AppOfferCollection.cs new file mode 100644 index 0000000..2e743fc --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/AppOfferCollection.cs @@ -0,0 +1,190 @@ +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using _003CCppImplementationDetails_003E; + +namespace Microsoft.Zune.Service +{ + public class AppOfferCollection : OfferCollection, IDisposable + { + private IList m_items; + + private unsafe IAppCollection* m_pCollection; + + public IList Items => m_items; + + internal unsafe AppOfferCollection() + : this() + { + //IL_0015: Expected I, but got I8 + m_items = null; + m_pCollection = null; + } + + private void _007EAppOfferCollection() + { + _0021AppOfferCollection(); + } + + private unsafe void _0021AppOfferCollection() + { + //IL_0017: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + IAppCollection* pCollection = m_pCollection; + if (pCollection != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 16)))((nint)pCollection); + m_pCollection = null; + } + m_items = null; + } + + internal unsafe int Init(IAppCollection* pCollection) + { + //IL_000f: Expected I, but got I8 + //IL_0042: Expected I, but got I8 + //IL_0042: Expected I, but got I8 + //IL_0067: Expected I, but got I8 + //IL_00a7: Expected I, but got I8 + //IL_00a7: Expected I, but got I8 + //IL_0102: Expected I, but got I8 + //IL_0102: Expected I, but got I8 + //IL_0102: Expected I, but got I8 + //IL_0136: Expected I, but got I8 + //IL_0136: Expected I, but got I8 + //IL_014e: Expected I, but got I8 + //IL_0159: Expected I, but got I8 + //IL_0164: Expected I, but got I8 + //IL_016f: Expected I, but got I8 + //IL_017a: Expected I, but got I8 + //IL_0185: Expected I, but got I8 + //IL_0190: Expected I, but got I8 + //IL_0198: Expected I, but got I8 + //IL_01c9: Expected I, but got I8 + //IL_0216: Expected I, but got I8 + int num = 0; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 24)))((nint)pCollection); + IList list = new ArrayList(num2); + int num3 = 0; + if (0 < num2) + { + do + { + AppMetadata appMetadata; + _003CModule_003E.AppMetadata_002E_007Bctor_007D(&appMetadata); + try + { + if (num >= 0) + { + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 32)))((nint)pCollection, num3, &appMetadata, null); + } + DateTime result = default(DateTime); + if (num >= 0) + { + if (System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref appMetadata, 72)) == 0L || !DateTime.TryParse(new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref appMetadata, 72))), out result)) + { + result = DateTime.MinValue; + } + Guid id = _003CModule_003E.GUIDToGuid(System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref appMetadata, 8))); + long num4 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref appMetadata, 136)); + bool inCollection = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref appMetadata, 136)) + 144)))((nint)num4) != 0) ? true : false); + _0024ArrayType_0024_0024_0024BY01W4EMediaRights_0040_0040 _0024ArrayType_0024_0024_0024BY01W4EMediaRights_0040_0040; + *(int*)(&_0024ArrayType_0024_0024_0024BY01W4EMediaRights_0040_0040) = 3; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY01W4EMediaRights_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY01W4EMediaRights_0040_0040, 4)) = 11; + EMediaRights* ptr = (EMediaRights*)(&_0024ArrayType_0024_0024_0024BY01W4EMediaRights_0040_0040); + uint num5 = 2u; + do + { + CComPtrNtv_003CIPriceInfo_003E cComPtrNtv_003CIPriceInfo_003E; + *(long*)(&cComPtrNtv_003CIPriceInfo_003E) = 0L; + try + { + _GUID gUID_NULL = _003CModule_003E.GUID_NULL; + _GUID gUID_NULL2 = _003CModule_003E.GUID_NULL; + int num6 = (int)(*ptr); + long num7 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref appMetadata, 136)); + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref appMetadata, 136)) + 136)))((nint)num7, (EMediaRights)num6, (EMediaFormat)5, &gUID_NULL2, &gUID_NULL, (IPriceInfo**)(&cComPtrNtv_003CIPriceInfo_003E), null) >= 0) + { + bool isTrialPurchase = num6 == 11; + long num8 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref appMetadata, 136)); + bool previouslyPurchased = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref appMetadata, 136)) + 168)))((nint)num8, (EMediaRights)num6, (EMediaFormat)5, 1, 1) != 0) ? true : false); + list.Add(new AppOffer(id, new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref appMetadata, 24))), new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref appMetadata, 48))), new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref appMetadata, 56))), new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref appMetadata, 64))), new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref appMetadata, 88))), new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref appMetadata, 96))), new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref appMetadata, 112))), new PriceInfo((IPriceInfo*)(*(ulong*)(&cComPtrNtv_003CIPriceInfo_003E))), result, previouslyPurchased, inCollection, isTrialPurchase)); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPriceInfo_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIPriceInfo_003E); + ptr = (EMediaRights*)((ulong)(nint)ptr + 4uL); + num5 += uint.MaxValue; + } + while (num5 != 0); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.AppMetadata_002E_007Bdtor_007D), &appMetadata); + throw; + } + _003CModule_003E.AppMetadata_002E_007Bdtor_007D(&appMetadata); + num3++; + } + while (num3 < num2); + if (num < 0) + { + goto IL_0217; + } + } + m_items = list; + m_pCollection = pCollection; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 8)))((nint)pCollection); + goto IL_0217; + IL_0217: + return num; + } + + internal unsafe IAppCollection* GetCollection() + { + //IL_0016: Expected I, but got I8 + IAppCollection* pCollection = m_pCollection; + if (pCollection != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 8)))((nint)pCollection); + } + return m_pCollection; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021AppOfferCollection(); + return; + } + try + { + _0021AppOfferCollection(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~AppOfferCollection() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/AsyncRequestComplete.cs b/ZuneDBApi/Microsoft/Zune/Service/AsyncRequestComplete.cs new file mode 100644 index 0000000..438860b --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/AsyncRequestComplete.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Service +{ + public delegate void AsyncRequestComplete(HttpWebResponse response, object stateInfo); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/BillingOffer.cs b/ZuneDBApi/Microsoft/Zune/Service/BillingOffer.cs new file mode 100644 index 0000000..e164353 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/BillingOffer.cs @@ -0,0 +1,79 @@ +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class BillingOffer + { + private ulong m_id; + + private EBillingOfferType m_eBillingOfferType; + + private string m_offerName; + + private string m_displayPrice; + + private uint m_points; + + private float m_price; + + private bool m_taxes; + + private bool m_trial; + + public bool Trial + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_trial; + } + } + + public bool Taxes + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_taxes; + } + } + + public string DisplayPrice => m_displayPrice; + + public float Price => m_price; + + public uint Points => m_points; + + public string OfferName => m_offerName; + + public EBillingOfferType OfferType => m_eBillingOfferType; + + public ulong Id => m_id; + + public BillingOffer(ulong id, EBillingOfferType eBillingOfferType, string offerName) + { + Initialize(id, eBillingOfferType, offerName, null, 0u, 0f, taxes: false, trial: false); + } + + public BillingOffer(ulong id, EBillingOfferType eBillingOfferType, string offerName, string displayPrice, uint points, float price, [MarshalAs(UnmanagedType.U1)] bool taxes, [MarshalAs(UnmanagedType.U1)] bool trial) + { + Initialize(id, eBillingOfferType, offerName, displayPrice, points, price, taxes, trial); + } + + private void Initialize(ulong id, EBillingOfferType eBillingOfferType, string offerName, string displayPrice, uint points, float price, [MarshalAs(UnmanagedType.U1)] bool taxes, [MarshalAs(UnmanagedType.U1)] bool trial) + { + m_id = id; + m_eBillingOfferType = eBillingOfferType; + m_offerName = offerName; + m_displayPrice = displayPrice; + m_points = points; + m_price = price; + m_taxes = taxes; + m_trial = trial; + if (offerName != (string)null) + { + m_offerName = m_offerName.Trim(); + } + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/BillingOfferCollection.cs b/ZuneDBApi/Microsoft/Zune/Service/BillingOfferCollection.cs new file mode 100644 index 0000000..751c797 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/BillingOfferCollection.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class BillingOfferCollection : IDisposable + { + private ArrayList m_items; + + private unsafe IBillingOfferCollection* m_pCollection; + + public IList Items => m_items; + + internal unsafe BillingOfferCollection() + { + //IL_0015: Expected I, but got I8 + m_items = null; + m_pCollection = null; + } + + private void _007EBillingOfferCollection() + { + _0021BillingOfferCollection(); + } + + private unsafe void _0021BillingOfferCollection() + { + //IL_0017: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + IBillingOfferCollection* pCollection = m_pCollection; + if (pCollection != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 16)))((nint)pCollection); + m_pCollection = null; + } + m_items = null; + } + + internal unsafe int Init(IBillingOfferCollection* pCollection) + { + //IL_000f: Expected I, but got I8 + //IL_0029: Expected I, but got I8 + //IL_002c: Expected I, but got I8 + //IL_0061: Expected I, but got I8 + //IL_00d8: Expected I, but got I8 + int num = 0; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 24)))((nint)pCollection); + ArrayList arrayList = new ArrayList(); + int num3 = 0; + if (0 < num2) + { + do + { + ulong id = 0uL; + ushort* ptr = null; + ushort* ptr2 = null; + uint points = 0u; + float price = 0f; + int num4 = 1; + int num5 = 0; + global::EBillingOfferType eBillingOfferType = (global::EBillingOfferType)0; + if (num >= 0) + { + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 32)))((nint)pCollection, num3, &id, &eBillingOfferType, &ptr, &ptr2, &points, &price, &num4, &num5); + if (num >= 0) + { + bool trial = ((num5 != 0) ? true : false); + bool taxes = ((num4 != 0) ? true : false); + arrayList.Add(new BillingOffer(id, (EBillingOfferType)eBillingOfferType, new string((char*)ptr), new string((char*)ptr2), points, price, taxes, trial)); + } + } + _003CModule_003E.SysFreeString(ptr); + _003CModule_003E.SysFreeString(ptr2); + num3++; + } + while (num3 < num2); + if (num < 0) + { + goto IL_00d9; + } + } + m_items = arrayList; + m_pCollection = pCollection; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 8)))((nint)pCollection); + goto IL_00d9; + IL_00d9: + return num; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021BillingOfferCollection(); + return; + } + try + { + _0021BillingOfferCollection(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~BillingOfferCollection() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/CWebRequestCallbackWrapper.cs b/ZuneDBApi/Microsoft/Zune/Service/CWebRequestCallbackWrapper.cs new file mode 100644 index 0000000..3933967 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/CWebRequestCallbackWrapper.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Service +{ + [StructLayout(LayoutKind.Sequential, Size = 56)] + [MiscellaneousBits(64)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct CWebRequestCallbackWrapper + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/CountryBaseDetails.cs b/ZuneDBApi/Microsoft/Zune/Service/CountryBaseDetails.cs new file mode 100644 index 0000000..80ee53d --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/CountryBaseDetails.cs @@ -0,0 +1,60 @@ +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class CountryBaseDetails + { + private string m_abbreviation; + + private string[] m_languageAbbreviations; + + private int m_teenagerAge; + + private int m_adultAge; + + private bool m_showNewsletterOptions; + + private bool m_usageCollection; + + private CountryFieldValidator[] m_validators; + + public CountryFieldValidator[] Validators => m_validators; + + public bool UsageCollection + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_usageCollection; + } + } + + public bool ShowNewsletterOptions + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_showNewsletterOptions; + } + } + + public int AdultAge => m_adultAge; + + public int TeenagerAge => m_teenagerAge; + + public string[] LanguageAbbreviations => m_languageAbbreviations; + + public string Abbreviation => m_abbreviation; + + public CountryBaseDetails(string abbreviation, string[] languageAbbreviations, int teenagerAge, int adultAge, [MarshalAs(UnmanagedType.U1)] bool showNewsletterOptions, [MarshalAs(UnmanagedType.U1)] bool usageCollection, CountryFieldValidator[] validators) + { + m_abbreviation = abbreviation; + m_languageAbbreviations = languageAbbreviations; + m_teenagerAge = teenagerAge; + m_adultAge = adultAge; + m_showNewsletterOptions = showNewsletterOptions; + m_usageCollection = usageCollection; + m_validators = validators; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/CountryFieldValidator.cs b/ZuneDBApi/Microsoft/Zune/Service/CountryFieldValidator.cs new file mode 100644 index 0000000..35a630f --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/CountryFieldValidator.cs @@ -0,0 +1,29 @@ +namespace Microsoft.Zune.Service +{ + public class CountryFieldValidator + { + private string m_name; + + private string m_regex; + + private string m_friendlyFormat; + + private string m_nameStringId; + + public string NameStringId => m_nameStringId; + + public string FriendlyFormat => m_friendlyFormat; + + public string Regex => m_regex; + + public string Name => m_name; + + public CountryFieldValidator(string name, string regex, string friendlyFormat, string nameStringId) + { + m_name = name; + m_regex = regex; + m_friendlyFormat = friendlyFormat; + m_nameStringId = nameStringId; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/CreditCard.cs b/ZuneDBApi/Microsoft/Zune/Service/CreditCard.cs new file mode 100644 index 0000000..ab7e9b2 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/CreditCard.cs @@ -0,0 +1,387 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class CreditCard : PaymentInstrument + { + private Address m_address; + + private CreditCardType m_creditCardType; + + private string m_contactFirstName; + + private string m_contactLastName; + + private string m_accountHolderName; + + private string m_accountNumber; + + private string m_ccvNumber; + + private DateTime m_expirationDate; + + private string m_phonePrefix; + + private string m_phoneNumber; + + private string m_phoneExtension; + + private string m_email; + + private string m_locale; + + private bool m_parentCreditCard; + + public bool ParentCreditCard + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_parentCreditCard; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + m_parentCreditCard = value; + } + } + + public string Email + { + get + { + return m_email; + } + set + { + m_email = value; + } + } + + public string Locale + { + get + { + return m_locale; + } + set + { + m_locale = value; + } + } + + public string PhoneExtension + { + get + { + return m_phoneExtension; + } + set + { + m_phoneExtension = value; + } + } + + public string PhoneNumber + { + get + { + return m_phoneNumber; + } + set + { + m_phoneNumber = value; + } + } + + public string PhonePrefix + { + get + { + return m_phonePrefix; + } + set + { + m_phonePrefix = value; + } + } + + public DateTime ExpirationDate + { + get + { + return m_expirationDate; + } + set + { + m_expirationDate = value; + } + } + + public string CCVNumber + { + get + { + return m_ccvNumber; + } + set + { + m_ccvNumber = value; + } + } + + public string AccountNumber + { + get + { + return m_accountNumber; + } + set + { + m_accountNumber = value; + } + } + + public string ContactLastName + { + get + { + return m_contactLastName; + } + set + { + m_contactLastName = value; + } + } + + public string ContactFirstName + { + get + { + return m_contactFirstName; + } + set + { + m_contactFirstName = value; + } + } + + public string AccountHolderName + { + get + { + return m_accountHolderName; + } + set + { + m_accountHolderName = value; + } + } + + public CreditCardType CreditCardType + { + get + { + return m_creditCardType; + } + set + { + m_creditCardType = value; + } + } + + public Address Address + { + get + { + return m_address; + } + set + { + m_address = value; + } + } + + internal unsafe CreditCard(ICreditCard* pAddress) + : base(null, PaymentType.CreditCard) + { + //IL_0064: Expected I4, but got I8 + //IL_0087: Expected I, but got I8 + //IL_0098: Expected I, but got I8 + //IL_00ad: Expected I, but got I8 + //IL_00bb: Expected I, but got I8 + //IL_00c9: Expected I, but got I8 + //IL_00d7: Expected I, but got I8 + //IL_00e5: Expected I, but got I8 + //IL_00f3: Expected I, but got I8 + //IL_0101: Expected I, but got I8 + //IL_010f: Expected I, but got I8 + //IL_0130: Expected I, but got I8 + if (pAddress == null) + { + return; + } + CComPtrNtv_003CIAddress_003E cComPtrNtv_003CIAddress_003E; + *(long*)(&cComPtrNtv_003CIAddress_003E) = 0L; + try + { + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + try + { + WBSTRString wBSTRString2; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString2); + try + { + WBSTRString wBSTRString3; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString3); + try + { + WBSTRString wBSTRString4; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString4); + try + { + WBSTRString wBSTRString5; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString5); + try + { + WBSTRString wBSTRString6; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString6); + try + { + WBSTRString wBSTRString7; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString7); + try + { + WBSTRString wBSTRString8; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString8); + try + { + _SYSTEMTIME stValue; + *(short*)(&stValue) = 0; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref stValue, 2), 0, 14); + ECreditCardType creditCardType; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAddress + 32)))((nint)pAddress, (IAddress**)(&cComPtrNtv_003CIAddress_003E), &creditCardType, (ushort**)(&wBSTRString), (ushort**)(&wBSTRString2), (ushort**)(&wBSTRString3), (ushort**)(&wBSTRString4), (ushort**)(&wBSTRString5), (ushort**)(&wBSTRString6), (ushort**)(&wBSTRString7), (ushort**)(&wBSTRString8), &stValue) >= 0) + { + m_address = new Address((IAddress*)(*(ulong*)(&cComPtrNtv_003CIAddress_003E))); + m_creditCardType = (CreditCardType)creditCardType; + m_accountHolderName = new string((char*)(*(ulong*)(&wBSTRString))); + m_accountNumber = new string((char*)(*(ulong*)(&wBSTRString2))); + m_ccvNumber = new string((char*)(*(ulong*)(&wBSTRString3))); + m_locale = new string((char*)(*(ulong*)(&wBSTRString4))); + m_phoneNumber = new string((char*)(*(ulong*)(&wBSTRString5))); + m_email = new string((char*)(*(ulong*)(&wBSTRString6))); + m_contactFirstName = new string((char*)(*(ulong*)(&wBSTRString7))); + m_contactLastName = new string((char*)(*(ulong*)(&wBSTRString8))); + DateTime dateTime = (m_expirationDate = _003CModule_003E.SystemTimeToDateTime(stValue)); + m_parentCreditCard = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAddress + 48)))((nint)pAddress) != 0; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString8); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString8); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString7); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString7); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString6); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString6); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString5); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString5); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString4); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString4); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString3); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString2); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString2); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIAddress_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIAddress_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIAddress_003E_002ERelease(&cComPtrNtv_003CIAddress_003E); + } + + public CreditCard(string id, Address address, CreditCardType creditCardType, string accountHolderName, string accountNumber, string ccvNumber, DateTime expirationDate, string phonePrefix, string phoneNumber, string phoneExtension) + : base(id, PaymentType.CreditCard) + { + m_address = address; + m_creditCardType = creditCardType; + m_accountNumber = accountNumber; + m_ccvNumber = ccvNumber; + m_expirationDate = expirationDate; + m_phonePrefix = phonePrefix; + m_phoneNumber = phoneNumber; + m_phoneExtension = phoneExtension; + m_accountHolderName = accountHolderName; + } + + public CreditCard() + : base(null, PaymentType.CreditCard) + { + m_address = new Address(); + } + + public override string ToString() + { + if (m_accountNumber != (string)null && m_accountNumber.Length > 4) + { + string accountNumber = m_accountNumber; + string text = accountNumber; + return accountNumber.Substring(text.Length - 4, 4); + } + return m_accountNumber; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/CreditCardCollection.cs b/ZuneDBApi/Microsoft/Zune/Service/CreditCardCollection.cs new file mode 100644 index 0000000..4dc324b --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/CreditCardCollection.cs @@ -0,0 +1,154 @@ +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class CreditCardCollection : IDisposable + { + private ArrayList m_items; + + private unsafe ICreditCardCollection* m_pCollection; + + public IList Items => m_items; + + internal unsafe CreditCardCollection() + { + //IL_0015: Expected I, but got I8 + m_items = null; + m_pCollection = null; + } + + private void _007ECreditCardCollection() + { + _0021CreditCardCollection(); + } + + private unsafe void _0021CreditCardCollection() + { + //IL_0017: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + ICreditCardCollection* pCollection = m_pCollection; + if (pCollection != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 16)))((nint)pCollection); + m_pCollection = null; + } + m_items = null; + } + + internal unsafe int Init(ICreditCardCollection* pCollection) + { + //IL_000f: Expected I, but got I8 + //IL_0029: Expected I, but got I8 + //IL_002d: Expected I, but got I8 + //IL_0031: Expected I, but got I8 + //IL_0035: Expected I, but got I8 + //IL_0039: Expected I, but got I8 + //IL_003d: Expected I, but got I8 + //IL_0041: Expected I, but got I8 + //IL_0045: Expected I, but got I8 + //IL_0049: Expected I, but got I8 + //IL_004d: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + //IL_0058: Expected I, but got I8 + //IL_005b: Expected I, but got I8 + //IL_005e: Expected I, but got I8 + //IL_0093: Expected I, but got I8 + //IL_01b4: Expected I, but got I8 + int num = 0; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 24)))((nint)pCollection); + ArrayList arrayList = new ArrayList(); + int num3 = 0; + if (0 < num2) + { + do + { + EBillingPaymentType eBillingPaymentType = (EBillingPaymentType)(-1); + ushort* ptr = null; + ushort* ptr2 = null; + ushort* ptr3 = null; + ushort* ptr4 = null; + ushort* ptr5 = null; + ushort* ptr6 = null; + ushort* ptr7 = null; + ushort* ptr8 = null; + ushort* ptr9 = null; + ushort* ptr10 = null; + ECreditCardType creditCardType = (ECreditCardType)(-1); + ushort* ptr11 = null; + ushort* ptr12 = null; + ushort* ptr13 = null; + ushort* ptr14 = null; + if (num >= 0) + { + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 32)))((nint)pCollection, num3, &eBillingPaymentType, &ptr, &ptr2, &ptr3, &ptr4, &ptr5, &ptr6, &ptr7, &ptr8, &ptr9, &ptr10, &creditCardType, &ptr11, &ptr12, &ptr13, &ptr14); + if (num >= 0) + { + DateTime result = default(DateTime); + if (DateTime.TryParse(new string((char*)ptr14), out result)) + { + Address address = new Address(new string((char*)ptr2), new string((char*)ptr3), new string((char*)ptr4), new string((char*)ptr5), new string((char*)ptr6), new string((char*)ptr7)); + arrayList.Add(new CreditCard(new string((char*)ptr), address, (CreditCardType)creditCardType, new string((char*)ptr11), new string((char*)ptr12), new string((char*)ptr13), result, new string((char*)ptr8), new string((char*)ptr9), new string((char*)ptr10))); + } + } + } + _003CModule_003E.SysFreeString(ptr); + _003CModule_003E.SysFreeString(ptr2); + _003CModule_003E.SysFreeString(ptr3); + _003CModule_003E.SysFreeString(ptr4); + _003CModule_003E.SysFreeString(ptr5); + _003CModule_003E.SysFreeString(ptr6); + _003CModule_003E.SysFreeString(ptr7); + _003CModule_003E.SysFreeString(ptr8); + _003CModule_003E.SysFreeString(ptr9); + _003CModule_003E.SysFreeString(ptr10); + _003CModule_003E.SysFreeString(ptr11); + _003CModule_003E.SysFreeString(ptr12); + _003CModule_003E.SysFreeString(ptr13); + _003CModule_003E.SysFreeString(ptr14); + num3++; + } + while (num3 < num2); + if (num < 0) + { + goto IL_01b5; + } + } + m_items = arrayList; + m_pCollection = pCollection; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 8)))((nint)pCollection); + goto IL_01b5; + IL_01b5: + return num; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021CreditCardCollection(); + return; + } + try + { + _0021CreditCardCollection(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CreditCardCollection() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/CreditCardType.cs b/ZuneDBApi/Microsoft/Zune/Service/CreditCardType.cs new file mode 100644 index 0000000..b63b55c --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/CreditCardType.cs @@ -0,0 +1,14 @@ +namespace Microsoft.Zune.Service +{ + public enum CreditCardType + { + KLCC = 6, + Diners = 5, + JCB = 4, + Discover = 3, + AmEx = 2, + MasterCard = 1, + Visa = 0, + Unknown = -1 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/DRMInfo.cs b/ZuneDBApi/Microsoft/Zune/Service/DRMInfo.cs new file mode 100644 index 0000000..61d90dc --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/DRMInfo.cs @@ -0,0 +1,89 @@ +using System; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class DRMInfo + { + private DRMQueryState m_canPlay; + + private DateTime m_expiryDate; + + private bool m_canSync; + + private bool m_canBurn; + + public bool CanBurn + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_canBurn; + } + } + + public bool CanSync + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_canSync; + } + } + + public DateTime ExpiryDate => m_expiryDate; + + public bool HasExpiryDate + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_expiryDate != DateTime.MaxValue; + } + } + + public bool LicenseExpired + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_canPlay == (DRMQueryState)2; + } + } + + public bool NoLicense + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_canPlay == (DRMQueryState)1; + } + } + + public bool ValidLicense + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_canPlay == (DRMQueryState)0; + } + } + + public bool NotProtected + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_canPlay == (DRMQueryState)4; + } + } + + public DRMInfo(DRMQueryState eCanPlay, DateTime expiryDate, [MarshalAs(UnmanagedType.U1)] bool canSync, [MarshalAs(UnmanagedType.U1)] bool canBurn) + { + m_canPlay = eCanPlay; + m_expiryDate = expiryDate; + m_canSync = canSync; + m_canBurn = canBurn; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/DownloadCallbackWrapper.cs b/ZuneDBApi/Microsoft/Zune/Service/DownloadCallbackWrapper.cs new file mode 100644 index 0000000..53b9836 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/DownloadCallbackWrapper.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Service +{ + [StructLayout(LayoutKind.Sequential, Size = 40)] + [NativeCppClass] + [DebugInfoInPDB] + [MiscellaneousBits(64)] + internal struct DownloadCallbackWrapper + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/DownloadEventHandler.cs b/ZuneDBApi/Microsoft/Zune/Service/DownloadEventHandler.cs new file mode 100644 index 0000000..04947d5 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/DownloadEventHandler.cs @@ -0,0 +1,7 @@ +using System; +using ZuneUI; + +namespace Microsoft.Zune.Service +{ + public delegate void DownloadEventHandler(Guid mediaId, HRESULT hr); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/DownloadEventProgressHandler.cs b/ZuneDBApi/Microsoft/Zune/Service/DownloadEventProgressHandler.cs new file mode 100644 index 0000000..f3b5549 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/DownloadEventProgressHandler.cs @@ -0,0 +1,6 @@ +using System; + +namespace Microsoft.Zune.Service +{ + public delegate void DownloadEventProgressHandler(Guid mediaId, float percent); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/EBillingOfferType.cs b/ZuneDBApi/Microsoft/Zune/Service/EBillingOfferType.cs new file mode 100644 index 0000000..6becb42 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/EBillingOfferType.cs @@ -0,0 +1,11 @@ +namespace Microsoft.Zune.Service +{ + public enum EBillingOfferType + { + Unknown = 0, + Trial = 0x1000, + Points = 8, + Renewal = 4, + Subscription = 1 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/EClientTypeFlags.cs b/ZuneDBApi/Microsoft/Zune/Service/EClientTypeFlags.cs new file mode 100644 index 0000000..0e32d24 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/EClientTypeFlags.cs @@ -0,0 +1,13 @@ +using System; + +namespace Microsoft.Zune.Service +{ + [Flags] + public enum EClientTypeFlags + { + All = 0xFF, + Zune3Device = 0x2, + PC = 0x1, + None = 0x0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/EConcernType.cs b/ZuneDBApi/Microsoft/Zune/Service/EConcernType.cs new file mode 100644 index 0000000..87529ff --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/EConcernType.cs @@ -0,0 +1,21 @@ +using ZuneUI; + +namespace Microsoft.Zune.Service +{ + public enum EConcernType + { + [Description(49222u)] + StaleImage = 5, + [Description(49221u)] + Stale = 4, + [Description(49220u)] + PlayOrDownloadErrors = 3, + [Description(49219u)] + Miscategorized = 2, + [Description(49223u)] + OffensiveImage = 1, + [Description(49218u)] + OffensiveContent = 0, + Unknown = -1 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/EContentType.cs b/ZuneDBApi/Microsoft/Zune/Service/EContentType.cs new file mode 100644 index 0000000..94d2e2b --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/EContentType.cs @@ -0,0 +1,15 @@ +namespace Microsoft.Zune.Service +{ + public enum EContentType + { + Playlist = 8, + App = 7, + PodcastSeries = 6, + PodcastEpisode = 5, + Video = 3, + MusicAlbum = 1, + MusicTrack = 0, + Artist = 4, + Unknown = -1 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/EContentUriFlags.cs b/ZuneDBApi/Microsoft/Zune/Service/EContentUriFlags.cs new file mode 100644 index 0000000..3edde71 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/EContentUriFlags.cs @@ -0,0 +1,11 @@ +namespace Microsoft.Zune.Service +{ + public enum EContentUriFlags + { + BypassLicense = 8, + ForcePreview = 4, + FallbackToPreview = 2, + IgnoreCollection = 1, + None = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/EDownloadContextEvent.cs b/ZuneDBApi/Microsoft/Zune/Service/EDownloadContextEvent.cs new file mode 100644 index 0000000..28d2fec --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/EDownloadContextEvent.cs @@ -0,0 +1,23 @@ +namespace Microsoft.Zune.Service +{ + public enum EDownloadContextEvent + { + FMRadio = 80, + Facebook = 72, + Bing = 71, + Partner = 70, + Charts = 50, + MixView = 43, + SmartDJ = 41, + Recommendation = 40, + Featured = 30, + DeepLink = 20, + MoreAbout = 11, + Channel = 0x20, + Playlist = 0x1F, + Search = 10, + Unknown = -1, + Social = 60, + Picks = 42 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/EDownloadFlags.cs b/ZuneDBApi/Microsoft/Zune/Service/EDownloadFlags.cs new file mode 100644 index 0000000..ee92eb5 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/EDownloadFlags.cs @@ -0,0 +1,15 @@ +namespace Microsoft.Zune.Service +{ + public enum EDownloadFlags + { + Stream = 0x40, + HD = 0x80, + Rental = 0x20, + DeviceLicensed = 8, + CanBeOffline = 4, + UserCard = 2, + Channel = 1, + None = 0, + Subscription = 0x10 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/EGetOffersFlags.cs b/ZuneDBApi/Microsoft/Zune/Service/EGetOffersFlags.cs new file mode 100644 index 0000000..fae7b53 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/EGetOffersFlags.cs @@ -0,0 +1,12 @@ +using System; + +namespace Microsoft.Zune.Service +{ + [Flags] + public enum EGetOffersFlags + { + SeasonPurchase = 0x2, + None = 0x0, + SubscriptionFreeTracks = 0x1 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/EHipType.cs b/ZuneDBApi/Microsoft/Zune/Service/EHipType.cs new file mode 100644 index 0000000..adc4170 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/EHipType.cs @@ -0,0 +1,8 @@ +namespace Microsoft.Zune.Service +{ + public enum EHipType + { + Image = 0, + Unknown = -1 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/EMediaStatus.cs b/ZuneDBApi/Microsoft/Zune/Service/EMediaStatus.cs new file mode 100644 index 0000000..ffc4335 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/EMediaStatus.cs @@ -0,0 +1,14 @@ +namespace Microsoft.Zune.Service +{ + public enum EMediaStatus + { + StatusInCollectionShortcut = 7, + StatusInCollectionNoLicense = 6, + StatusInCollectionExpiring = 5, + StatusInCollectionOwned = 4, + StatusInCollectionUnknown = 3, + StatusDownloading = 2, + StatusDownloadPending = 1, + StatusNotAvailable = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/EPassportPolicyId.cs b/ZuneDBApi/Microsoft/Zune/Service/EPassportPolicyId.cs new file mode 100644 index 0000000..7af3719 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/EPassportPolicyId.cs @@ -0,0 +1,10 @@ +namespace Microsoft.Zune.Service +{ + public enum EPassportPolicyId + { + MBI = 3, + MBI_SSL = 2, + HBI_SSL = 1, + None = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/EPurchaseOfferType.cs b/ZuneDBApi/Microsoft/Zune/Service/EPurchaseOfferType.cs new file mode 100644 index 0000000..794f54e --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/EPurchaseOfferType.cs @@ -0,0 +1,14 @@ +namespace Microsoft.Zune.Service +{ + public enum EPurchaseOfferType + { + App = 6, + Movie = 5, + TVShort = 4, + TVEpisode = 3, + MusicVideo = 2, + Track = 1, + Album = 0, + Unknown = -1 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/EPurchaseOffersFlags.cs b/ZuneDBApi/Microsoft/Zune/Service/EPurchaseOffersFlags.cs new file mode 100644 index 0000000..a706649 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/EPurchaseOffersFlags.cs @@ -0,0 +1,14 @@ +using System; + +namespace Microsoft.Zune.Service +{ + [Flags] + public enum EPurchaseOffersFlags + { + PurchaseHD = 0x1, + PurchaseTrials = 0x8, + StreamVideos = 0x4, + RentVideos = 0x2, + None = 0x0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/EServiceEndpointId.cs b/ZuneDBApi/Microsoft/Zune/Service/EServiceEndpointId.cs new file mode 100644 index 0000000..dbf7e28 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/EServiceEndpointId.cs @@ -0,0 +1,44 @@ +namespace Microsoft.Zune.Service +{ + public enum EServiceEndpointId + { + SEID_EndpointMax = 37, + SEID_DownloadQoS = 36, + SEID_TermsOfService = 35, + SEID_AppReview = 34, + SEID_MBRTelemetry = 33, + SEID_Stats = 0x20, + SEID_MyPhone = 0x1F, + SEID_ImageCatalog = 30, + SEID_AuthTransfer = 29, + SEID_Comments = 28, + SEID_UsageMembers = 27, + SEID_QuickMixSecure = 26, + SEID_QuickMix = 25, + SEID_CommerceV3 = 24, + SEID_CommerceV2 = 23, + SEID_Commerce = 22, + SEID_PicksDogfood = 21, + SEID_WindowsLiveSignup = 20, + SEID_Billing = 19, + SEID_Telemetry = 18, + SEID_RootCatalogSSL = 17, + SEID_RootCatalog = 0x10, + SEID_WMISEndpoints = 0xF, + SEID_Tuners = 14, + SEID_Resources = 13, + SEID_ZuneNet = 12, + SEID_WMISRedirEndpoint = 11, + SEID_WMISImageEndpoint = 10, + SEID_UsageData = 9, + SEID_Transaction = 8, + SEID_Recommendations = 7, + SEID_Passport = 6, + SEID_Messaging = 5, + SEID_Lynx = 4, + SEID_SocialApi = 3, + SEID_Forums = 2, + SEID_AccountManagement = 1, + SEID_Invalid = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/EStreamingActionType.cs b/ZuneDBApi/Microsoft/Zune/Service/EStreamingActionType.cs new file mode 100644 index 0000000..e8bf296 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/EStreamingActionType.cs @@ -0,0 +1,10 @@ +namespace Microsoft.Zune.Service +{ + public enum EStreamingActionType + { + Pause = 2, + Resume = 3, + Stop = 1, + Start = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/ETokenType.cs b/ZuneDBApi/Microsoft/Zune/Service/ETokenType.cs new file mode 100644 index 0000000..5251fef --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/ETokenType.cs @@ -0,0 +1,10 @@ +namespace Microsoft.Zune.Service +{ + public enum ETokenType + { + Media = 0, + Unknown = -1, + Subscription = 2, + Points = 1 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/EmailFormat.cs b/ZuneDBApi/Microsoft/Zune/Service/EmailFormat.cs new file mode 100644 index 0000000..3068788 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/EmailFormat.cs @@ -0,0 +1,9 @@ +namespace Microsoft.Zune.Service +{ + public enum EmailFormat + { + Html = 1, + Text = 0, + Unknown = -1 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetAccountCallbackWrapper.cs b/ZuneDBApi/Microsoft/Zune/Service/GetAccountCallbackWrapper.cs new file mode 100644 index 0000000..bafe5e7 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetAccountCallbackWrapper.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Service +{ + [StructLayout(LayoutKind.Sequential, Size = 32)] + [MiscellaneousBits(64)] + [DebugInfoInPDB] + [NativeCppClass] + internal struct GetAccountCallbackWrapper + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetAccountCompleteCallback.cs b/ZuneDBApi/Microsoft/Zune/Service/GetAccountCompleteCallback.cs new file mode 100644 index 0000000..331928b --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetAccountCompleteCallback.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Service +{ + public delegate void GetAccountCompleteCallback(AccountUser accountUser); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetBalancesCallbackWrapper.cs b/ZuneDBApi/Microsoft/Zune/Service/GetBalancesCallbackWrapper.cs new file mode 100644 index 0000000..04699dc --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetBalancesCallbackWrapper.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Service +{ + [StructLayout(LayoutKind.Sequential, Size = 32)] + [DebugInfoInPDB] + [MiscellaneousBits(64)] + [NativeCppClass] + internal struct GetBalancesCallbackWrapper + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetBalancesCompleteCallback.cs b/ZuneDBApi/Microsoft/Zune/Service/GetBalancesCompleteCallback.cs new file mode 100644 index 0000000..191be32 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetBalancesCompleteCallback.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Service +{ + public delegate void GetBalancesCompleteCallback(int pointsBalance, int freeTracksBalance); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetBalancesErrorCallback.cs b/ZuneDBApi/Microsoft/Zune/Service/GetBalancesErrorCallback.cs new file mode 100644 index 0000000..b30c946 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetBalancesErrorCallback.cs @@ -0,0 +1,6 @@ +using ZuneUI; + +namespace Microsoft.Zune.Service +{ + public delegate void GetBalancesErrorCallback(HRESULT hr); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetBillingOffersCallbackWrapper.cs b/ZuneDBApi/Microsoft/Zune/Service/GetBillingOffersCallbackWrapper.cs new file mode 100644 index 0000000..fb48c50 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetBillingOffersCallbackWrapper.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Service +{ + [StructLayout(LayoutKind.Sequential, Size = 32)] + [MiscellaneousBits(64)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct GetBillingOffersCallbackWrapper + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetBillingOffersCompleteCallback.cs b/ZuneDBApi/Microsoft/Zune/Service/GetBillingOffersCompleteCallback.cs new file mode 100644 index 0000000..1b9d2c9 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetBillingOffersCompleteCallback.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Service +{ + public delegate void GetBillingOffersCompleteCallback(BillingOfferCollection nonMediaOffers); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetBillingOffersErrorCallback.cs b/ZuneDBApi/Microsoft/Zune/Service/GetBillingOffersErrorCallback.cs new file mode 100644 index 0000000..948b200 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetBillingOffersErrorCallback.cs @@ -0,0 +1,6 @@ +using ZuneUI; + +namespace Microsoft.Zune.Service +{ + public delegate void GetBillingOffersErrorCallback(HRESULT hr); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetOfferDetailsCallbackWrapper.cs b/ZuneDBApi/Microsoft/Zune/Service/GetOfferDetailsCallbackWrapper.cs new file mode 100644 index 0000000..28c1cce --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetOfferDetailsCallbackWrapper.cs @@ -0,0 +1,16 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Service +{ + [StructLayout(LayoutKind.Sequential, Size = 64)] + [MiscellaneousBits(64)] + [UnsafeValueType] + [NativeCppClass] + [DebugInfoInPDB] + internal struct GetOfferDetailsCallbackWrapper + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetOfferDetailsCompleteCallback.cs b/ZuneDBApi/Microsoft/Zune/Service/GetOfferDetailsCompleteCallback.cs new file mode 100644 index 0000000..a6fc366 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetOfferDetailsCompleteCallback.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Service +{ + public delegate void GetOfferDetailsCompleteCallback(AlbumOfferCollection albumOffers, TrackOfferCollection trackOffers, VideoOfferCollection videoOffers, EClientTypeFlags clientTypes, object state); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetOfferDetailsErrorCallback.cs b/ZuneDBApi/Microsoft/Zune/Service/GetOfferDetailsErrorCallback.cs new file mode 100644 index 0000000..7f13be5 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetOfferDetailsErrorCallback.cs @@ -0,0 +1,6 @@ +using ZuneUI; + +namespace Microsoft.Zune.Service +{ + public delegate void GetOfferDetailsErrorCallback(HRESULT hr, object state); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetOffersCallbackWrapper.cs b/ZuneDBApi/Microsoft/Zune/Service/GetOffersCallbackWrapper.cs new file mode 100644 index 0000000..a328d19 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetOffersCallbackWrapper.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Service +{ + [StructLayout(LayoutKind.Sequential, Size = 40)] + [DebugInfoInPDB] + [MiscellaneousBits(64)] + [NativeCppClass] + internal struct GetOffersCallbackWrapper + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetOffersCompleteCallback.cs b/ZuneDBApi/Microsoft/Zune/Service/GetOffersCompleteCallback.cs new file mode 100644 index 0000000..1bcbbed --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetOffersCompleteCallback.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Service +{ + public delegate void GetOffersCompleteCallback(AlbumOfferCollection albumOffers, TrackOfferCollection trackOffers, VideoOfferCollection musicVideoOffers, AppOfferCollection appOffers, int totalSubscriptionFreeTracks); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetOffersErrorCallback.cs b/ZuneDBApi/Microsoft/Zune/Service/GetOffersErrorCallback.cs new file mode 100644 index 0000000..a652bce --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetOffersErrorCallback.cs @@ -0,0 +1,6 @@ +using ZuneUI; + +namespace Microsoft.Zune.Service +{ + public delegate void GetOffersErrorCallback(HRESULT hr); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetPaymentInstrumentsCallbackWrapper.cs b/ZuneDBApi/Microsoft/Zune/Service/GetPaymentInstrumentsCallbackWrapper.cs new file mode 100644 index 0000000..5a50d47 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetPaymentInstrumentsCallbackWrapper.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Service +{ + [StructLayout(LayoutKind.Sequential, Size = 32)] + [NativeCppClass] + [MiscellaneousBits(64)] + [DebugInfoInPDB] + internal struct GetPaymentInstrumentsCallbackWrapper + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetPaymentInstrumentsCompleteCallback.cs b/ZuneDBApi/Microsoft/Zune/Service/GetPaymentInstrumentsCompleteCallback.cs new file mode 100644 index 0000000..c481b68 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetPaymentInstrumentsCompleteCallback.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Service +{ + public delegate void GetPaymentInstrumentsCompleteCallback(CreditCardCollection creditCards); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/GetPaymentInstrumentsErrorCallback.cs b/ZuneDBApi/Microsoft/Zune/Service/GetPaymentInstrumentsErrorCallback.cs new file mode 100644 index 0000000..3f8686f --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/GetPaymentInstrumentsErrorCallback.cs @@ -0,0 +1,6 @@ +using ZuneUI; + +namespace Microsoft.Zune.Service +{ + public delegate void GetPaymentInstrumentsErrorCallback(HRESULT hr); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/HistoryItem.cs b/ZuneDBApi/Microsoft/Zune/Service/HistoryItem.cs new file mode 100644 index 0000000..c9eba00 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/HistoryItem.cs @@ -0,0 +1,24 @@ +namespace Microsoft.Zune.Service +{ + public class HistoryItem + { + private string m_compId; + + private string m_date; + + private int m_remainingLicenseCount; + + public int RemainingLicenseCount => m_remainingLicenseCount; + + public string Date => m_date; + + public string CompId => m_compId; + + public HistoryItem(string compId, string date, int remainingLicenseCount) + { + m_compId = compId; + m_date = date; + m_remainingLicenseCount = remainingLicenseCount; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/HttpRequestCachePolicy.cs b/ZuneDBApi/Microsoft/Zune/Service/HttpRequestCachePolicy.cs new file mode 100644 index 0000000..31c3732 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/HttpRequestCachePolicy.cs @@ -0,0 +1,9 @@ +namespace Microsoft.Zune.Service +{ + public enum HttpRequestCachePolicy + { + Default = 1, + BypassCache = 0, + Refresh = 2 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/HttpResponseStream.cs b/ZuneDBApi/Microsoft/Zune/Service/HttpResponseStream.cs new file mode 100644 index 0000000..08c8ba0 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/HttpResponseStream.cs @@ -0,0 +1,199 @@ +using System; +using System.IO; +using System.Net; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class HttpResponseStream : Stream + { + private unsafe IStream* m_pStream; + + private long _length; + + private long _position; + + public unsafe override long Position + { + get + { + if (m_pStream == null) + { + throw new ObjectDisposedException("Already disposed!"); + } + return _position; + } + set + { + //Discarded unreachable code: IL_000b + throw new NotSupportedException("HttpResponseStream.Position.set(...)"); + } + } + + public unsafe override long Length + { + get + { + if (m_pStream == null) + { + throw new ObjectDisposedException("Already disposed!"); + } + return _length; + } + } + + public override bool CanSeek + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return false; + } + } + + public override bool CanWrite + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return false; + } + } + + public override bool CanRead + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return true; + } + } + + public unsafe HttpResponseStream(IStream* pStream, long length) + { + //IL_0028: Expected I, but got I8 + try + { + if (pStream == null) + { + throw new HttpWebException("Response closed", WebExceptionStatus.ConnectionClosed); + } + m_pStream = pStream; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pStream + 8)))((nint)pStream); + _length = length; + } + catch + { + //try-fault + base.Dispose(disposing: true); + throw; + } + } + + private void _007EHttpResponseStream() + { + _0021HttpResponseStream(); + } + + private unsafe void _0021HttpResponseStream() + { + //IL_0017: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + IStream* pStream = m_pStream; + if (pStream != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pStream + 16)))((nint)pStream); + m_pStream = null; + } + } + + public override void Flush() + { + //Discarded unreachable code: IL_000b + throw new NotSupportedException("HttpResponseStream.Flush()"); + } + + public override void SetLength(long value) + { + //Discarded unreachable code: IL_000b + throw new NotSupportedException("HttpResponseStream.SetLength(...)"); + } + + public override long Seek(long offset, SeekOrigin origin) + { + //Discarded unreachable code: IL_000b + throw new NotSupportedException("HttpResponseStream.Seek(...)"); + } + + public unsafe override int Read(byte[] buffer, int offset, int count) + { + //IL_006b: Expected I, but got I8 + if (m_pStream == null) + { + throw new ObjectDisposedException("Already disposed!"); + } + if (buffer == null) + { + throw new ArgumentNullException("HttpResponseStream.Read: buffer is null"); + } + if (offset + count > (nint)buffer.LongLength) + { + throw new ArgumentException("HttpResponseStream.Read: offset + count >= buffer.Length"); + } + if (offset + count < 0) + { + throw new ArgumentOutOfRangeException("HttpResponseStream.Read: offset + count < 0"); + } + fixed (byte* ptr = &buffer[offset]) + { + uint num = 0u; + long num2 = *(long*)m_pStream + 24; + IStream* pStream = m_pStream; + int num3 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pStream, ptr, (uint)count, &num); + if (num3 < 0) + { + throw new IOException($"Read error: 0x{num3:X}"); + } + _position = (int)num + _position; + return (int)num; + } + } + + public override void Write(byte[] buffer, int offset, int count) + { + //Discarded unreachable code: IL_000b + throw new NotSupportedException("HttpResponseStream.Write(...)"); + } + + protected override void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EHttpResponseStream(); + } + finally + { + base.Dispose(disposing: true); + } + } + else + { + try + { + _0021HttpResponseStream(); + } + finally + { + base.Dispose(disposing: false); + } + } + } + + ~HttpResponseStream() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/HttpWebException.cs b/ZuneDBApi/Microsoft/Zune/Service/HttpWebException.cs new file mode 100644 index 0000000..6a39b08 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/HttpWebException.cs @@ -0,0 +1,34 @@ +using System; +using System.Net; + +namespace Microsoft.Zune.Service +{ + public class HttpWebException : Exception + { + private int _hr; + + private HttpWebResponse _response; + + private WebExceptionStatus _status; + + public HttpWebResponse Response => _response; + + public WebExceptionStatus Status => _status; + + public HttpWebException(int hr) + { + _hr = hr; + } + + public HttpWebException(HttpWebResponse response) + { + _response = response; + } + + public HttpWebException(string text, WebExceptionStatus status) + : base(text) + { + _status = status; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/HttpWebRequest.cs b/ZuneDBApi/Microsoft/Zune/Service/HttpWebRequest.cs new file mode 100644 index 0000000..335acee --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/HttpWebRequest.cs @@ -0,0 +1,687 @@ +using System; +using System.Collections; +using System.IO; +using System.Net; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using MicrosoftZuneLibrary; + +namespace Microsoft.Zune.Service +{ + public class HttpWebRequest + { + private class AsyncRequest + { + public unsafe IHttpWebRequest* m_pRequest; + + public bool m_cancelOnShutdown; + + public unsafe AsyncRequest(IHttpWebRequest* pRequest, [MarshalAs(UnmanagedType.U1)] bool cancelOnShutdown) + { + m_pRequest = pRequest; + m_cancelOnShutdown = cancelOnShutdown; + base._002Ector(); + } + } + + private Uri _uri; + + private string _method; + + private string _contentType; + + private string _acceptLanguage; + + private string _authorization; + + private string _browserCookieUrl; + + private bool _acceptGZipEncoding; + + private bool _keepAlive; + + private long _contentLength; + + private long _maxResponseLength; + + private HttpRequestCachePolicy _cachePolicy; + + private bool _cancelOnShutdown; + + private MemoryStream _requestStream; + + private static object _lock = new object(); + + private static ArrayList _asyncRequests; + + private unsafe static void* m_hRequestsCompleteEvent; + + private static bool _shutdown; + + public bool CancelOnShutdown + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return _cancelOnShutdown; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + _cancelOnShutdown = value; + } + } + + public bool KeepAlive + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return _keepAlive; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + _keepAlive = value; + } + } + + public string ContentType + { + get + { + return _contentType; + } + set + { + _contentType = value; + } + } + + public HttpRequestCachePolicy CachePolicy + { + get + { + return _cachePolicy; + } + set + { + _cachePolicy = value; + } + } + + public long MaxResponseLength + { + get + { + return _maxResponseLength; + } + set + { + _maxResponseLength = value; + } + } + + public string BrowserCookieUrl + { + get + { + return _browserCookieUrl; + } + set + { + _browserCookieUrl = value; + } + } + + public string Authorization + { + get + { + return _authorization; + } + set + { + _authorization = value; + } + } + + public bool AcceptGZipEncoding + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return _acceptGZipEncoding; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + _acceptGZipEncoding = value; + } + } + + public string AcceptLanguage + { + get + { + return _acceptLanguage; + } + set + { + _acceptLanguage = value; + } + } + + public long ContentLength + { + get + { + return _contentLength; + } + set + { + _contentLength = value; + } + } + + public Uri RequestUri => _uri; + + public string Method + { + get + { + return _method; + } + set + { + _method = value; + } + } + + public static HttpWebRequest Create(string uri) + { + return new HttpWebRequest(new Uri(uri)); + } + + public static HttpWebRequest Create(Uri uri) + { + return new HttpWebRequest(uri); + } + + public Stream GetRequestStream() + { + if (_requestStream == null) + { + _requestStream = new MemoryStream(new byte[(int)_contentLength]); + } + return _requestStream; + } + + public unsafe HttpWebResponse GetResponse() + { + //Discarded unreachable code: IL_00c9 + //IL_0016: Expected I, but got I8 + //IL_0027: Expected I, but got I8 + //IL_002a: Expected I, but got I8 + //IL_0042: Expected I, but got I8 + //IL_005b: Expected I, but got I8 + //IL_0084: Expected I, but got I8 + //IL_0095: Expected I, but got I8 + //IL_00a8: Expected I, but got I8 + int num = 0; + num = (_shutdown ? (-2147418113) : num); + IHttpWebRequest* ptr = null; + if (num >= 0) + { + num = ConstructNativeRequest(&ptr); + } + IStream* ptr2 = null; + IHttpWebResponse* ptr3 = null; + if (num >= 0) + { + IHttpWebRequest* intPtr = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 160)))((nint)intPtr, &ptr2, &ptr3); + } + HttpStatusCode httpStatusCode = HttpStatusCode.OK; + if (num >= 0) + { + IHttpWebResponse* intPtr2 = ptr3; + httpStatusCode = (HttpStatusCode)((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 24)))((nint)intPtr2); + } + HttpWebResponse httpWebResponse = null; + if (num >= 0) + { + httpWebResponse = new HttpWebResponse(_uri, httpStatusCode, ptr3, ptr2); + } + if (ptr != null) + { + IHttpWebRequest* intPtr3 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + } + if (ptr3 != null) + { + IHttpWebResponse* intPtr4 = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr4 + 16)))((nint)intPtr4); + } + if (ptr2 != null) + { + IStream* intPtr5 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr5 + 16)))((nint)intPtr5); + } + if (num >= 0 && httpStatusCode == HttpStatusCode.OK) + { + return httpWebResponse; + } + if (httpWebResponse != null) + { + throw new HttpWebException(httpWebResponse); + } + throw new HttpWebException(num); + } + + public unsafe void GetResponseAsync(AsyncRequestComplete responseComplete, object stateInfo) + { + //Discarded unreachable code: IL_0113 + //IL_0032: Expected I, but got I8 + //IL_003f: Expected I, but got I8 + //IL_0050: Expected I, but got I8 + //IL_0082: Expected I, but got I8 + //IL_00c6: Expected I, but got I8 + //IL_00e1: Expected I, but got I8 + //IL_00f2: Expected I, but got I8 + //IL_0105: Expected I, but got I8 + ManagedLock managedLock = null; + ManagedLock managedLock2 = new ManagedLock(_lock); + try + { + managedLock = managedLock2; + if (!_shutdown) + { + goto IL_002e; + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + goto IL_0122; + IL_0122: + try + { + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + return; + IL_002e: + try + { + IHttpWebRequest* ptr = null; + int num = ConstructNativeRequest(&ptr); + IStream* ptr2 = null; + if (num >= 0) + { + num = _003CModule_003E.CreateStreamOnHGlobal(null, 1, &ptr2); + if (num >= 0) + { + CWebRequestCallbackWrapper* ptr3 = (CWebRequestCallbackWrapper*)_003CModule_003E.@new(56uL); + CWebRequestCallbackWrapper* ptr4; + try + { + if (ptr3 != null) + { + Uri uri = _uri; + ptr4 = _003CModule_003E.Microsoft_002EZune_002EService_002ECWebRequestCallbackWrapper_002E_007Bctor_007D(ptr3, uri, ptr, ptr2, responseComplete, stateInfo); + } + else + { + ptr4 = null; + } + } + catch + { + //try-fault + _003CModule_003E.delete(ptr3); + throw; + } + int num2 = (((long)(nint)ptr4 != 0) ? num : (-2147024882)); + num = num2; + if (num2 >= 0) + { + bool cancelOnShutdown = _cancelOnShutdown; + OnAsyncRequestStart(ptr, cancelOnShutdown); + IHttpWebRequest* intPtr = ptr; + IStream* intPtr2 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 168)))((nint)intPtr, intPtr2, (IHttpWebRequestCallback*)ptr4); + if (num < 0) + { + OnAsyncRequestComplete(ptr); + } + } + if (ptr4 != null) + { + CWebRequestCallbackWrapper* intPtr3 = ptr4; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + } + } + } + if (ptr != null) + { + IHttpWebRequest* intPtr4 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr4 + 16)))((nint)intPtr4); + } + if (ptr2 != null) + { + IStream* intPtr5 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr5 + 16)))((nint)intPtr5); + } + if (num < 0) + { + throw new HttpWebException(num); + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + goto IL_0122; + } + + public unsafe static void Shutdown() + { + //IL_0070: Expected I, but got I8 + //IL_008d: Expected I, but got I8 + //IL_008d: Expected I, but got I8 + ManagedLock managedLock = null; + ManagedLock managedLock2 = new ManagedLock(_lock); + try + { + managedLock = managedLock2; + _shutdown = true; + if (_asyncRequests != null && _asyncRequests.Count > 0) + { + int num = 0; + if (0 < _asyncRequests.Count) + { + do + { + AsyncRequest asyncRequest = (AsyncRequest)_asyncRequests[num]; + if (asyncRequest.m_cancelOnShutdown) + { + IHttpWebRequest* pRequest = asyncRequest.m_pRequest; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pRequest + 176)))((nint)pRequest); + } + num++; + } + while (num < _asyncRequests.Count); + } + m_hRequestsCompleteEvent = _003CModule_003E.CreateEventW(null, 1, 0, null); + managedLock.Unlock(); + if (m_hRequestsCompleteEvent != null) + { + _003CModule_003E.WaitForSingleObject(m_hRequestsCompleteEvent, 120000u); + _003CModule_003E.CloseHandle(m_hRequestsCompleteEvent); + } + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + } + + internal unsafe static void OnAsyncRequestComplete(IHttpWebRequest* pRequest) + { + ManagedLock managedLock = null; + ManagedLock managedLock2 = new ManagedLock(_lock); + try + { + managedLock = managedLock2; + int num = 0; + if (0 < _asyncRequests.Count) + { + do + { + if (((AsyncRequest)_asyncRequests[num]).m_pRequest != pRequest) + { + num++; + continue; + } + _asyncRequests.RemoveAt(num); + break; + } + while (num < _asyncRequests.Count); + } + if (m_hRequestsCompleteEvent != null && _asyncRequests.Count == 0) + { + managedLock.Unlock(); + _003CModule_003E.SetEvent(m_hRequestsCompleteEvent); + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + } + + private HttpWebRequest(Uri uri) + { + _uri = uri; + _method = "GET"; + _keepAlive = true; + _cachePolicy = HttpRequestCachePolicy.Default; + } + + private unsafe int ConstructNativeRequest(IHttpWebRequest** ppRequest) + { + //IL_0077: Expected I, but got I8 + //IL_0077: Expected I, but got I8 + //IL_00b3: Expected I, but got I8 + //IL_00e7: Expected I, but got I8 + //IL_00fc: Expected I, but got I8 + //IL_011a: Expected I, but got I8 + //IL_011a: Expected I, but got I8 + //IL_014d: Expected I, but got I8 + //IL_014d: Expected I, but got I8 + //IL_0162: Expected I, but got I8 + //IL_0162: Expected I, but got I8 + //IL_0177: Expected I, but got I8 + //IL_0177: Expected I, but got I8 + //IL_01ae: Expected I, but got I8 + //IL_01ae: Expected I, but got I8 + //IL_021d: Expected I, but got I8 + //IL_021d: Expected I, but got I8 + //IL_024b: Expected I, but got I8 + //IL_024b: Expected I, but got I8 + //IL_0257: Expected I, but got I8 + //IL_0260: Expected I8, but got I + if (ppRequest == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 774u); + return -2147467261; + } + *(long*)ppRequest = 0L; + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(_uri.AbsoluteUri))) + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(_method))) + { + CComPtrNtv_003CIService_003E cComPtrNtv_003CIService_003E; + *(long*)(&cComPtrNtv_003CIService_003E) = 0L; + int num; + try + { + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&cComPtrNtv_003CIService_003E)); + CComPtrNtv_003CIHttpWebRequest_003E cComPtrNtv_003CIHttpWebRequest_003E; + *(long*)(&cComPtrNtv_003CIHttpWebRequest_003E) = 0L; + try + { + if (num >= 0) + { + long num2 = *(long*)(*(ulong*)(&cComPtrNtv_003CIService_003E)) + 976; + long num3 = *(long*)(&cComPtrNtv_003CIService_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)num3, ptr, ptr2, (IHttpWebRequest**)(&cComPtrNtv_003CIHttpWebRequest_003E)); + if (num >= 0) + { + if (_authorization != (string)null && _authorization.Length > 0) + { + _003CModule_003E.Microsoft_002EZune_002EService_002E_003FA0x12f4bdec_002ESetHeader((IHttpWebRequest*)(*(ulong*)(&cComPtrNtv_003CIHttpWebRequest_003E)), "Authorization: " + _authorization); + } + if (_acceptLanguage != (string)null && _acceptLanguage.Length > 0) + { + _003CModule_003E.Microsoft_002EZune_002EService_002E_003FA0x12f4bdec_002ESetHeader((IHttpWebRequest*)(*(ulong*)(&cComPtrNtv_003CIHttpWebRequest_003E)), "Accept-Language: " + _acceptLanguage); + } + if (_keepAlive) + { + _003CModule_003E.Microsoft_002EZune_002EService_002E_003FA0x12f4bdec_002ESetHeader((IHttpWebRequest*)(*(ulong*)(&cComPtrNtv_003CIHttpWebRequest_003E)), "Proxy-Connection: Keep-Alive"); + } + if (_acceptGZipEncoding) + { + long num4 = *(long*)(&cComPtrNtv_003CIHttpWebRequest_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIHttpWebRequest_003E)) + 104)))((nint)num4, 1); + } + if (num >= 0) + { + switch (_cachePolicy) + { + case HttpRequestCachePolicy.Refresh: + { + long num7 = *(long*)(&cComPtrNtv_003CIHttpWebRequest_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIHttpWebRequest_003E)) + 24)))((nint)num7, (EHttpCacheLevel)2); + break; + } + case HttpRequestCachePolicy.Default: + { + long num6 = *(long*)(&cComPtrNtv_003CIHttpWebRequest_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIHttpWebRequest_003E)) + 24)))((nint)num6, (EHttpCacheLevel)1); + break; + } + case HttpRequestCachePolicy.BypassCache: + { + long num5 = *(long*)(&cComPtrNtv_003CIHttpWebRequest_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIHttpWebRequest_003E)) + 24)))((nint)num5, (EHttpCacheLevel)0); + break; + } + } + if (num >= 0 && !string.IsNullOrEmpty(_browserCookieUrl)) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(_browserCookieUrl))) + { + try + { + long num8 = *(long*)(*(ulong*)(&cComPtrNtv_003CIHttpWebRequest_003E)) + 144; + long num9 = *(long*)(&cComPtrNtv_003CIHttpWebRequest_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num8))((nint)num9, ptr3); + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + } + } + } + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(_contentType))) + { + if (num >= 0) + { + MemoryStream requestStream = _requestStream; + if (requestStream != null && requestStream.Length > 0) + { + byte[] array = _requestStream.ToArray(); + uint num10 = (uint)array.Length; + fixed (byte* ptr5 = &array[0]) + { + try + { + long num11 = *(long*)(*(ulong*)(&cComPtrNtv_003CIHttpWebRequest_003E)) + 136; + long num12 = *(long*)(&cComPtrNtv_003CIHttpWebRequest_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num11))((nint)num12, ptr4, (int)num10, ptr5); + } + catch + { + //try-fault + ptr5 = null; + throw; + } + } + } + if (num >= 0) + { + long maxResponseLength = _maxResponseLength; + if (maxResponseLength > 0) + { + long num13 = *(long*)(&cComPtrNtv_003CIHttpWebRequest_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIHttpWebRequest_003E)) + 88)))((nint)num13, (ulong)maxResponseLength); + } + if (num >= 0) + { + IHttpWebRequest* ptr6 = (IHttpWebRequest*)(*(ulong*)(&cComPtrNtv_003CIHttpWebRequest_003E)); + *(long*)(&cComPtrNtv_003CIHttpWebRequest_003E) = 0L; + *(long*)ppRequest = (nint)ptr6; + } + } + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIHttpWebRequest_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIHttpWebRequest_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIHttpWebRequest_003E_002ERelease(&cComPtrNtv_003CIHttpWebRequest_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIService_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIService_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIService_003E_002ERelease(&cComPtrNtv_003CIService_003E); + return num; + } + } + } + + private unsafe static void OnAsyncRequestStart(IHttpWebRequest* pRequest, [MarshalAs(UnmanagedType.U1)] bool cancelOnShutdown) + { + ManagedLock managedLock = null; + ManagedLock managedLock2 = new ManagedLock(_lock); + try + { + managedLock = managedLock2; + AsyncRequest value = new AsyncRequest(pRequest, cancelOnShutdown); + if (_asyncRequests == null) + { + _asyncRequests = new ArrayList(); + } + _asyncRequests.Add(value); + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/HttpWebResponse.cs b/ZuneDBApi/Microsoft/Zune/Service/HttpWebResponse.cs new file mode 100644 index 0000000..7914e0a --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/HttpWebResponse.cs @@ -0,0 +1,200 @@ +using System; +using System.IO; +using System.Net; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class HttpWebResponse : IDisposable + { + private unsafe IStream* m_pStream; + + private HttpWebRequest _request; + + private string _contentType; + + private long _contentLength; + + private Stream _stream; + + private Uri _responseUri; + + private HttpStatusCode _statusCode; + + private DateTime _expires; + + public HttpStatusCode StatusCode => _statusCode; + + public DateTime Expires => _expires; + + public string ContentType => _contentType; + + public long ContentLength => _contentLength; + + public Version ProtocolVersion => HttpVersion.Version11; + + public Uri ResponseUri => _responseUri; + + private void _007EHttpWebResponse() + { + _0021HttpWebResponse(); + } + + private unsafe void _0021HttpWebResponse() + { + //IL_0017: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + IStream* pStream = m_pStream; + if (pStream != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pStream + 16)))((nint)pStream); + m_pStream = null; + } + } + + public unsafe Stream GetResponseStream() + { + if (_stream == null) + { + _stream = new HttpResponseStream(m_pStream, _contentLength); + } + return _stream; + } + + public unsafe void Close() + { + //IL_0017: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + IStream* pStream = m_pStream; + if (pStream != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pStream + 16)))((nint)pStream); + m_pStream = null; + } + } + + internal unsafe HttpWebResponse(Uri requestUri, HttpStatusCode statusCode, IHttpWebResponse* pResponse, IStream* pStream) + { + //IL_0032: Expected I, but got I8 + //IL_0058: Expected I, but got I8 + //IL_007e: Expected I, but got I8 + //IL_00a5: Expected I, but got I8 + //IL_00c8: Expected I, but got I8 + //IL_00eb: Expected I, but got I8 + //IL_010d: Expected I, but got I8 + //IL_0199: Expected I, but got I8 + m_pStream = pStream; + base._002Ector(); + _statusCode = statusCode; + if (pResponse != null) + { + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + try + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pResponse + 104)))((nint)pResponse, (ushort**)(&wBSTRString)); + bool flag = *(long*)(&wBSTRString) != 0L && ((*(ushort*)(*(ulong*)(&wBSTRString)) != 0) ? true : false); + if (flag) + { + _responseUri = new Uri(new string((char*)(*(ulong*)(&wBSTRString)))); + } + else + { + _responseUri = requestUri; + } + ulong contentLength = 0uL; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pResponse + 72)))((nint)pResponse, &contentLength) >= 0) + { + _contentLength = (long)contentLength; + } + WBSTRString wBSTRString2; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString2); + try + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pResponse + 112)))((nint)pResponse, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BK_0040DOFICLFP_0040_003F_0024AAC_003F_0024AAo_003F_0024AAn_003F_0024AAt_003F_0024AAe_003F_0024AAn_003F_0024AAt_003F_0024AA_003F9_003F_0024AAT_003F_0024AAy_003F_0024AAp_003F_0024AAe_003F_0024AA_003F_0024AA_0040), (ushort**)(&wBSTRString2)); + bool flag2 = *(long*)(&wBSTRString2) != 0L && ((*(ushort*)(*(ulong*)(&wBSTRString2)) != 0) ? true : false); + if (flag2) + { + _contentType = new string((char*)(*(ulong*)(&wBSTRString2))); + } + WBSTRString wBSTRString3; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString3); + try + { + string s = null; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pResponse + 112)))((nint)pResponse, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BA_0040FICLJLAN_0040_003F_0024AAE_003F_0024AAx_003F_0024AAp_003F_0024AAi_003F_0024AAr_003F_0024AAe_003F_0024AAs_003F_0024AA_003F_0024AA_0040), (ushort**)(&wBSTRString3)); + bool flag3 = *(long*)(&wBSTRString3) != 0L && ((*(ushort*)(*(ulong*)(&wBSTRString3)) != 0) ? true : false); + if (flag3) + { + s = new string((char*)(*(ulong*)(&wBSTRString3))); + } + if (DateTime.TryParse(s, out _expires)) + { + DateTime dateTime = (_expires = _expires.ToUniversalTime()); + } + else + { + _expires = DateTime.MaxValue; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString3); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString2); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString2); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + } + IStream* pStream2 = m_pStream; + if (pStream2 != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pStream2 + 8)))((nint)pStream2); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021HttpWebResponse(); + return; + } + try + { + _0021HttpWebResponse(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~HttpWebResponse() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/InitializedEventHandler.cs b/ZuneDBApi/Microsoft/Zune/Service/InitializedEventHandler.cs new file mode 100644 index 0000000..0d6e8be --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/InitializedEventHandler.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Service +{ + public delegate void InitializedEventHandler(); +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/Offer.cs b/ZuneDBApi/Microsoft/Zune/Service/Offer.cs new file mode 100644 index 0000000..529b4e5 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/Offer.cs @@ -0,0 +1,73 @@ +using System; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class Offer + { + private Guid m_id; + + private string m_title; + + private string m_artist; + + private bool m_isMP3; + + private bool m_previouslyPurchased; + + private bool m_inCollection; + + private string m_serviceContext; + + private PriceInfo m_priceInfo; + + public PriceInfo PriceInfo => m_priceInfo; + + public string ServiceContext => m_serviceContext; + + public bool InCollection + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_inCollection; + } + } + + public bool PreviouslyPurchased + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_previouslyPurchased; + } + } + + public bool IsMP3 + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_isMP3; + } + } + + public string Artist => m_artist; + + public string Title => m_title; + + public Guid Id => m_id; + + public Offer(Guid id, string title, string artist, PriceInfo priceInfo, [MarshalAs(UnmanagedType.U1)] bool isMP3, [MarshalAs(UnmanagedType.U1)] bool previouslyPurchased, [MarshalAs(UnmanagedType.U1)] bool inCollection, string serviceContext) + { + m_priceInfo = priceInfo; + m_id = id; + m_title = title; + m_artist = artist; + m_isMP3 = isMP3; + m_previouslyPurchased = previouslyPurchased; + m_inCollection = inCollection; + m_serviceContext = serviceContext; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/OfferCollection.cs b/ZuneDBApi/Microsoft/Zune/Service/OfferCollection.cs new file mode 100644 index 0000000..b422769 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/OfferCollection.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections; + +namespace Microsoft.Zune.Service +{ + public abstract class OfferCollection + { + protected unsafe string GetRecommendationContext(Guid id, IDictionary mapIdToContext, IContextData* pContextData) + { + //IL_0041: Expected I, but got I8 + //IL_0065: Expected I, but got I8 + string result = null; + if (mapIdToContext != null && mapIdToContext.Contains(id)) + { + result = (string)mapIdToContext[id]; + } + else if (pContextData != null) + { + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + try + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pContextData + 24)))((nint)pContextData, (ushort**)(&wBSTRString)); + bool flag = *(long*)(&wBSTRString) != 0L && ((*(ushort*)(*(ulong*)(&wBSTRString)) != 0) ? true : false); + if (flag) + { + result = new string((char*)(*(ulong*)(&wBSTRString))); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + } + return result; + } + + public OfferCollection() + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/PassportIdentity.cs b/ZuneDBApi/Microsoft/Zune/Service/PassportIdentity.cs new file mode 100644 index 0000000..63739b9 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/PassportIdentity.cs @@ -0,0 +1,139 @@ +using System; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class PassportIdentity : IDisposable + { + private readonly CComPtrMgd_003CIPassportIdentity_003E m_spPassportIdentity; + + private string m_username; + + private string m_password; + + private string m_serviceTicket; + + public unsafe string ServiceTicket + { + get + { + //IL_0020: Expected I, but got I8 + //IL_0036: Expected I, but got I8 + if (m_serviceTicket == (string)null) + { + CComPtrMgd_003CIPassportIdentity_003E spPassportIdentity = m_spPassportIdentity; + if (spPassportIdentity.p != null) + { + ushort* ptr = null; + IPassportIdentity* p = spPassportIdentity.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p, &ptr) >= 0) + { + m_serviceTicket = new string((char*)ptr); + } + _003CModule_003E.SysFreeString(ptr); + } + } + return m_serviceTicket; + } + } + + public unsafe string Password + { + get + { + //IL_0020: Expected I, but got I8 + //IL_0036: Expected I, but got I8 + if (m_password == (string)null) + { + CComPtrMgd_003CIPassportIdentity_003E spPassportIdentity = m_spPassportIdentity; + if (spPassportIdentity.p != null) + { + ushort* ptr = null; + IPassportIdentity* p = spPassportIdentity.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)p, &ptr) >= 0) + { + m_password = new string((char*)ptr); + } + _003CModule_003E.SysFreeString(ptr); + } + } + return m_username; + } + } + + public unsafe string Username + { + get + { + //IL_0020: Expected I, but got I8 + //IL_0036: Expected I, but got I8 + if (m_username == (string)null) + { + CComPtrMgd_003CIPassportIdentity_003E spPassportIdentity = m_spPassportIdentity; + if (spPassportIdentity.p != null) + { + ushort* ptr = null; + IPassportIdentity* p = spPassportIdentity.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p, &ptr) >= 0) + { + m_username = new string((char*)ptr); + } + _003CModule_003E.SysFreeString(ptr); + } + } + return m_username; + } + } + + internal unsafe PassportIdentity(IPassportIdentity* pPassportIdentity) + { + CComPtrMgd_003CIPassportIdentity_003E spPassportIdentity = new CComPtrMgd_003CIPassportIdentity_003E(); + try + { + m_spPassportIdentity = spPassportIdentity; + base._002Ector(); + m_spPassportIdentity.op_Assign(pPassportIdentity); + } + catch + { + //try-fault + ((IDisposable)m_spPassportIdentity).Dispose(); + throw; + } + } + + internal unsafe int GetComPointer(IPassportIdentity** ppPassportIdentity) + { + CComPtrMgd_003CIPassportIdentity_003E spPassportIdentity = m_spPassportIdentity; + return (spPassportIdentity.p == null) ? (-2147467259) : spPassportIdentity.QueryInterface_003CIPassportIdentity_003E(ppPassportIdentity); + } + + public void _007EPassportIdentity() + { + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + } + finally + { + ((IDisposable)m_spPassportIdentity).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/PaymentInstrument.cs b/ZuneDBApi/Microsoft/Zune/Service/PaymentInstrument.cs new file mode 100644 index 0000000..6a6b389 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/PaymentInstrument.cs @@ -0,0 +1,29 @@ +namespace Microsoft.Zune.Service +{ + public class PaymentInstrument + { + private string m_id; + + private PaymentType m_type; + + public PaymentType Type => m_type; + + public string Id + { + get + { + return m_id; + } + set + { + m_id = value; + } + } + + public PaymentInstrument(string id, PaymentType type) + { + m_id = id; + m_type = type; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/PaymentType.cs b/ZuneDBApi/Microsoft/Zune/Service/PaymentType.cs new file mode 100644 index 0000000..a2ef6a7 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/PaymentType.cs @@ -0,0 +1,13 @@ +namespace Microsoft.Zune.Service +{ + public enum PaymentType + { + Points = 5, + Wholesale = 3, + DirectDebit = 2, + CreditCard = 1, + None = 0, + Unknown = -1, + Token = 4 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/PointsPayment.cs b/ZuneDBApi/Microsoft/Zune/Service/PointsPayment.cs new file mode 100644 index 0000000..cab18e7 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/PointsPayment.cs @@ -0,0 +1,10 @@ +namespace Microsoft.Zune.Service +{ + public class PointsPayment : PaymentInstrument + { + public PointsPayment() + : base(null, PaymentType.Points) + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/PriceInfo.cs b/ZuneDBApi/Microsoft/Zune/Service/PriceInfo.cs new file mode 100644 index 0000000..047b19b --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/PriceInfo.cs @@ -0,0 +1,134 @@ +using System; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class PriceInfo + { + private int m_pointsPrice; + + private double m_currencyPrice; + + private bool m_hasPoints; + + private bool m_hasCurrency; + + private string m_displayPrice; + + private string m_currencyCode; + + public string CurrencyCode => m_currencyCode; + + public string DisplayPrice => m_displayPrice; + + public bool HasCurrency + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_hasCurrency; + } + } + + public bool HasPoints + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_hasPoints; + } + } + + public double CurrencyPrice => m_currencyPrice; + + public int PointsPrice => m_pointsPrice; + + internal unsafe PriceInfo(IPriceInfo* pPriceInfo) + { + Init(pPriceInfo); + } + + internal unsafe PriceInfo() + { + //IL_000e: Expected I, but got I8 + Init(null); + } + + public unsafe PriceInfo(int pointsPrice) + { + //IL_000e: Expected I, but got I8 + Init(null); + m_pointsPrice = pointsPrice; + } + + public void MakeFree() + { + m_pointsPrice = 0; + m_currencyPrice = 0.0; + m_displayPrice = null; + } + + public static PriceInfo FreeWithPoints() + { + return new PriceInfo(); + } + + internal unsafe void Init(IPriceInfo* pPriceInfo) + { + //IL_0038: Expected I, but got I8 + //IL_004b: Expected I, but got I8 + //IL_005d: Expected I, but got I8 + //IL_0079: Expected I, but got I8 + //IL_00a7: Expected I, but got I8 + //IL_00b7: Expected I, but got I8 + //IL_00cb: Expected I, but got I8 + //IL_00db: Expected I, but got I8 + m_pointsPrice = 0; + m_currencyPrice = 0.0; + m_hasPoints = true; + m_hasCurrency = false; + if (pPriceInfo == null) + { + return; + } + m_pointsPrice = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPriceInfo + 24)))((nint)pPriceInfo); + m_currencyPrice = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPriceInfo + 32)))((nint)pPriceInfo); + bool flag = (m_hasPoints = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPriceInfo + 40)))((nint)pPriceInfo) != 0) ? true : false)); + bool flag2 = (m_hasCurrency = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPriceInfo + 48)))((nint)pPriceInfo) != 0) ? true : false)); + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + try + { + WBSTRString wBSTRString2; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString2); + try + { + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPriceInfo + 64)))((nint)pPriceInfo, (ushort**)(&wBSTRString)); + if (num >= 0) + { + m_displayPrice = new string((char*)(*(ulong*)(&wBSTRString))); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPriceInfo + 72)))((nint)pPriceInfo, (ushort**)(&wBSTRString2)); + if (num >= 0) + { + m_currencyCode = new string((char*)(*(ulong*)(&wBSTRString2))); + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString2); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString2); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/PrivacySettingId.cs b/ZuneDBApi/Microsoft/Zune/Service/PrivacySettingId.cs new file mode 100644 index 0000000..228ca48 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/PrivacySettingId.cs @@ -0,0 +1,21 @@ +namespace Microsoft.Zune.Service +{ + public enum PrivacySettingId + { + PremiumContent = 6, + MusicSharing = 5, + OnlineStatus = 4, + OnlineFriends = 3, + MemberContent = 2, + ExplicitContent = 1, + Communication = 0, + Unknown = -1, + UsageCollection = 13, + FriendsListSharing = 12, + GamesForWindowMultiplayer = 11, + VideoCommunication = 10, + ProfileCustomization = 9, + ProfileViewing = 8, + ProfileSharing = 7 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/PrivacySettingValue.cs b/ZuneDBApi/Microsoft/Zune/Service/PrivacySettingValue.cs new file mode 100644 index 0000000..7ca9cca --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/PrivacySettingValue.cs @@ -0,0 +1,10 @@ +namespace Microsoft.Zune.Service +{ + public enum PrivacySettingValue + { + FriendsOnly = 1, + Allow = 2, + Deny = 0, + Unknown = -1 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/PropertyError.cs b/ZuneDBApi/Microsoft/Zune/Service/PropertyError.cs new file mode 100644 index 0000000..856b7d9 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/PropertyError.cs @@ -0,0 +1,35 @@ +using ZuneUI; + +namespace Microsoft.Zune.Service +{ + public class PropertyError + { + private HRESULT m_hr; + + private string m_name; + + public string Name + { + get + { + return m_name; + } + set + { + m_name = value; + } + } + + public HRESULT Hr + { + get + { + return m_hr; + } + set + { + m_hr = value; + } + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/RatingSystemBase.cs b/ZuneDBApi/Microsoft/Zune/Service/RatingSystemBase.cs new file mode 100644 index 0000000..efbe52c --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/RatingSystemBase.cs @@ -0,0 +1,71 @@ +using System.Collections.Generic; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class RatingSystemBase + { + private RatingValue[] m_ratings; + + private Dictionary> m_strings; + + private string m_name; + + private string m_title; + + private string m_description; + + private string m_blockText; + + private string m_defaultLanguage; + + private bool m_useImages; + + private bool m_showBlockUnrated; + + public RatingValue[] Ratings => m_ratings; + + public Dictionary> Strings => m_strings; + + public bool ShowBlockUnrated + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_showBlockUnrated; + } + } + + public bool UseImages + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_useImages; + } + } + + public string DefaultLanguage => m_defaultLanguage; + + public string BlockText => m_blockText; + + public string Description => m_description; + + public string Title => m_title; + + public string Name => m_name; + + public RatingSystemBase(string name, string title, string description, string blockText, [MarshalAs(UnmanagedType.U1)] bool useImages, [MarshalAs(UnmanagedType.U1)] bool showBlockUnrated, string defaultLanguage, Dictionary> strings, RatingValue[] ratings) + { + m_name = name; + m_title = title; + m_description = description; + m_blockText = blockText; + m_defaultLanguage = defaultLanguage; + m_useImages = useImages; + m_showBlockUnrated = showBlockUnrated; + m_strings = strings; + m_ratings = ratings; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/RatingValue.cs b/ZuneDBApi/Microsoft/Zune/Service/RatingValue.cs new file mode 100644 index 0000000..148ce81 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/RatingValue.cs @@ -0,0 +1,53 @@ +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class RatingValue + { + private string m_name; + + private int m_order; + + private string m_text; + + private string m_toolTip; + + private string m_description; + + private string m_image; + + private bool m_treatAsUnrated; + + public bool TreatAsUnrated + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_treatAsUnrated; + } + } + + public string ImageId => m_image; + + public string DescriptionId => m_description; + + public string ToolTipId => m_toolTip; + + public string TextId => m_text; + + public int Order => m_order; + + public string Rating => m_name; + + public RatingValue(string name, int order, string text, string toolTip, string description, string image, [MarshalAs(UnmanagedType.U1)] bool treatAsUnrated) + { + m_name = name; + m_order = order; + m_text = text; + m_toolTip = toolTip; + m_description = description; + m_image = image; + m_treatAsUnrated = treatAsUnrated; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/Service.cs b/ZuneDBApi/Microsoft/Zune/Service/Service.cs new file mode 100644 index 0000000..05984bc --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/Service.cs @@ -0,0 +1,7765 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using _003CCppImplementationDetails_003E; +using Microsoft.Iris; +using Microsoft.Zune.Util; +using ZuneUI; + +namespace Microsoft.Zune.Service +{ + public class Service : IDisposable + { + private static Service m_singletonInstance = null; + + private unsafe IService* m_pService = null; + + public static Service Instance + { + get + { + if (m_singletonInstance == null) + { + m_singletonInstance = new Service(); + } + return m_singletonInstance; + } + } + + private unsafe Service() + { + //IL_0008: Expected I, but got I8 + //IL_0011: Expected I, but got I8 + IService* pService = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&pService)) >= 0) + { + m_pService = pService; + } + } + + private unsafe static int PaymentTypeToBillingPaymentType(PaymentType ePaymentType, EBillingPaymentType* pePaymentType) + { + if (pePaymentType == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 501u); + return -2147467261; + } + int result = 0; + switch (ePaymentType) + { + default: + _003CModule_003E._ZuneShipAssert(1003u, 532u); + result = -2147024809; + break; + case PaymentType.Token: + *pePaymentType = (EBillingPaymentType)4; + break; + case PaymentType.Wholesale: + *pePaymentType = (EBillingPaymentType)3; + break; + case PaymentType.DirectDebit: + *pePaymentType = (EBillingPaymentType)2; + break; + case PaymentType.CreditCard: + *pePaymentType = (EBillingPaymentType)1; + break; + case PaymentType.None: + *pePaymentType = (EBillingPaymentType)0; + break; + case PaymentType.Unknown: + *pePaymentType = (EBillingPaymentType)(-1); + break; + } + return result; + } + + private unsafe static int PaymentTypeToMediaPaymentType(PaymentType ePaymentType, EMediaPaymentType* pePaymentType) + { + if (pePaymentType == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 545u); + return -2147467261; + } + int result = 0; + switch (ePaymentType) + { + default: + _003CModule_003E._ZuneShipAssert(1003u, 568u); + result = -2147024809; + break; + case PaymentType.Points: + *pePaymentType = (EMediaPaymentType)3; + break; + case PaymentType.Token: + *pePaymentType = (EMediaPaymentType)4; + break; + case PaymentType.CreditCard: + *pePaymentType = (EMediaPaymentType)1; + break; + case PaymentType.Unknown: + *pePaymentType = (EMediaPaymentType)(-1); + break; + } + return result; + } + + public unsafe static string GetEndPointUri(EServiceEndpointId eServiceEndpointId) + { + //IL_0004: Expected I, but got I8 + object result = null; + ushort* ptr = null; + if (_003CModule_003E.GetServiceEndPointUri((global::EServiceEndpointId)eServiceEndpointId, &ptr) >= 0) + { + result = Marshal.PtrToStringBSTR((IntPtr)ptr); + } + if (ptr != null) + { + _003CModule_003E.SysFreeString(ptr); + } + return (string)result; + } + + public unsafe int Phase3Initialize() + { + //IL_0020: Expected I, but got I8 + int result = -2147467259; + IService* pService = m_pService; + if (pService != null) + { + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 136)))((nint)pService); + } + return result; + } + + public unsafe int InitializeWMISEndpointCollection() + { + //IL_0020: Expected I, but got I8 + int result = -2147467259; + IService* pService = m_pService; + if (pService != null) + { + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 888)))((nint)pService); + } + return result; + } + + public unsafe string GetWMISEndPointUri(string strEndPointName) + { + //IL_0017: Expected I, but got I8 + //IL_0032: Expected I, but got I8 + string result = null; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strEndPointName))) + { + IService* pService = m_pService; + if (pService != null) + { + ushort* ptr = null; + long num = *(long*)pService + 896; + IService* pService2 = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pService2, ptr2, &ptr) >= 0) + { + if (ptr == null) + { + goto IL_004d; + } + result = Marshal.PtrToStringBSTR((IntPtr)ptr); + } + if (ptr != null) + { + _003CModule_003E.SysFreeString(ptr); + } + } + goto IL_004d; + IL_004d: + return result; + } + } + + private void _007EService() + { + _0021Service(); + } + + private unsafe void _0021Service() + { + //IL_0017: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + IService* pService = m_pService; + if (pService != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 16)))((nint)pService); + m_pService = null; + } + } + + public unsafe void SignIn(string strUsername, string strPassword, [MarshalAs(UnmanagedType.U1)] bool fRememberUsername, [MarshalAs(UnmanagedType.U1)] bool fRememberPassword, [MarshalAs(UnmanagedType.U1)] bool fAutomaticallySignInAtStartup, AsyncCompleteHandler eventHandler) + { + //IL_0028: Expected I, but got I8 + //IL_007a: Expected I, but got I8 + //IL_008d: Expected I, but got I8 + if (m_pService == null) + { + return; + } + int num = 0; + AsyncCallbackWrapper* ptr = (AsyncCallbackWrapper*)_003CModule_003E.@new(24uL); + AsyncCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EAsyncCallbackWrapper_002E_007Bctor_007D(ptr, eventHandler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + num = (((long)(nint)ptr2 == 0) ? (-2147024882) : num); + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strUsername))) + { + try + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strPassword))) + { + try + { + if (num >= 0) + { + long num2 = *(long*)m_pService + 288; + IService* pService = m_pService; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService, ptr3, ptr4, fRememberUsername ? 1 : 0, fRememberPassword ? 1 : 0, fAutomaticallySignInAtStartup ? 1 : 0, (IAsyncCallback*)ptr2); + } + if (ptr2 != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + + public unsafe void RefreshAccount(AsyncCompleteHandler eventHandler) + { + //IL_0021: Expected I, but got I8 + //IL_0046: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + if (m_pService != null) + { + AsyncCallbackWrapper* ptr = (AsyncCallbackWrapper*)_003CModule_003E.@new(24uL); + AsyncCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EAsyncCallbackWrapper_002E_007Bctor_007D(ptr, eventHandler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + if (ptr2 != null) + { + IService* pService = m_pService; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 304)))((nint)pService, 1, (IAsyncCallback*)ptr2); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool IsSigningIn() + { + //IL_001c: Expected I, but got I8 + bool result = false; + IService* pService = m_pService; + if (pService != null) + { + bool flag = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 208)))((nint)pService) != 0) ? true : false); + result = flag; + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool IsSignedIn() + { + //IL_001c: Expected I, but got I8 + bool result = false; + IService* pService = m_pService; + if (pService != null) + { + bool flag = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 200)))((nint)pService) != 0) ? true : false); + result = flag; + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool IsSignedInWithSubscription() + { + //IL_001c: Expected I, but got I8 + bool result = false; + IService* pService = m_pService; + if (pService != null) + { + bool flag = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 216)))((nint)pService) != 0) ? true : false); + result = flag; + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool BlockExplicitContent() + { + //IL_001c: Expected I, but got I8 + bool result = false; + IService* pService = m_pService; + if (pService != null) + { + bool flag = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 248)))((nint)pService) != 0) ? true : false); + result = flag; + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool BlockRatedContent(string system, string rating) + { + //IL_0038: Expected I, but got I8 + bool result = false; + if (m_pService != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(system))) + { + try + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(rating))) + { + try + { + long num = *(long*)m_pService + 256; + IService* pService = m_pService; + bool flag = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pService, ptr, ptr2) != 0) ? true : false); + result = flag; + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool CanSignedInUserPostUsageData() + { + //IL_001c: Expected I, but got I8 + bool result = false; + IService* pService = m_pService; + if (pService != null) + { + bool flag = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 264)))((nint)pService) != 0) ? true : false); + result = flag; + } + return result; + } + + public unsafe string GetSignedInUsername() + { + //IL_000f: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + string result = null; + IService* pService = m_pService; + if (pService != null) + { + ushort* ptr = null; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 272)))((nint)pService, &ptr) >= 0) + { + if (ptr == null) + { + goto IL_003c; + } + result = Marshal.PtrToStringBSTR((IntPtr)ptr); + } + if (ptr != null) + { + _003CModule_003E.SysFreeString(ptr); + } + } + goto IL_003c; + IL_003c: + return result; + } + + public unsafe uint GetSignedInGeoId() + { + //IL_001c: Expected I, but got I8 + int result = 0; + IService* pService = m_pService; + if (pService != null) + { + result = (int)((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 280)))((nint)pService); + } + return (uint)result; + } + + public unsafe void CancelSignIn() + { + //IL_001a: Expected I, but got I8 + IService* pService = m_pService; + if (pService != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 328)))((nint)pService); + } + } + + public unsafe void SignOut() + { + //IL_001a: Expected I, but got I8 + IService* pService = m_pService; + if (pService != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 336)))((nint)pService); + } + } + + public unsafe IList GetPersistedUsernames() + { + //IL_0046: Expected I, but got I8 + //IL_006e: Expected I, but got I8 + IList list = null; + if (m_pService != null) + { + DynamicArray_003Cunsigned_0020short_0020_002A_003E obj; + *(long*)(&obj) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_7_003F_0024DynamicArray_0040PEAG_0040_00406B_0040); + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref obj, 8)) = 0L; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref obj, 16)) = 0; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref obj, 20)) = 0; + try + { + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 392)))((nint)pService, &obj) >= 0) + { + int num = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref obj, 16)); + list = new ArrayList(System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref obj, 16))); + int num2 = 0; + if (0 < num) + { + do + { + ushort* ptr = (ushort*)(*(ulong*)_003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_005B_005D(&obj, num2)); + list.Add(new string((char*)ptr)); + _003CModule_003E.SysFreeString(ptr); + num2++; + } + while (num2 < num); + } + _003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002ERemoveAllElements(&obj, true); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bdtor_007D), &obj); + throw; + } + _003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bdtor_007D(&obj); + } + return list; + } + + public unsafe void RemovePersistedUsername(string strUsername) + { + //IL_002c: Expected I, but got I8 + if (m_pService == null) + { + return; + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strUsername))) + { + try + { + long num = *(long*)m_pService + 400; + IService* pService = m_pService; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pService, ptr); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool SignInPasswordRequired(string strUsername) + { + //IL_0033: Expected I, but got I8 + bool result = false; + if (m_pService != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strUsername))) + { + try + { + int num = 0; + long num2 = *(long*)m_pService + 408; + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService, ptr, &num) >= 0) + { + bool flag = ((num != 0) ? true : false); + result = flag; + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool SignInAtStartup(string strUsername) + { + //IL_0033: Expected I, but got I8 + bool result = false; + if (m_pService != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strUsername))) + { + try + { + int num = 0; + long num2 = *(long*)m_pService + 416; + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService, ptr, &num) >= 0) + { + bool flag = ((num != 0) ? true : false); + result = flag; + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return result; + } + + public unsafe string GetSignInAtStartupUsername() + { + //IL_000f: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + string result = null; + IService* pService = m_pService; + if (pService != null) + { + ushort* ptr = null; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 424)))((nint)pService, &ptr) >= 0) + { + if (ptr == null) + { + goto IL_003c; + } + result = Marshal.PtrToStringBSTR((IntPtr)ptr); + } + if (ptr != null) + { + _003CModule_003E.SysFreeString(ptr); + } + } + goto IL_003c; + IL_003c: + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool CanDownloadSubscriptionContent() + { + //IL_0028: Expected I, but got I8 + //IL_0041: Expected I, but got I8 + //IL_0041: Expected I, but got I8 + bool result = false; + if (IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)) >= 0) + { + long num = *(long*)(&cComPtrNtv_003CISignInState_003E); + bool flag = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 184)))((nint)num) != 0) ? true : false); + result = flag; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return result; + } + + public unsafe void GetLastSignedInUserSubscriptionState(out bool activeSubscription, out ulong subscriptionId) + { + //IL_002a: Expected I, but got I8 + activeSubscription = false; + subscriptionId = 0uL; + IService* pService = m_pService; + if (pService != null) + { + int num = 0; + ulong num2 = 0uL; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 376)))((nint)pService, &num, &num2) >= 0) + { + bool flag = (activeSubscription = ((num != 0) ? true : false)); + subscriptionId = num2; + } + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool GetLastSignedInUserGuid(out int iUserId, out Guid guidUserGuid) + { + //IL_0028: Expected I, but got I8 + bool flag = false; + _GUID gUID_NULL = _003CModule_003E.GUID_NULL; + int num = 0; + IService* pService = m_pService; + if (pService != null) + { + flag = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 384)))((nint)pService, &gUID_NULL, &num) >= 0 || flag; + } + iUserId = num; + Guid guid = (guidUserGuid = _003CModule_003E.GUIDToGuid(gUID_NULL)); + return flag; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool ClearLastSignedInUser() + { + //IL_001c: Expected I, but got I8 + bool flag = false; + IService* pService = m_pService; + if (pService != null) + { + flag = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 360)))((nint)pService) >= 0 || flag; + } + return flag; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool SetLastSignedInUserGuid(ref Guid guidUserGuid, out int iUserId) + { + //IL_0035: Expected I, but got I8 + //IL_0035: Expected I, but got I8 + //IL_0035: Expected I, but got I8 + bool flag = false; + _GUID gUID = _003CModule_003E.GuidToGUID(guidUserGuid); + int num = 0; + IService* pService = m_pService; + if (pService != null) + { + flag = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 352)))((nint)pService, 0uL, &gUID, null, null, 0, &num) >= 0 || flag; + } + iUserId = num; + return flag; + } + + public unsafe string GetXboxPuid() + { + //IL_0021: Expected I, but got I8 + //IL_0033: Expected I4, but got I8 + string result = null; + IService* pService = m_pService; + if (pService != null) + { + ulong num = 0uL; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 944)))((nint)pService, &num); + _0024ArrayType_0024_0024_0024BY0BO_0040G _0024ArrayType_0024_0024_0024BY0BO_0040G; + *(short*)(&_0024ArrayType_0024_0024_0024BY0BO_0040G) = 0; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0BO_0040G, 2), 0, 58); + if (num2 >= 0) + { + num2 = ((_003CModule_003E._i64tow_s((long)num, (ushort*)(&_0024ArrayType_0024_0024_0024BY0BO_0040G), 30uL, 10) != 0) ? (-2147467259) : num2); + if (num2 >= 0) + { + result = new string((char*)(&_0024ArrayType_0024_0024_0024BY0BO_0040G)); + } + } + } + return result; + } + + public unsafe void RegisterForDownloadNotification(DownloadEventHandler eventHandler, DownloadEventProgressHandler progressHandler, EventHandler allPendingHandler) + { + //IL_001b: Expected I, but got I8 + //IL_003f: Expected I, but got I8 + //IL_004d: Expected I, but got I8 + DownloadCallbackWrapper* ptr = (DownloadCallbackWrapper*)_003CModule_003E.@new(40uL); + DownloadCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EService_002EDownloadCallbackWrapper_002E_007Bctor_007D(ptr, eventHandler, progressHandler, allPendingHandler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + if (ptr2 != null) + { + IService* pService = m_pService; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 600)))((nint)pService, (IDownloadCallback*)ptr2); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + public unsafe void Download(IList items, EDownloadFlags eDownloadFlags, string deviceEndpointId, EDownloadContextEvent clientContextEvent, string clientContextEventData, DownloadEventHandler eventHandler, DownloadEventProgressHandler progressHandler, EventHandler allPendingHandler) + { + //IL_0038: Expected I, but got I8 + //IL_005b: Expected I, but got I8 + //IL_007c: Expected I, but got I8 + //IL_0612: Expected I, but got I8 + //IL_0637: Expected I, but got I8 + //IL_06b8: Expected I, but got I8 + //IL_06cb: Expected I, but got I8 + //IL_06e0: Expected I, but got I8 + //The blocks IL_05e2, IL_0649 are reachable both inside and outside the pinned region starting at IL_05e0. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + //The blocks IL_0000, IL_05c0, IL_05c7, IL_0657 are reachable both inside and outside the pinned region starting at IL_05be. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + //The blocks IL_05aa, IL_05ae, IL_0662 are reachable both inside and outside the pinned region starting at IL_05a8. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + //The blocks IL_0596, IL_059f, IL_066d are reachable both inside and outside the pinned region starting at IL_0594. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + //The blocks IL_0582, IL_058b, IL_0678 are reachable both inside and outside the pinned region starting at IL_0580. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + //The blocks IL_0000, IL_00a4, IL_00aa, IL_00b2, IL_00be, IL_00e6, IL_010b, IL_011b, IL_012b, IL_013b, IL_014b, IL_015b, IL_016b, IL_017b, IL_018b, IL_019b, IL_01ab, IL_01bb, IL_01c8, IL_021c, IL_022c, IL_023c, IL_024c, IL_025c, IL_026c, IL_0279, IL_02bb, IL_02c8, IL_02d8, IL_031a, IL_035e, IL_0376, IL_03cc, IL_03e4, IL_0414, IL_041c, IL_0458, IL_0460, IL_0493, IL_049b, IL_04c5, IL_04da, IL_04f3, IL_04fd, IL_0513, IL_0524, IL_054e, IL_0556, IL_0566, IL_0577, IL_0683, IL_068c, IL_0691, IL_06b9, IL_06bd, IL_06cc, IL_06d2 are reachable both inside and outside the pinned region starting at IL_00a2. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + string text = null; + if (m_pService == null) + { + return; + } + /*pinned*/ref ushort reference = ref *(ushort*)null; + try + { + int num = 0; + DownloadCallbackWrapper* ptr = (DownloadCallbackWrapper*)_003CModule_003E.@new(40uL); + DownloadCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EService_002EDownloadCallbackWrapper_002E_007Bctor_007D(ptr, eventHandler, progressHandler, allPendingHandler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + DownloadCallbackWrapper* ptr3 = ptr2; + num = (((long)(nint)ptr2 == 0) ? (-2147024882) : num); + IMediaCollection* ptr4 = null; + if (num < 0) + { + goto IL_06cc; + } + IService* pService = m_pService; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 32)))((nint)pService, &ptr4); + if (num < 0) + { + goto IL_06b9; + } + _GUID gUID; + ref ushort reference2; + ref ushort reference3; + CComPtrNtv_003CIContextData_003E cComPtrNtv_003CIContextData_003E; + IService* pService2; + ref ushort val; + global::EDownloadContextEvent num3; + ref ushort val2; + IContextData** intPtr; + IMediaCollection* intPtr2; + ref _GUID reference4; + global::EContentType num5; + _003F val3; + _003F val4; + _003F val5; + IContextData* intPtr3; + IService* pService3; + IMediaCollection* intPtr4; + if (!(deviceEndpointId != (string)null) || deviceEndpointId.Equals("")) + { + if (items != null) + { + IEnumerator enumerator = items.GetEnumerator(); + while (enumerator.MoveNext()) + { + object current = enumerator.Current; + Guid guid = Guid.Empty; + string s = null; + string s2 = null; + string s3 = null; + text = null; + global::EContentType eContentType = (global::EContentType)(-1); + if (current is DataProviderObject) + { + DataProviderObject dataProviderObject = current as DataProviderObject; + string typeName = dataProviderObject.TypeName; + try + { + text = (string)dataProviderObject.GetProperty("ReferrerContext"); + } + catch (KeyNotFoundException ex) + { + } + if (!typeName.Equals("Album") && !typeName.Equals("AlbumData") && !typeName.Equals("RecommendedAlbum")) + { + if (!typeName.Equals("Track") && !typeName.Equals("ChannelTrack") && !typeName.Equals("ProfileTrack") && !typeName.Equals("PlaylistTrack") && !typeName.Equals("ZplTrack") && !typeName.Equals("RecommendedTrack") && !typeName.Equals("TrackPurchaseHistory") && !typeName.Equals("TrackDownloadHistory")) + { + if (typeName.Equals("PlaylistContentItem")) + { + eContentType = (global::EContentType)0; + guid = (Guid)dataProviderObject.GetProperty("ZuneMediaId"); + s = (string)dataProviderObject.GetProperty("Title"); + s2 = (string)dataProviderObject.GetProperty("AlbumName"); + s3 = (string)dataProviderObject.GetProperty("ArtistName"); + } + else if (!typeName.Equals("MusicVideo") && !typeName.Equals("MusicVideoHistory") && !typeName.Equals("Episode") && !typeName.Equals("Short") && !typeName.Equals("VideoHistory")) + { + if (typeName.Equals("Video")) + { + eContentType = (global::EContentType)3; + guid = (Guid)dataProviderObject.GetProperty("ZuneMediaId"); + s = (string)dataProviderObject.GetProperty("Title"); + s3 = (string)dataProviderObject.GetProperty("Title"); + } + else if (typeName.Equals("AppData") || typeName.Equals("ZuneHDAppData")) + { + eContentType = (global::EContentType)7; + guid = (Guid)dataProviderObject.GetProperty("Id"); + s = (string)dataProviderObject.GetProperty("Title"); + s3 = (string)dataProviderObject.GetProperty("Author"); + } + } + else + { + eContentType = (global::EContentType)3; + guid = (Guid)dataProviderObject.GetProperty("Id"); + s = (string)dataProviderObject.GetProperty("Title"); + DataProviderObject dataProviderObject2 = (DataProviderObject)dataProviderObject.GetProperty("PrimaryArtist"); + if (dataProviderObject2 != null) + { + s3 = (string)dataProviderObject2.GetProperty("Title"); + } + } + } + else + { + eContentType = (global::EContentType)0; + guid = (Guid)dataProviderObject.GetProperty("Id"); + s = (string)dataProviderObject.GetProperty("Title"); + s2 = (string)dataProviderObject.GetProperty("AlbumTitle"); + DataProviderObject dataProviderObject3 = (DataProviderObject)dataProviderObject.GetProperty("PrimaryArtist"); + if (dataProviderObject3 != null) + { + s3 = (string)dataProviderObject3.GetProperty("Title"); + } + } + } + else + { + eContentType = (global::EContentType)1; + guid = (Guid)dataProviderObject.GetProperty("Id"); + s = (string)dataProviderObject.GetProperty("Title"); + } + } + else if (current is TrackOffer) + { + eContentType = (global::EContentType)0; + TrackOffer trackOffer = current as TrackOffer; + guid = trackOffer.Id; + s = trackOffer.Title; + s2 = trackOffer.Album; + s3 = trackOffer.Artist; + text = trackOffer.ServiceContext; + } + else if (current is VideoOffer) + { + eContentType = (global::EContentType)3; + VideoOffer videoOffer = current as VideoOffer; + guid = videoOffer.Id; + s = videoOffer.Title; + s2 = videoOffer.SeriesTitle; + s3 = videoOffer.Artist; + } + else if (current is AlbumOffer) + { + eContentType = (global::EContentType)1; + AlbumOffer albumOffer = current as AlbumOffer; + guid = albumOffer.Id; + s = albumOffer.Title; + text = albumOffer.ServiceContext; + } + else if (current.GetType() == typeof(DownloadTask)) + { + DownloadTask downloadTask = (DownloadTask)current; + string property = ((DownloadTask)current).GetProperty("Type"); + if (!string.IsNullOrEmpty(property)) + { + eContentType = (global::EContentType)GetContentType(property); + } + string property2 = ((DownloadTask)current).GetProperty("ServiceId"); + if (!string.IsNullOrEmpty(property2)) + { + try + { + Guid guid2 = new Guid(property2); + guid = guid2; + } + catch (FormatException ex2) + { + } + } + s = downloadTask.GetProperty("Title"); + s2 = downloadTask.GetProperty("Album"); + s3 = downloadTask.GetProperty("Artist"); + } + if (num < 0 || !(guid != Guid.Empty)) + { + continue; + } + gUID = _003CModule_003E.GuidToGUID(guid); + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(s))) + { + try + { + if (ptr5 == null) + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00_0024_0024CBG, ushort>(ref _003CModule_003E._003F_003F_C_0040_11LOCGONAA_0040_003F_0024AA_003F_0024AA_0040)) + { + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(s2))) + { + try + { + if (ptr6 == null) + { + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00_0024_0024CBG, ushort>(ref _003CModule_003E._003F_003F_C_0040_11LOCGONAA_0040_003F_0024AA_003F_0024AA_0040)) + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(s3))) + { + try + { + if (ptr7 == null) + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00_0024_0024CBG, ushort>(ref _003CModule_003E._003F_003F_C_0040_11LOCGONAA_0040_003F_0024AA_003F_0024AA_0040)) + { + reference2 = ref *(ushort*)null; + try + { + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ptr8; + num3 = eDownloadContextEvent; + val2 = ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)(nint)val, num3, (ushort*)(nint)val2, intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ptr8; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)(nint)val, num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + else + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + continue; + } + reference2 = ref *(ushort*)null; + try + { + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + else + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + catch + { + //try-fault + ptr7 = null; + throw; + } + } + } + continue; + } + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(s3))) + { + try + { + if (ptr7 == null) + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00_0024_0024CBG, ushort>(ref _003CModule_003E._003F_003F_C_0040_11LOCGONAA_0040_003F_0024AA_003F_0024AA_0040)) + { + reference2 = ref *(ushort*)null; + try + { + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + else + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + continue; + } + reference2 = ref *(ushort*)null; + try + { + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + else + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + catch + { + //try-fault + ptr7 = null; + throw; + } + } + } + catch + { + //try-fault + ptr6 = null; + throw; + } + } + } + continue; + } + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(s2))) + { + try + { + if (ptr6 == null) + { + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00_0024_0024CBG, ushort>(ref _003CModule_003E._003F_003F_C_0040_11LOCGONAA_0040_003F_0024AA_003F_0024AA_0040)) + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(s3))) + { + try + { + if (ptr7 == null) + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00_0024_0024CBG, ushort>(ref _003CModule_003E._003F_003F_C_0040_11LOCGONAA_0040_003F_0024AA_003F_0024AA_0040)) + { + reference2 = ref *(ushort*)null; + try + { + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + else + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + continue; + } + reference2 = ref *(ushort*)null; + try + { + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + else + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + catch + { + //try-fault + ptr7 = null; + throw; + } + } + } + continue; + } + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(s3))) + { + try + { + if (ptr7 == null) + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00_0024_0024CBG, ushort>(ref _003CModule_003E._003F_003F_C_0040_11LOCGONAA_0040_003F_0024AA_003F_0024AA_0040)) + { + reference2 = ref *(ushort*)null; + try + { + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + else + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + continue; + } + reference2 = ref *(ushort*)null; + try + { + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + else + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + catch + { + //try-fault + ptr7 = null; + throw; + } + } + } + catch + { + //try-fault + ptr6 = null; + throw; + } + } + } + catch + { + //try-fault + ptr5 = null; + throw; + } + } + } + } + if (num >= 0) + { + long num6 = *(long*)m_pService + 608; + pService3 = m_pService; + intPtr4 = ptr4; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num6))((nint)pService3, intPtr4, (global::EDownloadFlags)eDownloadFlags, -1, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference), 1, (IDownloadCallback*)ptr3); + } + goto IL_06b9; + } + IMediaCollection* intPtr5; + DownloadCallbackWrapper* intPtr6; + fixed (ushort* ptr10 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(deviceEndpointId))) + { + if (items != null) + { + IEnumerator enumerator = items.GetEnumerator(); + while (enumerator.MoveNext()) + { + object current = enumerator.Current; + Guid guid = Guid.Empty; + string s = null; + string s2 = null; + string s3 = null; + text = null; + global::EContentType eContentType = (global::EContentType)(-1); + if (current is DataProviderObject) + { + DataProviderObject dataProviderObject = current as DataProviderObject; + string typeName = dataProviderObject.TypeName; + try + { + text = (string)dataProviderObject.GetProperty("ReferrerContext"); + } + catch (KeyNotFoundException ex) + { + } + if (!typeName.Equals("Album") && !typeName.Equals("AlbumData") && !typeName.Equals("RecommendedAlbum")) + { + if (!typeName.Equals("Track") && !typeName.Equals("ChannelTrack") && !typeName.Equals("ProfileTrack") && !typeName.Equals("PlaylistTrack") && !typeName.Equals("ZplTrack") && !typeName.Equals("RecommendedTrack") && !typeName.Equals("TrackPurchaseHistory") && !typeName.Equals("TrackDownloadHistory")) + { + if (typeName.Equals("PlaylistContentItem")) + { + eContentType = (global::EContentType)0; + guid = (Guid)dataProviderObject.GetProperty("ZuneMediaId"); + s = (string)dataProviderObject.GetProperty("Title"); + s2 = (string)dataProviderObject.GetProperty("AlbumName"); + s3 = (string)dataProviderObject.GetProperty("ArtistName"); + } + else if (!typeName.Equals("MusicVideo") && !typeName.Equals("MusicVideoHistory") && !typeName.Equals("Episode") && !typeName.Equals("Short") && !typeName.Equals("VideoHistory")) + { + if (typeName.Equals("Video")) + { + eContentType = (global::EContentType)3; + guid = (Guid)dataProviderObject.GetProperty("ZuneMediaId"); + s = (string)dataProviderObject.GetProperty("Title"); + s3 = (string)dataProviderObject.GetProperty("Title"); + } + else if (typeName.Equals("AppData") || typeName.Equals("ZuneHDAppData")) + { + eContentType = (global::EContentType)7; + guid = (Guid)dataProviderObject.GetProperty("Id"); + s = (string)dataProviderObject.GetProperty("Title"); + s3 = (string)dataProviderObject.GetProperty("Author"); + } + } + else + { + eContentType = (global::EContentType)3; + guid = (Guid)dataProviderObject.GetProperty("Id"); + s = (string)dataProviderObject.GetProperty("Title"); + DataProviderObject dataProviderObject2 = (DataProviderObject)dataProviderObject.GetProperty("PrimaryArtist"); + if (dataProviderObject2 != null) + { + s3 = (string)dataProviderObject2.GetProperty("Title"); + } + } + } + else + { + eContentType = (global::EContentType)0; + guid = (Guid)dataProviderObject.GetProperty("Id"); + s = (string)dataProviderObject.GetProperty("Title"); + s2 = (string)dataProviderObject.GetProperty("AlbumTitle"); + DataProviderObject dataProviderObject3 = (DataProviderObject)dataProviderObject.GetProperty("PrimaryArtist"); + if (dataProviderObject3 != null) + { + s3 = (string)dataProviderObject3.GetProperty("Title"); + } + } + } + else + { + eContentType = (global::EContentType)1; + guid = (Guid)dataProviderObject.GetProperty("Id"); + s = (string)dataProviderObject.GetProperty("Title"); + } + } + else if (current is TrackOffer) + { + eContentType = (global::EContentType)0; + TrackOffer trackOffer = current as TrackOffer; + guid = trackOffer.Id; + s = trackOffer.Title; + s2 = trackOffer.Album; + s3 = trackOffer.Artist; + text = trackOffer.ServiceContext; + } + else if (current is VideoOffer) + { + eContentType = (global::EContentType)3; + VideoOffer videoOffer = current as VideoOffer; + guid = videoOffer.Id; + s = videoOffer.Title; + s2 = videoOffer.SeriesTitle; + s3 = videoOffer.Artist; + } + else if (current is AlbumOffer) + { + eContentType = (global::EContentType)1; + AlbumOffer albumOffer = current as AlbumOffer; + guid = albumOffer.Id; + s = albumOffer.Title; + text = albumOffer.ServiceContext; + } + else if (current.GetType() == typeof(DownloadTask)) + { + DownloadTask downloadTask = (DownloadTask)current; + string property = ((DownloadTask)current).GetProperty("Type"); + if (!string.IsNullOrEmpty(property)) + { + eContentType = (global::EContentType)GetContentType(property); + } + string property2 = ((DownloadTask)current).GetProperty("ServiceId"); + if (!string.IsNullOrEmpty(property2)) + { + try + { + Guid guid2 = new Guid(property2); + guid = guid2; + } + catch (FormatException ex2) + { + } + } + s = downloadTask.GetProperty("Title"); + s2 = downloadTask.GetProperty("Album"); + s3 = downloadTask.GetProperty("Artist"); + } + if (num < 0 || !(guid != Guid.Empty)) + { + continue; + } + gUID = _003CModule_003E.GuidToGUID(guid); + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(s))) + { + try + { + if (ptr5 == null) + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00_0024_0024CBG, ushort>(ref _003CModule_003E._003F_003F_C_0040_11LOCGONAA_0040_003F_0024AA_003F_0024AA_0040)) + { + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(s2))) + { + try + { + if (ptr6 == null) + { + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00_0024_0024CBG, ushort>(ref _003CModule_003E._003F_003F_C_0040_11LOCGONAA_0040_003F_0024AA_003F_0024AA_0040)) + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(s3))) + { + try + { + if (ptr7 == null) + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00_0024_0024CBG, ushort>(ref _003CModule_003E._003F_003F_C_0040_11LOCGONAA_0040_003F_0024AA_003F_0024AA_0040)) + { + reference2 = ref *(ushort*)null; + try + { + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + else + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + continue; + } + reference2 = ref *(ushort*)null; + try + { + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + else + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + catch + { + //try-fault + ptr7 = null; + throw; + } + } + } + continue; + } + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(s3))) + { + try + { + if (ptr7 == null) + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00_0024_0024CBG, ushort>(ref _003CModule_003E._003F_003F_C_0040_11LOCGONAA_0040_003F_0024AA_003F_0024AA_0040)) + { + reference2 = ref *(ushort*)null; + try + { + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + else + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + continue; + } + reference2 = ref *(ushort*)null; + try + { + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + else + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + catch + { + //try-fault + ptr7 = null; + throw; + } + } + } + catch + { + //try-fault + ptr6 = null; + throw; + } + } + } + continue; + } + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(s2))) + { + try + { + if (ptr6 == null) + { + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00_0024_0024CBG, ushort>(ref _003CModule_003E._003F_003F_C_0040_11LOCGONAA_0040_003F_0024AA_003F_0024AA_0040)) + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(s3))) + { + try + { + if (ptr7 == null) + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00_0024_0024CBG, ushort>(ref _003CModule_003E._003F_003F_C_0040_11LOCGONAA_0040_003F_0024AA_003F_0024AA_0040)) + { + reference2 = ref *(ushort*)null; + try + { + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + else + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + continue; + } + reference2 = ref *(ushort*)null; + try + { + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + else + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + catch + { + //try-fault + ptr7 = null; + throw; + } + } + } + continue; + } + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(s3))) + { + try + { + if (ptr7 == null) + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00_0024_0024CBG, ushort>(ref _003CModule_003E._003F_003F_C_0040_11LOCGONAA_0040_003F_0024AA_003F_0024AA_0040)) + { + reference2 = ref *(ushort*)null; + try + { + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + else + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + continue; + } + reference2 = ref *(ushort*)null; + try + { + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref *ptr8; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + else + { + global::EDownloadContextEvent eDownloadContextEvent = (global::EDownloadContextEvent)(-1); + reference3 = ref *(ushort*)null; + try + { + if (clientContextEvent != EDownloadContextEvent.Unknown && !string.IsNullOrEmpty(clientContextEventData)) + { + eDownloadContextEvent = (global::EDownloadContextEvent)clientContextEvent; + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(clientContextEventData))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref *ptr9; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = eDownloadContextEvent; + val2 = ref reference3; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), num3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val2), intPtr); + long num4 = *(long*)ptr4 + 40; + intPtr2 = ptr4; + reference4 = ref gUID; + num5 = eContentType; + val3 = ptr5; + val4 = ptr6; + val5 = ptr7; + intPtr3 = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_002EPEAUIContextData_0040_0040(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), num5, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, intPtr3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference3 = ref *(ushort*)null; + throw; + } + reference3 = ref *(ushort*)null; + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + catch + { + //try-fault + ptr7 = null; + throw; + } + } + } + catch + { + //try-fault + ptr6 = null; + throw; + } + } + } + catch + { + //try-fault + ptr5 = null; + throw; + } + } + } + } + if (num >= 0) + { + long num6 = *(long*)m_pService + 608; + pService3 = m_pService; + intPtr4 = ptr4; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num6))((nint)pService3, intPtr4, (global::EDownloadFlags)eDownloadFlags, -1, ptr10, 1, (IDownloadCallback*)ptr3); + } + if (ptr4 != null) + { + intPtr5 = ptr4; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr5 + 16)))((nint)intPtr5); + } + if (ptr3 != null) + { + intPtr6 = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr6 + 16)))((nint)intPtr6); + } + } + goto end_IL_0012; + IL_06b9: + if (ptr4 != null) + { + intPtr5 = ptr4; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr5 + 16)))((nint)intPtr5); + } + goto IL_06cc; + IL_06cc: + if (ptr3 != null) + { + intPtr6 = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr6 + 16)))((nint)intPtr6); + } + end_IL_0012:; + } + catch + { + //try-fault + reference = ref *(ushort*)null; + throw; + } + reference = ref *(ushort*)null; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool IsDownloading(Guid guidMediaId, EContentType eContentType, out bool fIsDownloadPending, out bool fIsHidden) + { + //IL_003a: Expected I, but got I8 + bool result = false; + if (m_pService != null) + { + int num = 0; + int num2 = 0; + int num3 = 0; + _GUID gUID = _003CModule_003E.GuidToGUID(guidMediaId); + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 616)))((nint)pService, gUID, (global::EContentType)eContentType, &num, &num2, &num3) >= 0) + { + bool flag = ((num != 0 || num2 != 0) ? true : false); + result = flag; + bool flag2 = (fIsDownloadPending = ((num2 != 0) ? true : false)); + bool flag3 = (fIsHidden = ((num3 != 0) ? true : false)); + } + } + return result; + } + + public unsafe void CancelDownload(Guid guidMediaId, EContentType eContentType) + { + //IL_0028: Expected I, but got I8 + if (m_pService != null) + { + _GUID gUID = _003CModule_003E.GuidToGUID(guidMediaId); + IService* pService = m_pService; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 624)))((nint)pService, gUID, (global::EContentType)eContentType); + } + } + + public unsafe HRESULT GetContentUri(Guid guidMediaId, EContentType eContentType, EContentUriFlags eContentUriFlags, EMediaFormat eMediaFormat, EMediaRights eMediaRights, out string uriOut, out Guid mediaInstanceIdOut) + { + //IL_0016: Expected I, but got I8 + //IL_0041: Expected I, but got I8 + int num = 0; + string text = null; + _GUID gUID_NULL = _003CModule_003E.GUID_NULL; + if (m_pService != null) + { + ushort* ptr = null; + _GUID gUID = _003CModule_003E.GuidToGUID(guidMediaId); + IService* pService = m_pService; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 584)))((nint)pService, gUID, (global::EContentType)eContentType, (global::EContentUriFlags)eContentUriFlags, eMediaFormat, eMediaRights, &ptr, &gUID_NULL); + if (num >= 0) + { + if (ptr == null) + { + goto IL_005e; + } + text = Marshal.PtrToStringBSTR((IntPtr)ptr); + } + if (ptr != null) + { + _003CModule_003E.SysFreeString(ptr); + } + } + goto IL_005e; + IL_005e: + uriOut = text; + Guid guid = (mediaInstanceIdOut = _003CModule_003E.GUIDToGuid(gUID_NULL)); + return num; + } + + public HRESULT GetContentUri(Guid guidMediaId, EContentType eContentType, EContentUriFlags eContentUriFlags, [MarshalAs(UnmanagedType.U1)] bool fIsHD, [MarshalAs(UnmanagedType.U1)] bool fIsRental, out string uriOut) + { + EMediaFormat eMediaFormat = (fIsHD ? ((EMediaFormat)2) : ((EMediaFormat)3)); + EMediaRights eMediaRights = (fIsRental ? ((EMediaRights)9) : ((EMediaRights)8)); + Guid mediaInstanceIdOut = default(Guid); + return GetContentUri(guidMediaId, eContentType, eContentUriFlags, eMediaFormat, eMediaRights, out uriOut, out mediaInstanceIdOut); + } + + public HRESULT GetContentUri(Guid guidMediaId, EContentType eContentType, EContentUriFlags eContentUriFlags, out string uriOut, out Guid mediaInstanceIdOut) + { + return GetContentUri(guidMediaId, eContentType, eContentUriFlags, (EMediaFormat)(-1), (EMediaRights)(-1), out uriOut, out mediaInstanceIdOut); + } + + [return: MarshalAs(UnmanagedType.U1)] + public bool InCompleteCollection(Guid guidMediaId, EContentType eContentType) + { + int dbMediaId; + bool fHidden; + return InCompleteCollection(guidMediaId, eContentType, null, out dbMediaId, out fHidden); + } + + [return: MarshalAs(UnmanagedType.U1)] + public bool InCompleteCollection(Guid guidMediaId, EContentType eContentType, string strDeviceEndpointId) + { + int dbMediaId; + bool fHidden; + return InCompleteCollection(guidMediaId, eContentType, strDeviceEndpointId, out dbMediaId, out fHidden); + } + + [return: MarshalAs(UnmanagedType.U1)] + public bool InCompleteCollection(Guid guidMediaId, EContentType eContentType, out int dbMediaId, out bool fHidden) + { + return InCompleteCollection(guidMediaId, eContentType, null, out dbMediaId, out fHidden); + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool InCompleteCollection(Guid guidMediaId, EContentType eContentType, string strDeviceEndpointId, out int dbMediaId, out bool fHidden) + { + //IL_004a: Expected I, but got I8 + bool result = false; + int num = -1; + if (m_pService != null) + { + int num2 = 0; + int num3 = 0; + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strDeviceEndpointId))) + { + try + { + _GUID gUID = _003CModule_003E.GuidToGUID(guidMediaId); + long num4 = *(long*)m_pService + 640; + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)pService, gUID, (global::EContentType)eContentType, ptr, &num2, &num, &num3) >= 0) + { + bool flag = ((num2 != 0) ? true : false); + result = flag; + bool flag2 = (fHidden = ((num3 != 0) ? true : false)); + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + dbMediaId = num; + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public bool InVisibleCollection(Guid guidMediaId, EContentType eContentType) + { + if (InCompleteCollection(guidMediaId, eContentType, null, out var _, out var fHidden)) + { + return !fHidden; + } + return false; + } + + [return: MarshalAs(UnmanagedType.U1)] + public bool InVisibleCollection(Guid guidMediaId, EContentType eContentType, out int dbMediaId) + { + if (InCompleteCollection(guidMediaId, eContentType, null, out dbMediaId, out var fHidden)) + { + return !fHidden; + } + return false; + } + + [return: MarshalAs(UnmanagedType.U1)] + public bool InHiddenCollection(Guid guidMediaId, EContentType eContentType) + { + int dbMediaId; + bool fHidden; + return InCompleteCollection(guidMediaId, eContentType, null, out dbMediaId, out fHidden) && fHidden; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool SetUserTrackRating(int iUserId, int iRating, Guid guidTrackMediaId, Guid guidAlbumMediaId, int iTrackNumber, string strTitle, int msDuration, string strAlbum, string strArtist, string strGenre, string strServiceContext) + { + //IL_005d: Expected I, but got I8 + //IL_005d: Expected I, but got I8 + //IL_009f: Expected I, but got I8 + //IL_009f: Expected I, but got I8 + bool result = false; + if (m_pService != null) + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strTitle))) + { + try + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strAlbum))) + { + try + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strArtist))) + { + try + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strGenre))) + { + try + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strServiceContext))) + { + try + { + CComPtrNtv_003CIContextData_003E cComPtrNtv_003CIContextData_003E; + *(long*)(&cComPtrNtv_003CIContextData_003E) = 0L; + try + { + long num = *(long*)m_pService + 120; + IService* pService = m_pService; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pService, ptr, (global::EDownloadContextEvent)(-1), null, (IContextData**)(&cComPtrNtv_003CIContextData_003E)); + _GUID gUID = _003CModule_003E.GuidToGUID(guidAlbumMediaId); + _GUID gUID2 = _003CModule_003E.GuidToGUID(guidTrackMediaId); + long num2 = *(long*)m_pService + 904; + IService* pService2 = m_pService; + _003F val = ptr2; + _003F val2 = ptr3; + _003F val3 = ptr4; + _003F val4 = ptr5; + long num3 = *(long*)(&cComPtrNtv_003CIContextData_003E); + result = (byte)((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, iUserId, iRating, &gUID2, &gUID, iTrackNumber, (ushort*)(nint)val, msDuration, (ushort*)(nint)val2, (ushort*)(nint)val3, (ushort*)(nint)val4, (IContextData*)num3) >= 0) ? 1u : 0u) != 0; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002ERelease(&cComPtrNtv_003CIContextData_003E); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + catch + { + //try-fault + ptr5 = null; + throw; + } + } + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool SetUserArtistRating(int iUserId, int iRating, Guid guidArtistMediaId, string strTitle) + { + //IL_003a: Expected I, but got I8 + bool result = false; + if (m_pService != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strTitle))) + { + try + { + _GUID gUID = _003CModule_003E.GuidToGUID(guidArtistMediaId); + long num = *(long*)m_pService + 912; + IService* pService = m_pService; + result = (byte)((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pService, iUserId, iRating, &gUID, ptr) >= 0) ? 1u : 0u) != 0; + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool GetUserRating(int iUserId, Guid guidMediaId, EContentType eContentType, [In][Out] ref int piRating) + { + //IL_002f: Expected I, but got I8 + bool flag = false; + if (m_pService != null) + { + _GUID gUID = _003CModule_003E.GuidToGUID(guidMediaId); + IService* pService = m_pService; + int num; + flag = 0 == ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 920)))((nint)pService, iUserId, &gUID, (global::EContentType)eContentType, &num); + if (flag) + { + piRating = num; + } + } + return flag; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool DeleteSubscriptionDownloads(AsyncCompleteHandler eventHandler) + { + //IL_0023: Expected I, but got I8 + //IL_0047: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + bool flag = false; + if (m_pService != null) + { + AsyncCallbackWrapper* ptr = (AsyncCallbackWrapper*)_003CModule_003E.@new(24uL); + AsyncCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EAsyncCallbackWrapper_002E_007Bctor_007D(ptr, eventHandler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + if (ptr2 != null) + { + IService* pService = m_pService; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 648)))((nint)pService, (IAsyncCallback*)ptr2); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + flag = num >= 0 || flag; + } + } + return flag; + } + + public unsafe string GetSubscriptionDirectory() + { + //IL_000f: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + string result = null; + IService* pService = m_pService; + if (pService != null) + { + ushort* ptr = null; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 656)))((nint)pService, &ptr) >= 0) + { + result = Marshal.PtrToStringBSTR((IntPtr)ptr); + } + if (ptr != null) + { + _003CModule_003E.SysFreeString(ptr); + } + } + return result; + } + + public static EListType ContentTypeToListType(EContentType contentType) + { + int result; + switch (contentType) + { + case EContentType.MusicTrack: + return EListType.eTrackList; + case EContentType.MusicAlbum: + return EListType.eAlbumList; + case EContentType.Video: + return EListType.eVideoList; + case EContentType.PodcastEpisode: + return EListType.ePodcastEpisodeList; + case EContentType.PodcastSeries: + return EListType.ePodcastList; + case EContentType.Artist: + return EListType.eArtistList; + default: + result = 23; + break; + case EContentType.App: + result = 20; + break; + } + return (EListType)result; + } + + public unsafe EMediaStatus GetMediaStatus(Guid guidMediaId, EContentType eContentType) + { + //IL_003c: Expected I, but got I8 + //IL_00d3: Expected I, but got I8 + int dbMediaId = -1; + bool fIsDownloadPending = false; + EMediaStatus result = EMediaStatus.StatusNotAvailable; + bool fIsHidden; + if (InVisibleCollection(guidMediaId, eContentType, out dbMediaId)) + { + EMediaTypes eMediaTypes = EMediaTypes.eMediaTypeInvalid; + if (eContentType == EContentType.Video) + { + _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040 _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040; + _003CModule_003E.DBPropertyRequestStruct_002E_007Bctor_007D((DBPropertyRequestStruct*)(&_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040), 177u); + try + { + if (_003CModule_003E.ZuneLibraryExports_002EGetFieldValues(dbMediaId, ContentTypeToListType(EContentType.Video), 1, (DBPropertyRequestStruct*)(&_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040), null) >= 0 && System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, 4)) >= 0) + { + eMediaTypes = ((System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, ushort>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, 8)) == 3) ? System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, EMediaTypes>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, 16)) : eMediaTypes); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindVecDtor((delegate*, void>)(&_003CModule_003E.__ehvec_dtor), (void*)(&_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040), 32uL, 1, (delegate*)(delegate*)(&_003CModule_003E.DBPropertyRequestStruct_002E_007Bdtor_007D)); + throw; + } + _003CModule_003E.__ehvec_dtor(&_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, 32uL, 1, (delegate*)(delegate*)(&_003CModule_003E.DBPropertyRequestStruct_002E_007Bdtor_007D)); + if (eMediaTypes == EMediaTypes.eMediaTypeVideoMBR) + { + if (IsDownloading(guidMediaId, EContentType.Video, out fIsDownloadPending, out fIsHidden)) + { + EMediaStatus eMediaStatus = (fIsDownloadPending ? EMediaStatus.StatusDownloadPending : EMediaStatus.StatusDownloading); + result = eMediaStatus; + } + else + { + result = EMediaStatus.StatusInCollectionShortcut; + } + goto IL_016f; + } + } + _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040 _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_00402; + _003CModule_003E.DBPropertyRequestStruct_002E_007Bctor_007D((DBPropertyRequestStruct*)(&_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_00402), 149u); + try + { + if (_003CModule_003E.ZuneLibraryExports_002EGetFieldValues(dbMediaId, ContentTypeToListType(eContentType), 1, (DBPropertyRequestStruct*)(&_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_00402), null) < 0 || System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_00402, 4)) < 0 || System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, ushort>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_00402, 8)) != 3) + { + goto IL_0118; + } + if (System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_00402, 16)) != 10) + { + if (System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_00402, 16)) != 20 && System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_00402, 16)) != 26) + { + if (System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_00402, 16)) != 30 && System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_00402, 16)) != 40) + { + goto IL_0118; + } + result = EMediaStatus.StatusInCollectionOwned; + } + else + { + result = EMediaStatus.StatusInCollectionExpiring; + } + } + else + { + result = EMediaStatus.StatusInCollectionNoLicense; + } + goto end_IL_00c2; + IL_0118: + result = EMediaStatus.StatusInCollectionUnknown; + end_IL_00c2:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindVecDtor((delegate*, void>)(&_003CModule_003E.__ehvec_dtor), (void*)(&_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_00402), 32uL, 1, (delegate*)(delegate*)(&_003CModule_003E.DBPropertyRequestStruct_002E_007Bdtor_007D)); + throw; + } + _003CModule_003E.__ehvec_dtor(&_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_00402, 32uL, 1, (delegate*)(delegate*)(&_003CModule_003E.DBPropertyRequestStruct_002E_007Bdtor_007D)); + } + else if (IsDownloading(guidMediaId, eContentType, out fIsDownloadPending, out fIsHidden)) + { + EMediaStatus eMediaStatus2 = (fIsDownloadPending ? EMediaStatus.StatusDownloadPending : EMediaStatus.StatusDownloading); + result = eMediaStatus2; + } + goto IL_016f; + IL_016f: + return result; + } + + public unsafe string GetZuneTag() + { + //IL_0033: Expected I, but got I8 + //IL_0037: Expected I, but got I8 + //IL_0050: Expected I, but got I8 + //IL_0050: Expected I, but got I8 + string result = null; + if (m_pService != null && IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)); + ushort* ptr = null; + if (num >= 0) + { + long num2 = *(long*)(&cComPtrNtv_003CISignInState_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 96)))((nint)num2, &ptr); + if (num < 0) + { + goto IL_0066; + } + if (ptr != null) + { + result = Marshal.PtrToStringBSTR((IntPtr)ptr); + goto IL_0066; + } + } + goto end_IL_001a; + IL_0066: + if (ptr != null) + { + _003CModule_003E.SysFreeString(ptr); + } + end_IL_001a:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return result; + } + + public unsafe string GetPassportTicket(EPassportPolicyId ePassportPolicy) + { + //IL_0036: Expected I, but got I8 + //IL_003a: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + string result = null; + if (m_pService != null && IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)); + ushort* ptr = null; + if (num >= 0) + { + long num2 = *(long*)(&cComPtrNtv_003CISignInState_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 40)))((nint)num2, (EPassportPolicy)ePassportPolicy, &ptr); + if (num < 0) + { + goto IL_006a; + } + if (ptr != null) + { + result = Marshal.PtrToStringBSTR((IntPtr)ptr); + goto IL_006a; + } + } + goto end_IL_001d; + IL_006a: + if (ptr != null) + { + _003CModule_003E.SysFreeString(ptr); + } + end_IL_001d:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return result; + } + + public unsafe HRESULT AuthenticatePassport(string username, string password, EPassportPolicyId ePassportPolicyId, out PassportIdentity passportIdentity) + { + //IL_0048: Expected I, but got I8 + //IL_0059: Expected I, but got I8 + int num = -2147467259; + passportIdentity = null; + if (m_pService != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(username))) + { + try + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(password))) + { + try + { + CComPtrNtv_003CIPassportIdentity_003E cComPtrNtv_003CIPassportIdentity_003E; + *(long*)(&cComPtrNtv_003CIPassportIdentity_003E) = 0L; + try + { + long num2 = *(long*)m_pService + 440; + IService* pService = m_pService; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService, ptr, ptr2, (EPassportPolicy)ePassportPolicyId, (IPassportIdentity**)(&cComPtrNtv_003CIPassportIdentity_003E)); + if (num >= 0) + { + passportIdentity = new PassportIdentity((IPassportIdentity*)(*(ulong*)(&cComPtrNtv_003CIPassportIdentity_003E))); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPassportIdentity_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPassportIdentity_003E_002ERelease(&cComPtrNtv_003CIPassportIdentity_003E); + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return new HRESULT(num); + } + + public unsafe string GetXboxTicket() + { + //IL_0033: Expected I, but got I8 + //IL_0037: Expected I, but got I8 + //IL_0050: Expected I, but got I8 + //IL_0050: Expected I, but got I8 + string result = null; + if (m_pService != null && IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)); + ushort* ptr = null; + if (num >= 0) + { + long num2 = *(long*)(&cComPtrNtv_003CISignInState_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 32)))((nint)num2, &ptr); + if (num < 0) + { + goto IL_0066; + } + if (ptr != null) + { + result = Marshal.PtrToStringBSTR((IntPtr)ptr); + goto IL_0066; + } + } + goto end_IL_001a; + IL_0066: + if (ptr != null) + { + _003CModule_003E.SysFreeString(ptr); + } + end_IL_001a:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return result; + } + + public unsafe ulong GetPassportPuid() + { + //IL_0031: Expected I, but got I8 + //IL_0047: Expected I, but got I8 + //IL_0047: Expected I, but got I8 + ulong result = 0uL; + if (m_pService != null && IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)) >= 0) + { + long num = *(long*)(&cComPtrNtv_003CISignInState_003E); + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 80)))((nint)num); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return result; + } + + public unsafe ValueType GetUserGuid() + { + //IL_0034: Expected I, but got I8 + //IL_004e: Expected I, but got I8 + //IL_004e: Expected I, but got I8 + _GUID gUID_NULL = _003CModule_003E.GUID_NULL; + if (m_pService != null && IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)); + if (num >= 0) + { + long num2 = *(long*)(&cComPtrNtv_003CISignInState_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 64)))((nint)num2, &gUID_NULL); + if (num < 0) + { + gUID_NULL = _003CModule_003E.GUID_NULL; + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return _003CModule_003E.GUIDToGuid(gUID_NULL); + } + + public unsafe string GetLocale() + { + //IL_0033: Expected I, but got I8 + //IL_0037: Expected I, but got I8 + //IL_0050: Expected I, but got I8 + //IL_0050: Expected I, but got I8 + string result = null; + if (m_pService != null && IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)); + ushort* ptr = null; + if (num >= 0) + { + long num2 = *(long*)(&cComPtrNtv_003CISignInState_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 104)))((nint)num2, &ptr); + if (num < 0) + { + goto IL_0066; + } + if (ptr != null) + { + result = Marshal.PtrToStringBSTR((IntPtr)ptr); + goto IL_0066; + } + } + goto end_IL_001a; + IL_0066: + if (ptr != null) + { + _003CModule_003E.SysFreeString(ptr); + } + end_IL_001a:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool HasSignInLabelTakedown() + { + //IL_0030: Expected I, but got I8 + //IL_0049: Expected I, but got I8 + //IL_0049: Expected I, but got I8 + bool result = false; + if (m_pService != null && IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)) >= 0) + { + long num = *(long*)(&cComPtrNtv_003CISignInState_003E); + bool flag = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 248)))((nint)num) != 0) ? true : false); + result = flag; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool HasSignInBillingViolation() + { + //IL_0030: Expected I, but got I8 + //IL_0049: Expected I, but got I8 + //IL_0049: Expected I, but got I8 + bool result = false; + if (m_pService != null && IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)) >= 0) + { + long num = *(long*)(&cComPtrNtv_003CISignInState_003E); + bool flag = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 200)))((nint)num) != 0) ? true : false); + result = flag; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return result; + } + + public unsafe int GetPointsBalance() + { + //IL_0030: Expected I, but got I8 + //IL_0049: Expected I, but got I8 + //IL_0049: Expected I, but got I8 + int result = 0; + if (m_pService != null && IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)) >= 0) + { + long num = *(long*)(&cComPtrNtv_003CISignInState_003E); + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 144)))((nint)num); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return result; + } + + public unsafe void GetBalances(GetBalancesCompleteCallback completeCallback, GetBalancesErrorCallback errorCallback) + { + //IL_0022: Expected I, but got I8 + //IL_0046: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + if (m_pService != null) + { + GetBalancesCallbackWrapper* ptr = (GetBalancesCallbackWrapper*)_003CModule_003E.@new(32uL); + GetBalancesCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EService_002EGetBalancesCallbackWrapper_002E_007Bctor_007D(ptr, completeCallback, errorCallback)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + if (ptr2 != null) + { + IService* pService = m_pService; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 672)))((nint)pService, (IGetBalancesCallback*)ptr2); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + } + + public unsafe int GetSubscriptionFreeTrackBalance() + { + //IL_0030: Expected I, but got I8 + //IL_0049: Expected I, but got I8 + //IL_0049: Expected I, but got I8 + int result = 0; + if (m_pService != null && IsSignedInWithSubscription()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)) >= 0) + { + long num = *(long*)(&cComPtrNtv_003CISignInState_003E); + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 152)))((nint)num); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return result; + } + + public unsafe HRESULT GetOfferDetails(Guid offerId, GetOfferDetailsCompleteCallback completeCallback, GetOfferDetailsErrorCallback errorCallback, object state) + { + //IL_004a: Expected I, but got I8 + //IL_0090: Expected I, but got I8 + //IL_0090: Expected I, but got I8 + int num = 0; + num = (((long)(nint)m_pService == 0) ? (-2147467259) : num); + _GUID offerId2 = _003CModule_003E.GuidToGUID(offerId); + CComPtrNtv_003CIGetOfferDetailsCallback_003E cComPtrNtv_003CIGetOfferDetailsCallback_003E; + *(long*)(&cComPtrNtv_003CIGetOfferDetailsCallback_003E) = 0L; + HRESULT result; + try + { + if (num >= 0) + { + GetOfferDetailsCallbackWrapper* ptr = (GetOfferDetailsCallbackWrapper*)_003CModule_003E.@new(64uL); + GetOfferDetailsCallbackWrapper* p; + try + { + p = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EService_002EGetOfferDetailsCallbackWrapper_002E_007Bctor_007D(ptr, offerId2, state, m_pService, completeCallback, errorCallback)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + _003CModule_003E.CComPtrNtv_003CIGetOfferDetailsCallback_003E_002EAttach(&cComPtrNtv_003CIGetOfferDetailsCallback_003E, (IGetOfferDetailsCallback*)p); + num = ((*(long*)(&cComPtrNtv_003CIGetOfferDetailsCallback_003E) == 0) ? (-2147024882) : num); + if (num >= 0) + { + IService* pService = m_pService; + long num2 = *(long*)(&cComPtrNtv_003CIGetOfferDetailsCallback_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 688)))((nint)pService, 1, &offerId2, (IGetOfferDetailsCallback*)num2); + } + } + result = new HRESULT(num); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIGetOfferDetailsCallback_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIGetOfferDetailsCallback_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIGetOfferDetailsCallback_003E_002ERelease(&cComPtrNtv_003CIGetOfferDetailsCallback_003E); + return result; + } + + public unsafe void GetOffers(IList albumGuids, IList trackGuids, IList videoGuids, IList appGuids, IDictionary mapIdToContext, EGetOffersFlags eGetOffersFlags, string deviceEndpointId, GetOffersCompleteCallback completeCallback, GetOffersErrorCallback errorCallback) + { + //IL_0032: Expected I, but got I8 + //IL_004d: Expected I, but got I8 + //IL_006d: Expected I, but got I8 + //IL_011a: Expected I, but got I8 + //IL_011a: Expected I, but got I8 + //IL_013d: Expected I, but got I8 + //IL_013d: Expected I, but got I8 + //IL_013d: Expected I, but got I8 + //IL_013d: Expected I, but got I8 + //IL_013d: Expected I, but got I8 + //IL_0206: Expected I, but got I8 + //IL_0206: Expected I, but got I8 + //IL_0229: Expected I, but got I8 + //IL_0229: Expected I, but got I8 + //IL_0229: Expected I, but got I8 + //IL_0229: Expected I, but got I8 + //IL_0229: Expected I, but got I8 + //IL_029e: Expected I, but got I8 + //IL_029e: Expected I, but got I8 + //IL_029e: Expected I, but got I8 + //IL_029e: Expected I, but got I8 + //IL_029e: Expected I, but got I8 + //IL_02f2: Expected I, but got I8 + //IL_02f2: Expected I, but got I8 + //IL_02f2: Expected I, but got I8 + //IL_02f2: Expected I, but got I8 + //IL_02f2: Expected I, but got I8 + //IL_0336: Expected I, but got I8 + //IL_0347: Expected I, but got I8 + //IL_035a: Expected I, but got I8 + //The blocks IL_00eb, IL_014e are reachable both inside and outside the pinned region starting at IL_00e9. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + //The blocks IL_01e0, IL_023a are reachable both inside and outside the pinned region starting at IL_01df. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + //The blocks IL_0312, IL_0337, IL_033a, IL_0348, IL_034d are reachable both inside and outside the pinned region starting at IL_0310. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + if (m_pService == null) + { + return; + } + /*pinned*/ref ushort reference = ref *(ushort*)null; + try + { + int num = 0; + GetOffersCallbackWrapper* ptr = (GetOffersCallbackWrapper*)_003CModule_003E.@new(40uL); + GetOffersCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EService_002EGetOffersCallbackWrapper_002E_007Bctor_007D(ptr, completeCallback, errorCallback, mapIdToContext)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + num = (((long)(nint)ptr2 == 0) ? (-2147024882) : num); + IMediaCollection* ptr3 = null; + if (num < 0) + { + goto IL_0348; + } + IService* pService = m_pService; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 32)))((nint)pService, &ptr3); + if (num < 0) + { + goto IL_0337; + } + if (albumGuids != null) + { + IEnumerator enumerator = albumGuids.GetEnumerator(); + if (enumerator.MoveNext()) + { + do + { + if (num < 0) + { + continue; + } + Guid guid = (Guid)enumerator.Current; + string text = null; + if (mapIdToContext != null && mapIdToContext.Contains(guid)) + { + text = (string)mapIdToContext[guid]; + } + /*pinned*/ref ushort reference2 = ref *(ushort*)null; + try + { + CComPtrNtv_003CIContextData_003E cComPtrNtv_003CIContextData_003E; + IService* pService2; + ref ushort val; + int num3; + long num4; + IContextData** intPtr; + _GUID gUID; + IMediaCollection* intPtr2; + ref _GUID reference3; + int num5; + long num6; + long num7; + long num8; + long num9; + if (!string.IsNullOrEmpty(text)) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text))) + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ptr4; + num3 = -1; + num4 = 0L; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)(nint)val, (global::EDownloadContextEvent)num3, (ushort*)num4, intPtr); + gUID = _003CModule_003E.GuidToGUID(guid); + intPtr2 = ptr3; + reference3 = ref gUID; + num5 = 1; + num6 = 0L; + num7 = 0L; + num8 = 0L; + num9 = *(long*)(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr3 + 40)))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference3), (global::EContentType)num5, (ushort*)num6, (ushort*)num7, (ushort*)num8, (IContextData*)num9); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + else + { + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bctor_007D(&cComPtrNtv_003CIContextData_003E); + try + { + long num2 = *(long*)m_pService + 120; + pService2 = m_pService; + val = ref reference2; + num3 = -1; + num4 = 0L; + intPtr = _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_0026(&cComPtrNtv_003CIContextData_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService2, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref val), (global::EDownloadContextEvent)num3, (ushort*)num4, intPtr); + gUID = _003CModule_003E.GuidToGUID(guid); + intPtr2 = ptr3; + reference3 = ref gUID; + num5 = 1; + num6 = 0L; + num7 = 0L; + num8 = 0L; + num9 = *(long*)(&cComPtrNtv_003CIContextData_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr3 + 40)))((nint)intPtr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference3), (global::EContentType)num5, (ushort*)num6, (ushort*)num7, (ushort*)num8, (IContextData*)num9); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + } + catch + { + //try-fault + reference2 = ref *(ushort*)null; + throw; + } + reference2 = ref *(ushort*)null; + } + while (enumerator.MoveNext()); + } + } + if (trackGuids != null) + { + IEnumerator enumerator2 = trackGuids.GetEnumerator(); + if (enumerator2.MoveNext()) + { + do + { + if (num < 0) + { + continue; + } + Guid guid2 = (Guid)enumerator2.Current; + string text2 = null; + if (mapIdToContext != null && mapIdToContext.Contains(guid2)) + { + text2 = (string)mapIdToContext[guid2]; + } + /*pinned*/ref ushort reference4 = ref *(ushort*)null; + try + { + CComPtrNtv_003CIContextData_003E cComPtrNtv_003CIContextData_003E2; + IService* pService3; + _GUID gUID2; + IMediaCollection* intPtr3; + ref _GUID reference5; + int num11; + long num12; + long num13; + long num14; + long num15; + if (!string.IsNullOrEmpty(text2)) + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(text2))) + { + *(long*)(&cComPtrNtv_003CIContextData_003E2) = 0L; + try + { + long num10 = *(long*)m_pService + 120; + pService3 = m_pService; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num10))((nint)pService3, ptr5, (global::EDownloadContextEvent)(-1), null, (IContextData**)(&cComPtrNtv_003CIContextData_003E2)); + gUID2 = _003CModule_003E.GuidToGUID(guid2); + intPtr3 = ptr3; + reference5 = ref gUID2; + num11 = 0; + num12 = 0L; + num13 = 0L; + num14 = 0L; + num15 = *(long*)(&cComPtrNtv_003CIContextData_003E2); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr3 + 40)))((nint)intPtr3, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference5), (global::EContentType)num11, (ushort*)num12, (ushort*)num13, (ushort*)num14, (IContextData*)num15); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E2); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E2); + } + } + else + { + *(long*)(&cComPtrNtv_003CIContextData_003E2) = 0L; + try + { + long num10 = *(long*)m_pService + 120; + pService3 = m_pService; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num10))((nint)pService3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference4), (global::EDownloadContextEvent)(-1), null, (IContextData**)(&cComPtrNtv_003CIContextData_003E2)); + gUID2 = _003CModule_003E.GuidToGUID(guid2); + intPtr3 = ptr3; + reference5 = ref gUID2; + num11 = 0; + num12 = 0L; + num13 = 0L; + num14 = 0L; + num15 = *(long*)(&cComPtrNtv_003CIContextData_003E2); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr3 + 40)))((nint)intPtr3, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference5), (global::EContentType)num11, (ushort*)num12, (ushort*)num13, (ushort*)num14, (IContextData*)num15); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E2); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E2); + } + } + catch + { + //try-fault + reference4 = ref *(ushort*)null; + throw; + } + reference4 = ref *(ushort*)null; + } + while (enumerator2.MoveNext()); + } + } + if (videoGuids != null) + { + IEnumerator enumerator3 = videoGuids.GetEnumerator(); + if (enumerator3.MoveNext()) + { + do + { + if (num >= 0) + { + _GUID gUID3 = _003CModule_003E.GuidToGUID((Guid)enumerator3.Current); + IMediaCollection* intPtr4 = ptr3; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr3 + 40)))((nint)intPtr4, &gUID3, (global::EContentType)3, null, null, null, null); + } + } + while (enumerator3.MoveNext()); + } + } + if (appGuids != null) + { + IEnumerator enumerator4 = appGuids.GetEnumerator(); + if (enumerator4.MoveNext()) + { + do + { + if (num >= 0) + { + _GUID gUID4 = _003CModule_003E.GuidToGUID((Guid)enumerator4.Current); + IMediaCollection* intPtr5 = ptr3; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr3 + 40)))((nint)intPtr5, &gUID4, (global::EContentType)7, null, null, null, null); + } + } + while (enumerator4.MoveNext()); + } + } + if (num < 0) + { + goto IL_0337; + } + IService* pService4; + IMediaCollection* intPtr6; + if (string.IsNullOrEmpty(deviceEndpointId)) + { + long num16 = *(long*)m_pService + 680; + pService4 = m_pService; + intPtr6 = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num16))((nint)pService4, intPtr6, (IGetOffersCallback*)ptr2, (global::EGetOffersFlags)eGetOffersFlags, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref reference)); + goto IL_0337; + } + IMediaCollection* intPtr7; + GetOffersCallbackWrapper* intPtr8; + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(deviceEndpointId))) + { + long num16 = *(long*)m_pService + 680; + pService4 = m_pService; + intPtr6 = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num16))((nint)pService4, intPtr6, (IGetOffersCallback*)ptr2, (global::EGetOffersFlags)eGetOffersFlags, ptr6); + if (ptr3 != null) + { + intPtr7 = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr7 + 16)))((nint)intPtr7); + } + if (ptr2 != null) + { + intPtr8 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr8 + 16)))((nint)intPtr8); + } + } + goto end_IL_000f; + IL_0337: + if (ptr3 != null) + { + intPtr7 = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr7 + 16)))((nint)intPtr7); + } + goto IL_0348; + IL_0348: + if (ptr2 != null) + { + intPtr8 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr8 + 16)))((nint)intPtr8); + } + end_IL_000f:; + } + catch + { + //try-fault + reference = ref *(ushort*)null; + throw; + } + reference = ref *(ushort*)null; + } + + public unsafe void PurchaseOffers(PaymentInstrument payment, AlbumOfferCollection albumOffers, TrackOfferCollection trackOffers, VideoOfferCollection videoOffers, AppOfferCollection appOffers, EPurchaseOffersFlags ePurchaseOffersFlags, PurchaseOffersCompleteHandler purchaseOffersHandler) + { + //IL_0039: Expected I, but got I8 + //IL_0055: Expected I, but got I8 + //IL_0068: Expected I, but got I8 + //IL_007a: Expected I, but got I8 + //IL_008d: Expected I, but got I8 + //IL_00ee: Expected I, but got I8 + //IL_010c: Expected I, but got I8 + //IL_011f: Expected I, but got I8 + //IL_0130: Expected I, but got I8 + //IL_0141: Expected I, but got I8 + //IL_0152: Expected I, but got I8 + if (null == payment) + { + throw new ArgumentNullException("payment"); + } + if (m_pService == null) + { + return; + } + int num = 0; + PurchaseOffersCallbackWrapper* ptr = (PurchaseOffersCallbackWrapper*)_003CModule_003E.@new(24uL); + PurchaseOffersCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EPurchaseOffersCallbackWrapper_002E_007Bctor_007D(ptr, purchaseOffersHandler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + num = (((long)(nint)ptr2 == 0) ? (-2147024882) : num); + IMusicAlbumCollection* ptr3 = null; + if (num >= 0 && albumOffers != null) + { + ptr3 = albumOffers.GetCollection(); + } + IMusicTrackCollection* ptr4 = null; + if (num >= 0 && trackOffers != null) + { + ptr4 = trackOffers.GetCollection(); + } + IVideoCollection* ptr5 = null; + if (num >= 0 && videoOffers != null) + { + ptr5 = videoOffers.GetCollection(); + } + IAppCollection* ptr6 = null; + if (num >= 0 && appOffers != null) + { + ptr6 = appOffers.GetCollection(); + } + EMediaPaymentType eMediaPaymentType = (EMediaPaymentType)(-1); + if (num >= 0) + { + num = PaymentTypeToMediaPaymentType(payment.Type, &eMediaPaymentType); + if (num >= 0) + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(payment.Id))) + { + try + { + long num2 = *(long*)m_pService + 712; + IService* pService = m_pService; + EMediaPaymentType num3 = eMediaPaymentType; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService, num3, ptr7, ptr3, ptr4, ptr5, ptr6, (global::EPurchaseOffersFlags)ePurchaseOffersFlags, (IPurchaseOffersCallback*)ptr2); + } + catch + { + //try-fault + ptr7 = null; + throw; + } + } + } + } + if (ptr3 != null) + { + IMusicAlbumCollection* intPtr = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + } + if (ptr4 != null) + { + IMusicTrackCollection* intPtr2 = ptr4; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + if (ptr5 != null) + { + IVideoCollection* intPtr3 = ptr5; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + } + if (ptr6 != null) + { + IAppCollection* intPtr4 = ptr6; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr4 + 16)))((nint)intPtr4); + } + if (ptr2 != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool ReportFavouriteArtists(Guid userId, IList artists, AsyncCompleteHandler callback) + { + //IL_0027: Expected I, but got I8 + //IL_00af: Expected I, but got I8 + //IL_00e1: Expected I, but got I8 + //IL_00f6: Expected I, but got I8 + int num; + if (m_pService != null) + { + AsyncCallbackWrapper* ptr = (AsyncCallbackWrapper*)_003CModule_003E.@new(24uL); + AsyncCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EAsyncCallbackWrapper_002E_007Bctor_007D(ptr, callback)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + if (ptr2 == null) + { + num = -2147024882; + goto IL_0103; + } + _GUID gUID = _003CModule_003E.GuidToGUID(userId); + ulong num2 = (ulong)artists.Count; + _GUID* ptr3 = (_GUID*)_003CModule_003E.new_005B_005D((num2 > 1152921504606846975L) ? ulong.MaxValue : (num2 * 16)); + int num3 = 0; + if (0 < artists.Count) + { + _GUID* ptr4 = ptr3; + do + { + _GUID gUID2 = _003CModule_003E.GuidToGUID((Guid)artists[num3]); + // IL cpblk instruction + System.Runtime.CompilerServices.Unsafe.CopyBlockUnaligned(ptr4, ref gUID2, 16); + num3++; + ptr4 = (_GUID*)((ulong)(nint)ptr4 + 16uL); + } + while (num3 < artists.Count); + } + long num4 = *(long*)m_pService + 528; + IService* pService = m_pService; + int count = artists.Count; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)pService, gUID, count, ptr3, (IAsyncCallback*)ptr2); + _003CModule_003E.delete_005B_005D(ptr3); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + else + { + num = -2147467259; + } + if (num >= 0) + { + return true; + } + goto IL_0103; + IL_0103: + if (callback != null) + { + HRESULT hr = num; + callback(hr); + } + return false; + } + + public unsafe int VerifyToken(string token, out TokenDetails tokenDetails) + { + //IL_0038: Expected I, but got I8 + //IL_0048: Expected I, but got I8 + int num = 0; + tokenDetails = null; + if (m_pService != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(token))) + { + try + { + CComPtrNtv_003CITokenDetails_003E cComPtrNtv_003CITokenDetails_003E; + *(long*)(&cComPtrNtv_003CITokenDetails_003E) = 0L; + try + { + long num2 = *(long*)m_pService + 536; + IService* pService = m_pService; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService, ptr, (ITokenDetails**)(&cComPtrNtv_003CITokenDetails_003E)); + if (num >= 0) + { + tokenDetails = new TokenDetails((ITokenDetails*)(*(ulong*)(&cComPtrNtv_003CITokenDetails_003E))); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CITokenDetails_003E_002E_007Bdtor_007D), &cComPtrNtv_003CITokenDetails_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CITokenDetails_003E_002ERelease(&cComPtrNtv_003CITokenDetails_003E); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return num; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool ReportAConcern(EConcernType concernType, EContentType contentType, Guid mediaId, string message, AsyncCompleteHandler callback) + { + //IL_0025: Expected I, but got I8 + //IL_006d: Expected I, but got I8 + //IL_0084: Expected I, but got I8 + int num; + if (m_pService != null) + { + AsyncCallbackWrapper* ptr = (AsyncCallbackWrapper*)_003CModule_003E.@new(24uL); + AsyncCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EAsyncCallbackWrapper_002E_007Bctor_007D(ptr, callback)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + if (ptr2 == null) + { + num = -2147024882; + goto IL_0091; + } + _GUID gUID = _003CModule_003E.GuidToGUID(mediaId); + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(message))) + { + try + { + long num2 = *(long*)m_pService + 520; + IService* pService = m_pService; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService, (global::EConcernType)concernType, (global::EContentType)contentType, gUID, ptr3, (IAsyncCallback*)ptr2); + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + else + { + num = -2147467259; + } + if (num >= 0) + { + return true; + } + goto IL_0091; + IL_0091: + if (callback != null) + { + HRESULT hr = num; + callback(hr); + } + return false; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool PostAppReview(Guid mediaId, string title, string comment, int rating, AsyncCompleteHandler callback) + { + //IL_0028: Expected I, but got I8 + //IL_0078: Expected I, but got I8 + //IL_0098: Expected I, but got I8 + int num; + if (m_pService != null) + { + AsyncCallbackWrapper* ptr = (AsyncCallbackWrapper*)_003CModule_003E.@new(24uL); + AsyncCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EAsyncCallbackWrapper_002E_007Bctor_007D(ptr, callback)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + if (ptr2 == null) + { + num = -2147024882; + goto IL_00a5; + } + _GUID gUID = _003CModule_003E.GuidToGUID(mediaId); + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(title))) + { + try + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(comment))) + { + try + { + long num2 = *(long*)m_pService + 544; + IService* pService = m_pService; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService, &gUID, ptr3, ptr4, rating, (IAsyncCallback*)ptr2); + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + else + { + num = -2147467259; + } + if (num >= 0) + { + return true; + } + goto IL_00a5; + IL_00a5: + if (callback != null) + { + HRESULT hr = num; + callback(hr); + } + return false; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool LaunchBrowserForExternalUrl(string strUrl, EPassportPolicyId ePassportPolicy) + { + //IL_0031: Expected I, but got I8 + //IL_0031: Expected I, but got I8 + bool result = false; + if (m_pService != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strUrl))) + { + try + { + long num = *(long*)m_pService + 816; + IService* pService = m_pService; + result = (byte)((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pService, ptr, (EPassportPolicy)ePassportPolicy, null) >= 0) ? 1u : 0u) != 0; + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool GetAlbumIdFromCompId(string compId, out Guid guidAlbum) + { + //IL_003b: Expected I, but got I8 + bool result = false; + if (m_pService != null) + { + MusicAlbumMetadata musicAlbumMetadata; + _003CModule_003E.MusicAlbumMetadata_002E_007Bctor_007D(&musicAlbumMetadata); + try + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(compId))) + { + try + { + long num = *(long*)m_pService + 832; + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pService, ptr, &musicAlbumMetadata) >= 0) + { + Guid guid = (guidAlbum = _003CModule_003E.GUIDToGuid(System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicAlbumMetadata, 8)))); + result = true; + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.MusicAlbumMetadata_002E_007Bdtor_007D), &musicAlbumMetadata); + throw; + } + *(long*)(&musicAlbumMetadata) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_7MusicAlbumMetadata_0040_00406B_0040); + _003CModule_003E.MusicAlbumMetadata_002EClear(&musicAlbumMetadata); + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool GetMusicVideoIdFromCompId(string compId, out Guid guidMusicVideo) + { + //IL_0030: Expected I, but got I8 + bool result = false; + if (m_pService != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(compId))) + { + try + { + long num = *(long*)m_pService + 840; + IService* pService = m_pService; + _GUID guid; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pService, ptr, &guid) >= 0) + { + Guid guid2 = (guidMusicVideo = _003CModule_003E.GUIDToGuid(guid)); + result = true; + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return result; + } + + public unsafe DRMInfo GetFileDRMInfo(string filePath) + { + //IL_003b: Expected I, but got I8 + DRMInfo result = null; + if (m_pService != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(filePath))) + { + try + { + long num = *(long*)m_pService + 568; + IService* pService = m_pService; + DRMQueryState eCanPlay; + _FILETIME fILETIME; + int num2; + int num3; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pService, ptr, &eCanPlay, &fILETIME, &num2, &num3) >= 0) + { + long num4 = (long)(uint)System.Runtime.CompilerServices.Unsafe.As<_FILETIME, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref fILETIME, 4)) * 4294967296L + (uint)(*(int*)(&fILETIME)); + DateTime expiryDate = DateTime.MaxValue; + if (num4 > 0) + { + try + { + expiryDate = DateTime.FromFileTime(num4); + } + catch (ArgumentOutOfRangeException) + { + } + } + bool canBurn = ((num3 != 0) ? true : false); + bool canSync = ((num2 != 0) ? true : false); + result = new DRMInfo(eCanPlay, expiryDate, canSync, canBurn); + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return result; + } + + public unsafe DRMInfo GetMediaDRMInfo(Guid mediaId, EContentType eContentType) + { + //IL_0037: Expected I, but got I8 + DRMInfo result = null; + if (m_pService != null) + { + _GUID gUID = _003CModule_003E.GuidToGUID(mediaId); + IService* pService = m_pService; + DRMQueryState eCanPlay; + _FILETIME fILETIME; + int num; + int num2; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 576)))((nint)pService, gUID, (global::EContentType)eContentType, &eCanPlay, &fILETIME, &num, &num2) >= 0) + { + long num3 = (long)(uint)System.Runtime.CompilerServices.Unsafe.As<_FILETIME, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref fILETIME, 4)) * 4294967296L + (uint)(*(int*)(&fILETIME)); + DateTime expiryDate = DateTime.MaxValue; + if (num3 > 0) + { + try + { + expiryDate = DateTime.FromFileTime(num3); + } + catch (ArgumentOutOfRangeException) + { + } + } + bool canBurn = ((num2 != 0) ? true : false); + bool canSync = ((num != 0) ? true : false); + result = new DRMInfo(eCanPlay, expiryDate, canSync, canBurn); + } + } + return result; + } + + public unsafe ulong GetSubscriptionOfferId() + { + //IL_0029: Expected I, but got I8 + //IL_0042: Expected I, but got I8 + //IL_0042: Expected I, but got I8 + ulong result = 0uL; + if (IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)) >= 0) + { + long num = *(long*)(&cComPtrNtv_003CISignInState_003E); + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 208)))((nint)num); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return result; + } + + public unsafe ulong GetSubscriptionRenewalOfferId() + { + //IL_0029: Expected I, but got I8 + //IL_0042: Expected I, but got I8 + //IL_0042: Expected I, but got I8 + ulong result = 0uL; + if (IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)) >= 0) + { + long num = *(long*)(&cComPtrNtv_003CISignInState_003E); + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 216)))((nint)num); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return result; + } + + public unsafe DateTime GetSubscriptionEndDate() + { + //IL_0030: Expected I, but got I8 + //IL_0034: Expected I, but got I8 + //IL_0050: Expected I, but got I8 + //IL_0050: Expected I, but got I8 + DateTime result = DateTime.MaxValue; + if (IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)); + ushort* ptr = null; + string text = null; + if (num >= 0) + { + long num2 = *(long*)(&cComPtrNtv_003CISignInState_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 224)))((nint)num2, &ptr); + if (num >= 0) + { + if (ptr == null) + { + goto IL_006d; + } + text = Marshal.PtrToStringBSTR((IntPtr)ptr); + } + if (ptr != null) + { + _003CModule_003E.SysFreeString(ptr); + } + } + goto IL_006d; + IL_006d: + if (text != (string)null && text.Length > 0) + { + DateTime.TryParse(text, out result); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return result; + } + + public unsafe DateTime GetSubscriptionFreeTrackExpiration() + { + //IL_0030: Expected I, but got I8 + //IL_0034: Expected I, but got I8 + //IL_0050: Expected I, but got I8 + //IL_0050: Expected I, but got I8 + DateTime result = DateTime.MaxValue; + if (IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)); + ushort* ptr = null; + string text = null; + if (num >= 0) + { + long num2 = *(long*)(&cComPtrNtv_003CISignInState_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 232)))((nint)num2, &ptr); + if (num >= 0) + { + if (ptr == null) + { + goto IL_006d; + } + text = Marshal.PtrToStringBSTR((IntPtr)ptr); + } + if (ptr != null) + { + _003CModule_003E.SysFreeString(ptr); + } + } + goto IL_006d; + IL_006d: + if (text != (string)null && text.Length > 0) + { + DateTime.TryParse(text, null, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out result); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool SubscriptionPendingCancel() + { + //IL_0028: Expected I, but got I8 + //IL_0041: Expected I, but got I8 + //IL_0041: Expected I, but got I8 + bool flag = false; + if (IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)) >= 0) + { + long num = *(long*)(&cComPtrNtv_003CISignInState_003E); + flag = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 240)))((nint)num) != 0 || flag; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return flag; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool IsParentallyControlled() + { + //IL_0028: Expected I, but got I8 + //IL_003e: Expected I, but got I8 + //IL_003e: Expected I, but got I8 + bool result = false; + if (IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)) >= 0) + { + long num = *(long*)(&cComPtrNtv_003CISignInState_003E); + bool flag = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 120)))((nint)num) != 0) ? true : false); + result = flag; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool IsLightWeight() + { + //IL_0028: Expected I, but got I8 + //IL_0041: Expected I, but got I8 + //IL_0041: Expected I, but got I8 + bool result = false; + if (IsSignedIn()) + { + CComPtrNtv_003CISignInState_003E cComPtrNtv_003CISignInState_003E; + *(long*)(&cComPtrNtv_003CISignInState_003E) = 0L; + try + { + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 344)))((nint)pService, (ISignInState**)(&cComPtrNtv_003CISignInState_003E)) >= 0) + { + long num = *(long*)(&cComPtrNtv_003CISignInState_003E); + bool flag = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CISignInState_003E)) + 128)))((nint)num) != 0) ? true : false); + result = flag; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISignInState_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISignInState_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISignInState_003E_002ERelease(&cComPtrNtv_003CISignInState_003E); + } + return result; + } + + public unsafe void GetPaymentInstruments(GetPaymentInstrumentsCompleteCallback completeCallback, GetPaymentInstrumentsErrorCallback errorCallback) + { + //IL_0022: Expected I, but got I8 + //IL_0046: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + if (m_pService != null) + { + GetPaymentInstrumentsCallbackWrapper* ptr = (GetPaymentInstrumentsCallbackWrapper*)_003CModule_003E.@new(32uL); + GetPaymentInstrumentsCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EService_002EGetPaymentInstrumentsCallbackWrapper_002E_007Bctor_007D(ptr, completeCallback, errorCallback)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + if (ptr2 != null) + { + IService* pService = m_pService; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 792)))((nint)pService, (IGetPaymentInstrumentsCallback*)ptr2); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + } + + public unsafe int AddPaymentInstrument(PaymentInstrument paymentInstrument, AddPaymentInstrumentCompleteCallback completeCallback, AddPaymentInstrumentErrorCallback errorCallback) + { + //IL_003c: Expected I, but got I8 + //IL_0157: Expected I, but got I8 + //IL_01e9: Expected I, but got I8 + CreditCard creditCard = paymentInstrument as CreditCard; + int result; + if (m_pService != null && creditCard == null) + { + result = -2147467259; + } + else + { + AddPaymentInstrumentCallbackWrapper* ptr = (AddPaymentInstrumentCallbackWrapper*)_003CModule_003E.@new(40uL); + AddPaymentInstrumentCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EService_002EAddPaymentInstrumentCallbackWrapper_002E_007Bctor_007D(ptr, creditCard, completeCallback, errorCallback)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + if (ptr2 == null) + { + result = -2147024882; + } + else + { + _SYSTEMTIME sYSTEMTIME = _003CModule_003E.DateTimeToSystemTime(creditCard.ExpirationDate); + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.Address.Street1))) + { + try + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.Address.Street2))) + { + try + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.Address.City))) + { + try + { + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.Address.District))) + { + try + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.Address.State))) + { + try + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.Address.PostalCode))) + { + try + { + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.PhonePrefix))) + { + try + { + fixed (ushort* ptr10 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.PhoneNumber))) + { + try + { + fixed (ushort* ptr11 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.PhoneExtension))) + { + try + { + fixed (ushort* ptr12 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.AccountHolderName))) + { + try + { + fixed (ushort* ptr13 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.AccountNumber))) + { + try + { + fixed (ushort* ptr14 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.CCVNumber))) + { + try + { + long num = *(long*)m_pService + 808; + IService* pService = m_pService; + _003F val = ptr3; + _003F val2 = ptr4; + _003F val3 = ptr5; + _003F val4 = ptr6; + _003F val5 = ptr7; + _003F val6 = ptr8; + _003F val7 = ptr9; + _003F val8 = ptr10; + _003F val9 = ptr11; + CreditCardType creditCardType = creditCard.CreditCardType; + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pService, (ushort*)(nint)val, (ushort*)(nint)val2, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, (ushort*)(nint)val6, (ushort*)(nint)val7, (ushort*)(nint)val8, (ushort*)(nint)val9, (ECreditCardType)creditCardType, ptr12, ptr13, ptr14, sYSTEMTIME, (IAddPaymentInstrumentCallback*)ptr2); + } + catch + { + //try-fault + ptr14 = null; + throw; + } + } + } + catch + { + //try-fault + ptr13 = null; + throw; + } + } + } + catch + { + //try-fault + ptr12 = null; + throw; + } + } + } + catch + { + //try-fault + ptr11 = null; + throw; + } + } + } + catch + { + //try-fault + ptr10 = null; + throw; + } + } + } + catch + { + //try-fault + ptr9 = null; + throw; + } + } + } + catch + { + //try-fault + ptr8 = null; + throw; + } + } + } + catch + { + //try-fault + ptr7 = null; + throw; + } + } + } + catch + { + //try-fault + ptr6 = null; + throw; + } + } + } + catch + { + //try-fault + ptr5 = null; + throw; + } + } + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + if (ptr2 != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + } + return result; + } + + public unsafe int AddPaymentInstrument(PaymentInstrument paymentInstrument, out string paymentId, out ServiceError serviceError) + { + //IL_0138: Expected I, but got I8 + //IL_01c6: Expected I, but got I8 + //IL_01d5: Expected I, but got I8 + CreditCard creditCard = paymentInstrument as CreditCard; + int num = 0; + if (m_pService == null || creditCard == null) + { + num = -2147467259; + } + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + try + { + CComPtrNtv_003CIServiceError_003E cComPtrNtv_003CIServiceError_003E; + *(long*)(&cComPtrNtv_003CIServiceError_003E) = 0L; + try + { + if (num >= 0) + { + _SYSTEMTIME sYSTEMTIME = _003CModule_003E.DateTimeToSystemTime(creditCard.ExpirationDate); + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.Address.Street1))) + { + try + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.Address.Street2))) + { + try + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.Address.City))) + { + try + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.Address.District))) + { + try + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.Address.State))) + { + try + { + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.Address.PostalCode))) + { + try + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.PhonePrefix))) + { + try + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.PhoneNumber))) + { + try + { + fixed (ushort* ptr9 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.PhoneExtension))) + { + try + { + fixed (ushort* ptr10 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.AccountHolderName))) + { + try + { + fixed (ushort* ptr11 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.AccountNumber))) + { + try + { + fixed (ushort* ptr12 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(creditCard.CCVNumber))) + { + try + { + long num2 = *(long*)m_pService + 800; + IService* pService = m_pService; + _003F val = ptr; + _003F val2 = ptr2; + _003F val3 = ptr3; + _003F val4 = ptr4; + _003F val5 = ptr5; + _003F val6 = ptr6; + _003F val7 = ptr7; + _003F val8 = ptr8; + _003F val9 = ptr9; + CreditCardType creditCardType = creditCard.CreditCardType; + _003F val10 = ptr10; + _003F val11 = ptr11; + _003F val12 = ptr12; + IServiceError** intPtr = _003CModule_003E.CComPtrNtv_003CIServiceError_003E_002E_0026(&cComPtrNtv_003CIServiceError_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService, (ushort*)(nint)val, (ushort*)(nint)val2, (ushort*)(nint)val3, (ushort*)(nint)val4, (ushort*)(nint)val5, (ushort*)(nint)val6, (ushort*)(nint)val7, (ushort*)(nint)val8, (ushort*)(nint)val9, (ECreditCardType)creditCardType, (ushort*)(nint)val10, (ushort*)(nint)val11, (ushort*)(nint)val12, sYSTEMTIME, (ushort**)(&wBSTRString), intPtr); + } + catch + { + //try-fault + ptr12 = null; + throw; + } + } + } + catch + { + //try-fault + ptr11 = null; + throw; + } + } + } + catch + { + //try-fault + ptr10 = null; + throw; + } + } + } + catch + { + //try-fault + ptr9 = null; + throw; + } + } + } + catch + { + //try-fault + ptr8 = null; + throw; + } + } + } + catch + { + //try-fault + ptr7 = null; + throw; + } + } + } + catch + { + //try-fault + ptr6 = null; + throw; + } + } + } + catch + { + //try-fault + ptr5 = null; + throw; + } + } + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + if (num >= 0) + { + paymentId = new string((char*)(*(ulong*)(&wBSTRString))); + } + } + if (*(long*)(&cComPtrNtv_003CIServiceError_003E) != 0L) + { + serviceError = new ServiceError((IServiceError*)(*(ulong*)(&cComPtrNtv_003CIServiceError_003E))); + } + else + { + serviceError = null; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIServiceError_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIServiceError_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIServiceError_003E_002ERelease(&cComPtrNtv_003CIServiceError_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + return num; + } + + public unsafe void GetSubscriptionOffers(GetBillingOffersCompleteCallback completeCallback, GetBillingOffersErrorCallback errorCallback) + { + //IL_0022: Expected I, but got I8 + //IL_0046: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + if (m_pService != null) + { + GetBillingOffersCallbackWrapper* ptr = (GetBillingOffersCallbackWrapper*)_003CModule_003E.@new(32uL); + GetBillingOffersCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EService_002EGetBillingOffersCallbackWrapper_002E_007Bctor_007D(ptr, completeCallback, errorCallback)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + if (ptr2 != null) + { + IService* pService = m_pService; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 736)))((nint)pService, (IGetBillingOffersCallback*)ptr2); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + } + + public unsafe void GetSubscriptionDetails(ulong offerId, GetBillingOffersCompleteCallback completeCallback, GetBillingOffersErrorCallback errorCallback) + { + //IL_0022: Expected I, but got I8 + //IL_0047: Expected I, but got I8 + //IL_0055: Expected I, but got I8 + if (m_pService != null) + { + GetBillingOffersCallbackWrapper* ptr = (GetBillingOffersCallbackWrapper*)_003CModule_003E.@new(32uL); + GetBillingOffersCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EService_002EGetBillingOffersCallbackWrapper_002E_007Bctor_007D(ptr, completeCallback, errorCallback)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + if (ptr2 != null) + { + IService* pService = m_pService; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 744)))((nint)pService, offerId, (IGetBillingOffersCallback*)ptr2); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + } + + public unsafe void GetPointsOffers(GetBillingOffersCompleteCallback completeCallback, GetBillingOffersErrorCallback errorCallback) + { + //IL_0022: Expected I, but got I8 + //IL_0046: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + if (m_pService != null) + { + GetBillingOffersCallbackWrapper* ptr = (GetBillingOffersCallbackWrapper*)_003CModule_003E.@new(32uL); + GetBillingOffersCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EService_002EGetBillingOffersCallbackWrapper_002E_007Bctor_007D(ptr, completeCallback, errorCallback)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + if (ptr2 != null) + { + IService* pService = m_pService; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 752)))((nint)pService, (IGetBillingOffersCallback*)ptr2); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + } + + public unsafe int PurchaseBillingOffer(BillingOffer offer, PaymentInstrument paymentInstrument, AsyncCompleteHandler callback) + { + //IL_0019: Expected I, but got I8 + //IL_0039: Expected I, but got I8 + //IL_00ac: Expected I, but got I8 + //IL_00c6: Expected I, but got I8 + int num = 0; + if (m_pService == null || offer == null || paymentInstrument == null) + { + num = -2147467259; + } + AsyncCallbackWrapper* ptr = null; + if (num >= 0) + { + AsyncCallbackWrapper* ptr2 = (AsyncCallbackWrapper*)_003CModule_003E.@new(24uL); + AsyncCallbackWrapper* ptr3; + try + { + ptr3 = ((ptr2 == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EAsyncCallbackWrapper_002E_007Bctor_007D(ptr2, callback)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr2); + throw; + } + ptr = ptr3; + num = (((long)(nint)ptr3 == 0) ? (-2147024882) : num); + } + EBillingPaymentType eBillingPaymentType = (EBillingPaymentType)(-1); + if (num >= 0) + { + num = PaymentTypeToBillingPaymentType(paymentInstrument.Type, &eBillingPaymentType); + if (num >= 0) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(paymentInstrument.Id))) + { + try + { + long num2 = *(long*)m_pService + 768; + IService* pService = m_pService; + ulong id = offer.Id; + EBillingOfferType offerType = offer.OfferType; + _003F val = ptr4; + EBillingPaymentType num3 = eBillingPaymentType; + uint points = offer.Points; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService, id, (global::EBillingOfferType)offerType, (ushort*)(nint)val, num3, (int)points, (IAsyncCallback*)ptr); + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + } + if (ptr != null) + { + AsyncCallbackWrapper* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + } + return num; + } + + public unsafe int PurchaseBillingOffer(BillingOffer offer, PaymentInstrument paymentInstrument) + { + //IL_006a: Expected I, but got I8 + int num = 0; + if (m_pService == null || offer == null || paymentInstrument == null) + { + num = -2147467259; + } + EBillingPaymentType eBillingPaymentType = (EBillingPaymentType)(-1); + if (num >= 0) + { + num = PaymentTypeToBillingPaymentType(paymentInstrument.Type, &eBillingPaymentType); + if (num >= 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(paymentInstrument.Id))) + { + try + { + long num2 = *(long*)m_pService + 760; + IService* pService = m_pService; + ulong id = offer.Id; + EBillingOfferType offerType = offer.OfferType; + _003F val = ptr; + EBillingPaymentType num3 = eBillingPaymentType; + uint points = offer.Points; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pService, id, (global::EBillingOfferType)offerType, (ushort*)(nint)val, num3, (int)points); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + } + return num; + } + + public unsafe string GetMachineId() + { + //IL_000f: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + string result = null; + IService* pService = m_pService; + if (pService != null) + { + ushort* ptr = null; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 928)))((nint)pService, &ptr) >= 0) + { + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + } + return result; + } + + public unsafe int ResumePurchase(string resumeHandle, string authorizationToken, AsyncCompleteHandler callback) + { + //IL_0019: Expected I, but got I8 + //IL_0051: Expected I, but got I8 + AsyncCallbackWrapper* ptr = (AsyncCallbackWrapper*)_003CModule_003E.@new(24uL); + AsyncCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EAsyncCallbackWrapper_002E_007Bctor_007D(ptr, callback)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(resumeHandle))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(authorizationToken))) + { + long num = *(long*)m_pService + 728; + IService* pService = m_pService; + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pService, ptr3, ptr4, (IAsyncCallback*)ptr2); + } + } + } + + public unsafe CountryBaseDetails[] GetCountryDetails() + { + //IL_002f: Expected I, but got I8 + //IL_0048: Expected I, but got I8 + //IL_0048: Expected I, but got I8 + //IL_0071: Expected I, but got I8 + //IL_0071: Expected I, but got I8 + //IL_0075: Expected I, but got I8 + //IL_00ee: Expected I, but got I8 + //IL_00ee: Expected I, but got I8 + //IL_010e: Expected I, but got I8 + //IL_0112: Expected I, but got I8 + //IL_0116: Expected I, but got I8 + //IL_011a: Expected I, but got I8 + //IL_0139: Expected I, but got I8 + //IL_0139: Expected I, but got I8 + //IL_019f: Expected I, but got I8 + //IL_01bf: Expected I, but got I8 + //IL_01cd: Expected I, but got I8 + //IL_021c: Expected I, but got I8 + CountryBaseDetails[] array = null; + if (m_pService != null) + { + CComPtrNtv_003CITunerConfig_003E cComPtrNtv_003CITunerConfig_003E; + *(long*)(&cComPtrNtv_003CITunerConfig_003E) = 0L; + try + { + IService* pService = m_pService; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 176)))((nint)pService, (ITunerConfig**)(&cComPtrNtv_003CITunerConfig_003E)); + int num2 = 0; + if (num >= 0) + { + long num3 = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 112)))((nint)num3); + array = new CountryBaseDetails[num2]; + } + int num4 = 0; + if (0 < num2) + { + do + { + long num5 = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + int num6 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 120)))((nint)num5, num4); + ushort** ptr = null; + if (num6 != 0) + { + ulong num7 = (ulong)num6; + ptr = (ushort**)_003CModule_003E.new_005B_005D((num7 > 2305843009213693951L) ? ulong.MaxValue : (num7 * 8)); + num = (((long)(nint)ptr == 0) ? (-2147024882) : num); + } + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + try + { + int teenagerAge = 0; + int adultAge = 0; + int num8 = 0; + int num9 = 0; + int num10 = 0; + if (num >= 0) + { + long num11 = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 128)))((nint)num11, num4, num6, (ushort**)(&wBSTRString), ptr, &teenagerAge, &adultAge, &num8, &num9, &num10); + if (num >= 0) + { + CountryFieldValidator[] array2 = new CountryFieldValidator[num10]; + int num12 = 0; + if (0 < num10) + { + do + { + ushort* value = null; + ushort* value2 = null; + ushort* value3 = null; + ushort* value4 = null; + long num13 = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 136)))((nint)num13, num4, num12, &value, &value2, &value3, &value4); + if (num >= 0) + { + CountryFieldValidator countryFieldValidator = (array2[num12] = new CountryFieldValidator(new string((char*)value), new string((char*)value2), new string((char*)value3), new string((char*)value4))); + } + _003CModule_003E.SafeSysFreeString(&value); + _003CModule_003E.SafeSysFreeString(&value2); + _003CModule_003E.SafeSysFreeString(&value3); + _003CModule_003E.SafeSysFreeString(&value4); + num12++; + } + while (num12 < num10); + } + if (num >= 0) + { + string abbreviation = new string((char*)(*(ulong*)(&wBSTRString))); + string[] array3 = new string[num6]; + int num14 = 0; + if (0 < num6) + { + ushort** ptr2 = ptr; + do + { + array3[num14] = new string((char*)(*(ulong*)ptr2)); + num14++; + ptr2 = (ushort**)((ulong)(nint)ptr2 + 8uL); + } + while (num14 < num6); + } + bool usageCollection = ((num9 != 0) ? true : false); + bool showNewsletterOptions = ((num8 != 0) ? true : false); + array[num4] = new CountryBaseDetails(abbreviation, array3, teenagerAge, adultAge, showNewsletterOptions, usageCollection, array2); + } + } + } + if (ptr != null) + { + if (0 < num6) + { + ushort** ptr3 = ptr; + int num15 = num6; + do + { + _003CModule_003E.SafeSysFreeString(ptr3); + ptr3 = (ushort**)((ulong)(nint)ptr3 + 8uL); + num15 += -1; + } + while (num15 != 0); + } + _003CModule_003E.delete_005B_005D(ptr); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + num4++; + } + while (num4 < num2); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002E_007Bdtor_007D), &cComPtrNtv_003CITunerConfig_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002ERelease(&cComPtrNtv_003CITunerConfig_003E); + } + return array; + } + + public unsafe RatingSystemBase[] GetRatingSystems() + { + //IL_002f: Expected I, but got I8 + //IL_004b: Expected I, but got I8 + //IL_004b: Expected I, but got I8 + //IL_0077: Expected I, but got I8 + //IL_0077: Expected I, but got I8 + //IL_008e: Expected I, but got I8 + //IL_008e: Expected I, but got I8 + //IL_00a5: Expected I, but got I8 + //IL_00a5: Expected I, but got I8 + //IL_0105: Expected I, but got I8 + //IL_0109: Expected I, but got I8 + //IL_0146: Expected I, but got I8 + //IL_01c6: Expected I, but got I8 + //IL_01d8: Expected I, but got I8 + //IL_0201: Expected I, but got I8 + //IL_0223: Expected I, but got I8 + //IL_022e: Expected I, but got I8 + //IL_023a: Expected I, but got I8 + //IL_026d: Expected I, but got I8 + //IL_029d: Expected I, but got I8 + //IL_033f: Expected I, but got I8 + //IL_033f: Expected I, but got I8 + //IL_0356: Expected I, but got I8 + //IL_035b: Expected I, but got I8 + //IL_0360: Expected I, but got I8 + //IL_0368: Expected I, but got I8 + //IL_0387: Expected I, but got I8 + //IL_043a: Expected I, but got I8 + //IL_043f: Expected I, but got I8 + //IL_0444: Expected I, but got I8 + //IL_044c: Expected I, but got I8 + //IL_046d: Expected I, but got I8 + RatingSystemBase[] array = null; + if (m_pService != null) + { + CComPtrNtv_003CITunerConfig_003E cComPtrNtv_003CITunerConfig_003E; + *(long*)(&cComPtrNtv_003CITunerConfig_003E) = 0L; + try + { + IService* pService = m_pService; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 176)))((nint)pService, (ITunerConfig**)(&cComPtrNtv_003CITunerConfig_003E)); + int num2 = 0; + if (num >= 0) + { + long num3 = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 144)))((nint)num3); + array = new RatingSystemBase[num2]; + } + int num4 = 0; + if (0 < num2) + { + do + { + long num5 = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + int num6 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 168)))((nint)num5, num4); + long num7 = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + int num8 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 160)))((nint)num7, num4); + long num9 = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + int num10 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 152)))((nint)num9, num4); + Dictionary> dictionary = new Dictionary>(); + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + try + { + WBSTRString wBSTRString2; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString2); + try + { + WBSTRString wBSTRString3; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString3); + try + { + WBSTRString wBSTRString4; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString4); + try + { + WBSTRString wBSTRString5; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString5); + try + { + int num11 = 0; + int num12 = 0; + int num13 = 0; + if (0 < num8) + { + do + { + ITunerConfig* ptr = _003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002E_002D_003E(&cComPtrNtv_003CITunerConfig_003E); + int num14 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 176)))((nint)ptr, num4, num13); + ushort** ptr2 = null; + if (num >= 0) + { + ulong num15 = (ulong)num14; + ptr2 = (ushort**)_003CModule_003E.new_005B_005D((num15 > 2305843009213693951L) ? ulong.MaxValue : (num15 * 8)); + num = (((long)(nint)ptr2 == 0) ? (-2147024882) : num); + } + ushort** ptr3 = null; + if (num >= 0) + { + ulong num16 = (ulong)num14; + ptr3 = (ushort**)_003CModule_003E.new_005B_005D((num16 > 2305843009213693951L) ? ulong.MaxValue : (num16 * 8)); + } + _003CModule_003E.WString_002EDeleteString((WString*)(&wBSTRString)); + _003CModule_003E.WString_002EDeleteString((WString*)(&wBSTRString2)); + _003CModule_003E.WString_002EDeleteString((WString*)(&wBSTRString3)); + _003CModule_003E.WString_002EDeleteString((WString*)(&wBSTRString4)); + WBSTRString wBSTRString6; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString6); + try + { + ITunerConfig* ptr4 = _003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002E_002D_003E(&cComPtrNtv_003CITunerConfig_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr4 + 184)))((nint)ptr4, num4, num13, num14, (ushort**)(&wBSTRString), (ushort**)(&wBSTRString2), (ushort**)(&wBSTRString3), (ushort**)(&wBSTRString4), (ushort**)(&wBSTRString6), &num11, &num12, ptr2, ptr3); + if (num >= 0) + { + string key = new string((char*)(*(ulong*)(&wBSTRString6))); + Dictionary dictionary2 = new Dictionary(); + if (num13 == num10) + { + _003CModule_003E.WString_002EDeleteString((WString*)(&wBSTRString5)); + _003CModule_003E.WString_002EInit((WString*)(&wBSTRString5), (ushort*)(*(ulong*)(&wBSTRString6)), ulong.MaxValue); + } + long num17 = num14; + if (0 < num17) + { + ushort** ptr5 = ptr2; + ushort** ptr6 = (ushort**)((byte*)ptr3 - (nuint)ptr2); + ulong num18 = (ulong)num17; + do + { + dictionary2.Add(new string((char*)(*(ulong*)ptr5)), new string((char*)(*(ulong*)((byte*)ptr6 + (nuint)ptr5)))); + ptr5 = (ushort**)((ulong)(nint)ptr5 + 8uL); + num18--; + } + while (num18 != 0); + } + dictionary.Add(key, dictionary2); + if (ptr2 != null) + { + if (0 < num14) + { + ushort** ptr7 = ptr2; + int num19 = num14; + do + { + _003CModule_003E.SafeSysFreeString(ptr7); + ptr7 = (ushort**)((ulong)(nint)ptr7 + 8uL); + num19 += -1; + } + while (num19 != 0); + } + _003CModule_003E.delete_005B_005D(ptr2); + } + if (ptr3 != null) + { + if (0 < num14) + { + ushort** ptr8 = ptr3; + int num20 = num14; + do + { + _003CModule_003E.SafeSysFreeString(ptr8); + ptr8 = (ushort**)((ulong)(nint)ptr8 + 8uL); + num20 += -1; + } + while (num20 != 0); + } + _003CModule_003E.delete_005B_005D(ptr3); + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString6); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString6); + num13++; + } + while (num13 < num8); + } + if (num >= 0) + { + RatingValue[] array2 = new RatingValue[num6]; + int num21 = 0; + if (0 < num6) + { + do + { + WBSTRString wBSTRString7; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString7); + try + { + WBSTRString wBSTRString8; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString8); + try + { + WBSTRString wBSTRString9; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString9); + try + { + WBSTRString wBSTRString10; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString10); + try + { + WBSTRString wBSTRString11; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString11); + try + { + long num22 = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + int order; + int num23; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 192)))((nint)num22, num4, num21, (ushort**)(&wBSTRString7), &order, (ushort**)(&wBSTRString10), (ushort**)(&wBSTRString8), (ushort**)(&wBSTRString9), (ushort**)(&wBSTRString11), &num23); + if (num >= 0) + { + bool treatAsUnrated = ((num23 != 0) ? true : false); + ushort* value = (ushort*)(*(ulong*)(&wBSTRString9)); + ushort* value2 = (ushort*)(*(ulong*)(&wBSTRString10)); + ushort* value3 = (ushort*)(*(ulong*)(&wBSTRString8)); + RatingValue ratingValue = (array2[num21] = new RatingValue(new string((char*)(*(ulong*)(&wBSTRString7))), order, new string((char*)value3), new string((char*)value2), new string((char*)value), new string((char*)(*(ulong*)(&wBSTRString11))), treatAsUnrated)); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString11); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString11); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString10); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString10); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString9); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString9); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString8); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString8); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString7); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString7); + num21++; + } + while (num21 < num6); + } + if (num >= 0) + { + bool showBlockUnrated = ((num12 != 0) ? true : false); + bool useImages = ((num11 != 0) ? true : false); + ushort* value4 = (ushort*)(*(ulong*)(&wBSTRString4)); + ushort* value5 = (ushort*)(*(ulong*)(&wBSTRString3)); + ushort* value6 = (ushort*)(*(ulong*)(&wBSTRString2)); + RatingSystemBase ratingSystemBase = (array[num4] = new RatingSystemBase(new string((char*)(*(ulong*)(&wBSTRString))), new string((char*)value6), new string((char*)value5), new string((char*)value4), useImages, showBlockUnrated, new string((char*)(*(ulong*)(&wBSTRString5))), dictionary, array2)); + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString5); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString5); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString4); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString4); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString3); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString2); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString2); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + num4++; + } + while (num4 < num2); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002E_007Bdtor_007D), &cComPtrNtv_003CITunerConfig_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002E_007Bdtor_007D(&cComPtrNtv_003CITunerConfig_003E); + } + return array; + } + + public unsafe int GetRentalTermDays(string strStudio) + { + //IL_0030: Expected I, but got I8 + //IL_004e: Expected I, but got I8 + //IL_004e: Expected I, but got I8 + int result = 14; + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strStudio))) + { + if (m_pService != null) + { + CComPtrNtv_003CITunerConfig_003E cComPtrNtv_003CITunerConfig_003E; + *(long*)(&cComPtrNtv_003CITunerConfig_003E) = 0L; + try + { + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 176)))((nint)pService, (ITunerConfig**)(&cComPtrNtv_003CITunerConfig_003E)) >= 0) + { + long num = *(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 208; + long num2 = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)num2, ptr, &result); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002E_007Bdtor_007D), &cComPtrNtv_003CITunerConfig_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002ERelease(&cComPtrNtv_003CITunerConfig_003E); + } + return result; + } + } + + public unsafe int GetRentalTermHours(string strStudio) + { + //IL_0030: Expected I, but got I8 + //IL_004e: Expected I, but got I8 + //IL_004e: Expected I, but got I8 + int result = 24; + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strStudio))) + { + if (m_pService != null) + { + CComPtrNtv_003CITunerConfig_003E cComPtrNtv_003CITunerConfig_003E; + *(long*)(&cComPtrNtv_003CITunerConfig_003E) = 0L; + try + { + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 176)))((nint)pService, (ITunerConfig**)(&cComPtrNtv_003CITunerConfig_003E)) >= 0) + { + long num = *(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 216; + long num2 = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)num2, ptr, &result); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002E_007Bdtor_007D), &cComPtrNtv_003CITunerConfig_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002ERelease(&cComPtrNtv_003CITunerConfig_003E); + } + return result; + } + } + + public unsafe string GetPhoneClientType(string strPhoneOsVersion) + { + //IL_0006: Expected I, but got I8 + //IL_0034: Expected I, but got I8 + //IL_0055: Expected I, but got I8 + //IL_0055: Expected I, but got I8 + string result = null; + ushort* ptr = null; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strPhoneOsVersion))) + { + if (m_pService != null) + { + CComPtrNtv_003CITunerConfig_003E cComPtrNtv_003CITunerConfig_003E; + *(long*)(&cComPtrNtv_003CITunerConfig_003E) = 0L; + try + { + IService* pService = m_pService; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 176)))((nint)pService, (ITunerConfig**)(&cComPtrNtv_003CITunerConfig_003E)); + if (num >= 0) + { + long num2 = *(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 224; + long num3 = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)num3, ptr2, &ptr); + if (num >= 0) + { + result = Marshal.PtrToStringBSTR((IntPtr)ptr); + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002E_007Bdtor_007D), &cComPtrNtv_003CITunerConfig_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002ERelease(&cComPtrNtv_003CITunerConfig_003E); + } + return result; + } + } + + public unsafe int GetSubscriptionTrialDuration() + { + //IL_0028: Expected I, but got I8 + //IL_0043: Expected I, but got I8 + //IL_0043: Expected I, but got I8 + int result = 0; + if (m_pService != null) + { + CComPtrNtv_003CITunerConfig_003E cComPtrNtv_003CITunerConfig_003E; + *(long*)(&cComPtrNtv_003CITunerConfig_003E) = 0L; + try + { + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 176)))((nint)pService, (ITunerConfig**)(&cComPtrNtv_003CITunerConfig_003E)) >= 0) + { + long num = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 232)))((nint)num, &result); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002E_007Bdtor_007D), &cComPtrNtv_003CITunerConfig_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002ERelease(&cComPtrNtv_003CITunerConfig_003E); + } + return result; + } + + public unsafe AppOfferCollection CreateEmptyAppCollection() + { + //IL_0025: Expected I, but got I8 + //IL_0039: Expected I, but got I8 + AppOfferCollection appOfferCollection = null; + if (m_pService != null) + { + CComPtrNtv_003CIAppCollection_003E cComPtrNtv_003CIAppCollection_003E; + *(long*)(&cComPtrNtv_003CIAppCollection_003E) = 0L; + try + { + IService* pService = m_pService; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 72)))((nint)pService, (IAppCollection**)(&cComPtrNtv_003CIAppCollection_003E)) >= 0) + { + appOfferCollection = new AppOfferCollection(); + appOfferCollection.Init((IAppCollection*)(*(ulong*)(&cComPtrNtv_003CIAppCollection_003E))); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIAppCollection_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIAppCollection_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIAppCollection_003E_002ERelease(&cComPtrNtv_003CIAppCollection_003E); + } + return appOfferCollection; + } + + public EContentType GetContentType(string contentTypeStr) + { + EContentType eContentType = EContentType.Unknown; + int result; + switch (contentTypeStr) + { + case "type:musictrack": + return EContentType.MusicTrack; + case "type:musicvideo": + return EContentType.Video; + case "type:podcast": + return EContentType.PodcastEpisode; + default: + result = (int)eContentType; + break; + case "type:app": + result = 7; + break; + } + return (EContentType)result; + } + + public unsafe void ReportStreamingAction(EStreamingActionType eStreamingActionType, Guid guidMediaInstanceId, AsyncCompleteHandler eventHandler) + { + //IL_000b: Expected I, but got I8 + //IL_0027: Expected I, but got I8 + //IL_0058: Expected I, but got I8 + //IL_0069: Expected I, but got I8 + if (m_pService == null) + { + return; + } + AsyncCallbackWrapper* ptr = null; + if (eventHandler != null) + { + AsyncCallbackWrapper* ptr2 = (AsyncCallbackWrapper*)_003CModule_003E.@new(24uL); + AsyncCallbackWrapper* ptr3; + try + { + ptr3 = ((ptr2 == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EAsyncCallbackWrapper_002E_007Bctor_007D(ptr2, eventHandler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr2); + throw; + } + ptr = ptr3; + if (ptr3 == null) + { + goto IL_0059; + } + } + _GUID gUID = _003CModule_003E.GuidToGUID(guidMediaInstanceId); + IService* pService = m_pService; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pService + 984)))((nint)pService, (global::EStreamingActionType)eStreamingActionType, gUID, (IAsyncCallback*)ptr); + goto IL_0059; + IL_0059: + if (ptr != null) + { + AsyncCallbackWrapper* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021Service(); + return; + } + try + { + _0021Service(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~Service() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/ServiceError.cs b/ZuneDBApi/Microsoft/Zune/Service/ServiceError.cs new file mode 100644 index 0000000..c4b7e17 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/ServiceError.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using ZuneUI; + +namespace Microsoft.Zune.Service +{ + public class ServiceError : IDisposable + { + private readonly CComPtrMgd_003CIServiceError_003E m_spServiceError; + + private IList m_propertyErrors; + + public unsafe IList PropertyErrors + { + get + { + //IL_002d: Expected I, but got I8 + //IL_0047: Expected I, but got I8 + //IL_0065: Expected I, but got I8 + if (m_propertyErrors == null) + { + IServiceError* p = m_spServiceError.p; + if (p != null) + { + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)p); + m_propertyErrors = new List(num); + int num2 = 0; + if (0 < num) + { + do + { + int num3 = 0; + ushort* ptr = null; + IServiceError* p2 = m_spServiceError.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p2 + 40)))((nint)p2, num2, &ptr, &num3) >= 0) + { + PropertyError propertyError = new PropertyError(); + propertyError.Name = new string((char*)ptr); + HRESULT hRESULT2 = (propertyError.Hr = num3); + m_propertyErrors.Add(propertyError); + } + _003CModule_003E.SysFreeString(ptr); + num2++; + } + while (num2 < num); + } + } + } + return m_propertyErrors; + } + } + + public unsafe HRESULT RootError + { + get + { + //IL_0026: Expected I, but got I8 + HRESULT s_OK = HRESULT._S_OK; + IServiceError* p = m_spServiceError.p; + if (p != null) + { + IServiceError* ptr = p; + s_OK.hr = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 24)))((nint)ptr); + } + return s_OK; + } + } + + internal unsafe ServiceError(IServiceError* pServiceError) + { + CComPtrMgd_003CIServiceError_003E spServiceError = new CComPtrMgd_003CIServiceError_003E(); + try + { + m_spServiceError = spServiceError; + base._002Ector(); + m_spServiceError.op_Assign(pServiceError); + } + catch + { + //try-fault + ((IDisposable)m_spServiceError).Dispose(); + throw; + } + } + + public void _007EServiceError() + { + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + } + finally + { + ((IDisposable)m_spServiceError).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/TokenDetails.cs b/ZuneDBApi/Microsoft/Zune/Service/TokenDetails.cs new file mode 100644 index 0000000..f5d6935 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/TokenDetails.cs @@ -0,0 +1,104 @@ +using System; + +namespace Microsoft.Zune.Service +{ + public class TokenDetails : PaymentInstrument + { + private string m_token; + + private string m_offerName; + + private string m_sellText; + + private ETokenType m_eTokenType; + + private EPurchaseOfferType m_ePurchaseOfferType; + + private Guid m_mediaId; + + private Guid m_mediaOfferId; + + private ulong m_billingOfferId; + + public Guid MediaOfferId => m_mediaOfferId; + + public Guid MediaId => m_mediaId; + + public EPurchaseOfferType PurchaseOfferType => m_ePurchaseOfferType; + + public string SellText => m_sellText; + + public string OfferName => m_offerName; + + public ulong BillingOfferId => m_billingOfferId; + + public ETokenType TokenType => m_eTokenType; + + public string Token => base.Id; + + internal unsafe TokenDetails(ITokenDetails* pTokenDetails) + : base(null, PaymentType.Token) + { + //IL_0059: Expected I, but got I8 + //IL_0067: Expected I, but got I8 + //IL_0075: Expected I, but got I8 + //IL_0083: Expected I, but got I8 + if (pTokenDetails == null) + { + return; + } + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + try + { + WBSTRString wBSTRString2; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString2); + try + { + WBSTRString wBSTRString3; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString3); + try + { + global::ETokenType eTokenType = (global::ETokenType)(-1); + global::EPurchaseOfferType ePurchaseOfferType = (global::EPurchaseOfferType)(-1); + _GUID gUID_NULL = _003CModule_003E.GUID_NULL; + _GUID gUID_NULL2 = _003CModule_003E.GUID_NULL; + ulong billingOfferId = 0uL; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTokenDetails + 24)))((nint)pTokenDetails, (ushort**)(&wBSTRString), (ushort**)(&wBSTRString2), (ushort**)(&wBSTRString3), &eTokenType, &ePurchaseOfferType, &billingOfferId, &gUID_NULL, &gUID_NULL2) >= 0) + { + base.Id = new string((char*)(*(ulong*)(&wBSTRString))); + m_offerName = new string((char*)(*(ulong*)(&wBSTRString2))); + m_sellText = new string((char*)(*(ulong*)(&wBSTRString3))); + m_eTokenType = (ETokenType)eTokenType; + m_ePurchaseOfferType = (EPurchaseOfferType)ePurchaseOfferType; + Guid guid = (m_mediaOfferId = _003CModule_003E.GUIDToGuid(gUID_NULL)); + Guid guid2 = (m_mediaId = _003CModule_003E.GUIDToGuid(gUID_NULL2)); + m_billingOfferId = billingOfferId; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString3); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString2); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString2); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/TrackOffer.cs b/ZuneDBApi/Microsoft/Zune/Service/TrackOffer.cs new file mode 100644 index 0000000..64bedda --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/TrackOffer.cs @@ -0,0 +1,35 @@ +using System; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class TrackOffer : Offer + { + private int m_trackNumber; + + private string m_album; + + private bool m_subscriptionFree; + + public bool SubscriptionFree + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_subscriptionFree; + } + } + + public string Album => m_album; + + public int TrackNumber => m_trackNumber; + + public TrackOffer(Guid id, int trackNumber, string title, string album, string artist, string serviceContext, PriceInfo priceInfo, [MarshalAs(UnmanagedType.U1)] bool isMP3, [MarshalAs(UnmanagedType.U1)] bool previouslyPurchased, [MarshalAs(UnmanagedType.U1)] bool inCollection, [MarshalAs(UnmanagedType.U1)] bool subscriptionFree) + : base(id, title, artist, priceInfo, isMP3, previouslyPurchased, inCollection, serviceContext) + { + m_trackNumber = trackNumber; + m_album = album; + m_subscriptionFree = subscriptionFree; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/TrackOfferCollection.cs b/ZuneDBApi/Microsoft/Zune/Service/TrackOfferCollection.cs new file mode 100644 index 0000000..f91bbc6 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/TrackOfferCollection.cs @@ -0,0 +1,202 @@ +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class TrackOfferCollection : OfferCollection, IDisposable + { + private IList m_items; + + private unsafe IMusicTrackCollection* m_pCollection; + + public IList Items => m_items; + + internal unsafe TrackOfferCollection() + : this() + { + //IL_0015: Expected I, but got I8 + m_items = null; + m_pCollection = null; + } + + private void _007ETrackOfferCollection() + { + _0021TrackOfferCollection(); + } + + private unsafe void _0021TrackOfferCollection() + { + //IL_0017: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + IMusicTrackCollection* pCollection = m_pCollection; + if (pCollection != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 16)))((nint)pCollection); + m_pCollection = null; + } + m_items = null; + } + + internal unsafe int Init(IMusicTrackCollection* pCollection, IDictionary mapIdToContext) + { + //IL_000f: Expected I, but got I8 + //IL_0044: Expected I, but got I8 + //IL_0076: Expected I, but got I8 + //IL_0076: Expected I, but got I8 + //IL_009f: Expected I, but got I8 + //IL_009f: Expected I, but got I8 + //IL_00c3: Expected I, but got I8 + //IL_00c3: Expected I, but got I8 + //IL_00e6: Expected I, but got I8 + //IL_00e6: Expected I, but got I8 + //IL_011a: Expected I, but got I8 + //IL_011a: Expected I, but got I8 + //IL_014b: Expected I, but got I8 + //IL_014b: Expected I, but got I8 + //IL_0171: Expected I, but got I8 + //IL_0193: Expected I, but got I8 + //IL_0193: Expected I, but got I8 + //IL_01d1: Expected I, but got I8 + //IL_01dc: Expected I, but got I8 + //IL_01e7: Expected I, but got I8 + //IL_01f1: Expected I, but got I8 + //IL_0273: Expected I, but got I8 + int num = 0; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 24)))((nint)pCollection); + IList list = new ArrayList(num2); + int num3 = 0; + if (0 < num2) + { + do + { + MusicTrackMetadata musicTrackMetadata; + _003CModule_003E.MusicTrackMetadata_002E_007Bctor_007D(&musicTrackMetadata); + try + { + CComPtrNtv_003CIContextData_003E cComPtrNtv_003CIContextData_003E; + *(long*)(&cComPtrNtv_003CIContextData_003E) = 0L; + try + { + if (num >= 0) + { + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 32)))((nint)pCollection, num3, &musicTrackMetadata, (IContextData**)(&cComPtrNtv_003CIContextData_003E)); + } + CComPtrNtv_003CIPriceInfo_003E cComPtrNtv_003CIPriceInfo_003E; + _003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_007Bctor_007D(&cComPtrNtv_003CIPriceInfo_003E); + try + { + if (num >= 0) + { + long num4 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 152)); + EMediaRights eMediaRights = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 152)) + 208)))((nint)num4) != 0) ? ((EMediaRights)5) : ((EMediaRights)3)); + long num5 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 152)); + int num6 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 152)) + 144)))((nint)num5); + long num7 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 152)); + int num8 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 152)) + 176)))((nint)num7, 1, 1); + long num9 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 152)); + int num10 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 152)) + 72)))((nint)num9, eMediaRights, (EMediaFormat)0); + if (eMediaRights != (EMediaRights)5) + { + EMediaFormat eMediaFormat = ((num10 == 0) ? ((EMediaFormat)1) : ((EMediaFormat)0)); + long num11 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 152)); + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 152)) + 72)))((nint)num11, eMediaRights, eMediaFormat) != 0) + { + EMediaFormat eMediaFormat2 = ((num10 == 0) ? ((EMediaFormat)1) : ((EMediaFormat)0)); + long num12 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 152)); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 152)) + 104)))((nint)num12, eMediaRights, eMediaFormat2, (IPriceInfo**)(&cComPtrNtv_003CIPriceInfo_003E)); + } + } + if (num >= 0) + { + Guid id = _003CModule_003E.GUIDToGuid(System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 8))); + string recommendationContext = GetRecommendationContext(id, mapIdToContext, (IContextData*)(*(ulong*)(&cComPtrNtv_003CIContextData_003E))); + long num13 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 152)); + bool subscriptionFree = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 152)) + 208)))((nint)num13) != 0) ? true : false); + bool inCollection = ((num6 != 0) ? true : false); + bool previouslyPurchased = ((num8 != 0) ? true : false); + bool isMP = ((num10 != 0) ? true : false); + list.Add(new TrackOffer(id, System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 72)), new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 80))), new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 88))), new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref musicTrackMetadata, 96))), recommendationContext, new PriceInfo((IPriceInfo*)(*(ulong*)(&cComPtrNtv_003CIPriceInfo_003E))), isMP, previouslyPurchased, inCollection, subscriptionFree)); + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPriceInfo_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIPriceInfo_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIContextData_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIContextData_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIContextData_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.MusicTrackMetadata_002E_007Bdtor_007D), &musicTrackMetadata); + throw; + } + _003CModule_003E.MusicTrackMetadata_002E_007Bdtor_007D(&musicTrackMetadata); + num3++; + } + while (num3 < num2); + if (num < 0) + { + goto IL_0274; + } + } + m_items = list; + m_pCollection = pCollection; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 8)))((nint)pCollection); + goto IL_0274; + IL_0274: + return num; + } + + internal unsafe IMusicTrackCollection* GetCollection() + { + //IL_0016: Expected I, but got I8 + IMusicTrackCollection* pCollection = m_pCollection; + if (pCollection != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 8)))((nint)pCollection); + } + return m_pCollection; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021TrackOfferCollection(); + return; + } + try + { + _0021TrackOfferCollection(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~TrackOfferCollection() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/UriResourceTracker.cs b/ZuneDBApi/Microsoft/Zune/Service/UriResourceTracker.cs new file mode 100644 index 0000000..ae0a627 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/UriResourceTracker.cs @@ -0,0 +1,133 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class UriResourceTracker : IDisposable + { + private static UriResourceTracker m_singletonInstance = null; + + private unsafe IUriResourceTracker* m_pUriResourceTracker = null; + + public static UriResourceTracker Instance + { + get + { + if (m_singletonInstance == null) + { + m_singletonInstance = new UriResourceTracker(); + } + return m_singletonInstance; + } + } + + private unsafe UriResourceTracker() + { + //IL_0008: Expected I, but got I8 + //IL_0011: Expected I, but got I8 + IUriResourceTracker* pUriResourceTracker = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_ddbb9148_dea1_47dd_a0c1_1fdcf002c1e2, (void**)(&pUriResourceTracker)) >= 0) + { + m_pUriResourceTracker = pUriResourceTracker; + } + } + + private void _007EUriResourceTracker() + { + _0021UriResourceTracker(); + } + + private unsafe void _0021UriResourceTracker() + { + //IL_0017: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + IUriResourceTracker* pUriResourceTracker = m_pUriResourceTracker; + if (pUriResourceTracker != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pUriResourceTracker + 16)))((nint)pUriResourceTracker); + m_pUriResourceTracker = null; + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool SetResourceModified(string strUrlResource, [MarshalAs(UnmanagedType.U1)] bool fModified) + { + //IL_002c: Expected I, but got I8 + bool result = false; + if (m_pUriResourceTracker != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strUrlResource))) + { + try + { + long num = *(long*)m_pUriResourceTracker + 24; + IUriResourceTracker* pUriResourceTracker = m_pUriResourceTracker; + result = (byte)((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pUriResourceTracker, ptr, fModified ? ((byte)1) : ((byte)0)) >= 0) ? 1u : 0u) != 0; + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool IsResourceModified(string strUrlResource) + { + //IL_002b: Expected I, but got I8 + bool result = false; + if (m_pUriResourceTracker != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strUrlResource))) + { + try + { + long num = *(long*)m_pUriResourceTracker + 32; + IUriResourceTracker* pUriResourceTracker = m_pUriResourceTracker; + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pUriResourceTracker, ptr) != 0; + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return result; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021UriResourceTracker(); + return; + } + try + { + _0021UriResourceTracker(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~UriResourceTracker() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/VideoOffer.cs b/ZuneDBApi/Microsoft/Zune/Service/VideoOffer.cs new file mode 100644 index 0000000..43b8ef4 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/VideoOffer.cs @@ -0,0 +1,143 @@ +using System; +using System.Runtime.InteropServices; +using System.Xml; +using Microsoft.Iris; + +namespace Microsoft.Zune.Service +{ + public class VideoOffer : Offer + { + private string m_previewImageUrl; + + private string m_productionCompany; + + private Image m_previewImage; + + private string m_genre; + + private string m_seriesTitle; + + private int m_seasonNumber; + + private int m_episodeNumber; + + private int m_releaseYear; + + private bool m_isHD; + + private bool m_isRental; + + private bool m_isStream; + + private bool m_isMusicVideo; + + private bool m_isSeasonPurchase; + + private DateTime? m_expirationDate; + + private Guid m_albumId; + + public DateTime? ExpirationDate => m_expirationDate; + + public bool IsSeasonPurchase + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_isSeasonPurchase; + } + } + + public bool IsMusicVideo + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_isMusicVideo; + } + } + + public bool IsStream + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_isStream; + } + } + + public bool IsRental + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_isRental; + } + } + + public bool IsHD + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_isHD; + } + } + + public string Genre => m_genre; + + public int EpisodeNumber => m_episodeNumber; + + public int SeasonNumber => m_seasonNumber; + + public string SeriesTitle => m_seriesTitle; + + public int ReleaseYear => m_releaseYear; + + public string ProductionCompany => m_productionCompany; + + public Image PreviewImage + { + get + { + if (m_previewImage == null && m_previewImageUrl != (string)null) + { + m_previewImage = new Image(m_previewImageUrl); + } + return m_previewImage; + } + } + + public Guid AlbumId => m_albumId; + + public VideoOffer(Guid id, string title, string seriesTitle, int seasonNumber, int episodeNumber, string artist, Guid albumId, string genre, int releaseYear, string previewImageUrl, string productionCompany, PriceInfo priceInfo, [MarshalAs(UnmanagedType.U1)] bool isHD, [MarshalAs(UnmanagedType.U1)] bool isRental, [MarshalAs(UnmanagedType.U1)] bool isStream, [MarshalAs(UnmanagedType.U1)] bool isMusicVideo, [MarshalAs(UnmanagedType.U1)] bool isSeasonPurchase, [MarshalAs(UnmanagedType.U1)] bool previouslyPurchased, [MarshalAs(UnmanagedType.U1)] bool inCollection, string expirationDate) + : base(id, title, artist, priceInfo, isMP3: false, previouslyPurchased, inCollection, null) + { + m_previewImageUrl = previewImageUrl; + m_productionCompany = productionCompany; + m_previewImage = null; + m_genre = genre; + m_seriesTitle = seriesTitle; + m_seasonNumber = seasonNumber; + m_episodeNumber = episodeNumber; + m_releaseYear = releaseYear; + m_isHD = isHD; + m_isRental = isRental; + m_isStream = isStream; + m_isMusicVideo = isMusicVideo; + m_isSeasonPurchase = isSeasonPurchase; + m_albumId = albumId; + if (!string.IsNullOrEmpty(expirationDate)) + { + try + { + DateTime value = XmlConvert.ToDateTime(expirationDate, XmlDateTimeSerializationMode.Utc); + DateTime? dateTime = (m_expirationDate = value); + } + catch (FormatException) + { + } + } + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/VideoOfferCollection.cs b/ZuneDBApi/Microsoft/Zune/Service/VideoOfferCollection.cs new file mode 100644 index 0000000..04ffd76 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/VideoOfferCollection.cs @@ -0,0 +1,387 @@ +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using _003CCppImplementationDetails_003E; + +namespace Microsoft.Zune.Service +{ + public class VideoOfferCollection : OfferCollection, IDisposable + { + private IList m_items; + + private unsafe IVideoCollection* m_pCollection; + + public IList Items => m_items; + + internal unsafe VideoOfferCollection() + : this() + { + //IL_0015: Expected I, but got I8 + m_items = null; + m_pCollection = null; + } + + private void _007EVideoOfferCollection() + { + _0021VideoOfferCollection(); + } + + private unsafe void _0021VideoOfferCollection() + { + //IL_0017: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + IVideoCollection* pCollection = m_pCollection; + if (pCollection != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 16)))((nint)pCollection); + m_pCollection = null; + } + m_items = null; + } + + internal unsafe int Init(IVideoCollection* pCollection) + { + //IL_0010: Expected I, but got I8 + //IL_0057: Expected I, but got I8 + //IL_0057: Expected I, but got I8 + //IL_008f: Expected I, but got I8 + //IL_009c: Expected I, but got I8 + //IL_00a9: Expected I, but got I8 + //IL_00b6: Expected I, but got I8 + //IL_00c6: Expected I, but got I8 + //IL_00d3: Expected I, but got I8 + //IL_00f5: Expected I, but got I8 + //IL_00f5: Expected I, but got I8 + //IL_011a: Expected I, but got I8 + //IL_02e5: Expected I, but got I8 + //IL_02e5: Expected I, but got I8 + //IL_02f6: Expected I, but got I8 + //IL_0347: Expected I, but got I8 + //IL_0347: Expected I, but got I8 + //IL_0378: Expected I, but got I8 + //IL_0378: Expected I, but got I8 + //IL_03f3: Expected I, but got I8 + //IL_03f3: Expected I, but got I8 + //IL_046b: Expected I, but got I8 + //IL_046b: Expected I, but got I8 + //IL_0485: Incompatible stack types: Ref vs I + //IL_050e: Expected I, but got I8 + //IL_050e: Expected I, but got I8 + //IL_0547: Expected I, but got I8 + //IL_0547: Expected I, but got I8 + //IL_0595: Expected I, but got I8 + //IL_0595: Expected I, but got I8 + //IL_062a: Expected I, but got I8 + //IL_0679: Expected I, but got I8 + int num = 0; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 24)))((nint)pCollection); + IList list = new ArrayList(num2); + int num3 = 0; + if (0 < num2) + { + do + { + int num4 = 0; + int num5 = 0; + int num6 = 0; + int num7 = 0; + VideoMetadata videoMetadata; + _003CModule_003E.VideoMetadata_002E_007Bctor_007D(&videoMetadata); + try + { + if (num >= 0) + { + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 32)))((nint)pCollection, num3, &videoMetadata, null); + if (num >= 0) + { + Guid id = _003CModule_003E.GUIDToGuid(System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 8))); + Guid albumId = _003CModule_003E.GUIDToGuid(System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 80))); + string title = new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 32))); + string seriesTitle = new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 120))); + string artist = new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 48))); + string genre = new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 96))); + string previewImageUrl = new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 160))); + string productionCompany = new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 112))); + long num8 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)); + bool flag = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)) + 144)))((nint)num8) != 0) ? true : false); + int releaseYear = 0; + if (System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 144)) != 0L) + { + releaseYear = _003CModule_003E._wtoi((ushort*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 144))); + } + _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040 _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040; + *(int*)(&_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040) = 3; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 4)) = 3; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 8)) = 4; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 12)) = 3; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 16)) = 2; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 20)) = 4; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 24)) = 3; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 28)) = 4; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 32)) = -1; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 36)) = 7; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 40)) = 2; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 44)) = -1; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 48)) = 7; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 52)) = 3; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 56)) = -1; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 60)) = 8; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 64)) = 2; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 68)) = -1; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 72)) = 8; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 76)) = 3; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 80)) = -1; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 84)) = 9; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 88)) = 3; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 92)) = -1; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 96)) = 9; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 100)) = 2; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 104)) = -1; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 108)) = 12; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 112)) = 2; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 116)) = 4; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 120)) = 12; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 124)) = 3; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 128)) = 4; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 132)) = 13; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 136)) = 2; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 140)) = -1; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 144)) = 13; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 148)) = 3; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 152)) = -1; + int num9 = 0; + VideoOfferParams* ptr = (VideoOfferParams*)(&_0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040); + long num10 = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 4)); + long num11 = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY0N_0040UVideoOfferParams_0040Service_0040Zune_0040Microsoft_0040_0040, 8)); + while (num6 == 0) + { + int num12 = *(int*)ptr; + if ((num12 != 8 && num12 != 13) || *(int*)num10 != 3 || *(int*)num11 != -1 || num7 == 0) + { + if (num12 == 3) + { + if (*(int*)num10 == 4 && *(int*)num11 == -1 && num4 != 0) + { + goto IL_0610; + } + } + else if (num12 != 12) + { + goto IL_02a8; + } + if (*(int*)num10 != 3 || *(int*)num11 != 4 || num5 == 0) + { + goto IL_02a8; + } + } + goto IL_0610; + IL_042f: + bool flag2; + bool flag3; + bool flag4; + int num14; + bool flag6; + ushort* ptr2; + CComPtrNtv_003CIPriceInfo_003E cComPtrNtv_003CIPriceInfo_003E; + bool flag7; + bool isRental; + bool isMusicVideo; + bool flag8; + bool flag9; + try + { + if (!flag2 && !flag3) + { + EMediaRights eMediaRights = (flag4 ? ((EMediaRights)13) : ((EMediaRights)12)); + long num13 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)); + bool flag5 = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)) + 168)))((nint)num13, eMediaRights, (EMediaFormat)num14, 1, 1) != 0) ? true : false); + flag6 = flag5; + } + string expirationDate = new string((char*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref (long)(nint)ptr2 != 0 ? ref *(_0024ArrayType_0024_0024_0024BY00_0024_0024CBG*)ptr2 : ref _003CModule_003E._003F_003F_C_0040_11LOCGONAA_0040_003F_0024AA_003F_0024AA_0040)); + VideoOffer value = new VideoOffer(id, title, seriesTitle, System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 128)), System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 132)), artist, albumId, genre, releaseYear, previewImageUrl, productionCompany, new PriceInfo(_003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_002EPEAUIPriceInfo_0040_0040(&cComPtrNtv_003CIPriceInfo_003E)), flag7, isRental, flag4, isMusicVideo, flag3, flag6, flag, expirationDate); + list.Add(value); + num4 = 1; + if (!flag8 || !flag9 || !flag6) + { + goto IL_051c; + } + long num15 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)); + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)) + 64)))((nint)num15, (EMediaRights)num12, (EMediaFormat)3, (EMediaFormat)4) == 0) + { + goto IL_051c; + } + num6 = (flag ? 1 : 0); + num5 = 1; + goto end_IL_0430; + IL_051c: + if (flag7 && flag4 && flag6) + { + long num16 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)); + num7 = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)) + 72)))((nint)num16, (EMediaRights)num12, (EMediaFormat)2) != 0) ? 1 : num7); + } + if (num5 == 0 && flag7 && flag9 && flag6) + { + long num17 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)); + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)) + 64)))((nint)num17, (EMediaRights)num12, (EMediaFormat)2, (EMediaFormat)3) != 0) + { + VideoOffer value2 = new VideoOffer(id, title, seriesTitle, System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 128)), System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 132)), artist, albumId, genre, releaseYear, previewImageUrl, productionCompany, PriceInfo.FreeWithPoints(), isHD: false, isRental: false, isStream: false, isMusicVideo: false, flag3, previouslyPurchased: true, flag, expirationDate); + list.Add(value2); + num5 = 1; + } + } + end_IL_0430:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPriceInfo_003E); + throw; + } + goto IL_05f1; + IL_0423: + _003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIPriceInfo_003E); + goto IL_0610; + IL_0610: + num9++; + num11 += 12; + num10 += 12; + ptr = (VideoOfferParams*)((ulong)(nint)ptr + 12uL); + if ((uint)num9 >= 13u) + { + break; + } + continue; + IL_02a8: + num14 = *(int*)num10; + flag7 = num14 == 2; + flag8 = num14 == 3; + ESeasonPurchaseFlags eSeasonPurchaseFlags = ((!flag7) ? ((ESeasonPurchaseFlags)1) : ((ESeasonPurchaseFlags)2)); + long num18 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)); + flag3 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)) + 224)))((nint)num18, eSeasonPurchaseFlags) == 1; + _003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_007Bctor_007D(&cComPtrNtv_003CIPriceInfo_003E); + try + { + ptr2 = null; + _GUID gUID_NULL = _003CModule_003E.GUID_NULL; + _GUID gUID_NULL2 = _003CModule_003E.GUID_NULL; + _GUID gUID_NULL3 = _003CModule_003E.GUID_NULL; + int num19 = *(int*)num11; + int num21; + if (num19 != -1) + { + long num20 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)); + IPriceInfo** intPtr = _003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_0026(&cComPtrNtv_003CIPriceInfo_003E); + num21 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)) + 128)))((nint)num20, (EMediaRights)num12, (EMediaFormat)num14, (EMediaFormat)num19, &gUID_NULL2, &gUID_NULL3, &gUID_NULL, intPtr, &ptr2); + } + else + { + long num22 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)); + IPriceInfo** intPtr2 = _003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_0026(&cComPtrNtv_003CIPriceInfo_003E); + num21 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)) + 136)))((nint)num22, (EMediaRights)num12, (EMediaFormat)num14, &gUID_NULL2, &gUID_NULL, intPtr2, &ptr2); + } + if (num21 >= 0) + { + flag9 = ((num12 == 3 || num12 == 12) ? true : false); + isRental = ((num12 == 7 || num12 == 9) ? true : false); + flag4 = ((num12 == 8 || num12 == 13 || num12 == 9) ? true : false); + int num23 = ((num12 == 12 || num12 == 13) ? 1 : 0); + bool flag10 = (byte)num23 != 0; + long num24 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)); + flag2 = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 192)) + 168)))((nint)num24, (EMediaRights)num12, (EMediaFormat)num14, 1, 1) != 0) ? true : false); + flag6 = flag2; + isMusicVideo = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref videoMetadata, 24)) == 0; + if (flag3 == flag10) + { + goto IL_042f; + } + goto IL_0423; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPriceInfo_003E); + throw; + } + goto IL_05f1; + IL_05f1: + try + { + _003CModule_003E.SysFreeString(ptr2); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIPriceInfo_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIPriceInfo_003E_002E_007Bdtor_007D(&cComPtrNtv_003CIPriceInfo_003E); + goto IL_0610; + } + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.VideoMetadata_002E_007Bdtor_007D), &videoMetadata); + throw; + } + _003CModule_003E.VideoMetadata_002E_007Bdtor_007D(&videoMetadata); + num3++; + } + while (num3 < num2); + if (num < 0) + { + goto IL_067a; + } + } + m_items = list; + m_pCollection = pCollection; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 8)))((nint)pCollection); + goto IL_067a; + IL_067a: + return num; + } + + internal unsafe IVideoCollection* GetCollection() + { + //IL_0016: Expected I, but got I8 + IVideoCollection* pCollection = m_pCollection; + if (pCollection != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pCollection + 8)))((nint)pCollection); + } + return m_pCollection; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021VideoOfferCollection(); + return; + } + try + { + _0021VideoOfferCollection(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~VideoOfferCollection() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/VideoOfferParams.cs b/ZuneDBApi/Microsoft/Zune/Service/VideoOfferParams.cs new file mode 100644 index 0000000..d815dc6 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/VideoOfferParams.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Service +{ + [StructLayout(LayoutKind.Sequential, Size = 12)] + [MiscellaneousBits(65)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct VideoOfferParams + { + private int _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/WMISEndpointIds.cs b/ZuneDBApi/Microsoft/Zune/Service/WMISEndpointIds.cs new file mode 100644 index 0000000..938bc04 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/WMISEndpointIds.cs @@ -0,0 +1,27 @@ +namespace Microsoft.Zune.Service +{ + public class WMISEndpointIds + { + public static string WMISEID_Search = "Search"; + + public static string WMISEID_GetAlbumDetailsByAlbumId = "GetAlbumDetailsFromAlbumId"; + + public static string WMISEID_SubmitMatchFeedback = "SubmitMatchFeedback"; + + public static string WMISEID_GetAlbumDetailsByToc = "GetAlbumDetailsFromToc"; + + public static string WMISEID_GetAlbumDetails = "GetAlbumDetails"; + + public static string WMISEID_GetAlbumLiteByTrackWMID = "GetAlbumLiteByTrackWMID"; + + public static string WMISEID_GetAlbumLiteByToc = "GetAlbumLiteByToc"; + + public static string WMISEID_GetAlbumDetailsFromAlbumId = "GetAlbumDetailsFromAlbumId"; + + public static string WMISEID_SubmitEditFeedback = "SubmitEditFeedback"; + + public static string WMISEID_SubmitAddFeedback = "SubmitAddFeedback"; + + public static string WMISEID_GetResultsForArtist = "GetResultsForArtist"; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/WinLiveAvailableInformation.cs b/ZuneDBApi/Microsoft/Zune/Service/WinLiveAvailableInformation.cs new file mode 100644 index 0000000..a22d4fc --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/WinLiveAvailableInformation.cs @@ -0,0 +1,136 @@ +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Service +{ + public class WinLiveAvailableInformation : IDisposable + { + private readonly CComPtrMgd_003CIWinLiveAvailableInformation_003E m_spWinLiveAvailableInformation; + + private string m_signinName; + + private IList m_suggestedNames; + + public unsafe IList SuggestedNames + { + get + { + //IL_002a: Expected I, but got I8 + //IL_0040: Expected I, but got I8 + //IL_005c: Expected I, but got I8 + if (m_suggestedNames == null) + { + IWinLiveAvailableInformation* p = m_spWinLiveAvailableInformation.p; + if (p != null) + { + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 48)))((nint)p); + m_suggestedNames = new ArrayList(num); + int num2 = 0; + if (0 < num) + { + do + { + ushort* ptr = null; + IWinLiveAvailableInformation* p2 = m_spWinLiveAvailableInformation.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p2 + 56)))((nint)p2, num2, &ptr) >= 0) + { + m_suggestedNames.Add(new string((char*)ptr)); + } + _003CModule_003E.SysFreeString(ptr); + num2++; + } + while (num2 < num); + } + } + } + return m_suggestedNames; + } + } + + public unsafe bool Available + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001e: Expected I, but got I8 + bool result = false; + IWinLiveAvailableInformation* p = m_spWinLiveAvailableInformation.p; + if (p != null) + { + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p) != 0; + } + return result; + } + } + + public unsafe string SigninName + { + get + { + //IL_0020: Expected I, but got I8 + //IL_0036: Expected I, but got I8 + if (m_signinName == (string)null) + { + CComPtrMgd_003CIWinLiveAvailableInformation_003E spWinLiveAvailableInformation = m_spWinLiveAvailableInformation; + if (spWinLiveAvailableInformation.p != null) + { + ushort* ptr = null; + IWinLiveAvailableInformation* p = spWinLiveAvailableInformation.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)p, &ptr) >= 0) + { + m_signinName = new string((char*)ptr); + } + _003CModule_003E.SysFreeString(ptr); + } + } + return m_signinName; + } + } + + internal unsafe WinLiveAvailableInformation(IWinLiveAvailableInformation* pWinLiveAvailableInformation) + { + CComPtrMgd_003CIWinLiveAvailableInformation_003E spWinLiveAvailableInformation = new CComPtrMgd_003CIWinLiveAvailableInformation_003E(); + try + { + m_spWinLiveAvailableInformation = spWinLiveAvailableInformation; + base._002Ector(); + m_spWinLiveAvailableInformation.op_Assign(pWinLiveAvailableInformation); + } + catch + { + //try-fault + ((IDisposable)m_spWinLiveAvailableInformation).Dispose(); + throw; + } + } + + public void _007EWinLiveAvailableInformation() + { + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + } + finally + { + ((IDisposable)m_spWinLiveAvailableInformation).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/WinLiveInformation.cs b/ZuneDBApi/Microsoft/Zune/Service/WinLiveInformation.cs new file mode 100644 index 0000000..82e3a58 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/WinLiveInformation.cs @@ -0,0 +1,244 @@ +using System; +using System.Collections; +using System.Runtime.InteropServices; +using MicrosoftZuneLibrary; + +namespace Microsoft.Zune.Service +{ + public class WinLiveInformation : IDisposable + { + private readonly CComPtrMgd_003CIWinLiveInformation_003E m_spWinLiveInformation; + + private string m_termsOfServiceUrl; + + private string m_privacyUrl; + + private string m_hipChallenge; + + private SafeBitmapWithData m_hipImage; + + private IList m_domains; + + public unsafe IList Domains + { + get + { + //IL_002a: Expected I, but got I8 + //IL_0040: Expected I, but got I8 + //IL_005c: Expected I, but got I8 + if (m_domains == null) + { + IWinLiveInformation* p = m_spWinLiveInformation.p; + if (p != null) + { + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 72)))((nint)p); + m_domains = new ArrayList(num); + int num2 = 0; + if (0 < num) + { + do + { + ushort* ptr = null; + IWinLiveInformation* p2 = m_spWinLiveInformation.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p2 + 80)))((nint)p2, num2, &ptr) >= 0) + { + m_domains.Add(new string((char*)ptr)); + } + _003CModule_003E.SysFreeString(ptr); + num2++; + } + while (num2 < num); + } + } + } + return m_domains; + } + } + + public unsafe int HipLength + { + get + { + //IL_001e: Expected I, but got I8 + int result = 0; + IWinLiveInformation* p = m_spWinLiveInformation.p; + if (p != null) + { + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 64)))((nint)p); + } + return result; + } + } + + public unsafe SafeBitmapWithData HipImage + { + get + { + //IL_002b: Expected I, but got I8 + //IL_003d: Expected I, but got I8 + //IL_0041: Expected I, but got I8 + if (m_hipImage == null) + { + CComPtrMgd_003CIWinLiveInformation_003E spWinLiveInformation = m_spWinLiveInformation; + if (spWinLiveInformation.p != null) + { + int num = 0; + IWinLiveInformation* p = spWinLiveInformation.p; + HBITMAP__* ptr = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 56)))((nint)p); + num = (((long)(nint)ptr == 0) ? (-2147467259) : num); + HBITMAP__* ptr2 = null; + void* pData = null; + if (num >= 0 && _003CModule_003E.ZuneLibraryExports_002ECopyThumbnailBitmapData(ptr, &ptr2, &pData) >= 0) + { + try + { + m_hipImage = new SafeBitmapWithData(pData, ptr2); + } + catch (ApplicationException) + { + m_hipImage = null; + if (ptr2 != null) + { + _003CModule_003E.DeleteObject(ptr2); + } + } + } + } + } + return m_hipImage; + } + } + + public unsafe string HipChallenge + { + get + { + //IL_0020: Expected I, but got I8 + //IL_0036: Expected I, but got I8 + if (m_hipChallenge == (string)null) + { + CComPtrMgd_003CIWinLiveInformation_003E spWinLiveInformation = m_spWinLiveInformation; + if (spWinLiveInformation.p != null) + { + ushort* ptr = null; + IWinLiveInformation* p = spWinLiveInformation.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 48)))((nint)p, &ptr) >= 0) + { + m_hipChallenge = new string((char*)ptr); + } + _003CModule_003E.SysFreeString(ptr); + } + } + return m_hipChallenge; + } + } + + public unsafe string PrivacyUrl + { + get + { + //IL_0020: Expected I, but got I8 + //IL_0036: Expected I, but got I8 + if (m_privacyUrl == (string)null) + { + CComPtrMgd_003CIWinLiveInformation_003E spWinLiveInformation = m_spWinLiveInformation; + if (spWinLiveInformation.p != null) + { + ushort* ptr = null; + IWinLiveInformation* p = spWinLiveInformation.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p, &ptr) >= 0) + { + m_privacyUrl = new string((char*)ptr); + } + _003CModule_003E.SysFreeString(ptr); + } + } + return m_privacyUrl; + } + } + + public unsafe int TermsOfServiceVersion + { + get + { + //IL_001e: Expected I, but got I8 + int result = 0; + IWinLiveInformation* p = m_spWinLiveInformation.p; + if (p != null) + { + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)p); + } + return result; + } + } + + public unsafe string TermsOfServiceUrl + { + get + { + //IL_0020: Expected I, but got I8 + //IL_0036: Expected I, but got I8 + if (m_termsOfServiceUrl == (string)null) + { + CComPtrMgd_003CIWinLiveInformation_003E spWinLiveInformation = m_spWinLiveInformation; + if (spWinLiveInformation.p != null) + { + ushort* ptr = null; + IWinLiveInformation* p = spWinLiveInformation.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p, &ptr) >= 0) + { + m_termsOfServiceUrl = new string((char*)ptr); + } + _003CModule_003E.SysFreeString(ptr); + } + } + return m_termsOfServiceUrl; + } + } + + internal unsafe WinLiveInformation(IWinLiveInformation* pWinLiveInformation) + { + CComPtrMgd_003CIWinLiveInformation_003E spWinLiveInformation = new CComPtrMgd_003CIWinLiveInformation_003E(); + try + { + m_spWinLiveInformation = spWinLiveInformation; + base._002Ector(); + m_spWinLiveInformation.op_Assign(pWinLiveInformation); + } + catch + { + //try-fault + ((IDisposable)m_spWinLiveInformation).Dispose(); + throw; + } + } + + public void _007EWinLiveInformation() + { + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + } + finally + { + ((IDisposable)m_spWinLiveInformation).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Service/WinLiveSignup.cs b/ZuneDBApi/Microsoft/Zune/Service/WinLiveSignup.cs new file mode 100644 index 0000000..5347534 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Service/WinLiveSignup.cs @@ -0,0 +1,383 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using ZuneUI; + +namespace Microsoft.Zune.Service +{ + public class WinLiveSignup : IDisposable + { + private readonly CComPtrMgd_003CIWinLiveSignup_003E m_spWinLiveSignup; + + public WinLiveSignup() + { + CComPtrMgd_003CIWinLiveSignup_003E spWinLiveSignup = new CComPtrMgd_003CIWinLiveSignup_003E(); + try + { + m_spWinLiveSignup = spWinLiveSignup; + base._002Ector(); + } + catch + { + //try-fault + ((IDisposable)m_spWinLiveSignup).Dispose(); + throw; + } + } + + public unsafe HRESULT GetInformation(string locale, EHipType hipType, out WinLiveInformation information, out ServiceError serviceError) + { + //IL_004c: Expected I, but got I8 + //IL_0074: Expected I, but got I8 + //IL_0086: Expected I, but got I8 + HRESULT result = CreateComObject(); + CComPtrNtv_003CIWinLiveInformation_003E cComPtrNtv_003CIWinLiveInformation_003E; + *(long*)(&cComPtrNtv_003CIWinLiveInformation_003E) = 0L; + try + { + CComPtrNtv_003CIServiceError_003E cComPtrNtv_003CIServiceError_003E; + *(long*)(&cComPtrNtv_003CIServiceError_003E) = 0L; + try + { + if ((byte)((result.hr >= 0) ? 1u : 0u) != 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(locale))) + { + try + { + IWinLiveSignup* p = m_spWinLiveSignup.p; + long num = *(long*)p + 32; + result.hr = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)p, ptr, (global::EHipType)hipType, (IWinLiveInformation**)(&cComPtrNtv_003CIWinLiveInformation_003E), (IServiceError**)(&cComPtrNtv_003CIServiceError_003E)); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + if ((byte)((result.hr >= 0) ? 1u : 0u) != 0) + { + information = new WinLiveInformation((IWinLiveInformation*)(*(ulong*)(&cComPtrNtv_003CIWinLiveInformation_003E))); + } + if (*(long*)(&cComPtrNtv_003CIServiceError_003E) != 0L) + { + serviceError = new ServiceError((IServiceError*)(*(ulong*)(&cComPtrNtv_003CIServiceError_003E))); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIServiceError_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIServiceError_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIServiceError_003E_002ERelease(&cComPtrNtv_003CIServiceError_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIWinLiveInformation_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIWinLiveInformation_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIWinLiveInformation_003E_002ERelease(&cComPtrNtv_003CIWinLiveInformation_003E); + return result; + } + + public unsafe HRESULT CheckAvailableSigninName(string signinName, [MarshalAs(UnmanagedType.U1)] bool needSuggestedNames, string firstName, string lastName, out WinLiveAvailableInformation information, out ServiceError serviceError) + { + //IL_0060: Expected I, but got I8 + //IL_009b: Expected I, but got I8 + //IL_00ad: Expected I, but got I8 + HRESULT result = CreateComObject(); + CComPtrNtv_003CIWinLiveAvailableInformation_003E cComPtrNtv_003CIWinLiveAvailableInformation_003E; + *(long*)(&cComPtrNtv_003CIWinLiveAvailableInformation_003E) = 0L; + try + { + CComPtrNtv_003CIServiceError_003E cComPtrNtv_003CIServiceError_003E; + *(long*)(&cComPtrNtv_003CIServiceError_003E) = 0L; + try + { + if ((byte)((result.hr >= 0) ? 1u : 0u) != 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(signinName))) + { + try + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(firstName))) + { + try + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(lastName))) + { + try + { + IWinLiveSignup* p = m_spWinLiveSignup.p; + long num = *(long*)p + 40; + result.hr = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)p, ptr, needSuggestedNames ? ((byte)1) : ((byte)0), ptr2, ptr3, (IWinLiveAvailableInformation**)(&cComPtrNtv_003CIWinLiveAvailableInformation_003E), (IServiceError**)(&cComPtrNtv_003CIServiceError_003E)); + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + if ((byte)((result.hr >= 0) ? 1u : 0u) != 0) + { + information = new WinLiveAvailableInformation((IWinLiveAvailableInformation*)(*(ulong*)(&cComPtrNtv_003CIWinLiveAvailableInformation_003E))); + } + if (*(long*)(&cComPtrNtv_003CIServiceError_003E) != 0L) + { + serviceError = new ServiceError((IServiceError*)(*(ulong*)(&cComPtrNtv_003CIServiceError_003E))); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIServiceError_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIServiceError_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIServiceError_003E_002ERelease(&cComPtrNtv_003CIServiceError_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIWinLiveAvailableInformation_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIWinLiveAvailableInformation_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIWinLiveAvailableInformation_003E_002ERelease(&cComPtrNtv_003CIWinLiveAvailableInformation_003E); + return result; + } + + public unsafe HRESULT CreateAccount(string signinName, string signinPassword, string secretQuestion, string secretAnswer, string countryCode, string hipChallenge, string hipSolution, DateTime birthday, int termsOfServiceVersion, int languagePreference, out ServiceError serviceError) + { + //IL_0091: Expected I, but got I8 + //IL_00ec: Expected I, but got I8 + HRESULT result = CreateComObject(); + CComPtrNtv_003CIServiceError_003E cComPtrNtv_003CIServiceError_003E; + _003CModule_003E.CComPtrNtv_003CIServiceError_003E_002E_007Bctor_007D(&cComPtrNtv_003CIServiceError_003E); + try + { + if (result.IsSuccess) + { + _SYSTEMTIME sYSTEMTIME = _003CModule_003E.DateTimeToSystemTime(birthday); + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(signinName))) + { + try + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(signinPassword))) + { + try + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(secretQuestion))) + { + try + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(secretAnswer))) + { + try + { + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(countryCode))) + { + try + { + fixed (ushort* ptr7 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(hipChallenge))) + { + try + { + fixed (ushort* ptr8 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(hipSolution))) + { + try + { + IWinLiveSignup* ptr = m_spWinLiveSignup.op_MemberSelection(); + long num = *(long*)ptr + 48; + result.hr = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)ptr, ptr2, ptr3, ptr4, ptr5, ptr6, ptr7, ptr8, &sYSTEMTIME, termsOfServiceVersion, languagePreference, (IServiceError**)(&cComPtrNtv_003CIServiceError_003E)); + } + catch + { + //try-fault + ptr8 = null; + throw; + } + } + } + catch + { + //try-fault + ptr7 = null; + throw; + } + } + } + catch + { + //try-fault + ptr6 = null; + throw; + } + } + } + catch + { + //try-fault + ptr5 = null; + throw; + } + } + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + if (*(long*)(&cComPtrNtv_003CIServiceError_003E) != 0L) + { + serviceError = new ServiceError((IServiceError*)(*(ulong*)(&cComPtrNtv_003CIServiceError_003E))); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIServiceError_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIServiceError_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIServiceError_003E_002ERelease(&cComPtrNtv_003CIServiceError_003E); + return result; + } + + private unsafe HRESULT CreateComObject() + { + //IL_0045: Expected I, but got I8 + //IL_0045: Expected I, but got I8 + //IL_005b: Expected I, but got I8 + //IL_0073: Expected I, but got I8 + //IL_0073: Expected I, but got I8 + //IL_0088: Expected I, but got I8 + int num = 0; + if ((long)(nint)m_spWinLiveSignup.p == 0) + { + CComPtrNtv_003CIService_003E cComPtrNtv_003CIService_003E; + *(long*)(&cComPtrNtv_003CIService_003E) = 0L; + try + { + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&cComPtrNtv_003CIService_003E)); + CComPtrNtv_003CIUnknown_003E cComPtrNtv_003CIUnknown_003E; + *(long*)(&cComPtrNtv_003CIUnknown_003E) = 0L; + try + { + if (num >= 0) + { + long num2 = *(long*)(&cComPtrNtv_003CIService_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIService_003E)) + 96)))((nint)num2, (IUnknown**)(&cComPtrNtv_003CIUnknown_003E)); + } + CComPtrNtv_003CIWinLiveSignup_003E cComPtrNtv_003CIWinLiveSignup_003E; + *(long*)(&cComPtrNtv_003CIWinLiveSignup_003E) = 0L; + try + { + if (num >= 0) + { + num = _003CModule_003E.IUnknown_002EQueryInterface_003Cstruct_0020IWinLiveSignup_003E((IUnknown*)(*(ulong*)(&cComPtrNtv_003CIUnknown_003E)), (IWinLiveSignup**)(&cComPtrNtv_003CIWinLiveSignup_003E)); + if (num >= 0) + { + long num3 = *(long*)(&cComPtrNtv_003CIWinLiveSignup_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIWinLiveSignup_003E)) + 24)))((nint)num3); + if (num >= 0) + { + m_spWinLiveSignup.op_Assign((IWinLiveSignup*)(*(ulong*)(&cComPtrNtv_003CIWinLiveSignup_003E))); + } + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIWinLiveSignup_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIWinLiveSignup_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIWinLiveSignup_003E_002ERelease(&cComPtrNtv_003CIWinLiveSignup_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIUnknown_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIUnknown_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIUnknown_003E_002ERelease(&cComPtrNtv_003CIUnknown_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIService_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIService_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIService_003E_002ERelease(&cComPtrNtv_003CIService_003E); + } + return new HRESULT(num); + } + + public void _007EWinLiveSignup() + { + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + } + finally + { + ((IDisposable)m_spWinLiveSignup).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Subscription/CSubscriptionCredentialProviderProxy.cs b/ZuneDBApi/Microsoft/Zune/Subscription/CSubscriptionCredentialProviderProxy.cs new file mode 100644 index 0000000..32ce347 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Subscription/CSubscriptionCredentialProviderProxy.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Subscription +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [MiscellaneousBits(64)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct CSubscriptionCredentialProviderProxy + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Subscription/CSubscriptionEventProxy.cs b/ZuneDBApi/Microsoft/Zune/Subscription/CSubscriptionEventProxy.cs new file mode 100644 index 0000000..f6827e2 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Subscription/CSubscriptionEventProxy.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Subscription +{ + [StructLayout(LayoutKind.Sequential, Size = 72)] + [NativeCppClass] + [DebugInfoInPDB] + [MiscellaneousBits(64)] + internal struct CSubscriptionEventProxy + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Subscription/PROPERTY_TO_PID_MAP.cs b/ZuneDBApi/Microsoft/Zune/Subscription/PROPERTY_TO_PID_MAP.cs new file mode 100644 index 0000000..16e26ce --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Subscription/PROPERTY_TO_PID_MAP.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Subscription +{ + [StructLayout(LayoutKind.Sequential, Size = 16)] + [NativeCppClass] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + internal struct PROPERTY_TO_PID_MAP + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionAction.cs b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionAction.cs new file mode 100644 index 0000000..c34bcb9 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionAction.cs @@ -0,0 +1,10 @@ +namespace Microsoft.Zune.Subscription +{ + public enum SubscriptionAction + { + Unsubscribed = 3, + RefreshFinished = 2, + RefreshStarted = 1, + Subscribed = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionCredentialHandler.cs b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionCredentialHandler.cs new file mode 100644 index 0000000..8414ce1 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionCredentialHandler.cs @@ -0,0 +1,7 @@ +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Subscription +{ + [return: MarshalAs(UnmanagedType.U1)] + public delegate bool SubscriptionCredentialHandler(SubscriptonCredentialRequestArguments args); +} diff --git a/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionDataProvider.cs b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionDataProvider.cs new file mode 100644 index 0000000..401c8a6 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionDataProvider.cs @@ -0,0 +1,21 @@ +using Microsoft.Iris; + +namespace Microsoft.Zune.Subscription +{ + public class SubscriptionDataProvider + { + public static void Register() + { + Application.RegisterDataProvider("DynamicRssView", ConstructQuery); + } + + public static DataProviderQuery ConstructQuery(object queryTypeCookie) + { + return new SubscriptionDataProviderQuery(queryTypeCookie); + } + + private SubscriptionDataProvider() + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionDataProviderItem.cs b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionDataProviderItem.cs new file mode 100644 index 0000000..3a99724 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionDataProviderItem.cs @@ -0,0 +1,431 @@ +using System; +using System.Runtime.CompilerServices; +using _003CCppImplementationDetails_003E; +using Microsoft.Iris; + +namespace Microsoft.Zune.Subscription +{ + public class SubscriptionDataProviderItem : DataProviderObject + { + private string m_feedUrl; + + private int m_nSeriesId = -1; + + private int m_nEpisodeId = -1; + + private EItemDownloadState m_eLastDownloadState = EItemDownloadState.eDownloadStateNone; + + private unsafe IMSMediaSchemaPropertySet* m_pEpisodePropertySet; + + public unsafe SubscriptionDataProviderItem(DataProviderQuery owner, object typeCookie, string feedUrl, IMSMediaSchemaPropertySet* pEpisodePropertySet) + : base(owner, typeCookie) + { + //IL_0039: Expected I, but got I8 + m_feedUrl = feedUrl; + m_pEpisodePropertySet = pEpisodePropertySet; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pEpisodePropertySet + 8)))((nint)pEpisodePropertySet); + BindToLocalEpisode(); + } + + public unsafe override object GetProperty(string propertyName) + { + //IL_00b6: Expected I4, but got I8 + //IL_024a: Expected I, but got I8 + //IL_0256: Expected I, but got I8 + //IL_0286: Expected I, but got I8 + _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040 _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040; + *(long*)(&_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1M_0040MNHBCACD_0040_003F_0024AAT_003F_0024AAi_003F_0024AAt_003F_0024AAl_003F_0024AAe_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 8)) = 16797697; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, long>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 16)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BI_0040DLMANABL_0040_003F_0024AAD_003F_0024AAe_003F_0024AAs_003F_0024AAc_003F_0024AAr_003F_0024AAi_003F_0024AAp_003F_0024AAt_003F_0024AAi_003F_0024AAo_003F_0024AAn_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 24)) = 134238211; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, long>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 32)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BC_0040CGFFANJJ_0040_003F_0024AAD_003F_0024AAu_003F_0024AAr_003F_0024AAa_003F_0024AAt_003F_0024AAi_003F_0024AAo_003F_0024AAn_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 40)) = 16797701; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, long>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 48)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BI_0040IMGEIAFE_0040_003F_0024AAR_003F_0024AAe_003F_0024AAl_003F_0024AAe_003F_0024AAa_003F_0024AAs_003F_0024AAe_003F_0024AAD_003F_0024AAa_003F_0024AAt_003F_0024AAe_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 56)) = 150995204; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, long>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 64)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BC_0040BFOBHOBE_0040_003F_0024AAE_003F_0024AAx_003F_0024AAp_003F_0024AAl_003F_0024AAi_003F_0024AAc_003F_0024AAi_003F_0024AAt_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 72)) = 83906566; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, long>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 80)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1O_0040IKCDCNCP_0040_003F_0024AAA_003F_0024AAu_003F_0024AAt_003F_0024AAh_003F_0024AAo_003F_0024AAr_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 88)) = 16797704; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, long>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 96)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BK_0040DIFENCED_0040_003F_0024AAE_003F_0024AAn_003F_0024AAc_003F_0024AAl_003F_0024AAo_003F_0024AAs_003F_0024AAu_003F_0024AAr_003F_0024AAe_003F_0024AAU_003F_0024AAr_003F_0024AAl_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 104)) = 134238215; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, long>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 112)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1CC_0040PFACMMFM_0040_003F_0024AAE_003F_0024AAp_003F_0024AAi_003F_0024AAs_003F_0024AAo_003F_0024AAd_003F_0024AAe_003F_0024AAM_003F_0024AAe_003F_0024AAd_003F_0024AAi_003F_0024AAa_003F_0024AAT_003F_0024AAy_003F_0024AAp_003F_0024AAe_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 120)) = 100683786; + int num = 0; + CComPropVariant cComPropVariant; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + object result; + try + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + if (_003CModule_003E._wcsicmp(ptr, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BE_0040NCILDCLH_0040_003F_0024AAL_003F_0024AAi_003F_0024AAb_003F_0024AAr_003F_0024AAa_003F_0024AAr_003F_0024AAy_003F_0024AAI_003F_0024AAd_003F_0024AA_003F_0024AA_0040)) == 0) + { + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant, 8)) = m_nEpisodeId; + *(short*)(&cComPropVariant) = 3; + } + else if (_003CModule_003E._wcsicmp(ptr, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BC_0040JCKMNCPP_0040_003F_0024AAS_003F_0024AAe_003F_0024AAr_003F_0024AAi_003F_0024AAe_003F_0024AAs_003F_0024AAI_003F_0024AAd_003F_0024AA_003F_0024AA_0040)) == 0) + { + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant, 8)) = m_nSeriesId; + *(short*)(&cComPropVariant) = 3; + } + else + { + if (_003CModule_003E._wcsicmp(ptr, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BM_0040BGELMDBM_0040_003F_0024AAD_003F_0024AAo_003F_0024AAw_003F_0024AAn_003F_0024AAl_003F_0024AAo_003F_0024AAa_003F_0024AAd_003F_0024AAS_003F_0024AAt_003F_0024AAa_003F_0024AAt_003F_0024AAe_003F_0024AA_003F_0024AA_0040)) == 0) + { + int nEpisodeId = m_nEpisodeId; + if (nEpisodeId >= 0) + { + num = GetDatabaseValue(nEpisodeId, 145u, (tagPROPVARIANT*)(&cComPropVariant)); + if (num < 0) + { + goto IL_02b0; + } + if (m_eLastDownloadState != (EItemDownloadState)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant, 8))) + { + InvalidateDownloadState(); + } + m_eLastDownloadState = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant, 8)); + } + else + { + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant, 8)) = 0; + *(short*)(&cComPropVariant) = 3; + } + } + else if (_003CModule_003E._wcsicmp(ptr, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BK_0040EPGEAFPP_0040_003F_0024AAD_003F_0024AAo_003F_0024AAw_003F_0024AAn_003F_0024AAl_003F_0024AAo_003F_0024AAa_003F_0024AAd_003F_0024AAT_003F_0024AAy_003F_0024AAp_003F_0024AAe_003F_0024AA_003F_0024AA_0040)) == 0) + { + int nEpisodeId2 = m_nEpisodeId; + if (nEpisodeId2 >= 0) + { + num = GetDatabaseValue(nEpisodeId2, 146u, (tagPROPVARIANT*)(&cComPropVariant)); + } + else + { + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant, 8)) = 0; + *(short*)(&cComPropVariant) = 3; + } + } + else if (_003CModule_003E._wcsicmp(ptr, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BK_0040JJCAOHOO_0040_003F_0024AAP_003F_0024AAl_003F_0024AAa_003F_0024AAy_003F_0024AAe_003F_0024AAd_003F_0024AAS_003F_0024AAt_003F_0024AAa_003F_0024AAt_003F_0024AAu_003F_0024AAs_003F_0024AA_003F_0024AA_0040)) == 0) + { + *(short*)(&cComPropVariant) = 1; + int nEpisodeId3 = m_nEpisodeId; + if (nEpisodeId3 < 0) + { + goto IL_028b; + } + num = GetDatabaseValue(nEpisodeId3, 262u, (tagPROPVARIANT*)(&cComPropVariant)); + } + else if (_003CModule_003E._wcsicmp(ptr, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BE_0040HHOJDPEL_0040_003F_0024AAS_003F_0024AAo_003F_0024AAu_003F_0024AAr_003F_0024AAc_003F_0024AAe_003F_0024AAU_003F_0024AAr_003F_0024AAl_003F_0024AA_003F_0024AA_0040)) == 0) + { + *(short*)(&cComPropVariant) = 1; + int nEpisodeId4 = m_nEpisodeId; + if (nEpisodeId4 < 0) + { + goto IL_028b; + } + num = GetDatabaseValue(nEpisodeId4, 317u, (tagPROPVARIANT*)(&cComPropVariant)); + } + else if (_003CModule_003E._wcsicmp(ptr, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1CE_0040ELHJHONN_0040_003F_0024AAD_003F_0024AAo_003F_0024AAw_003F_0024AAn_003F_0024AAl_003F_0024AAo_003F_0024AAa_003F_0024AAd_003F_0024AAE_003F_0024AAr_003F_0024AAr_003F_0024AAo_003F_0024AAr_003F_0024AAC_003F_0024AAo_003F_0024AAd_003F_0024AAe_003F_0024AA_003F_0024AA_0040)) == 0) + { + *(short*)(&cComPropVariant) = 1; + int nEpisodeId5 = m_nEpisodeId; + if (nEpisodeId5 < 0) + { + goto IL_028b; + } + num = GetDatabaseValue(nEpisodeId5, 144u, (tagPROPVARIANT*)(&cComPropVariant)); + } + else + { + int num2 = 0; + PROPERTY_TO_PID_MAP* ptr2 = (PROPERTY_TO_PID_MAP*)(&_0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040); + while (_003CModule_003E._wcsicmp(ptr, (ushort*)(*(ulong*)ptr2)) != 0) + { + num2++; + ptr2 = (PROPERTY_TO_PID_MAP*)((ulong)(nint)ptr2 + 16uL); + if ((uint)num2 < 8u) + { + continue; + } + goto IL_028b; + } + uint num3 = *(uint*)((long)num2 * 16L + (ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY07UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 8))); + IMSMediaSchemaPropertySet* pEpisodePropertySet = m_pEpisodePropertySet; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pEpisodePropertySet + 48)))((nint)pEpisodePropertySet, num3, 0u, (tagPROPVARIANT*)(&cComPropVariant)); + } + if (num < 0) + { + goto IL_02b0; + } + } + goto IL_028b; + IL_02b0: + result = base.Mappings[propertyName].DefaultValue; + goto end_IL_00c8; + IL_028b: + if (_003CModule_003E.CComPropVariant_002EIsNullOrEmpty(&cComPropVariant)) + { + goto IL_02b0; + } + result = SubscriptionDataProviderQueryResult.ConvertVariantToType(base.Mappings[propertyName].PropertyTypeName, &cComPropVariant); + end_IL_00c8:; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + return result; + } + + public unsafe override void SetProperty(string propertyName, object value) + { + //IL_0046: Expected I, but got I8 + if (m_nEpisodeId > 0 && propertyName == "DownloadErrorCode") + { + tagVARIANT tagVARIANT; + *(short*)(&tagVARIANT) = 3; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagVARIANT, 8)) = (int)value; + DBPropertySubmitStruct dBPropertySubmitStruct; + *(int*)(&dBPropertySubmitStruct) = 144; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref dBPropertySubmitStruct, 8)) = (nint)(&tagVARIANT); + int num = _003CModule_003E.ZuneLibraryExports_002ESetFieldValues(m_nEpisodeId, EListType.ePodcastEpisodeList, 1, &dBPropertySubmitStruct, null); + if (0 == num) + { + FirePropertyChanged(propertyName); + } + } + } + + public unsafe virtual void SaveToLibrary() + { + //IL_0003: Expected I, but got I8 + //IL_0006: Expected I, but got I8 + //IL_0033: Expected I, but got I8 + //IL_0033: Expected I, but got I8 + //IL_0067: Expected I, but got I8 + //IL_0098: Expected I, but got I8 + //IL_009c: Expected I, but got I8 + //IL_00ae: Expected I, but got I8 + IService* ptr = null; + ISubscriptionManager* ptr2 = null; + int num = 1; + int nSeriesId = -1; + int nEpisodeId = -1; + int singleton = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&ptr)); + if (singleton >= 0) + { + IService* intPtr = ptr; + singleton = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 384)))((nint)intPtr, null, &num); + if (singleton >= 0) + { + singleton = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_9dc7c984_41d5_4130_a5ac_46d0825cd29d, (void**)(&ptr2)); + if (singleton >= 0) + { + ISubscriptionManager* intPtr2 = ptr2; + int num2 = num; + IMSMediaSchemaPropertySet* pEpisodePropertySet = m_pEpisodePropertySet; + singleton = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 136)))((nint)intPtr2, num2, EMediaTypes.eMediaTypePodcastSeries, pEpisodePropertySet, &nSeriesId, &nEpisodeId); + if (singleton >= 0) + { + m_nSeriesId = nSeriesId; + m_nEpisodeId = nEpisodeId; + FirePropertyChanged("DownloadState"); + } + } + } + } + if (0L != (nint)ptr) + { + IService* intPtr3 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + ptr = null; + } + if (0L != (nint)ptr2) + { + ISubscriptionManager* intPtr4 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr4 + 16)))((nint)intPtr4); + } + } + + internal unsafe void OnDispose() + { + //IL_0019: Expected I, but got I8 + //IL_0022: Expected I, but got I8 + IMSMediaSchemaPropertySet* pEpisodePropertySet = m_pEpisodePropertySet; + if (0L != (nint)pEpisodePropertySet) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pEpisodePropertySet + 16)))((nint)pEpisodePropertySet); + m_pEpisodePropertySet = null; + } + } + + private unsafe int BindToLocalEpisode() + { + //IL_0003: Expected I, but got I8 + //IL_000b: Expected I4, but got I8 + //IL_0013: Expected I4, but got I8 + //IL_0050: Expected I, but got I8 + //IL_0071: Expected I, but got I8 + //IL_009a: Expected I, but got I8 + //IL_009a: Expected I, but got I8 + //IL_009a: Expected I, but got I8 + //IL_00a7: Expected I4, but got I8 + //IL_00e2: Expected I, but got I8 + //IL_00e6: Expected I, but got I8 + ISubscriptionManager* ptr = null; + CComPropVariant cComPropVariant; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + int num2; + try + { + CComPropVariant cComPropVariant2; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant2, 0, 24); + try + { + int num = -1; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_feedUrl))) + { + num2 = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_9dc7c984_41d5_4130_a5ac_46d0825cd29d, (void**)(&ptr)); + if (num2 >= 0) + { + IMSMediaSchemaPropertySet* pEpisodePropertySet = m_pEpisodePropertySet; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pEpisodePropertySet + 48)))((nint)pEpisodePropertySet, 16797697u, 0u, (tagPROPVARIANT*)(&cComPropVariant)); + if (num2 >= 0) + { + IMSMediaSchemaPropertySet* pEpisodePropertySet2 = m_pEpisodePropertySet; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pEpisodePropertySet2 + 48)))((nint)pEpisodePropertySet2, 134238215u, 0u, (tagPROPVARIANT*)(&cComPropVariant2)); + if (num2 >= 0) + { + long num3 = *(long*)ptr + 160; + ISubscriptionManager* intPtr = ptr; + _003F val = ptr2; + long num4 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant, 8)); + long num5 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant2, 8)); + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)intPtr, EMediaTypes.eMediaTypePodcastSeries, (ushort*)(nint)val, (ushort*)num4, (ushort*)num5, &num); + } + } + } + if (0 == num2) + { + tagPROPVARIANT tagPROPVARIANT; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref tagPROPVARIANT, 0, 24); + num2 = GetDatabaseValue(num, 311u, &tagPROPVARIANT); + if (num2 >= 0) + { + m_nEpisodeId = num; + m_nSeriesId = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagPROPVARIANT, 8)); + } + } + if (0L != (nint)ptr) + { + ISubscriptionManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + ptr = null; + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant2); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant2); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + return num2; + } + + private int InvalidateDownloadState() + { + FirePropertyChanged("DownloadState"); + FirePropertyChanged("DownloadType"); + FirePropertyChanged("DownloadErrorCode"); + return 0; + } + + private unsafe int GetDatabaseValue(int nMediaId, uint dwAtom, tagPROPVARIANT* pvarValue) + { + //IL_001b: Expected I, but got I8 + //IL_0042: Expected I, but got I8 + //IL_0042: Expected I, but got I8 + //IL_0046: Expected I, but got I8 + //IL_006e: Expected I, but got I8 + //IL_00b0: Expected I, but got I8 + //IL_00b4: Expected I, but got I8 + //IL_00c8: Expected I, but got I8 + //IL_00cc: Expected I, but got I8 + if (pvarValue == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 633u); + return -2147467261; + } + IService* ptr = null; + int num = 1; + int num2 = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&ptr)); + if (num2 >= 0) + { + IService* intPtr = ptr; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 384)))((nint)intPtr, null, &num); + } + IQueryPropertyBag* ptr2 = null; + DBPropertyRequestStruct dBPropertyRequestStruct; + _003CModule_003E.DBPropertyRequestStruct_002E_007Bctor_007D(&dBPropertyRequestStruct, dwAtom); + try + { + if (num2 >= 0) + { + num2 = _003CModule_003E.ZuneLibraryExports_002ECreatePropertyBag(&ptr2); + if (num2 >= 0) + { + IQueryPropertyBag* intPtr2 = ptr2; + int num3 = num; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 56)))((nint)intPtr2, (EQueryPropertyBagProp)0, num3); + if (num2 >= 0) + { + num2 = _003CModule_003E.ZuneLibraryExports_002EGetFieldValues(nMediaId, EListType.ePodcastEpisodeList, 1, &dBPropertyRequestStruct, ptr2); + if (num2 >= 0) + { + num2 = ((System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref dBPropertyRequestStruct, 4)) < 0) ? System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref dBPropertyRequestStruct, 4)) : _003CModule_003E.PropVariantCopy(pvarValue, (tagPROPVARIANT*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref dBPropertyRequestStruct, 8)))); + } + } + } + } + if (0L != (nint)ptr2) + { + IQueryPropertyBag* intPtr3 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + ptr2 = null; + } + if (0L != (nint)ptr) + { + IService* intPtr4 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr4 + 16)))((nint)intPtr4); + ptr = null; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.DBPropertyRequestStruct_002E_007Bdtor_007D), &dBPropertyRequestStruct); + throw; + } + _003CModule_003E.DBPropertyRequestStruct_002E_007Bdtor_007D(&dBPropertyRequestStruct); + return num2; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionDataProviderQuery.cs b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionDataProviderQuery.cs new file mode 100644 index 0000000..71713c5 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionDataProviderQuery.cs @@ -0,0 +1,46 @@ +using Microsoft.Iris; + +namespace Microsoft.Zune.Subscription +{ + public class SubscriptionDataProviderQuery : DataProviderQuery + { + internal SubscriptionDataProviderQuery(object queryTypeCookie) + : base(queryTypeCookie) + { + } + + protected override void BeginExecute() + { + string text = (string)GetProperty("FeedUrl"); + string text2 = (string)GetProperty("Sort"); + string serviceId = (string)GetProperty("ServiceID"); + if (Result != null) + { + VirtualSubscriptionEpisodeList virtualSubscriptionEpisodeList = (VirtualSubscriptionEpisodeList)((SubscriptionDataProviderQueryResult)Result).GetProperty("Items"); + if (null != virtualSubscriptionEpisodeList && virtualSubscriptionEpisodeList.FeedUrl == text) + { + virtualSubscriptionEpisodeList.Sort(text2); + FirePropertyChanged("Result"); + } + else + { + ((SubscriptionDataProviderQueryResult)Result).OnDispose(); + Result = new SubscriptionDataProviderQueryResult(this, base.ResultTypeCookie, text, serviceId, text2); + } + } + else + { + Result = new SubscriptionDataProviderQueryResult(this, base.ResultTypeCookie, text, serviceId, text2); + } + } + + protected override void OnDispose() + { + if (Result != null) + { + ((SubscriptionDataProviderQueryResult)Result).OnDispose(); + } + Result = null; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionDataProviderQueryResult.cs b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionDataProviderQueryResult.cs new file mode 100644 index 0000000..23e7674 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionDataProviderQueryResult.cs @@ -0,0 +1,85 @@ +using System; +using Microsoft.Iris; + +namespace Microsoft.Zune.Subscription +{ + public class SubscriptionDataProviderQueryResult : DataProviderObject + { + private SubscriptionSeriesInfo m_seriesInfo; + + private VirtualSubscriptionEpisodeList m_episodeList; + + public SubscriptionDataProviderQueryResult(DataProviderQuery owner, object typeCookie, string feedUrl, string serviceId, string sort) + : base(owner, typeCookie) + { + m_episodeList = new VirtualSubscriptionEpisodeList(owner, base.Mappings["Items"].UnderlyingCollectionTypeCookie, feedUrl, sort); + m_seriesInfo = new SubscriptionSeriesInfo(owner, base.Mappings["PodcastSeriesInfo"].PropertyTypeCookie, serviceId); + if (!string.IsNullOrEmpty(feedUrl)) + { + m_episodeList.AsyncRetrieveEpisodeList(m_seriesInfo); + } + } + + public void OnDispose() + { + ((IDisposable)m_episodeList)?.Dispose(); + m_episodeList = null; + SubscriptionSeriesInfo seriesInfo = m_seriesInfo; + if (seriesInfo != null) + { + seriesInfo.OnDispose(); + m_seriesInfo = null; + } + } + + public override object GetProperty(string propertyName) + { + if ("Items" == propertyName) + { + return m_episodeList; + } + if ("PodcastSeriesInfo" == propertyName) + { + return m_seriesInfo; + } + return null; + } + + public override void SetProperty(string propertyName, object value) + { + //Discarded unreachable code: IL_0006 + throw new NotSupportedException(); + } + + public unsafe static object ConvertVariantToType(string typeName, CComPropVariant* varValue) + { + //IL_0055: Expected I, but got I8 + object result = null; + switch (typeName) + { + case "Int32": + result = *(int*)((ulong)(nint)varValue + 8uL); + break; + case "Boolean": + { + byte b = ((*(short*)((ulong)(nint)varValue + 8uL) == -1) ? ((byte)1) : ((byte)0)); + result = b != 0; + break; + } + case "String": + result = new string((char*)(*(ulong*)((ulong)(nint)varValue + 8uL))); + break; + case "TimeSpan": + { + TimeSpan timeSpan = new TimeSpan(0, 0, 0, 0, *(int*)((ulong)(nint)varValue + 8uL)); + result = timeSpan; + break; + } + case "DateTime": + result = DateTime.FromOADate(*(double*)((ulong)(nint)varValue + 8uL)); + break; + } + return result; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionEventHandler.cs b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionEventHandler.cs new file mode 100644 index 0000000..84727c1 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionEventHandler.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Subscription +{ + public delegate void SubscriptionEventHandler(SubscriptonEventArguments args); +} diff --git a/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionManager.cs b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionManager.cs new file mode 100644 index 0000000..82067e6 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionManager.cs @@ -0,0 +1,871 @@ +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; + +namespace Microsoft.Zune.Subscription +{ + public class SubscriptionManager : IDisposable + { + private unsafe ISubscriptionManager* m_pSubscriptionManager; + + private SubscriptionEventHandler m_SubscriptionEventHandler; + + private static SubscriptionManager sm_instance = null; + + private static object sm_lock = new object(); + + public static SubscriptionManager Instance + { + get + { + if (sm_instance == null) + { + try + { + Monitor.Enter(sm_lock); + if (sm_instance == null) + { + SubscriptionManager subscriptionManager = new SubscriptionManager(); + Thread.MemoryBarrier(); + sm_instance = subscriptionManager; + } + } + finally + { + Monitor.Exit(sm_lock); + } + } + return sm_instance; + } + } + + [SpecialName] + public event SubscriptionEventHandler OnForegroundSubscriptionChanged + { + add + { + m_SubscriptionEventHandler = (SubscriptionEventHandler)Delegate.Combine(m_SubscriptionEventHandler, value); + } + remove + { + m_SubscriptionEventHandler = (SubscriptionEventHandler)Delegate.Remove(m_SubscriptionEventHandler, value); + } + } + + private void _007ESubscriptionManager() + { + _0021SubscriptionManager(); + } + + private unsafe void _0021SubscriptionManager() + { + //IL_0017: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + ISubscriptionManager* pSubscriptionManager = m_pSubscriptionManager; + if (pSubscriptionManager != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSubscriptionManager + 16)))((nint)pSubscriptionManager); + m_pSubscriptionManager = null; + } + } + + public unsafe int Subscribe(int subscriptionMediaId, EMediaTypes eSubscriptionMediaType) + { + //IL_0018: Expected I, but got I8 + //IL_004b: Expected I, but got I8 + //IL_006c: Expected I, but got I8 + int num = 0; + num = (((long)(nint)m_pSubscriptionManager == 0) ? (-2147467261) : num); + CSubscriptionEventProxy* ptr = null; + if (num >= 0) + { + SubscribeToEvent(subscriptionMediaId, eSubscriptionMediaType, null, SubscriptionAction.RefreshFinished, userInitiated: true, &ptr); + long num2 = *(long*)m_pSubscriptionManager + 24; + ISubscriptionManager* pSubscriptionManager = m_pSubscriptionManager; + int lastSignedInUserId = GetLastSignedInUserId(); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pSubscriptionManager, lastSignedInUserId, subscriptionMediaId, eSubscriptionMediaType); + if (num < 0) + { + if (ptr == null) + { + goto IL_006d; + } + _003CModule_003E.Microsoft_002EZune_002ESubscription_002ECSubscriptionEventProxy_002EUninitialize(ptr); + } + if (0L != (nint)ptr) + { + CSubscriptionEventProxy* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + } + } + goto IL_006d; + IL_006d: + return num; + } + + public unsafe int Subscribe(string feedUrl, string subscriptionTitle, Guid serviceId, [MarshalAs(UnmanagedType.U1)] bool isPersonalChannel, EMediaTypes eSubscriptionMediaType, ESubscriptionSource subscriptionSource, out int subscriptionMediaId) + { + //IL_0035: Expected I4, but got I8 + //IL_0070: Expected I, but got I8 + //IL_00bd: Expected I, but got I8 + //IL_00cb: Expected I4, but got I8 + //IL_00d3: Expected I4, but got I8 + //IL_00db: Expected I4, but got I8 + //IL_0128: Expected I8, but got I + //IL_016d: Expected I, but got I8 + //IL_018c: Expected I, but got I8 + //IL_01ab: Expected I, but got I8 + //IL_01cf: Expected I, but got I8 + //IL_0245: Expected I, but got I8 + //IL_028f: Expected I, but got I8 + int num = 0; + if (m_pSubscriptionManager == null || feedUrl == (string)null) + { + num = -2147467261; + } + int num2 = -1; + int lastSignedInUserId = GetLastSignedInUserId(); + _GUID gUID; + *(int*)(&gUID) = 0; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref gUID, 4), 0, 12); + tagPROPVARIANT tagPROPVARIANT; + *(short*)(&tagPROPVARIANT) = 1; + if (serviceId != Guid.Empty) + { + gUID = _003CModule_003E.GuidToGUID(serviceId); + *(short*)(&tagPROPVARIANT) = 72; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagPROPVARIANT, 8)) = (nint)(&gUID); + } + if (num >= 0 && EMediaTypes.eMediaTypePlaylist != eSubscriptionMediaType) + { + num = ValidateUrl(ref feedUrl); + } + IMSMediaSchemaPropertySet* ptr = null; + if (num >= 0) + { + if (eSubscriptionMediaType != EMediaTypes.eMediaTypePlaylist) + { + if (eSubscriptionMediaType == EMediaTypes.eMediaTypePodcastSeries && 72 == *(ushort*)(&tagPROPVARIANT)) + { + num = _003CModule_003E.ZuneLibraryExports_002ECreatePropertySet((_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.ID_MS_MEDIA_SCHEMA_SERIES), 3229616385u, &ptr); + if (num < 0) + { + goto IL_027f; + } + IMSMediaSchemaPropertySet* intPtr = ptr; + tagPROPVARIANT tagPROPVARIANT2 = tagPROPVARIANT; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 56)))((nint)intPtr, 67133455u, tagPROPVARIANT2); + } + } + else + { + CComPropVariant cComPropVariant; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + try + { + CComPropVariant cComPropVariant2; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant2, 0, 24); + try + { + CComPropVariant cComPropVariant3; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant3, 0, 24); + try + { + EPlaylistType nSrc = (isPersonalChannel ? ((EPlaylistType)6) : ((EPlaylistType)5)); + _003CModule_003E.CComPropVariant_002E_003D(&cComPropVariant, (int)nSrc); + _003CModule_003E.CComPropVariant_002E_003D(&cComPropVariant3, lastSignedInUserId); + num = _003CModule_003E.ZuneLibraryExports_002ECreatePropertySet((_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.ID_MS_MEDIA_SCHEMA_PLAYLIST), 3229617665u, &ptr); + if (num >= 0) + { + int num3; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(subscriptionTitle))) + { + try + { + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant2, 8)) = (nint)_003CModule_003E.SysAllocString(ptr2); + *(short*)(&cComPropVariant2) = 8; + num3 = ((System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant2, 8)) != 0) ? num : (-2147024882)); + num = num3; + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + if (num3 >= 0) + { + tagPROPVARIANT tagPROPVARIANT3 = (tagPROPVARIANT)cComPropVariant2; + IMSMediaSchemaPropertySet* intPtr2 = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 56)))((nint)intPtr2, 16777217u, tagPROPVARIANT3); + if (num >= 0) + { + tagPROPVARIANT tagPROPVARIANT4 = (tagPROPVARIANT)cComPropVariant; + IMSMediaSchemaPropertySet* intPtr3 = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 56)))((nint)intPtr3, 100663307u, tagPROPVARIANT4); + if (num >= 0) + { + tagPROPVARIANT tagPROPVARIANT5 = (tagPROPVARIANT)cComPropVariant3; + IMSMediaSchemaPropertySet* intPtr4 = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 56)))((nint)intPtr4, 100663309u, tagPROPVARIANT5); + if (num >= 0 && 72 == *(ushort*)(&tagPROPVARIANT)) + { + IMSMediaSchemaPropertySet* intPtr5 = ptr; + tagPROPVARIANT tagPROPVARIANT6 = tagPROPVARIANT; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 56)))((nint)intPtr5, 67108873u, tagPROPVARIANT6); + } + } + } + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant3); + throw; + } + _003CModule_003E.CComPropVariant_002E_007Bdtor_007D(&cComPropVariant3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant2); + throw; + } + _003CModule_003E.CComPropVariant_002E_007Bdtor_007D(&cComPropVariant2); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002E_007Bdtor_007D(&cComPropVariant); + } + if (num >= 0) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(feedUrl))) + { + try + { + long num4 = *(long*)m_pSubscriptionManager + 32; + ISubscriptionManager* pSubscriptionManager = m_pSubscriptionManager; + _003F val = ptr3; + IMSMediaSchemaPropertySet* intPtr6 = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)pSubscriptionManager, lastSignedInUserId, (ushort*)(nint)val, eSubscriptionMediaType, subscriptionSource, intPtr6, &num2); + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + if (num >= 0) + { + subscriptionMediaId = num2; + if (null != m_SubscriptionEventHandler) + { + SubscriptonEventArguments args = new SubscriptonEventArguments(SubscriptionAction.Subscribed, subscriptionTitle, eSubscriptionMediaType, userInitiated: true); + m_SubscriptionEventHandler(args); + } + } + } + goto IL_027f; + } + goto IL_0290; + IL_0290: + return num; + IL_027f: + if (ptr != null) + { + IMSMediaSchemaPropertySet* intPtr7 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr7 + 16)))((nint)intPtr7); + } + goto IL_0290; + } + + public unsafe int Unsubscribe(int subscriptionMediaId, EMediaTypes eSubscriptionMediaType, [MarshalAs(UnmanagedType.U1)] bool deleteContent) + { + //IL_002f: Expected I, but got I8 + ISubscriptionManager* pSubscriptionManager = m_pSubscriptionManager; + int num; + if (pSubscriptionManager == null) + { + num = -2147467261; + } + else + { + long num2 = *(long*)pSubscriptionManager + 40; + ISubscriptionManager* pSubscriptionManager2 = m_pSubscriptionManager; + int lastSignedInUserId = GetLastSignedInUserId(); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pSubscriptionManager2, lastSignedInUserId, subscriptionMediaId, eSubscriptionMediaType, deleteContent ? 1 : 0); + if (num >= 0 && null != m_SubscriptionEventHandler) + { + SubscriptonEventArguments args = new SubscriptonEventArguments(SubscriptionAction.Unsubscribed, null, eSubscriptionMediaType, userInitiated: true); + m_SubscriptionEventHandler(args); + } + } + return num; + } + + public unsafe int Refresh(int subscriptionMediaId, EMediaTypes eSubscriptionMediaType, [MarshalAs(UnmanagedType.U1)] bool refreshCache) + { + //IL_0003: Expected I, but got I8 + //IL_0006: Expected I, but got I8 + //IL_0049: Expected I, but got I8 + //IL_0074: Expected I, but got I8 + //IL_0087: Expected I, but got I8 + CSubscriptionEventProxy* ptr = null; + CSubscriptionEventProxy* ptr2 = null; + int num; + if (m_pSubscriptionManager == null) + { + num = -2147467261; + } + else + { + SubscribeToEvent(subscriptionMediaId, eSubscriptionMediaType, null, SubscriptionAction.RefreshStarted, refreshCache, &ptr); + SubscribeToEvent(subscriptionMediaId, eSubscriptionMediaType, null, SubscriptionAction.RefreshFinished, refreshCache, &ptr2); + ISubscriptionManager* pSubscriptionManager = m_pSubscriptionManager; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSubscriptionManager + 48)))((nint)pSubscriptionManager, subscriptionMediaId, eSubscriptionMediaType, refreshCache ? 1 : 0); + if (num < 0) + { + if (ptr != null) + { + _003CModule_003E.Microsoft_002EZune_002ESubscription_002ECSubscriptionEventProxy_002EUninitialize(ptr); + } + if (ptr2 != null) + { + _003CModule_003E.Microsoft_002EZune_002ESubscription_002ECSubscriptionEventProxy_002EUninitialize(ptr2); + } + } + if (0L != (nint)ptr) + { + CSubscriptionEventProxy* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + } + if (0L != (nint)ptr2) + { + CSubscriptionEventProxy* intPtr2 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + } + return num; + } + + public unsafe int SetSeriesUrl(int subscriptionMediaId, string feedUrl) + { + //IL_0050: Expected I, but got I8 + int num; + if (m_pSubscriptionManager == null || feedUrl == (string)null) + { + num = -2147467261; + } + else + { + num = ValidateUrl(ref feedUrl); + if (num >= 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(feedUrl))) + { + try + { + long num2 = *(long*)m_pSubscriptionManager + 72; + ISubscriptionManager* pSubscriptionManager = m_pSubscriptionManager; + int lastSignedInUserId = GetLastSignedInUserId(); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pSubscriptionManager, lastSignedInUserId, subscriptionMediaId, EMediaTypes.eMediaTypePodcastSeries, ptr); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + } + return num; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool FindByUrl(string feedUrl, EMediaTypes eSubscriptionMediaType, out int subscriptionMediaId, out bool isSubscribed) + { + //IL_005c: Expected I, but got I8 + bool result = false; + int num = 0; + int num2 = -1; + int num3; + if (!(feedUrl == (string)null) && m_pSubscriptionManager != null) + { + subscriptionMediaId = -1; + if (EMediaTypes.eMediaTypePlaylist != eSubscriptionMediaType) + { + num3 = ValidateUrl(ref feedUrl); + if (num3 < 0) + { + goto IL_0066; + } + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(feedUrl))) + { + try + { + long num4 = *(long*)m_pSubscriptionManager + 80; + ISubscriptionManager* pSubscriptionManager = m_pSubscriptionManager; + int lastSignedInUserId = GetLastSignedInUserId(); + num3 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)pSubscriptionManager, lastSignedInUserId, ptr, eSubscriptionMediaType, &num2, &num); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + goto IL_0066; + } + goto IL_007e; + IL_007e: + return result; + IL_0066: + if (0 == num3) + { + subscriptionMediaId = num2; + int num5 = ((isSubscribed = ((num != 0) ? true : false)) ? 1 : 0); + result = true; + } + goto IL_007e; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool FindByServiceId(Guid serviceId, EMediaTypes eSubscriptionMediaType, out int subscriptionMediaId, out bool isSubscribed) + { + //IL_0038: Expected I, but got I8 + subscriptionMediaId = -1; + isSubscribed = false; + bool result = false; + int num = 0; + int num2 = -1; + _GUID gUID = _003CModule_003E.GuidToGUID(serviceId); + ISubscriptionManager* pSubscriptionManager = m_pSubscriptionManager; + int lastSignedInUserId = GetLastSignedInUserId(); + if (0 == ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSubscriptionManager + 88)))((nint)pSubscriptionManager, lastSignedInUserId, &gUID, eSubscriptionMediaType, &num2, &num)) + { + subscriptionMediaId = num2; + int num3 = ((isSubscribed = ((num != 0) ? true : false)) ? 1 : 0); + result = true; + } + return result; + } + + public unsafe int SetCredentialHandler(EMediaTypes eSubscriptionMediaType, SubscriptionCredentialHandler credentialHandler) + { + //IL_0029: Expected I, but got I8 + //IL_0062: Expected I, but got I8 + //IL_0077: Expected I, but got I8 + if (null == credentialHandler) + { + return -2147467261; + } + int num = 0; + CSubscriptionCredentialProviderProxy* ptr = (CSubscriptionCredentialProviderProxy*)_003CModule_003E.@new(24uL); + CSubscriptionCredentialProviderProxy* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002ESubscription_002ECSubscriptionCredentialProviderProxy_002E_007Bctor_007D(ptr)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + CSubscriptionCredentialProviderProxy* ptr3 = ptr2; + try + { + if (ptr2 == null) + { + return -2147024882; + } + num = _003CModule_003E.Microsoft_002EZune_002ESubscription_002ECSubscriptionCredentialProviderProxy_002EInitialize(ptr2, credentialHandler); + if (num >= 0) + { + ISubscriptionManager* pSubscriptionManager = m_pSubscriptionManager; + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSubscriptionManager + 96)))((nint)pSubscriptionManager, eSubscriptionMediaType, (ISubscriptionManagerCredentialProvider*)ptr2); + } + return num; + } + finally + { + if (ptr3 != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr3 + 16)))((nint)ptr3); + } + } + } + + public unsafe int SetManagementSettings(int subscriptionMediaId, uint keepEpisodes, ESeriesPlaybackOrder playbackOrder) + { + //IL_0030: Expected I, but got I8 + ISubscriptionManager* pSubscriptionManager = m_pSubscriptionManager; + int result; + if (pSubscriptionManager == null) + { + result = -2147467261; + } + else + { + long num = *(long*)pSubscriptionManager + 104; + ISubscriptionManager* pSubscriptionManager2 = m_pSubscriptionManager; + int lastSignedInUserId = GetLastSignedInUserId(); + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pSubscriptionManager2, lastSignedInUserId, subscriptionMediaId, EMediaTypes.eMediaTypePodcastSeries, keepEpisodes, playbackOrder); + } + return result; + } + + public unsafe int GetManagementSettings(int subscriptionMediaId, out uint keepEpisodes, out ESeriesPlaybackOrder playbackOrder) + { + //IL_0041: Expected I, but got I8 + int num = 0; + ISubscriptionManager* pSubscriptionManager = m_pSubscriptionManager; + num = (((long)(nint)pSubscriptionManager == 0) ? (-2147467261) : num); + uint num2 = 0u; + ESeriesPlaybackOrder eSeriesPlaybackOrder = ESeriesPlaybackOrder.eSeriesPlaybackOrderNewestFirst; + if (num >= 0) + { + long num3 = *(long*)pSubscriptionManager + 112; + ISubscriptionManager* pSubscriptionManager2 = m_pSubscriptionManager; + int lastSignedInUserId = GetLastSignedInUserId(); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)pSubscriptionManager2, lastSignedInUserId, subscriptionMediaId, EMediaTypes.eMediaTypePodcastSeries, &num2, &eSeriesPlaybackOrder); + if (num >= 0) + { + keepEpisodes = num2; + playbackOrder = eSeriesPlaybackOrder; + } + } + return num; + } + + public unsafe int DownloadEpisode(int subscriptionMediaId, int subscriptionItemMediaId) + { + //IL_002f: Expected I, but got I8 + ISubscriptionManager* pSubscriptionManager = m_pSubscriptionManager; + int result; + if (pSubscriptionManager == null) + { + result = -2147467261; + } + else + { + long num = *(long*)pSubscriptionManager + 120; + ISubscriptionManager* pSubscriptionManager2 = m_pSubscriptionManager; + int lastSignedInUserId = GetLastSignedInUserId(); + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pSubscriptionManager2, lastSignedInUserId, subscriptionMediaId, subscriptionItemMediaId, EMediaTypes.eMediaTypePodcastSeries); + } + return result; + } + + public unsafe int DeleteEpisode(int subscriptionMediaId, int subscriptionItemMediaId) + { + //IL_0032: Expected I, but got I8 + ISubscriptionManager* pSubscriptionManager = m_pSubscriptionManager; + int result; + if (pSubscriptionManager == null) + { + result = -2147467261; + } + else + { + long num = *(long*)pSubscriptionManager + 128; + ISubscriptionManager* pSubscriptionManager2 = m_pSubscriptionManager; + int lastSignedInUserId = GetLastSignedInUserId(); + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pSubscriptionManager2, lastSignedInUserId, subscriptionMediaId, subscriptionItemMediaId, EMediaTypes.eMediaTypePodcastSeries); + } + return result; + } + + public unsafe int SaveEpisodeToCollection(int subscriptionMediaId, int subscriptionItemMediaId) + { + //IL_0032: Expected I, but got I8 + ISubscriptionManager* pSubscriptionManager = m_pSubscriptionManager; + int result; + if (pSubscriptionManager == null) + { + result = -2147467261; + } + else + { + long num = *(long*)pSubscriptionManager + 144; + ISubscriptionManager* pSubscriptionManager2 = m_pSubscriptionManager; + int lastSignedInUserId = GetLastSignedInUserId(); + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pSubscriptionManager2, lastSignedInUserId, subscriptionMediaId, subscriptionItemMediaId, EMediaTypes.eMediaTypePodcastSeries); + } + return result; + } + + public unsafe int SetEpisodeSeriesUrl(IList subscriptionItemMediaIdList, string feedUrl) + { + //IL_002d: Expected I, but got I8 + //IL_00c4: Expected I, but got I8 + int num = ((m_pSubscriptionManager != null && !(feedUrl == (string)null)) ? ValidateUrl(ref feedUrl) : (-2147467261)); + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(feedUrl))) + { + int* ptr = null; + int count = subscriptionItemMediaIdList.Count; + if (num >= 0) + { + try + { + ulong num2 = (ulong)count; + int* ptr2 = (int*)_003CModule_003E.new_005B_005D((num2 > 4611686018427387903L) ? ulong.MaxValue : (num2 * 4)); + ptr = ptr2; + num = (((long)(nint)ptr2 == 0) ? (-2147024882) : num); + if (num >= 0) + { + for (int i = 0; i < count; i++) + { + *(int*)((long)i * 4L + (nint)ptr) = (int)subscriptionItemMediaIdList[i]; + } + long num3 = *(long*)m_pSubscriptionManager + 152; + ISubscriptionManager* pSubscriptionManager = m_pSubscriptionManager; + int lastSignedInUserId = GetLastSignedInUserId(); + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)pSubscriptionManager, lastSignedInUserId, EMediaTypes.eMediaTypePodcastSeries, count, ptr, ptr3); + } + return num; + } + finally + { + if (ptr != null) + { + _003CModule_003E.delete_005B_005D(ptr); + } + } + } + return num; + } + } + + protected unsafe int SubscribeToEvent(int subscriptionMediaId, EMediaTypes eSubscriptionMediaType, string subscriptionTitle, SubscriptionAction targetAction, [MarshalAs(UnmanagedType.U1)] bool userInitiated, CSubscriptionEventProxy** ppSubscriptionEventProxy) + { + //IL_0051: Expected I, but got I8 + //IL_0099: Expected I8, but got I + //IL_00a8: Expected I, but got I8 + if (ppSubscriptionEventProxy == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 1475u); + return -2147467261; + } + CSubscriptionEventProxy* ptr2; + int num; + if (null != m_SubscriptionEventHandler && (EMediaTypes.eMediaTypePodcastSeries == eSubscriptionMediaType || EMediaTypes.eMediaTypePlaylist == eSubscriptionMediaType || EMediaTypes.eMediaTypeUser == eSubscriptionMediaType)) + { + CSubscriptionEventProxy* ptr = (CSubscriptionEventProxy*)_003CModule_003E.@new(72uL); + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002ESubscription_002ECSubscriptionEventProxy_002E_007Bctor_007D(ptr)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + if (ptr2 == null) + { + num = -2147024882; + } + else + { + if ((string)null == subscriptionTitle) + { + num = GetSubscriptionTitle(subscriptionMediaId, eSubscriptionMediaType, out subscriptionTitle); + if (num < 0) + { + goto IL_009b; + } + } + num = _003CModule_003E.Microsoft_002EZune_002ESubscription_002ECSubscriptionEventProxy_002EInitialize(ptr2, m_SubscriptionEventHandler, subscriptionMediaId, eSubscriptionMediaType, subscriptionTitle, targetAction, userInitiated); + if (num < 0) + { + goto IL_009b; + } + *(long*)ppSubscriptionEventProxy = (nint)ptr2; + } + } + else + { + num = 1; + } + goto IL_00ad; + IL_00ad: + return num; + IL_009b: + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + goto IL_00ad; + } + + protected unsafe int GetSubscriptionTitle(int subscriptionMediaId, EMediaTypes subscriptionMediaType, out string subscriptionTitle) + { + //Discarded unreachable code: IL_005a + //IL_0057: Expected I, but got I8 + //IL_0078: Expected I, but got I8 + //IL_00a6: Expected I, but got I8 + subscriptionTitle = null; + DBPropertyRequestStruct dBPropertyRequestStruct; + _003CModule_003E.DBPropertyRequestStruct_002E_007Bctor_007D(&dBPropertyRequestStruct, 344u); + int num; + try + { + switch (subscriptionMediaType) + { + case EMediaTypes.eMediaTypePlaylist: + break; + default: + num = 1; + goto IL_00b7; + case EMediaTypes.eMediaTypeUser: + subscriptionTitle = string.Empty; + goto IL_0041; + case EMediaTypes.eMediaTypePodcastSeries: + goto IL_004a; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.DBPropertyRequestStruct_002E_007Bdtor_007D), &dBPropertyRequestStruct); + throw; + } + try + { + num = _003CModule_003E.ZuneLibraryExports_002EGetFieldValues(subscriptionMediaId, EListType.ePlaylistList, 1, &dBPropertyRequestStruct, null); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.DBPropertyRequestStruct_002E_007Bdtor_007D), &dBPropertyRequestStruct); + throw; + } + goto IL_0089; + IL_0041: + _003CModule_003E.DBPropertyRequestStruct_002E_007Bdtor_007D(&dBPropertyRequestStruct); + return 0; + IL_004a: + try + { + num = _003CModule_003E.ZuneLibraryExports_002EGetFieldValues(subscriptionMediaId, EListType.ePodcastList, 1, &dBPropertyRequestStruct, null); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.DBPropertyRequestStruct_002E_007Bdtor_007D), &dBPropertyRequestStruct); + throw; + } + goto IL_0089; + IL_00b7: + _003CModule_003E.DBPropertyRequestStruct_002E_007Bdtor_007D(&dBPropertyRequestStruct); + return num; + IL_0089: + try + { + if (0 == num && System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref dBPropertyRequestStruct, 4)) >= 0) + { + subscriptionTitle = new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref dBPropertyRequestStruct, 16))); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.DBPropertyRequestStruct_002E_007Bdtor_007D), &dBPropertyRequestStruct); + throw; + } + goto IL_00b7; + } + + private unsafe SubscriptionManager() + { + //IL_0009: Expected I, but got I8 + ISubscriptionManager* pSubscriptionManager = null; + int singleton = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_9dc7c984_41d5_4130_a5ac_46d0825cd29d, (void**)(&pSubscriptionManager)); + if (singleton >= 0) + { + m_pSubscriptionManager = pSubscriptionManager; + return; + } + throw new ApplicationException(_003CModule_003E.GetErrorDescription(singleton)); + } + + private int ValidateUrl([In][Out] ref string feedUrl) + { + if (feedUrl == (string)null) + { + return -1072884976; + } + int num = _003CModule_003E.Microsoft_002EZune_002ESubscription_002EIsWellFormedUriString(ref feedUrl); + if (num == -1072884976) + { + feedUrl = "http://" + feedUrl; + num = _003CModule_003E.Microsoft_002EZune_002ESubscription_002EIsWellFormedUriString(ref feedUrl); + } + return num; + } + + private unsafe int GetLastSignedInUserId() + { + //IL_0005: Expected I, but got I8 + //IL_0028: Expected I, but got I8 + //IL_0028: Expected I, but got I8 + //IL_003b: Expected I, but got I8 + int result = 1; + IService* ptr = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&ptr)) >= 0) + { + IService* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 384)))((nint)intPtr, null, &result); + } + if (0L != (nint)ptr) + { + IService* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + return result; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021SubscriptionManager(); + return; + } + try + { + _0021SubscriptionManager(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~SubscriptionManager() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionSeriesInfo.cs b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionSeriesInfo.cs new file mode 100644 index 0000000..610880b --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptionSeriesInfo.cs @@ -0,0 +1,167 @@ +using System; +using System.Runtime.CompilerServices; +using _003CCppImplementationDetails_003E; +using Microsoft.Iris; + +namespace Microsoft.Zune.Subscription +{ + public class SubscriptionSeriesInfo : DataProviderObject + { + private string m_serviceId; + + private ESubscriptionState m_eSubscriptionState; + + private unsafe IMSMediaSchemaPropertySet* m_pSeriesPropertySet; + + public unsafe SubscriptionSeriesInfo(DataProviderQuery owner, object typeCookie, string serviceId) + { + //IL_000f: Expected I, but got I8 + m_serviceId = serviceId; + m_pSeriesPropertySet = null; + base._002Ector(owner, typeCookie); + } + + public unsafe override object GetProperty(string propertyName) + { + //IL_00ec: Expected I4, but got I8 + //IL_0138: Expected I, but got I8 + //IL_0144: Expected I, but got I8 + //IL_0175: Expected I, but got I8 + _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040 _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040; + *(long*)(&_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BA_0040CEPEGMDB_0040_003F_0024AAF_003F_0024AAe_003F_0024AAe_003F_0024AAd_003F_0024AAU_003F_0024AAr_003F_0024AAl_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 8)) = 134217987; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, long>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 16)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BE_0040ILMBBNLH_0040_003F_0024AAE_003F_0024AAr_003F_0024AAr_003F_0024AAo_003F_0024AAr_003F_0024AAC_003F_0024AAo_003F_0024AAd_003F_0024AAe_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 24)) = 100663562; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, long>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 32)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1M_0040MNHBCACD_0040_003F_0024AAT_003F_0024AAi_003F_0024AAt_003F_0024AAl_003F_0024AAe_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 40)) = 16801793; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, long>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 48)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BA_0040DPIPFNMB_0040_003F_0024AAH_003F_0024AAo_003F_0024AAm_003F_0024AAe_003F_0024AAU_003F_0024AAr_003F_0024AAl_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 56)) = 134242316; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, long>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 64)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1O_0040OPPNLDOF_0040_003F_0024AAA_003F_0024AAr_003F_0024AAt_003F_0024AAU_003F_0024AAr_003F_0024AAl_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 72)) = 134242317; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, long>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 80)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BI_0040DLMANABL_0040_003F_0024AAD_003F_0024AAe_003F_0024AAs_003F_0024AAc_003F_0024AAr_003F_0024AAi_003F_0024AAp_003F_0024AAt_003F_0024AAi_003F_0024AAo_003F_0024AAn_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 88)) = 134242306; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, long>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 96)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BC_0040BFOBHOBE_0040_003F_0024AAE_003F_0024AAx_003F_0024AAp_003F_0024AAl_003F_0024AAi_003F_0024AAc_003F_0024AAi_003F_0024AAt_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 104)) = 83910662; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, long>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 112)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BE_0040NPMHDJAF_0040_003F_0024AAC_003F_0024AAo_003F_0024AAp_003F_0024AAy_003F_0024AAr_003F_0024AAi_003F_0024AAg_003F_0024AAh_003F_0024AAt_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 120)) = 16801801; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, long>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 128)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1O_0040IKCDCNCP_0040_003F_0024AAA_003F_0024AAu_003F_0024AAt_003F_0024AAh_003F_0024AAo_003F_0024AAr_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 136)) = 16801796; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, long>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 144)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BE_0040GMGHCDOJ_0040_003F_0024AAO_003F_0024AAw_003F_0024AAn_003F_0024AAe_003F_0024AAr_003F_0024AAN_003F_0024AAa_003F_0024AAm_003F_0024AAe_003F_0024AA_003F_0024AA_0040); + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 152)) = 16801799; + CComPropVariant cComPropVariant; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + object result; + try + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + if (_003CModule_003E._wcsicmp(ptr, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BE_0040NCILDCLH_0040_003F_0024AAL_003F_0024AAi_003F_0024AAb_003F_0024AAr_003F_0024AAa_003F_0024AAr_003F_0024AAy_003F_0024AAI_003F_0024AAd_003F_0024AA_003F_0024AA_0040)) != 0 && _003CModule_003E._wcsicmp(ptr, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BI_0040KPFACBGA_0040_003F_0024AAS_003F_0024AAe_003F_0024AAr_003F_0024AAi_003F_0024AAe_003F_0024AAs_003F_0024AAS_003F_0024AAt_003F_0024AAa_003F_0024AAt_003F_0024AAe_003F_0024AA_003F_0024AA_0040)) != 0 && _003CModule_003E._wcsicmp(ptr, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1CC_0040GKFOINAA_0040_003F_0024AAN_003F_0024AAu_003F_0024AAm_003F_0024AAb_003F_0024AAe_003F_0024AAr_003F_0024AAO_003F_0024AAf_003F_0024AAE_003F_0024AAp_003F_0024AAi_003F_0024AAs_003F_0024AAo_003F_0024AAd_003F_0024AAe_003F_0024AAs_003F_0024AA_003F_0024AA_0040)) != 0 && m_pSeriesPropertySet != null) + { + int num = 0; + PROPERTY_TO_PID_MAP* ptr2 = (PROPERTY_TO_PID_MAP*)(&_0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040); + while (true) + { + if (_003CModule_003E._wcsicmp(ptr, (ushort*)(*(ulong*)ptr2)) != 0) + { + num++; + ptr2 = (PROPERTY_TO_PID_MAP*)((ulong)(nint)ptr2 + 16uL); + if ((uint)num >= 10u) + { + break; + } + continue; + } + uint num2 = *(uint*)((long)num * 16L + (ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY09UPROPERTY_TO_PID_MAP_0040Subscription_0040Zune_0040Microsoft_0040_0040, 8))); + IMSMediaSchemaPropertySet* pSeriesPropertySet = m_pSeriesPropertySet; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSeriesPropertySet + 48)))((nint)pSeriesPropertySet, num2, 0u, (tagPROPVARIANT*)(&cComPropVariant)) < 0 || *(ushort*)(&cComPropVariant) == 0) + { + break; + } + result = SubscriptionDataProviderQueryResult.ConvertVariantToType(base.Mappings[propertyName].PropertyTypeName, &cComPropVariant); + goto end_IL_00fe; + } + } + result = base.Mappings[propertyName].DefaultValue; + end_IL_00fe:; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + return result; + } + + public override void SetProperty(string propertyName, object value) + { + //Discarded unreachable code: IL_0006 + throw new NotSupportedException(); + } + + internal unsafe void OnDispose() + { + //IL_0019: Expected I, but got I8 + //IL_0022: Expected I, but got I8 + IMSMediaSchemaPropertySet* pSeriesPropertySet = m_pSeriesPropertySet; + if (0L != (nint)pSeriesPropertySet) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSeriesPropertySet + 16)))((nint)pSeriesPropertySet); + m_pSeriesPropertySet = null; + } + } + + internal unsafe void SetPropertySet(IMSMediaSchemaPropertySet* pSeriesPropertySet) + { + //IL_0008: Expected I4, but got I8 + //IL_0025: Expected I, but got I8 + //IL_0050: Expected I, but got I8 + //IL_0059: Expected I, but got I8 + //IL_006c: Expected I, but got I8 + //IL_009a: Expected I4, but got I8 + //IL_00c8: Expected I, but got I8 + CComPropVariant cComPropVariant; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + try + { + if (pSeriesPropertySet != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSeriesPropertySet + 48)))((nint)pSeriesPropertySet, 16801793u, 0u, (tagPROPVARIANT*)(&cComPropVariant)) >= 0 && *(ushort*)(&cComPropVariant) != 0) + { + IMSMediaSchemaPropertySet* pSeriesPropertySet2 = m_pSeriesPropertySet; + if (0L != (nint)pSeriesPropertySet2) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSeriesPropertySet2 + 16)))((nint)pSeriesPropertySet2); + m_pSeriesPropertySet = null; + } + m_pSeriesPropertySet = pSeriesPropertySet; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSeriesPropertySet + 8)))((nint)pSeriesPropertySet); + if (!string.IsNullOrEmpty(m_serviceId)) + { + Guid guid = new Guid(m_serviceId); + _GUID gUID; + *(int*)(&gUID) = 0; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref gUID, 4), 0, 12); + gUID = _003CModule_003E.GuidToGUID(guid); + tagPROPVARIANT tagPROPVARIANT; + *(short*)(&tagPROPVARIANT) = 72; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagPROPVARIANT, 8)) = (nint)(&gUID); + IMSMediaSchemaPropertySet* pSeriesPropertySet3 = m_pSeriesPropertySet; + tagPROPVARIANT tagPROPVARIANT2 = tagPROPVARIANT; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSeriesPropertySet3 + 56)))((nint)pSeriesPropertySet3, 67133455u, tagPROPVARIANT2); + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptonCredentialRequestArguments.cs b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptonCredentialRequestArguments.cs new file mode 100644 index 0000000..fd91392 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptonCredentialRequestArguments.cs @@ -0,0 +1,86 @@ +using System.Net; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Subscription +{ + public class SubscriptonCredentialRequestArguments + { + private int m_subscriptionMediaId; + + private int m_lastError; + + private string m_targetUrl; + + private string m_realm; + + private string m_lastUserName; + + private AuthenticationSchemes m_authScheme; + + private bool m_isAuthSchemeSafe; + + private NetworkCredential m_networkCredential; + + private bool m_save; + + public bool Save + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_save; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + m_save = value; + } + } + + public NetworkCredential Credential + { + get + { + return m_networkCredential; + } + set + { + m_networkCredential = value; + } + } + + public bool IsAuthenticationSchemeSafe + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_isAuthSchemeSafe; + } + } + + public AuthenticationSchemes AuthScheme => m_authScheme; + + public int LastError => m_lastError; + + public string LastUserName => m_lastUserName; + + public string Realm => m_realm; + + public string TargetUrl => m_targetUrl; + + public int SubscriptionMediaId => m_subscriptionMediaId; + + internal SubscriptonCredentialRequestArguments(int subscriptionMediaId, string targetUrl, AuthenticationSchemes authScheme, [MarshalAs(UnmanagedType.U1)] bool isAuthSchemeSafe, string realm, string lastUserName, int lastError) + { + m_subscriptionMediaId = subscriptionMediaId; + m_targetUrl = targetUrl; + m_authScheme = authScheme; + m_isAuthSchemeSafe = isAuthSchemeSafe; + m_realm = realm; + m_lastUserName = lastUserName; + m_lastError = lastError; + m_save = false; + m_networkCredential = null; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptonEventArguments.cs b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptonEventArguments.cs new file mode 100644 index 0000000..75d9ba1 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Subscription/SubscriptonEventArguments.cs @@ -0,0 +1,38 @@ +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Subscription +{ + public class SubscriptonEventArguments + { + private SubscriptionAction m_Action; + + private string m_SubscriptionTitle; + + private EMediaTypes m_eMediaType; + + private bool m_userInitiated; + + public bool UserInitiated + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_userInitiated; + } + } + + public EMediaTypes MediaType => m_eMediaType; + + public string SubscriptionTitle => m_SubscriptionTitle; + + public SubscriptionAction Action => m_Action; + + internal SubscriptonEventArguments(SubscriptionAction action, string subscriptionTitle, EMediaTypes eMediaType, [MarshalAs(UnmanagedType.U1)] bool userInitiated) + { + m_Action = action; + m_SubscriptionTitle = subscriptionTitle; + m_eMediaType = eMediaType; + m_userInitiated = userInitiated; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Subscription/VirtualSubscriptionEpisodeList.cs b/ZuneDBApi/Microsoft/Zune/Subscription/VirtualSubscriptionEpisodeList.cs new file mode 100644 index 0000000..de20c6f --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Subscription/VirtualSubscriptionEpisodeList.cs @@ -0,0 +1,256 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using Microsoft.Iris; + +namespace Microsoft.Zune.Subscription +{ + [DefaultMember("Item")] + public class VirtualSubscriptionEpisodeList : VirtualList, IDisposable + { + private string m_feedUrl; + + private DataProviderQuery m_owner; + + private object m_typeCookie; + + private List m_items; + + private object m_lock; + + private string m_sortProperty; + + private bool m_sortAsc; + + internal virtual string FeedUrl => m_feedUrl; + + public VirtualSubscriptionEpisodeList(DataProviderQuery owner, object typeCookie, string feedUrl, string sort) + { + m_feedUrl = feedUrl; + m_owner = owner; + m_typeCookie = typeCookie; + base._002Ector(); + try + { + m_items = new List(); + m_lock = new object(); + SetSortProperty(sort); + } + catch + { + //try-fault + ((IDisposable)this).Dispose(); + throw; + } + } + + private void _007EVirtualSubscriptionEpisodeList() + { + Monitor.Enter(m_lock); + try + { + List.Enumerator enumerator = m_items.GetEnumerator(); + while (enumerator.MoveNext()) + { + enumerator.Current.OnDispose(); + } + m_items = null; + } + finally + { + Monitor.Exit(m_lock); + } + } + + internal unsafe void AddItem(IMSMediaSchemaPropertySet* pEpisodeItem) + { + Monitor.Enter(m_lock); + try + { + if (m_items != null) + { + m_items.Add(new SubscriptionDataProviderItem(m_owner, m_typeCookie, m_feedUrl, pEpisodeItem)); + } + } + finally + { + Monitor.Exit(m_lock); + } + } + + internal unsafe void AsyncRetrieveEpisodeList(SubscriptionSeriesInfo seriesInfo) + { + //IL_000a: Expected I, but got I8 + //IL_000e: Expected I, but got I8 + //IL_0037: Expected I, but got I8 + //IL_0075: Expected I, but got I8 + //IL_008f: Expected I, but got I8 + //IL_0093: Expected I, but got I8 + //IL_00a5: Expected I, but got I8 + UpdateQueryStatus(DataProviderQueryStatus.RequestingData); + ISubscriptionViewer* ptr = null; + VirtualSubscriptionEpisodeListProxy* ptr2 = null; + int num = _003CModule_003E.ZuneLibraryExports_002ECreateNativeSubscriptionViewer((void**)(&ptr)); + if (num >= 0) + { + VirtualSubscriptionEpisodeListProxy* ptr3 = (VirtualSubscriptionEpisodeListProxy*)_003CModule_003E.@new(40uL); + VirtualSubscriptionEpisodeListProxy* ptr4; + try + { + ptr4 = ((ptr3 == null) ? null : _003CModule_003E.Microsoft_002EZune_002ESubscription_002EVirtualSubscriptionEpisodeListProxy_002E_007Bctor_007D(ptr3, seriesInfo, this)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr3); + throw; + } + ptr2 = ptr4; + num = (((long)(nint)ptr4 == 0) ? (-2147024882) : num); + if (num >= 0) + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(m_feedUrl))) + { + try + { + long num2 = *(long*)ptr + 24; + ISubscriptionViewer* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, ptr5, (ISubscriptionViewerCallback*)ptr4); + } + catch + { + //try-fault + ptr5 = null; + throw; + } + } + } + } + if (ptr != null) + { + ISubscriptionViewer* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + ptr = null; + } + if (ptr2 != null) + { + VirtualSubscriptionEpisodeListProxy* intPtr3 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + } + } + + internal void AsyncOperationCompleted(int hrErrorCode) + { + DataProviderQueryStatus dataProviderQueryStatus = DataProviderQueryStatus.Complete; + dataProviderQueryStatus = ((hrErrorCode < 0) ? DataProviderQueryStatus.Error : dataProviderQueryStatus); + Sort(null); + Application.DeferredInvoke(DeferredUpdateQueryStatus, dataProviderQueryStatus); + } + + internal void Sort(string sortProperty) + { + Monitor.Enter(m_lock); + try + { + if (sortProperty != (string)null) + { + SetSortProperty(sortProperty); + } + if (m_items != null) + { + m_items.Sort(CompareItems); + } + Application.DeferredInvoke(DeferredResetList, null); + } + finally + { + Monitor.Exit(m_lock); + } + } + + protected override object OnRequestItem(int index) + { + return m_items[index]; + } + + private void UpdateQueryStatus(DataProviderQueryStatus status) + { + m_owner.Status = status; + } + + private void DeferredUpdateQueryStatus(object param) + { + DataProviderQueryStatus status = (DataProviderQueryStatus)param; + UpdateQueryStatus(status); + } + + private void DeferredResetList(object param) + { + Clear(); + List items = m_items; + if (items != null) + { + base.Count = items.Count; + } + } + + private void SetSortProperty(string sort) + { + if (!string.IsNullOrEmpty(sort) && sort.Length > 1) + { + m_sortProperty = sort.Substring(1); + int num = ((m_sortAsc = sort[0] == '+') ? 1 : 0); + } + else + { + m_sortAsc = false; + m_sortProperty = "ReleaseDate"; + } + } + + private int CompareItems(SubscriptionDataProviderItem x, SubscriptionDataProviderItem y) + { + int num = 0; + object property = x.GetProperty(m_sortProperty); + object property2 = y.GetProperty(m_sortProperty); + IComparable comparable = property as IComparable; + if (comparable != null) + { + num = comparable.CompareTo(property2); + if (!m_sortAsc) + { + num = -num; + } + } + return num; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EVirtualSubscriptionEpisodeList(); + } + finally + { + base.Dispose(); + } + } + else + { + Finalize(); + } + } + + public new void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Subscription/VirtualSubscriptionEpisodeListProxy.cs b/ZuneDBApi/Microsoft/Zune/Subscription/VirtualSubscriptionEpisodeListProxy.cs new file mode 100644 index 0000000..dfc614b --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Subscription/VirtualSubscriptionEpisodeListProxy.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Subscription +{ + [StructLayout(LayoutKind.Sequential, Size = 40)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(64)] + internal struct VirtualSubscriptionEpisodeListProxy + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/User/UserManager.cs b/ZuneDBApi/Microsoft/Zune/User/UserManager.cs new file mode 100644 index 0000000..4aeada4 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/User/UserManager.cs @@ -0,0 +1,161 @@ +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Threading; + +namespace Microsoft.Zune.User +{ + public class UserManager + { + private static UserManager sm_instance = null; + + private static object sm_lock = new object(); + + public static UserManager Instance + { + get + { + if (sm_instance == null) + { + try + { + Monitor.Enter(sm_lock); + if (sm_instance == null) + { + UserManager userManager = new UserManager(); + Thread.MemoryBarrier(); + sm_instance = userManager; + } + } + finally + { + Monitor.Exit(sm_lock); + } + } + return sm_instance; + } + } + + public unsafe int GetUserIdList(IList userIdList) + { + //IL_0003: Expected I, but got I8 + //IL_0040: Expected I, but got I8 + //IL_0088: Expected I, but got I8 + //IL_008c: Expected I, but got I8 + IUserManager* ptr = null; + DynamicArray_003Cint_003E dynamicArray_003Cint_003E; + *(long*)(&dynamicArray_003Cint_003E) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_7_003F_0024DynamicArray_0040H_0040_00406B_0040); + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref dynamicArray_003Cint_003E, 8)) = 0L; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref dynamicArray_003Cint_003E, 16)) = 0; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref dynamicArray_003Cint_003E, 20)) = 0; + int num; + try + { + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_c9e0f18a_6c53_47d0_991e_dbd4fe395101, (void**)(&ptr)); + if (num >= 0) + { + IUserManager* intPtr = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 24)))((nint)intPtr, &dynamicArray_003Cint_003E); + if (num >= 0) + { + int num2 = 0; + if (0 < System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref dynamicArray_003Cint_003E, 16))) + { + do + { + int* ptr2 = _003CModule_003E.DynamicArray_003Cint_003E_002E_005B_005D(&dynamicArray_003Cint_003E, num2); + userIdList.Add(*ptr2); + num2++; + } + while (num2 < System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref dynamicArray_003Cint_003E, 16))); + } + } + } + if (0L != (nint)ptr) + { + IUserManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + ptr = null; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.DynamicArray_003Cint_003E_002E_007Bdtor_007D), &dynamicArray_003Cint_003E); + throw; + } + _003CModule_003E.DynamicArray_003Cint_003E_002E_007Bdtor_007D(&dynamicArray_003Cint_003E); + return num; + } + + public unsafe int FindUserByPassportId(string passportId, out int userId) + { + //IL_0006: Expected I, but got I8 + //IL_0033: Expected I, but got I8 + //IL_004e: Expected I, but got I8 + userId = -1; + IUserManager* ptr = null; + int num = -1; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(passportId))) + { + int num2 = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_c9e0f18a_6c53_47d0_991e_dbd4fe395101, (void**)(&ptr)); + if (num2 >= 0) + { + long num3 = *(long*)ptr + 40; + IUserManager* intPtr = ptr; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)intPtr, ptr2, &num); + } + if (0 == num2) + { + userId = num; + } + if (0L != (nint)ptr) + { + IUserManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + return num2; + } + } + + public unsafe int RefreshUserTile(int userId) + { + //IL_0003: Expected I, but got I8 + //IL_0022: Expected I, but got I8 + //IL_0035: Expected I, but got I8 + IUserManager* ptr = null; + int num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_c9e0f18a_6c53_47d0_991e_dbd4fe395101, (void**)(&ptr)); + if (num >= 0) + { + IUserManager* intPtr = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 48)))((nint)intPtr, userId); + } + if (0L != (nint)ptr) + { + IUserManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + return num; + } + + public unsafe int CleanupUserData(int userId) + { + //IL_0003: Expected I, but got I8 + //IL_0022: Expected I, but got I8 + //IL_0035: Expected I, but got I8 + IUserManager* ptr = null; + int num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_c9e0f18a_6c53_47d0_991e_dbd4fe395101, (void**)(&ptr)); + if (num >= 0) + { + IUserManager* intPtr = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 56)))((nint)intPtr, userId); + } + if (0L != (nint)ptr) + { + IUserManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + return num; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/UserCredential/CUserCredentialProviderProxy.cs b/ZuneDBApi/Microsoft/Zune/UserCredential/CUserCredentialProviderProxy.cs new file mode 100644 index 0000000..c027b8a --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/UserCredential/CUserCredentialProviderProxy.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.UserCredential +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [MiscellaneousBits(64)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct CUserCredentialProviderProxy + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/UserCredential/UserCredentialHandler.cs b/ZuneDBApi/Microsoft/Zune/UserCredential/UserCredentialHandler.cs new file mode 100644 index 0000000..531b512 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/UserCredential/UserCredentialHandler.cs @@ -0,0 +1,7 @@ +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.UserCredential +{ + [return: MarshalAs(UnmanagedType.U1)] + public delegate bool UserCredentialHandler(UserCredentialRequestArguments args); +} diff --git a/ZuneDBApi/Microsoft/Zune/UserCredential/UserCredentialManager.cs b/ZuneDBApi/Microsoft/Zune/UserCredential/UserCredentialManager.cs new file mode 100644 index 0000000..6d94fe1 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/UserCredential/UserCredentialManager.cs @@ -0,0 +1,102 @@ +using System; +using System.Threading; + +namespace Microsoft.Zune.UserCredential +{ + public class UserCredentialManager + { + private static UserCredentialManager sm_instance = null; + + private static object sm_lock = new object(); + + public static UserCredentialManager Instance + { + get + { + if (sm_instance == null) + { + try + { + Monitor.Enter(sm_lock); + if (sm_instance == null) + { + UserCredentialManager userCredentialManager = new UserCredentialManager(); + Thread.MemoryBarrier(); + sm_instance = userCredentialManager; + } + } + finally + { + Monitor.Exit(sm_lock); + } + } + return sm_instance; + } + } + + public unsafe int SetCredentialHandler(UserCredentialHandler credentialHandler) + { + //IL_0029: Expected I, but got I8 + //IL_0038: Expected I, but got I8 + //IL_006e: Expected I, but got I8 + //IL_0083: Expected I, but got I8 + //IL_0087: Expected I, but got I8 + //IL_009b: Expected I, but got I8 + if (null == credentialHandler) + { + return -2147467261; + } + int num = 0; + CUserCredentialProviderProxy* ptr = (CUserCredentialProviderProxy*)_003CModule_003E.@new(24uL); + CUserCredentialProviderProxy* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUserCredential_002ECUserCredentialProviderProxy_002E_007Bctor_007D(ptr)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + CUserCredentialProviderProxy* ptr3 = ptr2; + IUserCredentialManager* ptr4 = null; + try + { + if (ptr2 == null) + { + return -2147024882; + } + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_41c80590_c50b_4d27_b860_7c87f3f0cb54, (void**)(&ptr4)); + if (num >= 0) + { + num = _003CModule_003E.Microsoft_002EZune_002EUserCredential_002ECUserCredentialProviderProxy_002EInitialize(ptr2, credentialHandler); + if (num >= 0) + { + IUserCredentialManager* intPtr = ptr4; + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr4 + 24)))((nint)intPtr, (IUserCredentialManagerProvider*)ptr2); + } + return num; + } + return num; + } + finally + { + if (0L != (nint)ptr4) + { + IUserCredentialManager* intPtr2 = ptr4; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + ptr4 = null; + } + if (0L != (nint)ptr3) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr3 + 16)))((nint)ptr3); + } + } + } + + private UserCredentialManager() + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/UserCredential/UserCredentialRequestArguments.cs b/ZuneDBApi/Microsoft/Zune/UserCredential/UserCredentialRequestArguments.cs new file mode 100644 index 0000000..a0428ac --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/UserCredential/UserCredentialRequestArguments.cs @@ -0,0 +1,86 @@ +using System.Net; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.UserCredential +{ + public class UserCredentialRequestArguments + { + private string m_targetUrl; + + private string m_host; + + private int m_lastError; + + private string m_realm; + + private string m_lastUserName; + + private AuthenticationSchemes m_authScheme; + + private bool m_isAuthSchemeSafe; + + private NetworkCredential m_networkCredential; + + private bool m_save; + + public bool Save + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_save; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + m_save = value; + } + } + + public NetworkCredential Credential + { + get + { + return m_networkCredential; + } + set + { + m_networkCredential = value; + } + } + + public bool IsAuthenticationSchemeSafe + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_isAuthSchemeSafe; + } + } + + public AuthenticationSchemes AuthScheme => m_authScheme; + + public int LastError => m_lastError; + + public string LastUserName => m_lastUserName; + + public string Realm => m_realm; + + public string Host => m_host; + + public string TargetUrl => m_targetUrl; + + internal UserCredentialRequestArguments(string targetUrl, string host, AuthenticationSchemes authScheme, [MarshalAs(UnmanagedType.U1)] bool isAuthSchemeSafe, string realm, string lastUserName, int lastError) + { + m_targetUrl = targetUrl; + m_host = host; + m_authScheme = authScheme; + m_isAuthSchemeSafe = isAuthSchemeSafe; + m_realm = realm; + m_lastUserName = lastUserName; + m_lastError = lastError; + m_save = false; + m_networkCredential = null; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/AsyncCallbackWrapper.cs b/ZuneDBApi/Microsoft/Zune/Util/AsyncCallbackWrapper.cs new file mode 100644 index 0000000..389addb --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/AsyncCallbackWrapper.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Util +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(64)] + internal struct AsyncCallbackWrapper + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/AsyncCompleteHandler.cs b/ZuneDBApi/Microsoft/Zune/Util/AsyncCompleteHandler.cs new file mode 100644 index 0000000..581725d --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/AsyncCompleteHandler.cs @@ -0,0 +1,6 @@ +using ZuneUI; + +namespace Microsoft.Zune.Util +{ + public delegate void AsyncCompleteHandler(HRESULT hr); +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/Clipboard.cs b/ZuneDBApi/Microsoft/Zune/Util/Clipboard.cs new file mode 100644 index 0000000..fb5d785 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/Clipboard.cs @@ -0,0 +1,171 @@ +using System.Collections.Specialized; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using _003CCppImplementationDetails_003E; +using MicrosoftZuneLibrary; + +namespace Microsoft.Zune.Util +{ + public class Clipboard + { + private Clipboard() + { + } + + private unsafe static object CopyData(ClipboardDataType type, void* handle) + { + //IL_0075: Expected I, but got I8 + int num = 0; + object result = null; + if (handle != null) + { + if (type == ClipboardDataType.Image) + { + HBITMAP__* ptr = (HBITMAP__*)_003CModule_003E.CopyImage(handle, 0u, 0, 0, 0u); + if (ptr != null) + { + result = new SafeBitmap(ptr); + goto IL_0136; + } + uint lastError = _003CModule_003E.GetLastError(); + num = (((int)lastError > 0) ? ((int)(lastError & 0xFFFF) | -2147024896) : ((int)lastError)); + } + else if (type == ClipboardDataType.FileDropList) + { + StringCollection stringCollection = null; + uint num2 = 0u; + HDROP__* ptr2 = (HDROP__*)_003CModule_003E.GlobalLock(handle); + if (ptr2 != null) + { + num2 = _003CModule_003E.DragQueryFileW(ptr2, uint.MaxValue, null, 0u); + stringCollection = new StringCollection(); + } + else + { + uint lastError2 = _003CModule_003E.GetLastError(); + num = (((int)lastError2 > 0) ? ((int)(lastError2 & 0xFFFF) | -2147024896) : ((int)lastError2)); + } + uint num3 = 0u; + if (0 < num2) + { + do + { + _0024ArrayType_0024_0024_0024BY0BAE_0040G _0024ArrayType_0024_0024_0024BY0BAE_0040G; + if (_003CModule_003E.DragQueryFileW(ptr2, num3, (ushort*)(&_0024ArrayType_0024_0024_0024BY0BAE_0040G), 260u) != 0) + { + stringCollection.Add(new string((char*)(&_0024ArrayType_0024_0024_0024BY0BAE_0040G))); + num3++; + continue; + } + uint lastError3 = _003CModule_003E.GetLastError(); + num = (((int)lastError3 > 0) ? ((int)(lastError3 & 0xFFFF) | -2147024896) : ((int)lastError3)); + stringCollection = null; + break; + } + while (num3 < num2); + } + result = stringCollection; + } + else + { + num = 87; + } + if (num < 0 && _003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 10, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xd81a90d8_002EWPP_Clipboard_cpp_Traceguids), (uint)num); + } + } + goto IL_0136; + IL_0136: + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe static bool ContainsData(ClipboardDataType type) + { + //IL_0009: Expected I, but got I8 + bool flag = false; + int num; + if (_003CModule_003E.OpenClipboard(null) == 0) + { + uint lastError = _003CModule_003E.GetLastError(); + num = (((int)lastError > 0) ? ((int)(lastError & 0xFFFF) | -2147024896) : ((int)lastError)); + } + else + { + flag = _003CModule_003E.IsClipboardFormatAvailable((uint)type) != 0 || flag; + if (_003CModule_003E.CloseClipboard() != 0) + { + goto IL_009a; + } + uint lastError2 = _003CModule_003E.GetLastError(); + num = (((int)lastError2 > 0) ? ((int)(lastError2 & 0xFFFF) | -2147024896) : ((int)lastError2)); + } + if (num < 0 && _003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 11, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xd81a90d8_002EWPP_Clipboard_cpp_Traceguids), (uint)num); + } + goto IL_009a; + IL_009a: + return flag; + } + + [return: MarshalAs(UnmanagedType.U1)] + public static bool ContainsImage() + { + return ContainsData(ClipboardDataType.Image); + } + + [return: MarshalAs(UnmanagedType.U1)] + public static bool ContainsFileDropList() + { + return ContainsData(ClipboardDataType.FileDropList); + } + + public unsafe static object GetData(ClipboardDataType type) + { + //IL_000c: Expected I, but got I8 + //IL_0043: Expected I, but got I8 + object result = null; + int num = 0; + if (_003CModule_003E.OpenClipboard(null) == 0) + { + uint lastError = _003CModule_003E.GetLastError(); + num = (((int)lastError > 0) ? ((int)(lastError & 0xFFFF) | -2147024896) : ((int)lastError)); + } + else + { + void* ptr = ((_003CModule_003E.IsClipboardFormatAvailable((uint)type) == 0) ? null : _003CModule_003E.GetClipboardData((uint)type)); + if (ptr != null) + { + result = CopyData(type, ptr); + } + else + { + uint lastError2 = _003CModule_003E.GetLastError(); + num = (((int)lastError2 > 0) ? ((int)(lastError2 & 0xFFFF) | -2147024896) : ((int)lastError2)); + } + if (_003CModule_003E.CloseClipboard() == 0) + { + uint lastError3 = _003CModule_003E.GetLastError(); + num = (((int)lastError3 > 0) ? ((int)(lastError3 & 0xFFFF) | -2147024896) : ((int)lastError3)); + } + } + if (num < 0 && _003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 12, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xd81a90d8_002EWPP_Clipboard_cpp_Traceguids), (uint)num); + } + return result; + } + + public static SafeBitmap GetImage() + { + return GetData(ClipboardDataType.Image) as SafeBitmap; + } + + public static StringCollection GetFileDropList() + { + return GetData(ClipboardDataType.FileDropList) as StringCollection; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/ClipboardDataType.cs b/ZuneDBApi/Microsoft/Zune/Util/ClipboardDataType.cs new file mode 100644 index 0000000..b6ad1ca --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/ClipboardDataType.cs @@ -0,0 +1,10 @@ +namespace Microsoft.Zune.Util +{ + public enum ClipboardDataType + { + Text = 1, + Image = 2, + UnicodeText = 13, + FileDropList = 0xF + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/ContentRefreshTask.cs b/ZuneDBApi/Microsoft/Zune/Util/ContentRefreshTask.cs new file mode 100644 index 0000000..9548fde --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/ContentRefreshTask.cs @@ -0,0 +1,138 @@ +using System; +using System.Runtime.InteropServices; +using ZuneUI; + +namespace Microsoft.Zune.Util +{ + public class ContentRefreshTask : IDisposable + { + private unsafe IContentRefreshTask* m_pContentRefreshTask = null; + + private static ContentRefreshTask sm_ContentRefreshTask = null; + + public static bool HasInstance + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return (byte)((sm_ContentRefreshTask != null) ? 1u : 0u) != 0; + } + } + + public static ContentRefreshTask Instance + { + get + { + if (sm_ContentRefreshTask == null) + { + sm_ContentRefreshTask = new ContentRefreshTask(); + } + return sm_ContentRefreshTask; + } + } + + private void _007EContentRefreshTask() + { + _0021ContentRefreshTask(); + } + + private unsafe void _0021ContentRefreshTask() + { + //IL_0017: Expected I, but got I8 + //IL_0031: Expected I, but got I8 + //IL_003a: Expected I, but got I8 + IContentRefreshTask* pContentRefreshTask = m_pContentRefreshTask; + if (pContentRefreshTask != null) + { + IContentRefreshTask* intPtr = pContentRefreshTask; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 32)))((nint)intPtr); + pContentRefreshTask = m_pContentRefreshTask; + if (0L != (nint)pContentRefreshTask) + { + IContentRefreshTask* intPtr2 = pContentRefreshTask; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + m_pContentRefreshTask = null; + } + } + } + + public unsafe HRESULT StartContentRefresh(AsyncCompleteHandler completeHandler) + { + //IL_001b: Expected I, but got I8 + //IL_0035: Expected I, but got I8 + //IL_0066: Expected I, but got I8 + //IL_006a: Expected I, but got I8 + //IL_007c: Expected I, but got I8 + int num = 0; + AsyncCallbackWrapper* ptr = (AsyncCallbackWrapper*)_003CModule_003E.@new(24uL); + AsyncCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EAsyncCallbackWrapper_002E_007Bctor_007D(ptr, completeHandler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + num = (((long)(nint)ptr2 == 0) ? (-2147418113) : num); + IContentRefreshTask* ptr3 = null; + if (num >= 0) + { + num = _003CModule_003E.ZuneLibraryExports_002ECreateContentRefreshTask((IAsyncCallback*)ptr2, &ptr3); + if (num >= 0) + { + if (0L != (nint)ptr3) + { + m_pContentRefreshTask = ptr3; + } + } + else if (0L != (nint)ptr3) + { + IContentRefreshTask* intPtr = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + ptr3 = null; + } + } + if (0L != (nint)ptr2) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + return new HRESULT(num); + } + + private unsafe ContentRefreshTask() + { + }//IL_0008: Expected I, but got I8 + + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021ContentRefreshTask(); + return; + } + try + { + _0021ContentRefreshTask(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~ContentRefreshTask() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/DRMCanDoQuery.cs b/ZuneDBApi/Microsoft/Zune/Util/DRMCanDoQuery.cs new file mode 100644 index 0000000..58e6e86 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/DRMCanDoQuery.cs @@ -0,0 +1,150 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Util +{ + public class DRMCanDoQuery : IDisposable + { + private unsafe IDRMQuery* _pDRMQuery; + + public unsafe DRMCanDoQuery() + { + IDRMQuery* pDRMQuery; + int num = _003CModule_003E.ZuneLibraryExports_002ECreateDRMQuery(&pDRMQuery); + if (num < 0) + { + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + } + _pDRMQuery = pDRMQuery; + } + + private void _007EDRMCanDoQuery() + { + _0021DRMCanDoQuery(); + } + + private unsafe void _0021DRMCanDoQuery() + { + //IL_0017: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + IDRMQuery* pDRMQuery = _pDRMQuery; + if (pDRMQuery != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDRMQuery + 16)))((nint)pDRMQuery); + _pDRMQuery = null; + } + } + + public unsafe void SetDeviceInfo([MarshalAs(UnmanagedType.U1)] bool fHasSerialNumber, string deviceCert) + { + //IL_0022: Expected I, but got I8 + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(deviceCert))) + { + long num = *(long*)_pDRMQuery + 24; + IDRMQuery* pDRMQuery = _pDRMQuery; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pDRMQuery, fHasSerialNumber ? ((byte)1) : ((byte)0), ptr); + if (num2 < 0) + { + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num2)); + } + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool CanBurnFile(string path) + { + //IL_0023: Expected I, but got I8 + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(path))) + { + long num = *(long*)_pDRMQuery + 56; + IDRMQuery* pDRMQuery = _pDRMQuery; + bool flag; + int num2 = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pDRMQuery, ptr, &flag) >= 0 && flag) ? 1 : 0); + return (byte)num2 != 0; + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool CanBurnKID(string DRMKeyID) + { + //IL_0023: Expected I, but got I8 + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(DRMKeyID))) + { + long num = *(long*)_pDRMQuery + 64; + IDRMQuery* pDRMQuery = _pDRMQuery; + bool result; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pDRMQuery, ptr, &result); + if (num2 < 0) + { + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num2)); + } + return result; + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool CanSyncFile(string path) + { + //IL_0023: Expected I, but got I8 + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(path))) + { + long num = *(long*)_pDRMQuery + 72; + IDRMQuery* pDRMQuery = _pDRMQuery; + bool result; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pDRMQuery, ptr, &result); + if (num2 < 0) + { + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num2)); + } + return result; + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool CanSyncKID(string DRMKeyID) + { + //IL_0023: Expected I, but got I8 + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(DRMKeyID))) + { + long num = *(long*)_pDRMQuery + 80; + IDRMQuery* pDRMQuery = _pDRMQuery; + bool result; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pDRMQuery, ptr, &result); + if (num2 < 0) + { + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num2)); + } + return result; + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021DRMCanDoQuery(); + return; + } + try + { + _0021DRMCanDoQuery(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~DRMCanDoQuery() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/DownloadEventArguments.cs b/ZuneDBApi/Microsoft/Zune/Util/DownloadEventArguments.cs new file mode 100644 index 0000000..830e243 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/DownloadEventArguments.cs @@ -0,0 +1,25 @@ +namespace Microsoft.Zune.Util +{ + public class DownloadEventArguments + { + private float m_percent; + + private EDownloadTaskState m_state; + + private uint m_hrError; + + public uint Error => m_hrError; + + public float Progress => m_percent; + + public EDownloadTaskState State => m_state; + + internal DownloadEventArguments(float percent, EDownloadTaskState state, uint hrError) + { + m_percent = percent; + m_state = state; + m_hrError = hrError; + base._002Ector(); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/DownloadManager.cs b/ZuneDBApi/Microsoft/Zune/Util/DownloadManager.cs new file mode 100644 index 0000000..86e3e34 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/DownloadManager.cs @@ -0,0 +1,623 @@ +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using Microsoft.Iris; + +namespace Microsoft.Zune.Util +{ + public class DownloadManager : IDisposable + { + private unsafe DownloadManagerProxy* m_pDownloadManagerProxy; + + private static DownloadManager sm_downloadManager = null; + + private static object sm_lock = new object(); + + private ArrayListDataSet m_activeDownloadTasks; + + private ArrayListDataSet m_completedDownloadTasks; + + private ArrayListDataSet m_cancelledDownloadTasks; + + private ArrayListDataSet m_failedDownloadTasks; + + private DownloadManagerUpdateHandler m_defaultUpdateHandler; + + public ArrayListDataSet CancelledDownloads => m_cancelledDownloadTasks; + + public ArrayListDataSet FailedDownloads => m_failedDownloadTasks; + + public ArrayListDataSet CompletedDownloads => m_completedDownloadTasks; + + public ArrayListDataSet ActiveDownloads => m_activeDownloadTasks; + + public unsafe float Percentage => *(float*)((ulong)(nint)m_pDownloadManagerProxy + 24uL); + + public unsafe bool HadFailures + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return *(int*)((ulong)(nint)m_pDownloadManagerProxy + 20uL) > 0; + } + } + + public unsafe bool HadCancellations + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return *(int*)((ulong)(nint)m_pDownloadManagerProxy + 16uL) > 0; + } + } + + public unsafe bool IsQueuePaused + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_0005: Expected I, but got I8 + //IL_0024: Expected I, but got I8 + //IL_0037: Expected I, but got I8 + bool result = false; + IDownloadManager* ptr = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_399f851b_a600_4e88_90c3_03b8f2770076, (void**)(&ptr)) >= 0) + { + IDownloadManager* intPtr = ptr; + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 144)))((nint)intPtr) != 0; + } + if (0L != (nint)ptr) + { + IDownloadManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + return result; + } + } + + public unsafe bool Finished + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return (byte)((*(int*)((ulong)(nint)m_pDownloadManagerProxy + 8uL) <= 0) ? 1u : 0u) != 0; + } + } + + public unsafe int ActiveItem + { + get + { + DownloadManagerProxy* pDownloadManagerProxy = m_pDownloadManagerProxy; + return *(int*)((ulong)(nint)pDownloadManagerProxy + 20uL) + *(int*)((ulong)(nint)pDownloadManagerProxy + 16uL) + *(int*)((ulong)(nint)pDownloadManagerProxy + 12uL) + 1; + } + } + + public unsafe int TotalInProgressItems => *(int*)((ulong)(nint)m_pDownloadManagerProxy + 8uL); + + public unsafe int TotalItems + { + get + { + DownloadManagerProxy* pDownloadManagerProxy = m_pDownloadManagerProxy; + return *(int*)((ulong)(nint)pDownloadManagerProxy + 20uL) + *(int*)((ulong)(nint)pDownloadManagerProxy + 16uL) + *(int*)((ulong)(nint)pDownloadManagerProxy + 12uL) + *(int*)((ulong)(nint)pDownloadManagerProxy + 8uL); + } + } + + public static DownloadManager Instance + { + get + { + if (sm_downloadManager == null) + { + try + { + Monitor.Enter(sm_lock); + if (sm_downloadManager == null) + { + DownloadManager downloadManager = new DownloadManager(); + Thread.MemoryBarrier(); + sm_downloadManager = downloadManager; + } + } + finally + { + Monitor.Exit(sm_lock); + } + } + return sm_downloadManager; + } + } + + [SpecialName] + public unsafe event DownloadManagerUpdateHandler OnProgressChanged + { + add + { + _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadManagerProxy_002EAddDelegate(m_pDownloadManagerProxy, value); + } + remove + { + _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadManagerProxy_002ERemoveDelegate(m_pDownloadManagerProxy, value); + } + } + + private void _007EDownloadManager() + { + if (m_defaultUpdateHandler != null) + { + OnProgressChanged -= m_defaultUpdateHandler; + m_defaultUpdateHandler = null; + } + _0021DownloadManager(); + } + + private unsafe void _0021DownloadManager() + { + //IL_0019: Expected I, but got I8 + //IL_0022: Expected I, but got I8 + DownloadManagerProxy* pDownloadManagerProxy = m_pDownloadManagerProxy; + if (0L != (nint)pDownloadManagerProxy) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDownloadManagerProxy + 16)))((nint)pDownloadManagerProxy); + m_pDownloadManagerProxy = null; + } + } + + public static DownloadManager CreateInstance() + { + return Instance; + } + + public unsafe DownloadTask GetTask(string taskId) + { + //IL_0003: Expected I, but got I8 + //IL_0006: Expected I, but got I8 + //IL_0036: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + //IL_0058: Expected I, but got I8 + //IL_006a: Expected I, but got I8 + IDownloadManager* ptr = null; + IDownloadTask* ptr2 = null; + DownloadTask result = null; + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(taskId))) + { + int singleton = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_399f851b_a600_4e88_90c3_03b8f2770076, (void**)(&ptr)); + if (singleton >= 0) + { + long num = *(long*)ptr + 72; + IDownloadManager* intPtr = ptr; + singleton = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)intPtr, ptr3, &ptr2); + if (singleton >= 0) + { + result = new DownloadTask(ptr2); + } + } + if (0L != (nint)ptr) + { + IDownloadManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + ptr = null; + } + if (0L != (nint)ptr2) + { + IDownloadTask* intPtr3 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + } + return result; + } + } + + public int SetPosition(IList list, int position) + { + int num = 0; + if (list != null && position >= 0) + { + ArrayList arrayList = new ArrayList(list.Count); + int num2 = list.Count - 1; + if (num2 >= 0) + { + do + { + DownloadTask downloadTask = list[num2] as DownloadTask; + if (downloadTask != null && downloadTask.CanReorder() && downloadTask.SetPosition(position)) + { + arrayList.Add(downloadTask); + num++; + } + num2 += -1; + } + while (num2 >= 0); + if (num > 0) + { + DownloadManagerMoveArguments args = new DownloadManagerMoveArguments(arrayList, position); + UpdatePositions(args); + } + } + } + return num; + } + + public void DownloadNext(DownloadTask task) + { + if (task != null && task.CanReorder()) + { + task.DownloadNext(); + UpdateActiveList(); + } + } + + public void RemoveFailed(DownloadTask task) + { + if (Application.IsApplicationThread) + { + DeferredRemoveFailed(task); + } + else + { + Application.DeferredInvoke(DeferredRemoveFailed, task); + } + } + + public unsafe void PauseQueue() + { + _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadManagerProxy_002EPauseQueue(m_pDownloadManagerProxy); + } + + public unsafe void ResumeQueue() + { + _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadManagerProxy_002EResumeQueue(m_pDownloadManagerProxy); + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool SignInRequired() + { + //IL_0005: Expected I, but got I8 + //IL_0024: Expected I, but got I8 + //IL_0033: Expected I, but got I8 + //IL_0043: Expected I, but got I8 + //IL_0056: Expected I, but got I8 + //IL_006a: Expected I, but got I8 + //IL_006a: Expected I, but got I8 + //IL_0084: Expected I, but got I8 + //IL_00a0: Expected I, but got I8 + bool flag = false; + IDownloadManager* ptr = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_399f851b_a600_4e88_90c3_03b8f2770076, (void**)(&ptr)) >= 0) + { + IDownloadManager* intPtr = ptr; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 88)))((nint)intPtr); + int num2 = 0; + if (0 < num) + { + while (!flag) + { + IDownloadTask* ptr2 = null; + IDownloadManager* intPtr2 = ptr; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 104)))((nint)intPtr2, num2, &ptr2) >= 0) + { + IDownloadTask* intPtr3 = ptr2; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 144)))((nint)intPtr3) == (EDownloadType)0) + { + IDownloadTask* intPtr4 = ptr2; + flag = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 200)))((nint)intPtr4, null) == EDownloadTaskState.DLTaskPendingAttach || flag; + } + } + if (0L != (nint)ptr2) + { + IDownloadTask* intPtr5 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr5 + 16)))((nint)intPtr5); + } + num2++; + if (num2 >= num) + { + break; + } + } + } + } + if (0L != (nint)ptr) + { + IDownloadManager* intPtr6 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr6 + 16)))((nint)intPtr6); + } + return flag; + } + + private unsafe DownloadManager() + { + //IL_004a: Expected I, but got I8 + m_activeDownloadTasks = new ArrayListDataSet(); + m_completedDownloadTasks = new ArrayListDataSet(); + m_failedDownloadTasks = new ArrayListDataSet(); + m_cancelledDownloadTasks = new ArrayListDataSet(); + DownloadManagerProxy* ptr = (DownloadManagerProxy*)_003CModule_003E.@new(112uL); + DownloadManagerProxy* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadManagerProxy_002E_007Bctor_007D(ptr)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + m_pDownloadManagerProxy = ptr2; + if (ptr2 != null && _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadManagerProxy_002EInitialize(ptr2) >= 0) + { + OnProgressChanged += (m_defaultUpdateHandler = DefaultUpdateHandler); + } + } + + private void DefaultUpdateHandler(DownloadManagerUpdateArguments args) + { + if (args.Type == EDownloadManagerUpdateType.TaskAdded) + { + AddActiveTask(args); + } + else if (args.Type != EDownloadManagerUpdateType.TaskProgressChanged) + { + Application.DeferredInvoke(DeferredUpdateInactiveLists, args); + } + } + + private void UpdatePositions(DownloadManagerMoveArguments args) + { + if (Application.IsApplicationThread) + { + DeferredUpdatePositions(args); + } + else + { + Application.DeferredInvoke(DeferredUpdatePositions, args); + } + } + + private void AddActiveTask(DownloadManagerUpdateArguments args) + { + if (Application.IsApplicationThread) + { + DeferredAddActiveTask(args); + } + else + { + Application.DeferredInvoke(DeferredAddActiveTask, args); + } + } + + private void UpdateActiveList() + { + ThreadPool.QueueUserWorkItem(UpdateActiveListOnWorkerThread, this); + } + + private unsafe static void UpdateActiveListOnWorkerThread(object args) + { + //IL_0029: Expected I, but got I8 + //IL_0029: Expected I, but got I8 + //IL_005c: Expected I, but got I8 + //IL_005c: Expected I, but got I8 + //IL_0077: Expected I, but got I8 + //IL_0077: Expected I, but got I8 + //IL_0091: Expected I, but got I8 + //IL_0091: Expected I, but got I8 + //IL_0091: Expected I, but got I8 + //IL_009f: Expected I, but got I8 + CComPtrNtv_003CIDownloadManager_003E cComPtrNtv_003CIDownloadManager_003E; + *(long*)(&cComPtrNtv_003CIDownloadManager_003E) = 0L; + try + { + int singleton = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_399f851b_a600_4e88_90c3_03b8f2770076, (void**)(&cComPtrNtv_003CIDownloadManager_003E)); + int num = 0; + if (singleton >= 0) + { + long num2 = *(long*)(&cComPtrNtv_003CIDownloadManager_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIDownloadManager_003E)) + 88)))((nint)num2); + num = ((num >= 0) ? num : 0); + } + IList list = new ArrayList(num); + int num3 = 0; + if (0 < num) + { + do + { + CComPtrNtv_003CIDownloadTask_003E cComPtrNtv_003CIDownloadTask_003E; + *(long*)(&cComPtrNtv_003CIDownloadTask_003E) = 0L; + try + { + long num4 = *(long*)(&cComPtrNtv_003CIDownloadManager_003E); + singleton = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIDownloadManager_003E)) + 104)))((nint)num4, num3, (IDownloadTask**)(&cComPtrNtv_003CIDownloadTask_003E)); + if (singleton >= 0) + { + long num5 = *(long*)(&cComPtrNtv_003CIDownloadTask_003E); + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIDownloadTask_003E)) + 144)))((nint)num5) == (EDownloadType)0) + { + long num6 = *(long*)(&cComPtrNtv_003CIDownloadTask_003E); + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIDownloadTask_003E)) + 200)))((nint)num6, null) != EDownloadTaskState.DLTaskComplete) + { + list.Add(new DownloadTask((IDownloadTask*)(*(ulong*)(&cComPtrNtv_003CIDownloadTask_003E)))); + } + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIDownloadTask_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIDownloadTask_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIDownloadTask_003E_002ERelease(&cComPtrNtv_003CIDownloadTask_003E); + num3++; + } + while (num3 < num); + } + Application.DeferredInvoke(DeferredUpdateActiveList, list); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIDownloadManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIDownloadManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIDownloadManager_003E_002ERelease(&cComPtrNtv_003CIDownloadManager_003E); + } + + private void DeferredUpdateActiveList(object args) + { + m_activeDownloadTasks.Source = args as ArrayList; + } + + private void DeferredUpdateInactiveLists(object args) + { + DownloadManagerUpdateArguments downloadManagerUpdateArguments = args as DownloadManagerUpdateArguments; + if (downloadManagerUpdateArguments != null) + { + if (downloadManagerUpdateArguments.Type == EDownloadManagerUpdateType.TaskCompleted) + { + m_completedDownloadTasks.Add(downloadManagerUpdateArguments.Task); + m_activeDownloadTasks.Remove(downloadManagerUpdateArguments.Task); + } + else if (downloadManagerUpdateArguments.Type == EDownloadManagerUpdateType.TaskFailed) + { + m_failedDownloadTasks.Add(downloadManagerUpdateArguments.Task); + m_activeDownloadTasks.Remove(downloadManagerUpdateArguments.Task); + } + else if (downloadManagerUpdateArguments.Type == EDownloadManagerUpdateType.TaskCancelled) + { + m_cancelledDownloadTasks.Add(downloadManagerUpdateArguments.Task); + m_activeDownloadTasks.Remove(downloadManagerUpdateArguments.Task); + } + if (m_activeDownloadTasks.Count == 0) + { + DeferredClearLists(null); + } + } + } + + private void DeferredClearLists(object args) + { + m_activeDownloadTasks.Clear(); + m_completedDownloadTasks.Clear(); + m_cancelledDownloadTasks.Clear(); + } + + private unsafe void DeferredRemoveFailed(object args) + { + DownloadTask downloadTask = args as DownloadTask; + if (downloadTask == null) + { + return; + } + switch (downloadTask.GetState()) + { + case EDownloadTaskState.DLTaskCancelled: + { + int num2 = m_cancelledDownloadTasks.IndexOf(downloadTask); + if (num2 >= 0) + { + m_cancelledDownloadTasks.RemoveAt(num2); + _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadManagerProxy_002ERemoveCancelledCount(m_pDownloadManagerProxy); + } + break; + } + case EDownloadTaskState.DLTaskFailed: + { + int num = m_failedDownloadTasks.IndexOf(downloadTask); + if (num >= 0) + { + m_failedDownloadTasks.RemoveAt(num); + _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadManagerProxy_002ERemoveFailedCount(m_pDownloadManagerProxy); + } + break; + } + } + } + + private void DeferredUpdatePositions(object args) + { + DownloadManagerMoveArguments downloadManagerMoveArguments = args as DownloadManagerMoveArguments; + if (downloadManagerMoveArguments == null) + { + return; + } + int position = downloadManagerMoveArguments.Position; + if (position <= m_activeDownloadTasks.Count && position >= 0) + { + int num = 0; + if (0 >= downloadManagerMoveArguments.Tasks.Count) + { + return; + } + do + { + DownloadTask downloadTask = downloadManagerMoveArguments.Tasks[num] as DownloadTask; + if (downloadTask != null) + { + int num2 = m_activeDownloadTasks.IndexOf(downloadTask); + if (num2 >= 0) + { + m_activeDownloadTasks.Move(num2, position); + } + } + num++; + } + while (num < downloadManagerMoveArguments.Tasks.Count); + } + else + { + UpdateActiveList(); + } + } + + private unsafe void DeferredAddActiveTask(object args) + { + DownloadManagerUpdateArguments downloadManagerUpdateArguments = args as DownloadManagerUpdateArguments; + if (downloadManagerUpdateArguments == null) + { + return; + } + int num = *(int*)((ulong)(nint)m_pDownloadManagerProxy + 8uL); + if (num <= m_activeDownloadTasks.Count + 1 && downloadManagerUpdateArguments.QueuePosition <= m_activeDownloadTasks.Count && downloadManagerUpdateArguments.QueuePosition >= 0) + { + if (num != m_activeDownloadTasks.Count || !m_activeDownloadTasks.Contains(downloadManagerUpdateArguments.Task)) + { + m_activeDownloadTasks.Insert(downloadManagerUpdateArguments.QueuePosition, downloadManagerUpdateArguments.Task); + } + } + else + { + UpdateActiveList(); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _007EDownloadManager(); + return; + } + try + { + _0021DownloadManager(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~DownloadManager() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/DownloadManagerMoveArguments.cs b/ZuneDBApi/Microsoft/Zune/Util/DownloadManagerMoveArguments.cs new file mode 100644 index 0000000..0bba403 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/DownloadManagerMoveArguments.cs @@ -0,0 +1,21 @@ +using System.Collections; + +namespace Microsoft.Zune.Util +{ + public class DownloadManagerMoveArguments + { + private IList m_tasks; + + private int m_position; + + public int Position => m_position; + + public IList Tasks => m_tasks; + + internal DownloadManagerMoveArguments(IList Tasks, int position) + { + m_position = position; + m_tasks = Tasks; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/DownloadManagerProxy.cs b/ZuneDBApi/Microsoft/Zune/Util/DownloadManagerProxy.cs new file mode 100644 index 0000000..76e7b19 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/DownloadManagerProxy.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Util +{ + [StructLayout(LayoutKind.Sequential, Size = 112)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(64)] + internal struct DownloadManagerProxy + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/DownloadManagerUpdateArguments.cs b/ZuneDBApi/Microsoft/Zune/Util/DownloadManagerUpdateArguments.cs new file mode 100644 index 0000000..b263686 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/DownloadManagerUpdateArguments.cs @@ -0,0 +1,24 @@ +namespace Microsoft.Zune.Util +{ + public class DownloadManagerUpdateArguments + { + private EDownloadManagerUpdateType m_type; + + private DownloadTask m_task; + + private int m_queuePosition; + + public int QueuePosition => m_queuePosition; + + public DownloadTask Task => m_task; + + public EDownloadManagerUpdateType Type => m_type; + + internal DownloadManagerUpdateArguments(EDownloadManagerUpdateType type, DownloadTask task, int queuePosition) + { + m_type = type; + m_task = task; + m_queuePosition = queuePosition; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/DownloadManagerUpdateHandler.cs b/ZuneDBApi/Microsoft/Zune/Util/DownloadManagerUpdateHandler.cs new file mode 100644 index 0000000..476b6e7 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/DownloadManagerUpdateHandler.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Util +{ + public delegate void DownloadManagerUpdateHandler(DownloadManagerUpdateArguments args); +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/DownloadProgressHandler.cs b/ZuneDBApi/Microsoft/Zune/Util/DownloadProgressHandler.cs new file mode 100644 index 0000000..871773e --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/DownloadProgressHandler.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Util +{ + public delegate void DownloadProgressHandler(DownloadEventArguments args); +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/DownloadTask.cs b/ZuneDBApi/Microsoft/Zune/Util/DownloadTask.cs new file mode 100644 index 0000000..dd99821 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/DownloadTask.cs @@ -0,0 +1,206 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Util +{ + public class DownloadTask : IDisposable + { + private unsafe DownloadTaskProxy* m_pDownloadTaskProxy; + + private DownloadProgressHandler m_defaultProgressHandler; + + [SpecialName] + public unsafe event DownloadProgressHandler OnProgressChanged + { + add + { + int num = _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002ESetDelegate(m_pDownloadTaskProxy, value); + if (num < 0) + { + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + } + } + remove + { + _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002EResetDelegate(m_pDownloadTaskProxy); + } + } + + public unsafe DownloadTask(IDownloadTask* pDownloadTask) + { + //IL_001f: Expected I, but got I8 + DownloadTaskProxy* ptr = (DownloadTaskProxy*)_003CModule_003E.@new(32uL); + DownloadTaskProxy* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002E_007Bctor_007D(ptr, pDownloadTask)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + m_pDownloadTaskProxy = ptr2; + if (ptr2 == null) + { + throw new ApplicationException(_003CModule_003E.GetErrorDescription(-2147024882)); + } + } + + private void _007EDownloadTask() + { + _0021DownloadTask(); + } + + private unsafe void _0021DownloadTask() + { + //IL_0019: Expected I, but got I8 + //IL_0022: Expected I, but got I8 + DownloadTaskProxy* pDownloadTaskProxy = m_pDownloadTaskProxy; + if (0L != (nint)pDownloadTaskProxy) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDownloadTaskProxy + 16)))((nint)pDownloadTaskProxy); + m_pDownloadTaskProxy = null; + } + } + + public unsafe string GetTaskId() + { + return _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002EGetTaskId(m_pDownloadTaskProxy); + } + + public unsafe EDownloadTaskState GetState() + { + return _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002EGetState(m_pDownloadTaskProxy); + } + + public unsafe float GetProgress() + { + return _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002EGetProgress(m_pDownloadTaskProxy); + } + + public unsafe ulong GetBytesDownloaded() + { + return _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002EGetBytesDownloaded(m_pDownloadTaskProxy); + } + + public unsafe int GetDownloadSecondsRemaining() + { + return _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002EGetDownloadSecondsRemaining(m_pDownloadTaskProxy); + } + + public unsafe int GetDownloadFileSecondsRemaining(int iFile) + { + return _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002EGetDownloadFileSecondsRemaining(m_pDownloadTaskProxy, iFile); + } + + public unsafe string GetTempFileName(int iFile) + { + return _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002EGetTempFileName(m_pDownloadTaskProxy, iFile); + } + + public unsafe ulong GetFinalFileSize(int iFile) + { + return _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002EGetFinalFileSize(m_pDownloadTaskProxy, iFile); + } + + public unsafe int GetDownloadBytesPerSecond() + { + return _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002EGetDownloadBytesPerSecond(m_pDownloadTaskProxy); + } + + public unsafe string GetProperty(string propertyName) + { + return _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002EGetProperty(m_pDownloadTaskProxy, propertyName); + } + + public unsafe int GetPropertyInt(string propertyName) + { + return _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002EGetPropertyInt(m_pDownloadTaskProxy, propertyName); + } + + public unsafe void SetProperty(string propertyName, string propertyValue) + { + _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002ESetProperty(m_pDownloadTaskProxy, propertyName, propertyValue); + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool CanCancel() + { + EDownloadTaskState eDownloadTaskState = _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002EGetState(m_pDownloadTaskProxy); + int num = ((eDownloadTaskState == EDownloadTaskState.DLTaskPending || eDownloadTaskState == EDownloadTaskState.DLTaskPendingAttach || eDownloadTaskState == EDownloadTaskState.DLTaskDownloading || eDownloadTaskState == EDownloadTaskState.DLTaskPaused) ? 1 : 0); + return (byte)num != 0; + } + + public unsafe void Cancel() + { + _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002ECancel(m_pDownloadTaskProxy); + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool CanReorder() + { + EDownloadTaskState eDownloadTaskState = _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002EGetState(m_pDownloadTaskProxy); + int num = ((eDownloadTaskState == EDownloadTaskState.DLTaskPending || eDownloadTaskState == EDownloadTaskState.DLTaskPendingAttach || eDownloadTaskState == EDownloadTaskState.DLTaskDownloading || eDownloadTaskState == EDownloadTaskState.DLTaskPaused) ? 1 : 0); + return (byte)num != 0; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe override bool Equals(object obj) + { + bool result = false; + DownloadTask downloadTask = obj as DownloadTask; + if (downloadTask != null) + { + result = _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002EEquals(m_pDownloadTaskProxy, downloadTask.m_pDownloadTaskProxy); + } + return result; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + internal unsafe void DownloadNext() + { + _003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002EDownloadNext(m_pDownloadTaskProxy); + } + + [return: MarshalAs(UnmanagedType.U1)] + internal unsafe bool SetPosition(int position) + { + return (byte)((_003CModule_003E.Microsoft_002EZune_002EUtil_002EDownloadTaskProxy_002ESetPosition(m_pDownloadTaskProxy, (uint)position) >= 0) ? 1u : 0u) != 0; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021DownloadTask(); + return; + } + try + { + _0021DownloadTask(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~DownloadTask() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/DownloadTaskList.cs b/ZuneDBApi/Microsoft/Zune/Util/DownloadTaskList.cs new file mode 100644 index 0000000..b30b70c --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/DownloadTaskList.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections; +using System.Reflection; +using Microsoft.Iris; + +namespace Microsoft.Zune.Util +{ + [DefaultMember("Item")] + public class DownloadTaskList : AggregateList + { + private ArrayListDataSet m_activeDownloadTasks; + + private ArrayListDataSet m_completedDownloadTasks; + + private ArrayListDataSet m_failedDownloadTasks; + + private ArrayListDataSet m_cancelledDownloadTasks; + + private static DownloadTaskList m_instance; + + public ArrayListDataSet FailedDownloads => m_failedDownloadTasks; + + public ArrayListDataSet CancelledDownloads => m_cancelledDownloadTasks; + + public ArrayListDataSet CompletedDownloads => m_completedDownloadTasks; + + public ArrayListDataSet ActiveDownloads => m_activeDownloadTasks; + + public static DownloadTaskList Instance + { + get + { + if (m_instance == null) + { + m_instance = new DownloadTaskList(); + } + return m_instance; + } + } + + private DownloadTaskList() + : base(DownloadManager.Instance.CompletedDownloads, DownloadManager.Instance.CancelledDownloads, DownloadManager.Instance.FailedDownloads, DownloadManager.Instance.ActiveDownloads) + { + try + { + m_completedDownloadTasks = DownloadManager.Instance.CompletedDownloads; + m_cancelledDownloadTasks = DownloadManager.Instance.CancelledDownloads; + m_failedDownloadTasks = DownloadManager.Instance.FailedDownloads; + m_activeDownloadTasks = DownloadManager.Instance.ActiveDownloads; + } + catch + { + //try-fault + ((IDisposable)this).Dispose(); + throw; + } + } + + public int TopActivePosition() + { + int num = m_failedDownloadTasks.Count + m_cancelledDownloadTasks.Count; + return m_completedDownloadTasks.Count + num; + } + + public int SetPosition(IList list, int insertAt) + { + int num = TopActivePosition(); + insertAt = ((insertAt >= num) ? (insertAt - num) : 0); + return DownloadManager.Instance.SetPosition(list, insertAt); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/DownloadTaskProxy.cs b/ZuneDBApi/Microsoft/Zune/Util/DownloadTaskProxy.cs new file mode 100644 index 0000000..8c35a3a --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/DownloadTaskProxy.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Util +{ + [StructLayout(LayoutKind.Sequential, Size = 32)] + [NativeCppClass] + [DebugInfoInPDB] + [MiscellaneousBits(64)] + internal struct DownloadTaskProxy + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/EDownloadManagerUpdateType.cs b/ZuneDBApi/Microsoft/Zune/Util/EDownloadManagerUpdateType.cs new file mode 100644 index 0000000..35b90ab --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/EDownloadManagerUpdateType.cs @@ -0,0 +1,14 @@ +namespace Microsoft.Zune.Util +{ + public enum EDownloadManagerUpdateType + { + QueueResumed = 7, + QueuePaused = 6, + TaskProgressChanged = 5, + TaskCancelled = 4, + TaskFailed = 3, + TaskAdded = 2, + TaskCompleted = 1, + Unknown = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/ETaskbarPlayerCommand.cs b/ZuneDBApi/Microsoft/Zune/Util/ETaskbarPlayerCommand.cs new file mode 100644 index 0000000..1fc24a7 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/ETaskbarPlayerCommand.cs @@ -0,0 +1,14 @@ +namespace Microsoft.Zune.Util +{ + public enum ETaskbarPlayerCommand + { + PC_Restore = 0x40, + PC_Popup = 0x20, + PC_Rate = 0x10, + PC_Back = 8, + PC_Forward = 4, + PC_Pause = 2, + PC_Play = 1, + PC_Connect = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/ETaskbarPlayerState.cs b/ZuneDBApi/Microsoft/Zune/Util/ETaskbarPlayerState.cs new file mode 100644 index 0000000..3c8db0e --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/ETaskbarPlayerState.cs @@ -0,0 +1,18 @@ +namespace Microsoft.Zune.Util +{ + public enum ETaskbarPlayerState + { + PS_CanRate = 0x1000, + PS_CanBack = 0x800, + PS_CanForward = 0x400, + PS_CanPause = 0x200, + PS_CanPlay = 0x100, + PS_RatingHateIt = 0x40, + PS_RatingLoveIt = 0x20, + PS_RatingNotRated = 0x10, + PS_Minimized = 8, + PS_Paused = 4, + PS_Playing = 2, + PS_Stopped = 1 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/FamilySettingsManager.cs b/ZuneDBApi/Microsoft/Zune/Util/FamilySettingsManager.cs new file mode 100644 index 0000000..c54643e --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/FamilySettingsManager.cs @@ -0,0 +1,221 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using DataStructs; +using ZuneUI; + +namespace Microsoft.Zune.Util +{ + public class FamilySettingsManager : IDisposable + { + private unsafe IFamilySettingsProvider* m_pProvider = null; + + private static FamilySettingsManager sm_manager = null; + + private static object sm_lock = new object(); + + public unsafe static FamilySettingsManager Instance + { + get + { + //IL_0052: Expected I, but got I8 + //IL_0082: Expected I, but got I8 + //IL_0086: Expected I, but got I8 + if (sm_manager == null) + { + try + { + Monitor.Enter(sm_lock); + if (sm_manager == null) + { + FamilySettingsManager familySettingsManager = new FamilySettingsManager(); + IMetadataManager* ptr; + int singleton = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_6dd7146d_7a19_4fbb_9235_9e6c382fcc71, (void**)(&ptr)); + if (singleton < 0) + { + throw new ApplicationException(_003CModule_003E.GetErrorDescription(singleton)); + } + IMetadataManager* intPtr = ptr; + __s_GUID gUID_04f38ab5_391b_4b5a_a2c1_d4b74aeb4be = _003CModule_003E._GUID_04f38ab5_391b_4b5a_a2c1_d4b74aeb4be9; + IFamilySettingsProvider* pProvider; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 24)))((nint)intPtr, (_GUID)gUID_04f38ab5_391b_4b5a_a2c1_d4b74aeb4be, (void**)(&pProvider)); + if (num < 0) + { + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + } + Thread.MemoryBarrier(); + familySettingsManager.m_pProvider = pProvider; + if (0L != (nint)ptr) + { + IMetadataManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + ptr = null; + } + sm_manager = familySettingsManager; + } + } + finally + { + Monitor.Exit(sm_lock); + } + } + return sm_manager; + } + } + + private void _007EFamilySettingsManager() + { + _0021FamilySettingsManager(); + } + + private unsafe void _0021FamilySettingsManager() + { + //IL_0019: Expected I, but got I8 + //IL_0022: Expected I, but got I8 + IFamilySettingsProvider* pProvider = m_pProvider; + if (0L != (nint)pProvider) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pProvider + 16)))((nint)pProvider); + m_pProvider = null; + } + } + + public unsafe HRESULT AddSetting(int nSettingId, int nUserId, string szRatingSystem, int nRatingLevel, [MarshalAs(UnmanagedType.U1)] bool fBlockUnrated, out int settingId) + { + //IL_002c: Expected I, but got I8 + int num = -1; + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(szRatingSystem))) + { + long num2 = *(long*)m_pProvider + 24; + IFamilySettingsProvider* pProvider = m_pProvider; + int hr = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pProvider, nSettingId, nUserId, ptr, nRatingLevel, fBlockUnrated ? 1 : 0, &num); + settingId = num; + return new HRESULT(hr); + } + } + + public unsafe HRESULT GetSettingIdsForUser(int nUserId, out int[] rgSettingIds) + { + //IL_001f: Expected I, but got I8 + IntSet intSet; + _003CModule_003E.DataStructs_002EIntSet_002E_007Bctor_007D(&intSet); + HRESULT result; + try + { + IFamilySettingsProvider* pProvider = m_pProvider; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pProvider + 32)))((nint)pProvider, nUserId, &intSet); + if (num >= 0 && !(System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref intSet, 8)) == -1)) + { + rgSettingIds = new int[_003CModule_003E.DataStructs_002EIntSet_002EMemberCount(&intSet)]; + int num2 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref intSet, 4)); + int num3 = 0; + if (System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref intSet, 4)) != -1) + { + do + { + rgSettingIds[num3] = num2; + num3++; + num2 = _003CModule_003E.DataStructs_002EIntSet_002EGetNextMember(&intSet, num2); + } + while (num2 != -1); + } + } + result = num; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.DataStructs_002EIntSet_002E_007Bdtor_007D), &intSet); + throw; + } + _003CModule_003E.DataStructs_002EIntSet_002EFreeData(&intSet); + return result; + } + + public unsafe HRESULT GetSetting(int nSettingId, out string szRatingSystem, out int nRatingLevel, out bool fBlockUnrated) + { + //IL_0008: Expected I4, but got I8 + //IL_0023: Expected I, but got I8 + //IL_0033: Expected I, but got I8 + CComPropVariant cComPropVariant; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + HRESULT result; + try + { + IFamilySettingsProvider* pProvider = m_pProvider; + int num; + int num2; + int num3 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pProvider + 40)))((nint)pProvider, nSettingId, (tagPROPVARIANT*)(&cComPropVariant), &num, &num2); + if (0 == num3) + { + szRatingSystem = new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant, 8))); + nRatingLevel = num; + bool flag = (fBlockUnrated = ((num2 != 0) ? true : false)); + } + result = num3; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + return result; + } + + public unsafe HRESULT GetSettingForSystem(int nUserId, string szRatingSystem, out int nRatingLevel, out bool fBlockUnrated) + { + //IL_002a: Expected I, but got I8 + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(szRatingSystem))) + { + long num = *(long*)m_pProvider + 48; + IFamilySettingsProvider* pProvider = m_pProvider; + int num2; + int num3; + int num4 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pProvider, nUserId, ptr, &num2, &num3); + if (0 == num4) + { + nRatingLevel = num2; + bool flag = (fBlockUnrated = ((num3 != 0) ? true : false)); + } + return num4; + } + } + + private unsafe FamilySettingsManager() + { + }//IL_0008: Expected I, but got I8 + + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021FamilySettingsManager(); + return; + } + try + { + _0021FamilySettingsManager(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~FamilySettingsManager() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/FeatureChangedInteropWrapper.cs b/ZuneDBApi/Microsoft/Zune/Util/FeatureChangedInteropWrapper.cs new file mode 100644 index 0000000..d828218 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/FeatureChangedInteropWrapper.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Util +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(64)] + internal struct FeatureChangedInteropWrapper + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/FeatureEnablement.cs b/ZuneDBApi/Microsoft/Zune/Util/FeatureEnablement.cs new file mode 100644 index 0000000..884f47d --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/FeatureEnablement.cs @@ -0,0 +1,413 @@ +using System; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Util +{ + public class FeatureEnablement + { + [return: MarshalAs(UnmanagedType.U1)] + public unsafe static bool IsFeatureEnabled(Features eFeature) + { + //IL_0003: Expected I, but got I8 + //IL_0024: Expected I, but got I8 + //IL_0037: Expected I, but got I8 + IFeatureEnablementManager* ptr = null; + bool result = false; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_9581b41a_b5cf_4ebf_9d1a_975477e081ca, (void**)(&ptr)) >= 0) + { + IFeatureEnablementManager* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 24)))((nint)intPtr, (EFeatures)eFeature, &result); + } + if (0L != (nint)ptr) + { + IFeatureEnablementManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + return result; + } + + public unsafe static void ForceFeatureOn(Features eFeature) + { + //IL_0003: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + //IL_0033: Expected I, but got I8 + IFeatureEnablementManager* ptr = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_9581b41a_b5cf_4ebf_9d1a_975477e081ca, (void**)(&ptr)) >= 0) + { + IFeatureEnablementManager* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 32)))((nint)intPtr, (EFeatures)eFeature); + } + if (0L != (nint)ptr) + { + IFeatureEnablementManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + } + + public unsafe static string GetRegion() + { + //IL_0003: Expected I, but got I8 + //IL_0008: Expected I, but got I8 + //IL_0026: Expected I, but got I8 + //IL_0048: Expected I, but got I8 + IFeatureEnablementManager* ptr = null; + string result = null; + ushort* ptr2 = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_9581b41a_b5cf_4ebf_9d1a_975477e081ca, (void**)(&ptr)) >= 0) + { + IFeatureEnablementManager* intPtr = ptr; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 40)))((nint)intPtr, &ptr2) >= 0) + { + result = new string((char*)ptr2); + _003CModule_003E.SysFreeString(ptr2); + } + } + if (0L != (nint)ptr) + { + IFeatureEnablementManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + return result; + } + + public unsafe static uint GetGeoId() + { + //IL_0003: Expected I, but got I8 + //IL_0025: Expected I, but got I8 + //IL_003f: Expected I, but got I8 + IFeatureEnablementManager* ptr = null; + uint num = uint.MaxValue; + uint num2 = uint.MaxValue; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_9581b41a_b5cf_4ebf_9d1a_975477e081ca, (void**)(&ptr)) >= 0) + { + IFeatureEnablementManager* intPtr = ptr; + num = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 56)))((nint)intPtr, &num2) >= 0) ? num2 : num); + } + if (0L != (nint)ptr) + { + IFeatureEnablementManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + return num; + } + + public unsafe static uint GetInvalidGeoId() + { + //IL_0003: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + //IL_0033: Expected I, but got I8 + IFeatureEnablementManager* ptr = null; + int result = -1; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_9581b41a_b5cf_4ebf_9d1a_975477e081ca, (void**)(&ptr)) >= 0) + { + IFeatureEnablementManager* intPtr = ptr; + result = (int)((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 64)))((nint)intPtr); + } + if (0L != (nint)ptr) + { + IFeatureEnablementManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + return (uint)result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe static bool HasValidRegionAndLanguage() + { + //IL_0003: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + //IL_003d: Expected I, but got I8 + IFeatureEnablementManager* ptr = null; + bool result = false; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_9581b41a_b5cf_4ebf_9d1a_975477e081ca, (void**)(&ptr)) >= 0) + { + IFeatureEnablementManager* intPtr = ptr; + bool flag = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 72)))((nint)intPtr) != 0) ? true : false); + result = flag; + } + if (0L != (nint)ptr) + { + IFeatureEnablementManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + return result; + } + + public unsafe static string GetMarketplaceCulture() + { + //IL_003c: Expected I, but got I8 + //IL_003c: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + //IL_006a: Expected I, but got I8 + //IL_006a: Expected I, but got I8 + //IL_0077: Expected I, but got I8 + CComPtrNtv_003CIService_003E cComPtrNtv_003CIService_003E; + *(long*)(&cComPtrNtv_003CIService_003E) = 0L; + string result; + try + { + int singleton = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&cComPtrNtv_003CIService_003E)); + result = null; + if (singleton >= 0) + { + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + try + { + CComPtrNtv_003CITunerConfig_003E cComPtrNtv_003CITunerConfig_003E; + *(long*)(&cComPtrNtv_003CITunerConfig_003E) = 0L; + try + { + long num = *(long*)(&cComPtrNtv_003CIService_003E); + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIService_003E)) + 168)))((nint)num) != 0) + { + long num2 = *(long*)(&cComPtrNtv_003CIService_003E); + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIService_003E)) + 176)))((nint)num2, (ITunerConfig**)(&cComPtrNtv_003CITunerConfig_003E)) >= 0) + { + long num3 = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + _003CModule_003E.WString_002EAttachBSTR((WString*)(&wBSTRString), ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 72)))((nint)num3)); + } + } + result = new string((char*)(*(ulong*)(&wBSTRString))); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002E_007Bdtor_007D), &cComPtrNtv_003CITunerConfig_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002ERelease(&cComPtrNtv_003CITunerConfig_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIService_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIService_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIService_003E_002ERelease(&cComPtrNtv_003CIService_003E); + return result; + } + + public unsafe static string GetLynxCulture() + { + //IL_003a: Expected I, but got I8 + //IL_003a: Expected I, but got I8 + //IL_0052: Expected I, but got I8 + //IL_0052: Expected I, but got I8 + //IL_0068: Expected I, but got I8 + //IL_0068: Expected I, but got I8 + //IL_0075: Expected I, but got I8 + CComPtrNtv_003CIService_003E cComPtrNtv_003CIService_003E; + *(long*)(&cComPtrNtv_003CIService_003E) = 0L; + string result; + try + { + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&cComPtrNtv_003CIService_003E)) >= 0) + { + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + try + { + CComPtrNtv_003CITunerConfig_003E cComPtrNtv_003CITunerConfig_003E; + *(long*)(&cComPtrNtv_003CITunerConfig_003E) = 0L; + try + { + long num = *(long*)(&cComPtrNtv_003CIService_003E); + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIService_003E)) + 168)))((nint)num) != 0) + { + long num2 = *(long*)(&cComPtrNtv_003CIService_003E); + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIService_003E)) + 176)))((nint)num2, (ITunerConfig**)(&cComPtrNtv_003CITunerConfig_003E)) >= 0) + { + long num3 = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + _003CModule_003E.WString_002EAttachBSTR((WString*)(&wBSTRString), ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 80)))((nint)num3)); + } + } + result = new string((char*)(*(ulong*)(&wBSTRString))); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002E_007Bdtor_007D), &cComPtrNtv_003CITunerConfig_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002ERelease(&cComPtrNtv_003CITunerConfig_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + goto IL_00b4; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIService_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIService_003E); + throw; + } + string result2; + try + { + result2 = null; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIService_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIService_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIService_003E_002ERelease(&cComPtrNtv_003CIService_003E); + return result2; + IL_00b4: + _003CModule_003E.CComPtrNtv_003CIService_003E_002ERelease(&cComPtrNtv_003CIService_003E); + return result; + } + + public unsafe static string GetTaxString() + { + //IL_003c: Expected I, but got I8 + //IL_003c: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + //IL_006a: Expected I, but got I8 + //IL_006a: Expected I, but got I8 + //IL_0077: Expected I, but got I8 + CComPtrNtv_003CIService_003E cComPtrNtv_003CIService_003E; + *(long*)(&cComPtrNtv_003CIService_003E) = 0L; + string result; + try + { + int singleton = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&cComPtrNtv_003CIService_003E)); + result = null; + if (singleton >= 0) + { + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + try + { + CComPtrNtv_003CITunerConfig_003E cComPtrNtv_003CITunerConfig_003E; + *(long*)(&cComPtrNtv_003CITunerConfig_003E) = 0L; + try + { + long num = *(long*)(&cComPtrNtv_003CIService_003E); + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIService_003E)) + 168)))((nint)num) != 0) + { + long num2 = *(long*)(&cComPtrNtv_003CIService_003E); + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIService_003E)) + 176)))((nint)num2, (ITunerConfig**)(&cComPtrNtv_003CITunerConfig_003E)) >= 0) + { + long num3 = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + _003CModule_003E.WString_002EAttachBSTR((WString*)(&wBSTRString), ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 88)))((nint)num3)); + } + } + result = new string((char*)(*(ulong*)(&wBSTRString))); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002E_007Bdtor_007D), &cComPtrNtv_003CITunerConfig_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002ERelease(&cComPtrNtv_003CITunerConfig_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIService_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIService_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIService_003E_002ERelease(&cComPtrNtv_003CIService_003E); + return result; + } + + public unsafe static string GetCreditCardValidationString() + { + //IL_003c: Expected I, but got I8 + //IL_003c: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + //IL_006a: Expected I, but got I8 + //IL_006a: Expected I, but got I8 + //IL_0077: Expected I, but got I8 + CComPtrNtv_003CIService_003E cComPtrNtv_003CIService_003E; + *(long*)(&cComPtrNtv_003CIService_003E) = 0L; + string result; + try + { + int singleton = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&cComPtrNtv_003CIService_003E)); + result = null; + if (singleton >= 0) + { + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + try + { + CComPtrNtv_003CITunerConfig_003E cComPtrNtv_003CITunerConfig_003E; + *(long*)(&cComPtrNtv_003CITunerConfig_003E) = 0L; + try + { + long num = *(long*)(&cComPtrNtv_003CIService_003E); + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIService_003E)) + 168)))((nint)num) != 0) + { + long num2 = *(long*)(&cComPtrNtv_003CIService_003E); + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIService_003E)) + 176)))((nint)num2, (ITunerConfig**)(&cComPtrNtv_003CITunerConfig_003E)) >= 0) + { + long num3 = *(long*)(&cComPtrNtv_003CITunerConfig_003E); + _003CModule_003E.WString_002EAttachBSTR((WString*)(&wBSTRString), ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CITunerConfig_003E)) + 96)))((nint)num3)); + } + } + result = new string((char*)(*(ulong*)(&wBSTRString))); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002E_007Bdtor_007D), &cComPtrNtv_003CITunerConfig_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CITunerConfig_003E_002ERelease(&cComPtrNtv_003CITunerConfig_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIService_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIService_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIService_003E_002ERelease(&cComPtrNtv_003CIService_003E); + return result; + } + + private FeatureEnablement() + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/FeaturesChangedApi.cs b/ZuneDBApi/Microsoft/Zune/Util/FeaturesChangedApi.cs new file mode 100644 index 0000000..18b2421 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/FeaturesChangedApi.cs @@ -0,0 +1,167 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.Iris; + +namespace Microsoft.Zune.Util +{ + public class FeaturesChangedApi : IDisposable + { + private static FeaturesChangedApi m_singletonInstance; + + private FeaturesChangedHandler m_featuresChangedHandler; + + private readonly CComPtrMgd_003CIAsyncCallback_003E m_spAsyncCallback; + + public static FeaturesChangedApi Instance + { + get + { + if (m_singletonInstance == null) + { + m_singletonInstance = new FeaturesChangedApi(); + m_singletonInstance.Initialize(); + } + return m_singletonInstance; + } + } + + public static bool HasInstance + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return (byte)((m_singletonInstance != null) ? 1u : 0u) != 0; + } + } + + [SpecialName] + public unsafe event FeaturesChangedHandler OnFeaturesChangedEvent + { + add + { + //IL_001c: Expected I, but got I8 + //IL_003c: Expected I, but got I8 + //IL_005a: Expected I, but got I8 + m_featuresChangedHandler = (FeaturesChangedHandler)Delegate.Combine(m_featuresChangedHandler, value); + bool featuresHaveChanged = false; + IFeatureEnablementManager* ptr = null; + int singleton = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_9581b41a_b5cf_4ebf_9d1a_975477e081ca, (void**)(&ptr)); + if (singleton >= 0) + { + IFeatureEnablementManager* intPtr = ptr; + singleton = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 88)))((nint)intPtr, &featuresHaveChanged); + if (singleton >= 0) + { + value(featuresHaveChanged); + } + } + if (0L != (nint)ptr) + { + IFeatureEnablementManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + } + remove + { + m_featuresChangedHandler = (FeaturesChangedHandler)Delegate.Remove(m_featuresChangedHandler, value); + } + } + + public void FeaturesHaveChanged([MarshalAs(UnmanagedType.U1)] bool fFeaturesHaveChanged) + { + Application.DeferredInvoke(FeaturesHaveChangedAsync, fFeaturesHaveChanged); + } + + public void FeaturesHaveChangedAsync(object args) + { + m_featuresChangedHandler((bool)args); + } + + private FeaturesChangedApi() + { + CComPtrMgd_003CIAsyncCallback_003E spAsyncCallback = new CComPtrMgd_003CIAsyncCallback_003E(); + try + { + m_spAsyncCallback = spAsyncCallback; + base._002Ector(); + } + catch + { + //try-fault + ((IDisposable)m_spAsyncCallback).Dispose(); + throw; + } + } + + private unsafe int Initialize() + { + //IL_0026: Expected I, but got I8 + //IL_0058: Expected I, but got I8 + //IL_006d: Expected I, but got I8 + int num = 0; + FeatureChangedInteropWrapper* ptr = (FeatureChangedInteropWrapper*)_003CModule_003E.@new(24uL); + FeatureChangedInteropWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EFeatureChangedInteropWrapper_002E_007Bctor_007D(ptr, FeaturesHaveChanged)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + num = ((0L != (nint)ptr2) ? (-2147024882) : num); + CComPtrNtv_003CIAsyncCallback_003E cComPtrNtv_003CIAsyncCallback_003E; + *(long*)(&cComPtrNtv_003CIAsyncCallback_003E) = 0L; + try + { + if (num >= 0) + { + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(ulong*)ptr2)))((nint)ptr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._GUID_f5fcfd66_9e9a_436a_8b10_aeb4d6ce2b3d), (void**)(&cComPtrNtv_003CIAsyncCallback_003E)); + if (num >= 0) + { + m_spAsyncCallback.op_Assign((IAsyncCallback*)(*(ulong*)(&cComPtrNtv_003CIAsyncCallback_003E))); + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIAsyncCallback_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIAsyncCallback_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIAsyncCallback_003E_002ERelease(&cComPtrNtv_003CIAsyncCallback_003E); + return num; + } + + public void _007EFeaturesChangedApi() + { + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + } + finally + { + ((IDisposable)m_spAsyncCallback).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/FeaturesChangedHandler.cs b/ZuneDBApi/Microsoft/Zune/Util/FeaturesChangedHandler.cs new file mode 100644 index 0000000..08fa699 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/FeaturesChangedHandler.cs @@ -0,0 +1,6 @@ +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Util +{ + public delegate void FeaturesChangedHandler([MarshalAs(UnmanagedType.U1)] bool featuresHaveChanged); +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/ITrayDeskBand.cs b/ZuneDBApi/Microsoft/Zune/Util/ITrayDeskBand.cs new file mode 100644 index 0000000..e787a25 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/ITrayDeskBand.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Util +{ + [StructLayout(LayoutKind.Sequential, Size = 8)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(65)] + internal static struct ITrayDeskBand + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/JumpListCategory.cs b/ZuneDBApi/Microsoft/Zune/Util/JumpListCategory.cs new file mode 100644 index 0000000..d8511fc --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/JumpListCategory.cs @@ -0,0 +1,106 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Util +{ + public class JumpListCategory : IDisposable + { + private readonly CComPtrMgd_003CIJumpListCategory_003E m_spCategory; + + public unsafe string Name + { + get + { + //IL_0003: Expected I, but got I8 + //IL_001f: Expected I, but got I8 + ushort* ptr = null; + object result = null; + IJumpListCategory* p = m_spCategory.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p, &ptr) >= 0) + { + result = new string((char*)ptr); + } + _003CModule_003E.SysFreeString(ptr); + return (string)result; + } + set + { + //IL_0023: Expected I, but got I8 + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(value))) + { + IJumpListCategory* p = m_spCategory.p; + long num = *(long*)p + 32; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)p, ptr); + } + } + } + + public unsafe int CreateDestination(out JumpListEntry destination) + { + //IL_0020: Expected I, but got I8 + //IL_002a: Expected I, but got I8 + CComPtrNtv_003CIJumpListEntry_003E cComPtrNtv_003CIJumpListEntry_003E; + *(long*)(&cComPtrNtv_003CIJumpListEntry_003E) = 0L; + try + { + IJumpListCategory* p = m_spCategory.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p, (IJumpListEntry**)(&cComPtrNtv_003CIJumpListEntry_003E)); + destination = new JumpListEntry((IJumpListEntry*)(*(ulong*)(&cComPtrNtv_003CIJumpListEntry_003E))); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIJumpListEntry_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIJumpListEntry_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIJumpListEntry_003E_002ERelease(&cComPtrNtv_003CIJumpListEntry_003E); + return 0; + } + + internal unsafe JumpListCategory(IJumpListCategory* pCategory) + { + CComPtrMgd_003CIJumpListCategory_003E spCategory = new CComPtrMgd_003CIJumpListCategory_003E(); + try + { + m_spCategory = spCategory; + base._002Ector(); + m_spCategory.op_Assign(pCategory); + } + catch + { + //try-fault + ((IDisposable)m_spCategory).Dispose(); + throw; + } + } + + public void _007EJumpListCategory() + { + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + } + finally + { + ((IDisposable)m_spCategory).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/JumpListEntry.cs b/ZuneDBApi/Microsoft/Zune/Util/JumpListEntry.cs new file mode 100644 index 0000000..da53037 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/JumpListEntry.cs @@ -0,0 +1,130 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Util +{ + public class JumpListEntry : IDisposable + { + private readonly CComPtrMgd_003CIJumpListEntry_003E m_spEntry; + + public unsafe int IconIndex + { + get + { + //IL_001d: Expected I, but got I8 + int result = 0; + IJumpListEntry* p = m_spEntry.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 56)))((nint)p, &result); + return result; + } + set + { + //IL_001a: Expected I, but got I8 + IJumpListEntry* p = m_spEntry.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 64)))((nint)p, value); + } + } + + public unsafe string CommandLineArguments + { + get + { + //IL_0003: Expected I, but got I8 + //IL_001f: Expected I, but got I8 + ushort* ptr = null; + object result = null; + IJumpListEntry* p = m_spEntry.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p, &ptr) >= 0) + { + result = new string((char*)ptr); + } + _003CModule_003E.SysFreeString(ptr); + return (string)result; + } + set + { + //IL_0023: Expected I, but got I8 + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(value))) + { + IJumpListEntry* p = m_spEntry.p; + long num = *(long*)p + 48; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)p, ptr); + } + } + } + + public unsafe string Name + { + get + { + //IL_0003: Expected I, but got I8 + //IL_001f: Expected I, but got I8 + ushort* ptr = null; + object result = null; + IJumpListEntry* p = m_spEntry.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p, &ptr) >= 0) + { + result = new string((char*)ptr); + } + _003CModule_003E.SysFreeString(ptr); + return (string)result; + } + set + { + //IL_0023: Expected I, but got I8 + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(value))) + { + IJumpListEntry* p = m_spEntry.p; + long num = *(long*)p + 32; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)p, ptr); + } + } + } + + internal unsafe JumpListEntry(IJumpListEntry* pEntry) + { + CComPtrMgd_003CIJumpListEntry_003E spEntry = new CComPtrMgd_003CIJumpListEntry_003E(); + try + { + m_spEntry = spEntry; + base._002Ector(); + m_spEntry.op_Assign(pEntry); + } + catch + { + //try-fault + ((IDisposable)m_spEntry).Dispose(); + throw; + } + } + + public void _007EJumpListEntry() + { + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + } + finally + { + ((IDisposable)m_spEntry).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/JumpListSession.cs b/ZuneDBApi/Microsoft/Zune/Util/JumpListSession.cs new file mode 100644 index 0000000..1935a89 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/JumpListSession.cs @@ -0,0 +1,195 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Util +{ + public class JumpListSession : IDisposable + { + private readonly CComPtrMgd_003CIJumpList_003E m_spJumpList; + + public unsafe bool IsAlive + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001b: Expected I, but got I8 + IJumpList* p = m_spJumpList.p; + int num; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 72)))((nint)p, &num); + return num == 1; + } + } + + public unsafe int GetDisallowedDestinations(out List disallowedDestinationList) + { + //IL_0043: Expected I, but got I8 + //IL_0085: Expected I, but got I8 + //IL_00a6: Expected I, but got I8 + //IL_00c3: Expected I, but got I8 + //IL_00c3: Expected I, but got I8 + //IL_00d3: Expected I, but got I8 + if (m_spJumpList.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 214u); + return -2147418113; + } + disallowedDestinationList = null; + uint num = 0u; + IJumpList* p = m_spJumpList.p; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p, &num); + if (num2 >= 0) + { + IJumpListEntry** ptr = (IJumpListEntry**)_003CModule_003E.new_005B_005D((ulong)num * 8uL); + num2 = (((long)(nint)ptr == 0) ? (-2147024882) : num2); + if (num2 >= 0) + { + p = m_spJumpList.p; + IJumpList* intPtr = p; + uint num3 = num; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)intPtr, num3, ptr); + if (num2 >= 0) + { + disallowedDestinationList = new List((int)num); + uint num4 = 0u; + if (0 < num) + { + IJumpListEntry** ptr2 = ptr; + do + { + disallowedDestinationList.Add(new JumpListEntry((IJumpListEntry*)(*(ulong*)ptr2))); + long num5 = *(long*)ptr2; + if (0 != num5) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)num5 + 16)))((nint)num5); + *(long*)ptr2 = 0L; + } + num4++; + ptr2 = (IJumpListEntry**)((ulong)(nint)ptr2 + 8uL); + } + while (num4 < num); + } + } + } + if (0L != (nint)ptr) + { + _003CModule_003E.delete_005B_005D(ptr); + } + } + return num2; + } + + public unsafe int CreateTask(out JumpListEntry task) + { + //IL_0020: Expected I, but got I8 + //IL_002a: Expected I, but got I8 + CComPtrNtv_003CIJumpListEntry_003E cComPtrNtv_003CIJumpListEntry_003E; + *(long*)(&cComPtrNtv_003CIJumpListEntry_003E) = 0L; + try + { + IJumpList* p = m_spJumpList.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p, (IJumpListEntry**)(&cComPtrNtv_003CIJumpListEntry_003E)); + task = new JumpListEntry((IJumpListEntry*)(*(ulong*)(&cComPtrNtv_003CIJumpListEntry_003E))); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIJumpListEntry_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIJumpListEntry_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIJumpListEntry_003E_002ERelease(&cComPtrNtv_003CIJumpListEntry_003E); + return 0; + } + + public unsafe int CreateCategory(out JumpListCategory category) + { + //IL_0020: Expected I, but got I8 + //IL_002a: Expected I, but got I8 + CComPtrNtv_003CIJumpListCategory_003E cComPtrNtv_003CIJumpListCategory_003E; + *(long*)(&cComPtrNtv_003CIJumpListCategory_003E) = 0L; + try + { + IJumpList* p = m_spJumpList.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 48)))((nint)p, (IJumpListCategory**)(&cComPtrNtv_003CIJumpListCategory_003E)); + category = new JumpListCategory((IJumpListCategory*)(*(ulong*)(&cComPtrNtv_003CIJumpListCategory_003E))); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIJumpListCategory_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIJumpListCategory_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIJumpListCategory_003E_002ERelease(&cComPtrNtv_003CIJumpListCategory_003E); + return 0; + } + + public unsafe int Commit() + { + //IL_0031: Expected I, but got I8 + IJumpList* p = m_spJumpList.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 303u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 56)))((nint)p); + } + + public unsafe int Cancel() + { + //IL_0031: Expected I, but got I8 + IJumpList* p = m_spJumpList.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 319u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 64)))((nint)p); + } + + internal unsafe JumpListSession(IJumpList* pJumpList) + { + CComPtrMgd_003CIJumpList_003E spJumpList = new CComPtrMgd_003CIJumpList_003E(); + try + { + m_spJumpList = spJumpList; + base._002Ector(); + m_spJumpList.op_Assign(pJumpList); + } + catch + { + //try-fault + ((IDisposable)m_spJumpList).Dispose(); + throw; + } + } + + public void _007EJumpListSession() + { + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + } + finally + { + ((IDisposable)m_spJumpList).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/MonitorChangeHandler.cs b/ZuneDBApi/Microsoft/Zune/Util/MonitorChangeHandler.cs new file mode 100644 index 0000000..4e00e4d --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/MonitorChangeHandler.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Util +{ + public delegate void MonitorChangeHandler(); +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/NavigationCompleteHandler.cs b/ZuneDBApi/Microsoft/Zune/Util/NavigationCompleteHandler.cs new file mode 100644 index 0000000..41ae38c --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/NavigationCompleteHandler.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Util +{ + public delegate void NavigationCompleteHandler(string navUrl); +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/NavigationErrorHandler.cs b/ZuneDBApi/Microsoft/Zune/Util/NavigationErrorHandler.cs new file mode 100644 index 0000000..7864816 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/NavigationErrorHandler.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Util +{ + public delegate void NavigationErrorHandler(string errorUrl, int errorCode); +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/Notification.cs b/ZuneDBApi/Microsoft/Zune/Util/Notification.cs new file mode 100644 index 0000000..8e5af66 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/Notification.cs @@ -0,0 +1,44 @@ +using System; +using Microsoft.Zune.Configuration; + +namespace Microsoft.Zune.Util +{ + public class Notification + { + public static void BroadcastNowPlaying(EMediaTypes MediaType, string AlbumName, string ArtistName, string TrackTitle, int TrackNumber, Guid ZuneMediaId) + { + if (!ClientConfiguration.Playback.NotifyIMClient) + { + return; + } + switch (MediaType) + { + case EMediaTypes.eMediaTypePodcastEpisode: + if (ClientConfiguration.Playback.NotifyIncludePodcasts) + { + goto default; + } + break; + case EMediaTypes.eMediaTypeVideo: + if (!ClientConfiguration.Playback.NotifyIncludeVideos) + { + break; + } + goto default; + default: + _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x6d314898_002ENotifyInstantMessenger(AlbumName, ArtistName, TrackTitle, TrackNumber, ZuneMediaId); + break; + case EMediaTypes.eMediaTypeInvalid: + break; + } + } + + public static void ResetNowPlaying() + { + if (ClientConfiguration.Playback.NotifyIMClient) + { + _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x6d314898_002EResetInstantMessenger(); + } + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/PhotoManager.cs b/ZuneDBApi/Microsoft/Zune/Util/PhotoManager.cs new file mode 100644 index 0000000..f751735 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/PhotoManager.cs @@ -0,0 +1,463 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using ZuneUI; + +namespace Microsoft.Zune.Util +{ + public class PhotoManager + { + private static PhotoManager sm_PhotoManager = null; + + private static object sm_lock = new object(); + + public static PhotoManager Instance + { + get + { + if (sm_PhotoManager == null) + { + try + { + Monitor.Enter(sm_lock); + if (sm_PhotoManager == null) + { + PhotoManager photoManager = new PhotoManager(); + Thread.MemoryBarrier(); + sm_PhotoManager = photoManager; + } + } + finally + { + Monitor.Exit(sm_lock); + } + } + return sm_PhotoManager; + } + } + + public unsafe HRESULT SetWindowHandle(IntPtr hWnd) + { + //IL_0005: Expected I, but got I8 + //IL_002f: Expected I, but got I8 + //IL_0044: Expected I, but got I8 + //IL_0048: Expected I, but got I8 + int num = 0; + IMetadataManager* ptr = null; + try + { + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_6dd7146d_7a19_4fbb_9235_9e6c382fcc71, (void**)(&ptr)); + if (num >= 0) + { + long num2 = *(long*)ptr + 440; + IMetadataManager* intPtr = ptr; + void* intPtr2 = hWnd.ToPointer(); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, (HWND__*)intPtr2); + } + } + finally + { + if (0L != (nint)ptr) + { + IMetadataManager* intPtr3 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + ptr = null; + } + } + return new HRESULT(num); + } + + public unsafe HRESULT FindFolder(string szFolderName, out int nFolderId) + { + //IL_0008: Expected I, but got I8 + //IL_000b: Expected I, but got I8 + //IL_0030: Expected I, but got I8 + //IL_0042: Expected I4, but got I8 + //IL_0062: Expected I, but got I8 + //IL_008b: Expected I, but got I8 + //IL_008f: Expected I, but got I8 + //IL_00a1: Expected I, but got I8 + //IL_00a5: Expected I, but got I8 + int num = 1; + nFolderId = -1; + IMetadataManager* ptr = null; + IFolderProvider* ptr2 = null; + try + { + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_6dd7146d_7a19_4fbb_9235_9e6c382fcc71, (void**)(&ptr)); + if (num >= 0) + { + IMetadataManager* intPtr = ptr; + __s_GUID gUID_a2889317_d0c7_41d8_abc7_1eb4cb8d46d = _003CModule_003E._GUID_a2889317_d0c7_41d8_abc7_1eb4cb8d46d6; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 24)))((nint)intPtr, (_GUID)gUID_a2889317_d0c7_41d8_abc7_1eb4cb8d46d, (void**)(&ptr2)); + } + tagVARIANT tagVARIANT; + *(short*)(&tagVARIANT) = 0; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagVARIANT, 2), 0, 22); + if (num >= 0) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(szFolderName))) + { + try + { + long num2 = *(long*)ptr2 + 88; + IFolderProvider* intPtr2 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr2, ptr3, EMediaTypes.eMediaTypeImage, &tagVARIANT); + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + if (num >= 0) + { + nFolderId = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagVARIANT, 8)); + } + } + } + finally + { + if (0L != (nint)ptr2) + { + IFolderProvider* intPtr3 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + ptr2 = null; + } + if (0L != (nint)ptr) + { + IMetadataManager* intPtr4 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr4 + 16)))((nint)intPtr4); + ptr = null; + } + } + return new HRESULT(num); + } + + public unsafe HRESULT FindPhotoContainer([In] int nMediaId, out int nFolderId) + { + //IL_0008: Expected I, but got I8 + //IL_000b: Expected I, but got I8 + //IL_0030: Expected I, but got I8 + //IL_0042: Expected I4, but got I8 + //IL_005a: Expected I, but got I8 + //IL_007a: Expected I, but got I8 + //IL_007e: Expected I, but got I8 + //IL_0090: Expected I, but got I8 + //IL_0094: Expected I, but got I8 + int num = 1; + nFolderId = -1; + IMetadataManager* ptr = null; + IFileProvider* ptr2 = null; + try + { + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_6dd7146d_7a19_4fbb_9235_9e6c382fcc71, (void**)(&ptr)); + if (num >= 0) + { + IMetadataManager* intPtr = ptr; + __s_GUID gUID_16a9f8be_e76c_4391_ad74_8df74b7a3c = _003CModule_003E._GUID_16a9f8be_e76c_4391_ad74_8df74b7a3c21; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 24)))((nint)intPtr, (_GUID)gUID_16a9f8be_e76c_4391_ad74_8df74b7a3c, (void**)(&ptr2)); + } + tagVARIANT tagVARIANT; + *(short*)(&tagVARIANT) = 0; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagVARIANT, 2), 0, 22); + if (num >= 0) + { + IFileProvider* intPtr2 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 528)))((nint)intPtr2, nMediaId, EMediaTypes.eMediaTypeImage, &tagVARIANT); + if (num >= 0) + { + nFolderId = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagVARIANT, 8)); + } + } + } + finally + { + if (0L != (nint)ptr2) + { + IFileProvider* intPtr3 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + ptr2 = null; + } + if (0L != (nint)ptr) + { + IMetadataManager* intPtr4 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr4 + 16)))((nint)intPtr4); + ptr = null; + } + } + return new HRESULT(num); + } + + public unsafe HRESULT CreateFolder(string szFolderName, int nParentFolderId, out int nCreatedFolderId) + { + //IL_0016: Expected I, but got I8 + //IL_0019: Expected I, but got I8 + //IL_003e: Expected I, but got I8 + //IL_0050: Expected I4, but got I8 + //IL_0073: Expected I, but got I8 + //IL_009c: Expected I, but got I8 + //IL_00a0: Expected I, but got I8 + //IL_00b2: Expected I, but got I8 + //IL_00b6: Expected I, but got I8 + int num = 1; + nCreatedFolderId = -1; + if (string.IsNullOrEmpty(szFolderName)) + { + return HRESULT._DB_E_BADPARAMETERNAME; + } + IMetadataManager* ptr = null; + IFolderProvider* ptr2 = null; + try + { + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_6dd7146d_7a19_4fbb_9235_9e6c382fcc71, (void**)(&ptr)); + if (num >= 0) + { + IMetadataManager* intPtr = ptr; + __s_GUID gUID_a2889317_d0c7_41d8_abc7_1eb4cb8d46d = _003CModule_003E._GUID_a2889317_d0c7_41d8_abc7_1eb4cb8d46d6; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 24)))((nint)intPtr, (_GUID)gUID_a2889317_d0c7_41d8_abc7_1eb4cb8d46d, (void**)(&ptr2)); + } + tagVARIANT tagVARIANT; + *(short*)(&tagVARIANT) = 0; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagVARIANT, 2), 0, 22); + if (num >= 0) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(szFolderName))) + { + try + { + long num2 = *(long*)ptr2 + 224; + IFolderProvider* intPtr2 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr2, ptr3, nParentFolderId, &tagVARIANT); + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + if (num >= 0) + { + nCreatedFolderId = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagVARIANT, 8)); + } + } + } + finally + { + if (0L != (nint)ptr2) + { + IFolderProvider* intPtr3 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + ptr2 = null; + } + if (0L != (nint)ptr) + { + IMetadataManager* intPtr4 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr4 + 16)))((nint)intPtr4); + ptr = null; + } + } + return new HRESULT(num); + } + + public unsafe HRESULT RenameFolder(int nFolderId, string szNewFolderName) + { + //IL_0013: Expected I, but got I8 + //IL_0016: Expected I, but got I8 + //IL_003b: Expected I, but got I8 + //IL_005e: Expected I, but got I8 + //IL_007c: Expected I, but got I8 + //IL_0080: Expected I, but got I8 + //IL_0092: Expected I, but got I8 + //IL_0096: Expected I, but got I8 + int num = 1; + if (string.IsNullOrEmpty(szNewFolderName)) + { + return HRESULT._DB_E_BADPARAMETERNAME; + } + IMetadataManager* ptr = null; + IFolderProvider* ptr2 = null; + try + { + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_6dd7146d_7a19_4fbb_9235_9e6c382fcc71, (void**)(&ptr)); + if (num >= 0) + { + IMetadataManager* intPtr = ptr; + __s_GUID gUID_a2889317_d0c7_41d8_abc7_1eb4cb8d46d = _003CModule_003E._GUID_a2889317_d0c7_41d8_abc7_1eb4cb8d46d6; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 24)))((nint)intPtr, (_GUID)gUID_a2889317_d0c7_41d8_abc7_1eb4cb8d46d, (void**)(&ptr2)); + if (num >= 0) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(szNewFolderName))) + { + try + { + long num2 = *(long*)ptr2 + 232; + IFolderProvider* intPtr2 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr2, nFolderId, ptr3, 0); + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + } + } + finally + { + if (0L != (nint)ptr2) + { + IFolderProvider* intPtr3 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + ptr2 = null; + } + if (0L != (nint)ptr) + { + IMetadataManager* intPtr4 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr4 + 16)))((nint)intPtr4); + ptr = null; + } + } + return new HRESULT(num); + } + + public unsafe HRESULT Move(int[] mediaIds, EMediaTypes mediaType, int nDestinationFolderId) + { + //IL_0018: Expected I, but got I8 + //IL_001b: Expected I, but got I8 + //IL_0040: Expected I, but got I8 + //IL_0066: Expected I, but got I8 + //IL_0084: Expected I, but got I8 + //IL_0088: Expected I, but got I8 + //IL_009a: Expected I, but got I8 + //IL_009e: Expected I, but got I8 + if (mediaIds == null) + { + return HRESULT._DB_E_BADPARAMETERNAME; + } + if (mediaIds.Length == 0) + { + return HRESULT._S_OK; + } + int num = 1; + IMetadataManager* ptr = null; + IFolderProvider* ptr2 = null; + try + { + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_6dd7146d_7a19_4fbb_9235_9e6c382fcc71, (void**)(&ptr)); + if (num >= 0) + { + IMetadataManager* intPtr = ptr; + __s_GUID gUID_a2889317_d0c7_41d8_abc7_1eb4cb8d46d = _003CModule_003E._GUID_a2889317_d0c7_41d8_abc7_1eb4cb8d46d6; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 24)))((nint)intPtr, (_GUID)gUID_a2889317_d0c7_41d8_abc7_1eb4cb8d46d, (void**)(&ptr2)); + if (num >= 0) + { + fixed (int* ptr3 = &mediaIds[0]) + { + try + { + int* ptr4 = ptr3; + IFolderProvider* intPtr2 = ptr2; + IntPtr intPtr3 = (nint)mediaIds.LongLength; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 256)))((nint)intPtr2, mediaType, ptr4, (int)(nint)intPtr3, nDestinationFolderId); + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + } + } + finally + { + if (0L != (nint)ptr2) + { + IFolderProvider* intPtr4 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr4 + 16)))((nint)intPtr4); + ptr2 = null; + } + if (0L != (nint)ptr) + { + IMetadataManager* intPtr5 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr5 + 16)))((nint)intPtr5); + ptr = null; + } + } + return new HRESULT(num); + } + + public unsafe HRESULT Import(string szPath, EMediaTypes mediaType, int nDestinationFolderId) + { + //IL_0013: Expected I, but got I8 + //IL_0016: Expected I, but got I8 + //IL_003b: Expected I, but got I8 + //IL_005e: Expected I, but got I8 + //IL_007c: Expected I, but got I8 + //IL_0080: Expected I, but got I8 + //IL_0092: Expected I, but got I8 + //IL_0096: Expected I, but got I8 + if (string.IsNullOrEmpty(szPath)) + { + return HRESULT._DB_E_BADPARAMETERNAME; + } + int num = 1; + IMetadataManager* ptr = null; + IFolderProvider* ptr2 = null; + try + { + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_6dd7146d_7a19_4fbb_9235_9e6c382fcc71, (void**)(&ptr)); + if (num >= 0) + { + IMetadataManager* intPtr = ptr; + __s_GUID gUID_a2889317_d0c7_41d8_abc7_1eb4cb8d46d = _003CModule_003E._GUID_a2889317_d0c7_41d8_abc7_1eb4cb8d46d6; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 24)))((nint)intPtr, (_GUID)gUID_a2889317_d0c7_41d8_abc7_1eb4cb8d46d, (void**)(&ptr2)); + if (num >= 0) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(szPath))) + { + try + { + long num2 = *(long*)ptr2 + 264; + IFolderProvider* intPtr2 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr2, nDestinationFolderId, mediaType, ptr3); + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + } + } + finally + { + if (0L != (nint)ptr2) + { + IFolderProvider* intPtr3 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + ptr2 = null; + } + if (0L != (nint)ptr) + { + IMetadataManager* intPtr4 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr4 + 16)))((nint)intPtr4); + ptr = null; + } + } + return new HRESULT(num); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/PinManager.cs b/ZuneDBApi/Microsoft/Zune/Util/PinManager.cs new file mode 100644 index 0000000..eb683d8 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/PinManager.cs @@ -0,0 +1,178 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using ZuneUI; + +namespace Microsoft.Zune.Util +{ + public class PinManager : IDisposable + { + private unsafe IPinProvider* m_pPinProvider = null; + + private static PinManager sm_PinManager = null; + + private static object sm_lock = new object(); + + public unsafe static PinManager Instance + { + get + { + //IL_0052: Expected I, but got I8 + //IL_0082: Expected I, but got I8 + //IL_0086: Expected I, but got I8 + if (sm_PinManager == null) + { + try + { + Monitor.Enter(sm_lock); + if (sm_PinManager == null) + { + PinManager pinManager = new PinManager(); + IMetadataManager* ptr; + int singleton = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_6dd7146d_7a19_4fbb_9235_9e6c382fcc71, (void**)(&ptr)); + if (singleton < 0) + { + throw new ApplicationException(_003CModule_003E.GetErrorDescription(singleton)); + } + IMetadataManager* intPtr = ptr; + __s_GUID gUID_b396c324_6ab3_4e8e_a5cd_aafb3e01bedc = _003CModule_003E._GUID_b396c324_6ab3_4e8e_a5cd_aafb3e01bedc; + IPinProvider* pPinProvider; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 24)))((nint)intPtr, (_GUID)gUID_b396c324_6ab3_4e8e_a5cd_aafb3e01bedc, (void**)(&pPinProvider)); + if (num < 0) + { + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + } + Thread.MemoryBarrier(); + pinManager.m_pPinProvider = pPinProvider; + if (0L != (nint)ptr) + { + IMetadataManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + ptr = null; + } + sm_PinManager = pinManager; + } + } + finally + { + Monitor.Exit(sm_lock); + } + } + return sm_PinManager; + } + } + + private void _007EPinManager() + { + _0021PinManager(); + } + + private unsafe void _0021PinManager() + { + //IL_0019: Expected I, but got I8 + //IL_0022: Expected I, but got I8 + IPinProvider* pPinProvider = m_pPinProvider; + if (0L != (nint)pPinProvider) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPinProvider + 16)))((nint)pPinProvider); + m_pPinProvider = null; + } + } + + public unsafe HRESULT AddPin(EPinType ePinType, string szPinServiceRef, string szDescription, EServiceMediaType ePinServiceTypeId, int nUserId, int nOrdinal, out int nPinId) + { + //IL_001b: Incompatible stack types: I8 vs Ref + //IL_0043: Expected I, but got I8 + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(szPinServiceRef))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(szDescription))) + { + int num = -1; + int* ptr = (int*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref EPinType.ePinTypeQuickMix == ePinType ? ref nOrdinal : ref *(int*)null); + long num2 = *(long*)m_pPinProvider + 24; + IPinProvider* pPinProvider = m_pPinProvider; + int hr = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pPinProvider, ePinType, ptr2, ptr3, ePinServiceTypeId, nUserId, ptr, &num); + nPinId = num; + return new HRESULT(hr); + } + } + } + + public unsafe HRESULT AddPin(EPinType ePinType, int nPinMediaId, EMediaTypes ePinTypeId, int nUserId, int nOrdinal, out int pinId) + { + //IL_000b: Incompatible stack types: I8 vs Ref + //IL_002a: Expected I, but got I8 + int num = -1; + int* ptr = (int*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref EPinType.ePinTypeQuickMix == ePinType ? ref nOrdinal : ref *(int*)null); + IPinProvider* pPinProvider = m_pPinProvider; + int hr = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPinProvider + 32)))((nint)pPinProvider, ePinType, nPinMediaId, ePinTypeId, nUserId, ptr, &num); + pinId = num; + return new HRESULT(hr); + } + + public unsafe HRESULT FindPin(EPinType ePinType, string szPinServiceRef, EServiceMediaType ePinServiceTypeId, int nUserId, int nMaxAge, out int nPinId) + { + //IL_002d: Expected I, but got I8 + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(szPinServiceRef))) + { + int num = -1; + long num2 = *(long*)m_pPinProvider + 40; + IPinProvider* pPinProvider = m_pPinProvider; + int hr = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pPinProvider, ePinType, ptr, ePinServiceTypeId, nUserId, nMaxAge, &num); + nPinId = num; + return new HRESULT(hr); + } + } + + public unsafe HRESULT FindPin(EPinType ePinType, int nPinMediaId, EMediaTypes ePinTypeId, int nUserId, int nMaxAge, out int nPinId) + { + //IL_001f: Expected I, but got I8 + int num = -1; + IPinProvider* pPinProvider = m_pPinProvider; + int hr = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPinProvider + 48)))((nint)pPinProvider, ePinType, nPinMediaId, ePinTypeId, nUserId, nMaxAge, &num); + nPinId = num; + return new HRESULT(hr); + } + + public unsafe HRESULT DeletePin(int nPinId) + { + //IL_0017: Expected I, but got I8 + IPinProvider* pPinProvider = m_pPinProvider; + return new HRESULT(((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPinProvider + 64)))((nint)pPinProvider, nPinId)); + } + + private unsafe PinManager() + { + }//IL_0008: Expected I, but got I8 + + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021PinManager(); + return; + } + try + { + _0021PinManager(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~PinManager() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/Point.cs b/ZuneDBApi/Microsoft/Zune/Util/Point.cs new file mode 100644 index 0000000..1950d10 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/Point.cs @@ -0,0 +1,47 @@ +namespace Microsoft.Zune.Util +{ + public class Point + { + private int m_x; + + private int m_y; + + public int Y + { + get + { + return m_y; + } + set + { + m_y = value; + } + } + + public int X + { + get + { + return m_x; + } + set + { + m_x = value; + } + } + + public Point(int x, int y) + { + m_x = x; + m_y = y; + base._002Ector(); + } + + public Point() + { + m_x = 0; + m_y = 0; + base._002Ector(); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/PowerRequirements.cs b/ZuneDBApi/Microsoft/Zune/Util/PowerRequirements.cs new file mode 100644 index 0000000..a0989d6 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/PowerRequirements.cs @@ -0,0 +1,28 @@ +using ZuneUI; + +namespace Microsoft.Zune.Util +{ + public class PowerRequirements + { + public unsafe static HRESULT CheckOnBatteryPower(out bool fOnBatteryPower) + { + //IL_0012: Expected I, but got I8 + fOnBatteryPower = true; + int num = 0; + SYSTEM_BATTERY_STATE sYSTEM_BATTERY_STATE; + int num2 = _003CModule_003E.CallNtPowerInformation((POWER_INFORMATION_LEVEL)5, null, 0u, &sYSTEM_BATTERY_STATE, 32u); + if (num2 != 0) + { + num = num2 | 0x10000000; + if (num < 0) + { + goto IL_002c; + } + } + int num3 = ((fOnBatteryPower = *(byte*)(&sYSTEM_BATTERY_STATE) == 0) ? 1 : 0); + goto IL_002c; + IL_002c: + return num; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/PurchaseOffersCallbackWrapper.cs b/ZuneDBApi/Microsoft/Zune/Util/PurchaseOffersCallbackWrapper.cs new file mode 100644 index 0000000..7d6ad14 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/PurchaseOffersCallbackWrapper.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Util +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(64)] + internal struct PurchaseOffersCallbackWrapper + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/PurchaseOffersCompleteHandler.cs b/ZuneDBApi/Microsoft/Zune/Util/PurchaseOffersCompleteHandler.cs new file mode 100644 index 0000000..0569d7e --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/PurchaseOffersCompleteHandler.cs @@ -0,0 +1,6 @@ +using ZuneUI; + +namespace Microsoft.Zune.Util +{ + public delegate void PurchaseOffersCompleteHandler(HRESULT hr, string redirectUrl, string handle); +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/RadioPlaylist.cs b/ZuneDBApi/Microsoft/Zune/Util/RadioPlaylist.cs new file mode 100644 index 0000000..86a5b45 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/RadioPlaylist.cs @@ -0,0 +1,79 @@ +using System; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Util +{ + public class RadioPlaylist : IDisposable + { + private unsafe IRadioPlaylist* m_pRadioPlaylist; + + public unsafe RadioPlaylist(IRadioPlaylist* pRadioPlaylist) + { + //IL_001e: Expected I, but got I8 + m_pRadioPlaylist = pRadioPlaylist; + base._002Ector(); + IRadioPlaylist* pRadioPlaylist2 = m_pRadioPlaylist; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pRadioPlaylist2 + 8)))((nint)pRadioPlaylist2); + } + + private void _007ERadioPlaylist() + { + _0021RadioPlaylist(); + } + + private unsafe void _0021RadioPlaylist() + { + //IL_0019: Expected I, but got I8 + //IL_0022: Expected I, but got I8 + IRadioPlaylist* pRadioPlaylist = m_pRadioPlaylist; + if (0L != (nint)pRadioPlaylist) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pRadioPlaylist + 16)))((nint)pRadioPlaylist); + m_pRadioPlaylist = null; + } + } + + public unsafe string GetNextUri() + { + //IL_0004: Expected I, but got I8 + //IL_001a: Expected I, but got I8 + object result = null; + ushort* ptr = null; + IRadioPlaylist* pRadioPlaylist = m_pRadioPlaylist; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pRadioPlaylist + 24)))((nint)pRadioPlaylist, &ptr) >= 0) + { + result = new string((char*)ptr); + } + _003CModule_003E.SysFreeString(ptr); + return (string)result; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021RadioPlaylist(); + return; + } + try + { + _0021RadioPlaylist(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~RadioPlaylist() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/RadioStationManager.cs b/ZuneDBApi/Microsoft/Zune/Util/RadioStationManager.cs new file mode 100644 index 0000000..5feb797 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/RadioStationManager.cs @@ -0,0 +1,214 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; + +namespace Microsoft.Zune.Util +{ + public class RadioStationManager : IDisposable + { + private unsafe IRadioStationManager* m_pRadioStationManager = null; + + private static RadioStationManager sm_radioStationManager = null; + + private static object sm_lock = new object(); + + public static RadioStationManager Instance + { + get + { + if (sm_radioStationManager == null) + { + try + { + Monitor.Enter(sm_lock); + if (sm_radioStationManager == null) + { + RadioStationManager radioStationManager = new RadioStationManager(); + Thread.MemoryBarrier(); + sm_radioStationManager = radioStationManager; + } + } + finally + { + Monitor.Exit(sm_lock); + } + } + return sm_radioStationManager; + } + } + + private void _007ERadioStationManager() + { + _0021RadioStationManager(); + } + + private unsafe void _0021RadioStationManager() + { + //IL_0019: Expected I, but got I8 + //IL_0022: Expected I, but got I8 + IRadioStationManager* pRadioStationManager = m_pRadioStationManager; + if (0L != (nint)pRadioStationManager) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pRadioStationManager + 16)))((nint)pRadioStationManager); + m_pRadioStationManager = null; + } + } + + public unsafe RadioPlaylist GetRadioPlaylist(string uri) + { + //IL_0003: Expected I, but got I8 + //IL_0006: Expected I, but got I8 + //IL_0036: Expected I, but got I8 + //IL_0054: Expected I, but got I8 + //IL_0058: Expected I, but got I8 + //IL_006a: Expected I, but got I8 + IRadioStationManager* ptr = null; + IRadioPlaylist* ptr2 = null; + RadioPlaylist result = null; + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(uri))) + { + int singleton = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_e1c20902_172d_4c40_bc82_5164f64ab783, (void**)(&ptr)); + if (singleton >= 0) + { + long num = *(long*)ptr + 24; + IRadioStationManager* intPtr = ptr; + singleton = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)intPtr, ptr3, &ptr2); + if (singleton >= 0) + { + result = new RadioPlaylist(ptr2); + } + } + if (0L != (nint)ptr) + { + IRadioStationManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + ptr = null; + } + if (0L != (nint)ptr2) + { + IRadioPlaylist* intPtr3 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + } + return result; + } + } + + public unsafe void AddStation(string title, string sourceUrl, string imageUrl, RadioStationProgressHandler radioStationProgressHandler) + { + //IL_001a: Expected I, but got I8 + //IL_0060: Expected I, but got I8 + //IL_0073: Expected I, but got I8 + //IL_0086: Expected I, but got I8 + RadioStationProxy* ptr = (RadioStationProxy*)_003CModule_003E.@new(24uL); + RadioStationProxy* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002ERadioStationProxy_002E_007Bctor_007D(ptr, radioStationProgressHandler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(title))) + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(sourceUrl))) + { + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(imageUrl))) + { + IRadioStationManager* ptr3; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_e1c20902_172d_4c40_bc82_5164f64ab783, (void**)(&ptr3)) >= 0) + { + long num = *(long*)ptr3 + 32; + IRadioStationManager* intPtr = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)intPtr, ptr4, ptr5, ptr6, (IAsyncCallback*)ptr2); + } + if (0L != (nint)ptr2) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + if (0L != (nint)ptr3) + { + IRadioStationManager* intPtr2 = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + } + } + } + } + + public unsafe void DeleteStation(string title, RadioStationProgressHandler radioStationProgressHandler) + { + //IL_0019: Expected I, but got I8 + //IL_004b: Expected I, but got I8 + //IL_005e: Expected I, but got I8 + //IL_0071: Expected I, but got I8 + RadioStationProxy* ptr = (RadioStationProxy*)_003CModule_003E.@new(24uL); + RadioStationProxy* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002ERadioStationProxy_002E_007Bctor_007D(ptr, radioStationProgressHandler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(title))) + { + IRadioStationManager* ptr3; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_e1c20902_172d_4c40_bc82_5164f64ab783, (void**)(&ptr3)) >= 0) + { + long num = *(long*)ptr3 + 40; + IRadioStationManager* intPtr = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)intPtr, ptr4, (IAsyncCallback*)ptr2); + } + if (0L != (nint)ptr2) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + if (0L != (nint)ptr3) + { + IRadioStationManager* intPtr2 = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + } + } + + private unsafe RadioStationManager() + { + }//IL_0008: Expected I, but got I8 + + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021RadioStationManager(); + return; + } + try + { + _0021RadioStationManager(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~RadioStationManager() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/RadioStationProgressHandler.cs b/ZuneDBApi/Microsoft/Zune/Util/RadioStationProgressHandler.cs new file mode 100644 index 0000000..740d195 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/RadioStationProgressHandler.cs @@ -0,0 +1,6 @@ +using ZuneUI; + +namespace Microsoft.Zune.Util +{ + public delegate void RadioStationProgressHandler(HRESULT hr); +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/RadioStationProxy.cs b/ZuneDBApi/Microsoft/Zune/Util/RadioStationProxy.cs new file mode 100644 index 0000000..37f4e25 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/RadioStationProxy.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Util +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [NativeCppClass] + [MiscellaneousBits(64)] + [DebugInfoInPDB] + internal struct RadioStationProxy + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/SQMAction.cs b/ZuneDBApi/Microsoft/Zune/Util/SQMAction.cs new file mode 100644 index 0000000..af39d3f --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/SQMAction.cs @@ -0,0 +1,12 @@ +namespace Microsoft.Zune.Util +{ + public enum SQMAction + { + MixedStream = 5, + NumStream = 4, + SetBits = 3, + SetFlag = 2, + Inc = 1, + Add = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/SQMData.cs b/ZuneDBApi/Microsoft/Zune/Util/SQMData.cs new file mode 100644 index 0000000..8898e6f --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/SQMData.cs @@ -0,0 +1,243 @@ +namespace Microsoft.Zune.Util +{ + public class SQMData + { + public static SQMDataPoint[] s_rgSQMDataPoints = new SQMDataPoint[229]; + + public static SQMDataPoint s_sqmDataPointInvalid; + + static SQMData() + { + s_rgSQMDataPoints[0] = new SQMDataPoint(SQMDataId.OperatingSystemVersion, SQMAction.NumStream, 3); + s_rgSQMDataPoints[1] = new SQMDataPoint(SQMDataId.SetupDurations, SQMAction.NumStream, 5); + s_rgSQMDataPoints[2] = new SQMDataPoint(SQMDataId.DeviceArrival, SQMAction.Inc, 1); + s_rgSQMDataPoints[3] = new SQMDataPoint(SQMDataId.DeviceWiredArrival, SQMAction.Inc, 1); + s_rgSQMDataPoints[4] = new SQMDataPoint(SQMDataId.DeviceWirelessArrival, SQMAction.Inc, 1); + s_rgSQMDataPoints[5] = new SQMDataPoint(SQMDataId.DeviceWirelessSetup, SQMAction.Inc, 1); + s_rgSQMDataPoints[6] = new SQMDataPoint(SQMDataId.WirelessSyncWizardComplete, SQMAction.Inc, 1); + s_rgSQMDataPoints[7] = new SQMDataPoint(SQMDataId.WirelessSyncWizardCancel, SQMAction.Inc, 1); + s_rgSQMDataPoints[8] = new SQMDataPoint(SQMDataId.WirelessSyncWizardCancelFail, SQMAction.Inc, 1); + s_rgSQMDataPoints[9] = new SQMDataPoint(SQMDataId.BandwidthTestResultAndDecision, SQMAction.NumStream, 2); + s_rgSQMDataPoints[10] = new SQMDataPoint(SQMDataId.BandwidthTestDoesnotMeetMin, SQMAction.Inc, 1); + s_rgSQMDataPoints[11] = new SQMDataPoint(SQMDataId.BandwidthTestTimeout, SQMAction.Inc, 1); + s_rgSQMDataPoints[12] = new SQMDataPoint(SQMDataId.BandwidthTestRetryDifferentResult, SQMAction.Inc, 1); + s_rgSQMDataPoints[13] = new SQMDataPoint(SQMDataId.DeviceSize, SQMAction.NumStream, 2); + s_rgSQMDataPoints[14] = new SQMDataPoint(SQMDataId.DeviceSyncPreferences, SQMAction.NumStream, 1); + s_rgSQMDataPoints[15] = new SQMDataPoint(SQMDataId.DeviceSyncAllPreferences, SQMAction.NumStream, 6); + s_rgSQMDataPoints[16] = new SQMDataPoint(SQMDataId.DeviceInformation, SQMAction.MixedStream, 6); + s_rgSQMDataPoints[17] = new SQMDataPoint(SQMDataId.DeviceSyncRelationship, SQMAction.SetBits, 1); + s_rgSQMDataPoints[18] = new SQMDataPoint(SQMDataId.DeviceSyncRelationshipChange, SQMAction.NumStream, 2); + s_rgSQMDataPoints[19] = new SQMDataPoint(SQMDataId.DeviceFormat, SQMAction.Inc, 1); + s_rgSQMDataPoints[20] = new SQMDataPoint(SQMDataId.SyncTranscode, SQMAction.NumStream, 2); + s_rgSQMDataPoints[21] = new SQMDataPoint(SQMDataId.SyncRunMetrics, SQMAction.NumStream, 6); + s_rgSQMDataPoints[22] = new SQMDataPoint(SQMDataId.PodcastAdhocDownload, SQMAction.Inc, 1); + s_rgSQMDataPoints[23] = new SQMDataPoint(SQMDataId.PodcastManualEpisodeDownload, SQMAction.Inc, 1); + s_rgSQMDataPoints[24] = new SQMDataPoint(SQMDataId.PodcastSubscriptionSourceZMP, SQMAction.Inc, 1); + s_rgSQMDataPoints[25] = new SQMDataPoint(SQMDataId.PodcastSubscriptionSourceProtocolHandler, SQMAction.Inc, 1); + s_rgSQMDataPoints[26] = new SQMDataPoint(SQMDataId.PodcastSubscriptionSourceUrl, SQMAction.Inc, 1); + s_rgSQMDataPoints[27] = new SQMDataPoint(SQMDataId.PodcastSubscriptionSourceInbox, SQMAction.Inc, 1); + s_rgSQMDataPoints[28] = new SQMDataPoint(SQMDataId.PodcastVideoEpisodePlayed, SQMAction.Inc, 1); + s_rgSQMDataPoints[29] = new SQMDataPoint(SQMDataId.PodcastAudioEpisodePlayed, SQMAction.Inc, 1); + s_rgSQMDataPoints[30] = new SQMDataPoint(SQMDataId.PodcastDefaultKeepEpisodesChanged, SQMAction.Inc, 1); + s_rgSQMDataPoints[31] = new SQMDataPoint(SQMDataId.PodcastDefaultPlaybackOrderChanged, SQMAction.Inc, 1); + s_rgSQMDataPoints[32] = new SQMDataPoint(SQMDataId.PodcastSeriesKeepEpisodesChanged, SQMAction.Inc, 1); + s_rgSQMDataPoints[33] = new SQMDataPoint(SQMDataId.PodcastSeriesPlaybackOrderChanged, SQMAction.Inc, 1); + s_rgSQMDataPoints[34] = new SQMDataPoint(SQMDataId.ManualCheckForUpdatesInvoked, SQMAction.Inc, 1); + s_rgSQMDataPoints[35] = new SQMDataPoint(SQMDataId.MetadataUpdatesEnabled, SQMAction.SetFlag, 1); + s_rgSQMDataPoints[36] = new SQMDataPoint(SQMDataId.OverwriteAllMetadataEnabled, SQMAction.SetFlag, 1); + s_rgSQMDataPoints[37] = new SQMDataPoint(SQMDataId.AutoOrganizeEnabled, SQMAction.SetFlag, 1); + s_rgSQMDataPoints[38] = new SQMDataPoint(SQMDataId.UserEditMetadataField, SQMAction.Inc, 1); + s_rgSQMDataPoints[39] = new SQMDataPoint(SQMDataId.UserEditMusicMetadata, SQMAction.Inc, 1); + s_rgSQMDataPoints[40] = new SQMDataPoint(SQMDataId.UserEditVideoMetadata, SQMAction.Inc, 1); + s_rgSQMDataPoints[41] = new SQMDataPoint(SQMDataId.UserFindAlbumInfoUpdate, SQMAction.Inc, 1); + s_rgSQMDataPoints[42] = new SQMDataPoint(SQMDataId.UserReplaceAlbumArt, SQMAction.Inc, 1); + s_rgSQMDataPoints[43] = new SQMDataPoint(SQMDataId.UserDeferredAutomaticUpdate, SQMAction.Inc, 1); + s_rgSQMDataPoints[44] = new SQMDataPoint(SQMDataId.UserConfiguredSettingsFUE, SQMAction.SetFlag, 1); + s_rgSQMDataPoints[45] = new SQMDataPoint(SQMDataId.DXModeEnabled, SQMAction.SetFlag, 1); + s_rgSQMDataPoints[46] = new SQMDataPoint(SQMDataId.LanguageLocale, SQMAction.MixedStream, 1); + s_rgSQMDataPoints[47] = new SQMDataPoint(SQMDataId.InboxMessageRead, SQMAction.Inc, 1); + s_rgSQMDataPoints[48] = new SQMDataPoint(SQMDataId.InboxMessageDelete, SQMAction.Inc, 1); + s_rgSQMDataPoints[49] = new SQMDataPoint(SQMDataId.InboxMessageReply, SQMAction.Inc, 1); + s_rgSQMDataPoints[50] = new SQMDataPoint(SQMDataId.InboxMessageAcceptFriend, SQMAction.Inc, 1); + s_rgSQMDataPoints[51] = new SQMDataPoint(SQMDataId.InboxMessageRejectFriend, SQMAction.Inc, 1); + s_rgSQMDataPoints[52] = new SQMDataPoint(SQMDataId.InboxMessageSendMessage, SQMAction.Inc, 1); + s_rgSQMDataPoints[53] = new SQMDataPoint(SQMDataId.InboxMessageSendUserPlaylist, SQMAction.Inc, 1); + s_rgSQMDataPoints[54] = new SQMDataPoint(SQMDataId.InboxMessageSendPlaylist, SQMAction.Inc, 1); + s_rgSQMDataPoints[55] = new SQMDataPoint(SQMDataId.InboxMessageSendAlbum, SQMAction.Inc, 1); + s_rgSQMDataPoints[56] = new SQMDataPoint(SQMDataId.InboxMessageSendProfileCard, SQMAction.Inc, 1); + s_rgSQMDataPoints[57] = new SQMDataPoint(SQMDataId.InboxMessageSendTrack, SQMAction.Inc, 1); + s_rgSQMDataPoints[58] = new SQMDataPoint(SQMDataId.InboxMessageSendVideo, SQMAction.Inc, 1); + s_rgSQMDataPoints[59] = new SQMDataPoint(SQMDataId.InboxMessageSendPodcast, SQMAction.Inc, 1); + s_rgSQMDataPoints[60] = new SQMDataPoint(SQMDataId.SocialAddComment, SQMAction.Inc, 1); + s_rgSQMDataPoints[61] = new SQMDataPoint(SQMDataId.SocialDeleteComment, SQMAction.Inc, 1); + s_rgSQMDataPoints[62] = new SQMDataPoint(SQMDataId.SocialViewComments, SQMAction.Inc, 1); + s_rgSQMDataPoints[63] = new SQMDataPoint(SQMDataId.SocialViewRecentPlays, SQMAction.Inc, 1); + s_rgSQMDataPoints[64] = new SQMDataPoint(SQMDataId.SocialViewTopArtists, SQMAction.Inc, 1); + s_rgSQMDataPoints[65] = new SQMDataPoint(SQMDataId.SocialViewFavorites, SQMAction.Inc, 1); + s_rgSQMDataPoints[66] = new SQMDataPoint(SQMDataId.SocialViewBadges, SQMAction.Inc, 1); + s_rgSQMDataPoints[67] = new SQMDataPoint(SQMDataId.SocialViewAbout, SQMAction.Inc, 1); + s_rgSQMDataPoints[68] = new SQMDataPoint(SQMDataId.SocialEditTile, SQMAction.Inc, 1); + s_rgSQMDataPoints[69] = new SQMDataPoint(SQMDataId.SocialEditBackground, SQMAction.Inc, 1); + s_rgSQMDataPoints[70] = new SQMDataPoint(SQMDataId.SocialSyncAddProfileCard, SQMAction.Inc, 1); + s_rgSQMDataPoints[71] = new SQMDataPoint(SQMDataId.SocialSyncDeleteProfileCard, SQMAction.Inc, 1); + s_rgSQMDataPoints[72] = new SQMDataPoint(SQMDataId.FavoritesAdd, SQMAction.Inc, 1); + s_rgSQMDataPoints[73] = new SQMDataPoint(SQMDataId.FavoritesRemove, SQMAction.Inc, 1); + s_rgSQMDataPoints[74] = new SQMDataPoint(SQMDataId.InboxDownload, SQMAction.Inc, 1); + s_rgSQMDataPoints[75] = new SQMDataPoint(SQMDataId.InboxPurchase, SQMAction.Inc, 1); + s_rgSQMDataPoints[76] = new SQMDataPoint(SQMDataId.SearchExecuted, SQMAction.Inc, 1); + s_rgSQMDataPoints[77] = new SQMDataPoint(SQMDataId.SearchWordWheelCount, SQMAction.Inc, 1); + s_rgSQMDataPoints[78] = new SQMDataPoint(SQMDataId.SearchFiltersCount, SQMAction.Inc, 1); + s_rgSQMDataPoints[79] = new SQMDataPoint(SQMDataId.SearchFiltersSelection, SQMAction.NumStream, 1); + s_rgSQMDataPoints[80] = new SQMDataPoint(SQMDataId.SearchCollectionResultsCount, SQMAction.Inc, 1); + s_rgSQMDataPoints[81] = new SQMDataPoint(SQMDataId.SearchMarketplaceResultsCount, SQMAction.Inc, 1); + s_rgSQMDataPoints[82] = new SQMDataPoint(SQMDataId.SearchContextMenuAction, SQMAction.NumStream, 1); + s_rgSQMDataPoints[83] = new SQMDataPoint(SQMDataId.MarketplacePurchase, SQMAction.Inc, 1); + s_rgSQMDataPoints[84] = new SQMDataPoint(SQMDataId.MarketplaceDownload, SQMAction.Inc, 1); + s_rgSQMDataPoints[85] = new SQMDataPoint(SQMDataId.MarketplacePreviewStream, SQMAction.Inc, 1); + s_rgSQMDataPoints[86] = new SQMDataPoint(SQMDataId.MarketplaceSubscriptionStream, SQMAction.Inc, 1); + s_rgSQMDataPoints[87] = new SQMDataPoint(SQMDataId.SignedInWithCachedCredentials, SQMAction.Inc, 1); + s_rgSQMDataPoints[88] = new SQMDataPoint(SQMDataId.SignedInWithoutCachedCredentials, SQMAction.Inc, 1); + s_rgSQMDataPoints[89] = new SQMDataPoint(SQMDataId.SignInPersistedAccounts, SQMAction.Add, 1); + s_rgSQMDataPoints[90] = new SQMDataPoint(SQMDataId.RipRecordMode, SQMAction.NumStream, 1); + s_rgSQMDataPoints[91] = new SQMDataPoint(SQMDataId.AudioCDBurn, SQMAction.Inc, 1); + s_rgSQMDataPoints[92] = new SQMDataPoint(SQMDataId.DataCDBurn, SQMAction.Inc, 1); + s_rgSQMDataPoints[93] = new SQMDataPoint(SQMDataId.MonitoredAudioFolders, SQMAction.NumStream, 1); + s_rgSQMDataPoints[94] = new SQMDataPoint(SQMDataId.MonitoredPhotoFolders, SQMAction.NumStream, 1); + s_rgSQMDataPoints[95] = new SQMDataPoint(SQMDataId.MonitoredPodcastFolders, SQMAction.NumStream, 1); + s_rgSQMDataPoints[96] = new SQMDataPoint(SQMDataId.MonitoredVideoFolders, SQMAction.NumStream, 1); + s_rgSQMDataPoints[97] = new SQMDataPoint(SQMDataId.ErrorEvent, SQMAction.NumStream, 3); + s_rgSQMDataPoints[98] = new SQMDataPoint(SQMDataId.CollectionClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[99] = new SQMDataPoint(SQMDataId.DeviceClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[100] = new SQMDataPoint(SQMDataId.MarketplaceClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[101] = new SQMDataPoint(SQMDataId.SocialClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[102] = new SQMDataPoint(SQMDataId.DiscClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[103] = new SQMDataPoint(SQMDataId.QuickPlayClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[104] = new SQMDataPoint(SQMDataId.CollectionMusicClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[105] = new SQMDataPoint(SQMDataId.CollectionVideoClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[106] = new SQMDataPoint(SQMDataId.CollectionPicturesClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[107] = new SQMDataPoint(SQMDataId.CollectionPodcastsClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[108] = new SQMDataPoint(SQMDataId.CollectionChannelsClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[109] = new SQMDataPoint(SQMDataId.DeviceStatusClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[110] = new SQMDataPoint(SQMDataId.DeviceMusicClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[111] = new SQMDataPoint(SQMDataId.DeviceVideoClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[112] = new SQMDataPoint(SQMDataId.DevicePicturesClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[113] = new SQMDataPoint(SQMDataId.DevicePodcastsClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[114] = new SQMDataPoint(SQMDataId.DeviceFriendsClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[115] = new SQMDataPoint(SQMDataId.DeviceChannelsClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[116] = new SQMDataPoint(SQMDataId.MarketplaceRecommendationsClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[117] = new SQMDataPoint(SQMDataId.MarketplaceMusicClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[118] = new SQMDataPoint(SQMDataId.MarketplaceVideosClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[119] = new SQMDataPoint(SQMDataId.MarketplacePodcastsClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[120] = new SQMDataPoint(SQMDataId.MarketplaceCartClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[121] = new SQMDataPoint(SQMDataId.MarketplaceChannelsClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[122] = new SQMDataPoint(SQMDataId.TitleBarCartClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[123] = new SQMDataPoint(SQMDataId.MarketplaceDownloadsClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[124] = new SQMDataPoint(SQMDataId.SocialFriendsClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[125] = new SQMDataPoint(SQMDataId.SocialProfileClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[126] = new SQMDataPoint(SQMDataId.SocialInboxClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[127] = new SQMDataPoint(SQMDataId.TitleBarInboxClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[128] = new SQMDataPoint(SQMDataId.DiscTitleClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[129] = new SQMDataPoint(SQMDataId.PlayClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[130] = new SQMDataPoint(SQMDataId.PauseClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[131] = new SQMDataPoint(SQMDataId.StopClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[132] = new SQMDataPoint(SQMDataId.SkipForwardClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[133] = new SQMDataPoint(SQMDataId.SkipBackwardClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[134] = new SQMDataPoint(SQMDataId.RepeatClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[135] = new SQMDataPoint(SQMDataId.ShuffleClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[136] = new SQMDataPoint(SQMDataId.VolumeAdjustmentClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[137] = new SQMDataPoint(SQMDataId.VolumeMuteClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[138] = new SQMDataPoint(SQMDataId.NowPlayingClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[139] = new SQMDataPoint(SQMDataId.NowPlayingEQClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[140] = new SQMDataPoint(SQMDataId.NowPlayingAlbumArtClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[141] = new SQMDataPoint(SQMDataId.SettingsClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[142] = new SQMDataPoint(SQMDataId.HelpClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[143] = new SQMDataPoint(SQMDataId.BackClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[144] = new SQMDataPoint(SQMDataId.DeviceLogoClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[145] = new SQMDataPoint(SQMDataId.DeviceLogoDrops, SQMAction.Inc, 1); + s_rgSQMDataPoints[146] = new SQMDataPoint(SQMDataId.DiscLogoClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[147] = new SQMDataPoint(SQMDataId.DiscLogoDrops, SQMAction.Inc, 1); + s_rgSQMDataPoints[148] = new SQMDataPoint(SQMDataId.PlaylistLogoClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[149] = new SQMDataPoint(SQMDataId.PlaylistLogoDrops, SQMAction.Inc, 1); + s_rgSQMDataPoints[150] = new SQMDataPoint(SQMDataId.ComputerLogoDrops, SQMAction.Inc, 1); + s_rgSQMDataPoints[151] = new SQMDataPoint(SQMDataId.AutoPlaylistCreations, SQMAction.Inc, 1); + s_rgSQMDataPoints[152] = new SQMDataPoint(SQMDataId.ArtistViewClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[153] = new SQMDataPoint(SQMDataId.GenreViewClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[154] = new SQMDataPoint(SQMDataId.AlbumViewClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[155] = new SQMDataPoint(SQMDataId.SongViewClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[156] = new SQMDataPoint(SQMDataId.PlaylistViewClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[157] = new SQMDataPoint(SQMDataId.MixViewClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[158] = new SQMDataPoint(SQMDataId.MixViewPlayClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[159] = new SQMDataPoint(SQMDataId.MixViewAddToNowPlayingClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[160] = new SQMDataPoint(SQMDataId.QuickPlayPlays, SQMAction.Inc, 1); + s_rgSQMDataPoints[161] = new SQMDataPoint(SQMDataId.QuickPlayAsDefaultStarts, SQMAction.Inc, 1); + s_rgSQMDataPoints[162] = new SQMDataPoint(SQMDataId.QuickPlayAsDefaultSkips, SQMAction.Inc, 1); + s_rgSQMDataPoints[163] = new SQMDataPoint(SQMDataId.CompactModeOnTopSetting, SQMAction.Inc, 1); + s_rgSQMDataPoints[164] = new SQMDataPoint(SQMDataId.CompactModeSessions, SQMAction.Inc, 1); + s_rgSQMDataPoints[165] = new SQMDataPoint(SQMDataId.ToolbarPlayerInstallVista, SQMAction.Inc, 1); + s_rgSQMDataPoints[166] = new SQMDataPoint(SQMDataId.ToolbarPlayerInstallWin7, SQMAction.Inc, 1); + s_rgSQMDataPoints[167] = new SQMDataPoint(SQMDataId.ToolbarPlayerInstallXP, SQMAction.Inc, 1); + s_rgSQMDataPoints[168] = new SQMDataPoint(SQMDataId.LibraryContentTypeAllClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[169] = new SQMDataPoint(SQMDataId.LibraryContentTypePersonalClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[170] = new SQMDataPoint(SQMDataId.LibraryContentTypeProtectedClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[171] = new SQMDataPoint(SQMDataId.LibraryContentTypeZunePassClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[172] = new SQMDataPoint(SQMDataId.TrackPurchaseDownload, SQMAction.Inc, 1); + s_rgSQMDataPoints[173] = new SQMDataPoint(SQMDataId.TrackSubscriptionDownload, SQMAction.Inc, 1); + s_rgSQMDataPoints[174] = new SQMDataPoint(SQMDataId.MusicVideoPurchaseDownload, SQMAction.Inc, 1); + s_rgSQMDataPoints[175] = new SQMDataPoint(SQMDataId.TVEpisodePurchaseDownload, SQMAction.Inc, 1); + s_rgSQMDataPoints[176] = new SQMDataPoint(SQMDataId.MoviePurchaseDownload, SQMAction.Inc, 1); + s_rgSQMDataPoints[177] = new SQMDataPoint(SQMDataId.MovieRental, SQMAction.Inc, 1); + s_rgSQMDataPoints[178] = new SQMDataPoint(SQMDataId.MarketplacePicksClicks, SQMAction.Inc, 1); + s_rgSQMDataPoints[179] = new SQMDataPoint(SQMDataId.ArtistViewTime, SQMAction.Add, 1); + s_rgSQMDataPoints[180] = new SQMDataPoint(SQMDataId.SongViewTime, SQMAction.Add, 1); + s_rgSQMDataPoints[181] = new SQMDataPoint(SQMDataId.AlbumViewTime, SQMAction.Add, 1); + s_rgSQMDataPoints[182] = new SQMDataPoint(SQMDataId.GenreViewTime, SQMAction.Add, 1); + s_rgSQMDataPoints[183] = new SQMDataPoint(SQMDataId.PlaylistViewTime, SQMAction.Add, 1); + s_rgSQMDataPoints[184] = new SQMDataPoint(SQMDataId.MixViewTime, SQMAction.Add, 1); + s_rgSQMDataPoints[185] = new SQMDataPoint(SQMDataId.NowPlayingViewTime, SQMAction.Add, 1); + s_rgSQMDataPoints[186] = new SQMDataPoint(SQMDataId.IgnoredErrorEvent, SQMAction.NumStream, 1); + s_rgSQMDataPoints[187] = new SQMDataPoint(SQMDataId.QuickMixElapsedSecondsDsp, SQMAction.NumStream, 1); + s_rgSQMDataPoints[188] = new SQMDataPoint(SQMDataId.QuickMixElapsedSecondsMds, SQMAction.NumStream, 2); + s_rgSQMDataPoints[189] = new SQMDataPoint(SQMDataId.QuickMixElapsedMillisSimilarity, SQMAction.NumStream, 2); + s_rgSQMDataPoints[190] = new SQMDataPoint(SQMDataId.QuickMixSimilarTracksFound, SQMAction.NumStream, 2); + s_rgSQMDataPoints[191] = new SQMDataPoint(SQMDataId.QuickMixSessionCount, SQMAction.Inc, 1); + s_rgSQMDataPoints[192] = new SQMDataPoint(SQMDataId.QuickMixSessionNoResultsCount, SQMAction.Inc, 1); + s_rgSQMDataPoints[193] = new SQMDataPoint(SQMDataId.QuickMixLocalPlays, SQMAction.Inc, 1); + s_rgSQMDataPoints[194] = new SQMDataPoint(SQMDataId.QuickMixRadioPlays, SQMAction.Inc, 1); + s_rgSQMDataPoints[195] = new SQMDataPoint(SQMDataId.QuickMixPlaylistCreates, SQMAction.Inc, 1); + s_rgSQMDataPoints[196] = new SQMDataPoint(SQMDataId.QuickMixPlaylistPlays, SQMAction.Inc, 1); + s_rgSQMDataPoints[197] = new SQMDataPoint(SQMDataId.QuickMixUpsell, SQMAction.Inc, 1); + s_rgSQMDataPoints[198] = new SQMDataPoint(SQMDataId.QuickMixPlaytime, SQMAction.Add, 1); + s_rgSQMDataPoints[199] = new SQMDataPoint(SQMDataId.QuickMixLocalSkips, SQMAction.Inc, 1); + s_rgSQMDataPoints[200] = new SQMDataPoint(SQMDataId.QuickMixRemoteSkips, SQMAction.Inc, 1); + s_rgSQMDataPoints[201] = new SQMDataPoint(SQMDataId.QuickMixTrackPlays, SQMAction.Inc, 1); + s_rgSQMDataPoints[202] = new SQMDataPoint(SQMDataId.PlaylistAutoRefresh, SQMAction.SetFlag, 1); + s_rgSQMDataPoints[203] = new SQMDataPoint(SQMDataId.PlaylistLimitType, SQMAction.NumStream, 1); + s_rgSQMDataPoints[204] = new SQMDataPoint(SQMDataId.PlaylistSongLimitValue, SQMAction.NumStream, 1); + s_rgSQMDataPoints[205] = new SQMDataPoint(SQMDataId.PlaylistMinuteLimitValue, SQMAction.NumStream, 1); + s_rgSQMDataPoints[206] = new SQMDataPoint(SQMDataId.PlaylistSubType, SQMAction.NumStream, 1); + s_rgSQMDataPoints[207] = new SQMDataPoint(SQMDataId.ShipAssert, SQMAction.NumStream, 2); + s_rgSQMDataPoints[208] = new SQMDataPoint(SQMDataId.CompactModeViewTime, SQMAction.Add, 1); + s_rgSQMDataPoints[209] = new SQMDataPoint(SQMDataId.NowPlayingMusicViewTime, SQMAction.Add, 1); + s_rgSQMDataPoints[210] = new SQMDataPoint(SQMDataId.NowPlayingVideoViewTime, SQMAction.Add, 1); + s_rgSQMDataPoints[211] = new SQMDataPoint(SQMDataId.NowPlayingPhotoViewTime, SQMAction.Add, 1); + s_rgSQMDataPoints[212] = new SQMDataPoint(SQMDataId.UnlinkedDeviceNagDialogShow, SQMAction.Inc, 1); + s_rgSQMDataPoints[213] = new SQMDataPoint(SQMDataId.UnlinkedDeviceNagDialogNo, SQMAction.Inc, 1); + s_rgSQMDataPoints[214] = new SQMDataPoint(SQMDataId.UnlinkedDeviceNagDialogYes, SQMAction.Inc, 1); + s_rgSQMDataPoints[215] = new SQMDataPoint(SQMDataId.UnlinkedDeviceNagDialogNoShow, SQMAction.Inc, 1); + s_rgSQMDataPoints[216] = new SQMDataPoint(SQMDataId.PlaySlideshow, SQMAction.Inc, 1); + s_rgSQMDataPoints[217] = new SQMDataPoint(SQMDataId.DeviceFolder, SQMAction.Inc, 1); + s_rgSQMDataPoints[218] = new SQMDataPoint(SQMDataId.LaunchMovieMaker, SQMAction.Inc, 1); + s_rgSQMDataPoints[219] = new SQMDataPoint(SQMDataId.LaunchWLPG, SQMAction.Inc, 1); + s_rgSQMDataPoints[220] = new SQMDataPoint(SQMDataId.AutoReverseSyncPictures, SQMAction.Add, 1); + s_rgSQMDataPoints[221] = new SQMDataPoint(SQMDataId.ZuneWin7LibraryOpt, SQMAction.SetFlag, 1); + s_rgSQMDataPoints[222] = new SQMDataPoint(SQMDataId.OPLPlayUnrestricted, SQMAction.Inc, 1); + s_rgSQMDataPoints[223] = new SQMDataPoint(SQMDataId.OPLBestEffort, SQMAction.Inc, 1); + s_rgSQMDataPoints[224] = new SQMDataPoint(SQMDataId.OPLEnforcementSucceeded, SQMAction.Inc, 1); + s_rgSQMDataPoints[225] = new SQMDataPoint(SQMDataId.OPLDownResOnRestriction, SQMAction.Inc, 1); + s_rgSQMDataPoints[226] = new SQMDataPoint(SQMDataId.OPLDownResOnFailedEnforce, SQMAction.Inc, 1); + s_rgSQMDataPoints[227] = new SQMDataPoint(SQMDataId.OPLEnforcementFailed, SQMAction.Inc, 1); + s_rgSQMDataPoints[228] = new SQMDataPoint(SQMDataId.GdiMode, SQMAction.SetFlag, 1); + s_sqmDataPointInvalid = new SQMDataPoint(SQMDataId.Invalid, SQMAction.Add, 0); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/SQMDataId.cs b/ZuneDBApi/Microsoft/Zune/Util/SQMDataId.cs new file mode 100644 index 0000000..18d7100 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/SQMDataId.cs @@ -0,0 +1,236 @@ +namespace Microsoft.Zune.Util +{ + public enum SQMDataId + { + PlaylistLimitType = 204, + GdiMode = 229, + OPLEnforcementFailed = 228, + OPLDownResOnFailedEnforce = 227, + OPLDownResOnRestriction = 226, + OPLEnforcementSucceeded = 225, + OPLBestEffort = 224, + OPLPlayUnrestricted = 223, + ZuneWin7LibraryOpt = 222, + AutoReverseSyncPictures = 221, + LaunchWLPG = 220, + LaunchMovieMaker = 219, + DeviceFolder = 218, + PlaySlideshow = 217, + UnlinkedDeviceNagDialogNoShow = 216, + UnlinkedDeviceNagDialogYes = 215, + UnlinkedDeviceNagDialogNo = 214, + UnlinkedDeviceNagDialogShow = 213, + NowPlayingPhotoViewTime = 212, + NowPlayingVideoViewTime = 211, + NowPlayingMusicViewTime = 210, + CompactModeViewTime = 209, + ShipAssert = 208, + PlaylistSubType = 207, + PlaylistMinuteLimitValue = 206, + PlaylistSongLimitValue = 205, + PlaylistAutoRefresh = 203, + QuickMixTrackPlays = 202, + QuickMixRemoteSkips = 201, + QuickMixLocalSkips = 200, + QuickMixPlaytime = 199, + QuickMixUpsell = 198, + QuickMixPlaylistPlays = 197, + QuickMixPlaylistCreates = 196, + QuickMixRadioPlays = 195, + QuickMixLocalPlays = 194, + QuickMixSessionNoResultsCount = 193, + QuickMixSessionCount = 192, + QuickMixSimilarTracksFound = 191, + QuickMixElapsedMillisSimilarity = 190, + QuickMixElapsedSecondsMds = 189, + QuickMixElapsedSecondsDsp = 188, + IgnoredErrorEvent = 187, + NowPlayingViewTime = 186, + MixViewTime = 185, + PlaylistViewTime = 184, + GenreViewTime = 183, + AlbumViewTime = 182, + SongViewTime = 181, + ArtistViewTime = 180, + MarketplacePicksClicks = 179, + MovieRental = 178, + MoviePurchaseDownload = 177, + TVEpisodePurchaseDownload = 176, + MusicVideoPurchaseDownload = 175, + TrackSubscriptionDownload = 174, + TrackPurchaseDownload = 173, + LibraryContentTypeZunePassClicks = 172, + LibraryContentTypeProtectedClicks = 171, + LibraryContentTypePersonalClicks = 170, + LibraryContentTypeAllClicks = 169, + ToolbarPlayerInstallXP = 168, + ToolbarPlayerInstallWin7 = 167, + ToolbarPlayerInstallVista = 166, + CompactModeSessions = 165, + CompactModeOnTopSetting = 164, + QuickPlayAsDefaultSkips = 163, + QuickPlayAsDefaultStarts = 162, + QuickPlayPlays = 161, + MixViewAddToNowPlayingClicks = 160, + MixViewPlayClicks = 159, + MixViewClicks = 158, + PlaylistViewClicks = 157, + SongViewClicks = 156, + AlbumViewClicks = 155, + GenreViewClicks = 154, + ArtistViewClicks = 153, + AutoPlaylistCreations = 152, + ComputerLogoDrops = 151, + PlaylistLogoDrops = 150, + PlaylistLogoClicks = 149, + DiscLogoDrops = 148, + DiscLogoClicks = 147, + DeviceLogoDrops = 146, + DeviceLogoClicks = 145, + BackClicks = 144, + HelpClicks = 143, + SettingsClicks = 142, + NowPlayingAlbumArtClicks = 141, + NowPlayingEQClicks = 140, + NowPlayingClicks = 139, + VolumeMuteClicks = 138, + VolumeAdjustmentClicks = 137, + ShuffleClicks = 136, + RepeatClicks = 135, + SkipBackwardClicks = 134, + SkipForwardClicks = 133, + StopClicks = 132, + PauseClicks = 131, + PlayClicks = 130, + DiscTitleClicks = 129, + TitleBarInboxClicks = 0x80, + SocialInboxClicks = 0x7F, + SocialProfileClicks = 126, + SocialFriendsClicks = 125, + MarketplaceDownloadsClicks = 124, + TitleBarCartClicks = 123, + MarketplaceChannelsClicks = 122, + MarketplaceCartClicks = 121, + MarketplacePodcastsClicks = 120, + MarketplaceVideosClicks = 119, + MarketplaceMusicClicks = 118, + MarketplaceRecommendationsClicks = 117, + DeviceChannelsClicks = 116, + DeviceFriendsClicks = 115, + DevicePodcastsClicks = 114, + DevicePicturesClicks = 113, + DeviceVideoClicks = 112, + DeviceMusicClicks = 111, + DeviceStatusClicks = 110, + CollectionChannelsClicks = 109, + CollectionPodcastsClicks = 108, + CollectionPicturesClicks = 107, + CollectionVideoClicks = 106, + CollectionMusicClicks = 105, + QuickPlayClicks = 104, + DiscClicks = 103, + SocialClicks = 102, + MarketplaceClicks = 101, + DeviceClicks = 100, + CollectionClicks = 99, + ErrorEvent = 98, + MonitoredVideoFolders = 97, + MonitoredPodcastFolders = 96, + MonitoredPhotoFolders = 95, + MonitoredAudioFolders = 94, + DataCDBurn = 93, + AudioCDBurn = 92, + RipRecordMode = 91, + SignInPersistedAccounts = 90, + SignedInWithoutCachedCredentials = 89, + SignedInWithCachedCredentials = 88, + MarketplaceSubscriptionStream = 87, + MarketplacePreviewStream = 86, + MarketplaceDownload = 85, + MarketplacePurchase = 84, + SearchContextMenuAction = 83, + SearchMarketplaceResultsCount = 82, + SearchCollectionResultsCount = 81, + SearchFiltersSelection = 80, + SearchFiltersCount = 79, + SearchWordWheelCount = 78, + SearchExecuted = 77, + InboxPurchase = 76, + InboxDownload = 75, + FavoritesRemove = 74, + FavoritesAdd = 73, + SocialSyncDeleteProfileCard = 72, + SocialSyncAddProfileCard = 71, + SocialEditBackground = 70, + SocialEditTile = 69, + SocialViewAbout = 68, + SocialViewBadges = 67, + SocialViewFavorites = 66, + SocialViewTopArtists = 65, + SocialViewRecentPlays = 0x40, + SocialViewComments = 0x3F, + SocialDeleteComment = 62, + SocialAddComment = 61, + InboxMessageSendPodcast = 60, + InboxMessageSendVideo = 59, + InboxMessageSendTrack = 58, + InboxMessageSendProfileCard = 57, + InboxMessageSendAlbum = 56, + InboxMessageSendPlaylist = 55, + InboxMessageSendUserPlaylist = 54, + InboxMessageSendMessage = 53, + InboxMessageRejectFriend = 52, + InboxMessageAcceptFriend = 51, + InboxMessageReply = 50, + InboxMessageDelete = 49, + InboxMessageRead = 48, + LanguageLocale = 47, + DXModeEnabled = 46, + UserConfiguredSettingsFUE = 45, + UserDeferredAutomaticUpdate = 44, + UserReplaceAlbumArt = 43, + UserFindAlbumInfoUpdate = 42, + UserEditVideoMetadata = 41, + UserEditMusicMetadata = 40, + UserEditMetadataField = 39, + AutoOrganizeEnabled = 38, + OverwriteAllMetadataEnabled = 37, + MetadataUpdatesEnabled = 36, + ManualCheckForUpdatesInvoked = 35, + PodcastSeriesPlaybackOrderChanged = 34, + PodcastSeriesKeepEpisodesChanged = 33, + PodcastDefaultPlaybackOrderChanged = 0x20, + PodcastDefaultKeepEpisodesChanged = 0x1F, + PodcastAudioEpisodePlayed = 30, + PodcastVideoEpisodePlayed = 29, + PodcastSubscriptionSourceInbox = 28, + PodcastSubscriptionSourceUrl = 27, + PodcastSubscriptionSourceProtocolHandler = 26, + PodcastSubscriptionSourceZMP = 25, + PodcastManualEpisodeDownload = 24, + PodcastAdhocDownload = 23, + SyncRunMetrics = 22, + SyncTranscode = 21, + DeviceFormat = 20, + DeviceSyncRelationshipChange = 19, + DeviceSyncRelationship = 18, + DeviceInformation = 17, + DeviceSyncAllPreferences = 0x10, + DeviceSyncPreferences = 0xF, + DeviceSize = 14, + BandwidthTestRetryDifferentResult = 13, + BandwidthTestTimeout = 12, + BandwidthTestDoesnotMeetMin = 11, + BandwidthTestResultAndDecision = 10, + WirelessSyncWizardCancelFail = 9, + WirelessSyncWizardCancel = 8, + WirelessSyncWizardComplete = 7, + DeviceWirelessSetup = 6, + DeviceWirelessArrival = 5, + DeviceWiredArrival = 4, + DeviceArrival = 3, + SetupDurations = 2, + OperatingSystemVersion = 1, + Invalid = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/SQMDataPoint.cs b/ZuneDBApi/Microsoft/Zune/Util/SQMDataPoint.cs new file mode 100644 index 0000000..1b47aa1 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/SQMDataPoint.cs @@ -0,0 +1,23 @@ +namespace Microsoft.Zune.Util +{ + public class SQMDataPoint + { + public SQMDataId id; + + public SQMAction action; + + public int argCount; + + public string GetName() + { + return ((SQMDataId)(object)id).ToString(); + } + + internal SQMDataPoint(SQMDataId idParam, SQMAction actionParam, int argCountParam) + { + id = idParam; + action = actionParam; + argCount = argCountParam; + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/SQMStreamPositionType.cs b/ZuneDBApi/Microsoft/Zune/Util/SQMStreamPositionType.cs new file mode 100644 index 0000000..34a715e --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/SQMStreamPositionType.cs @@ -0,0 +1,9 @@ +namespace Microsoft.Zune.Util +{ + public enum SQMStreamPositionType + { + sptString = 2, + sptNumber = 1, + sptUnknown = 0 + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/ShipAssert.cs b/ZuneDBApi/Microsoft/Zune/Util/ShipAssert.cs new file mode 100644 index 0000000..4483d11 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/ShipAssert.cs @@ -0,0 +1,87 @@ +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Util +{ + public class ShipAssert + { + public unsafe static void AssertId([MarshalAs(UnmanagedType.U1)] bool condition, uint id, uint param) + { + //IL_000c: Expected I, but got I8 + if (!condition) + { + _003CModule_003E.ZuneLibraryExports_002EShipAssert(id, param, null); + } + } + + public unsafe static void AssertId_NoBreak([MarshalAs(UnmanagedType.U1)] bool condition, uint id, uint param) + { + //IL_000c: Expected I, but got I8 + if (!condition) + { + _003CModule_003E.ZuneLibraryExports_002EShipAssert(id, param, null); + } + } + + public unsafe static void AssertIdMsg([MarshalAs(UnmanagedType.U1)] bool condition, uint id, uint param, string msg) + { + if (condition) + { + return; + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(msg))) + { + try + { + _003CModule_003E.ZuneLibraryExports_002EShipAssert(id, param, ptr); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + + public unsafe static void AssertIdMsg_NoBreak([MarshalAs(UnmanagedType.U1)] bool condition, uint id, uint param, string msg) + { + if (condition) + { + return; + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(msg))) + { + try + { + _003CModule_003E.ZuneLibraryExports_002EShipAssert(id, param, ptr); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + + public unsafe static void Assert([MarshalAs(UnmanagedType.U1)] bool condition) + { + //IL_0069: Expected I, but got I8 + if (!condition) + { + StackFrame frame = new StackTrace(1, fNeedFileInfo: false).GetFrame(0); + string name = frame.GetMethod().Name; + uint num = 0u; + if (name != (string)null && name.Length >= 2) + { + char[] array = name.ToCharArray(0, 2); + num = ((uint)(array[1] & 0xFF) | ((uint)array[0] << 8)) << 16; + } + num |= (uint)frame.GetILOffset() & 0xFFFFu; + _003CModule_003E.ZuneLibraryExports_002EShipAssert(1006u, num, null); + } + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/Size.cs b/ZuneDBApi/Microsoft/Zune/Util/Size.cs new file mode 100644 index 0000000..45b8151 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/Size.cs @@ -0,0 +1,47 @@ +namespace Microsoft.Zune.Util +{ + public class Size + { + private int m_width; + + private int m_height; + + public int Height + { + get + { + return m_height; + } + set + { + m_height = value; + } + } + + public int Width + { + get + { + return m_width; + } + set + { + m_width = value; + } + } + + public Size(int width, int height) + { + m_width = width; + m_height = height; + base._002Ector(); + } + + public Size() + { + m_width = 0; + m_height = 0; + base._002Ector(); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/TaskbarPlayer.cs b/ZuneDBApi/Microsoft/Zune/Util/TaskbarPlayer.cs new file mode 100644 index 0000000..1dad529 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/TaskbarPlayer.cs @@ -0,0 +1,555 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.Iris; + +namespace Microsoft.Zune.Util +{ + public class TaskbarPlayer : ModelItem, IDisposable + { + internal uint m_uTaskbarPlayerStateMsg = 0u; + + internal uint m_uTaskbarPlayerCommandMsg = 0u; + + private TaskbarPlayerCommandHandler m_commandHandler; + + private bool m_fInitialized = false; + + private bool m_fPopupVisible = false; + + private bool m_fToolbarVisible = false; + + private bool m_fInteractivePopupTimer = false; + + private bool m_fHidePopupTimer = false; + + private bool m_fShowToolbar = false; + + private Command m_restoreCommand; + + private unsafe HWND__* m_hWndCommandDispatcher = null; + + private unsafe HWND__* m_hWndTaskbarPlayer = null; + + private unsafe HWND__* m_hWndFrame = null; + + private Point m_popupPosition; + + private Size m_popupSize; + + private WindowState m_restoreState; + + private Point m_restorePosition; + + private Size m_restoreSize; + + private static object sm_lock = new object(); + + private static TaskbarPlayer sm_taskbarPlayer = null; + + public Size RestoreSize => m_restoreSize; + + public Point RestorePosition => m_restorePosition; + + public WindowState RestoreState + { + get + { + return m_restoreState; + } + set + { + if (m_restoreState != value) + { + m_restoreState = value; + FirePropertyChanged("RestoreState"); + } + } + } + + public Size PopupSize => m_popupSize; + + public Point PopupPosition => m_popupPosition; + + public bool PopupVisible + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_fPopupVisible; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + if (m_fPopupVisible != value) + { + m_fPopupVisible = value; + FirePropertyChanged("PopupVisible"); + } + } + } + + public bool ToolbarVisible + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_fToolbarVisible; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + if (m_fToolbarVisible != value) + { + m_fToolbarVisible = value; + FirePropertyChanged("ToolbarVisible"); + } + } + } + + public unsafe bool EnableToolbar + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_0026: Expected I, but got I8 + //IL_004b: Expected I, but got I8 + //IL_004b: Expected I, but got I8 + bool result = false; + if (System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand) == 0) + { + _003CModule_003E.CoCreateInstance((_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.CLSID_TrayDeskBand), null, 4u, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.IID_ITrayDeskBand), (void**)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand)); + } + if (System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand) != 0L) + { + long microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand = System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand); + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand) + 40)))((nint)microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._GUID_f2d3efa4_12f4_466b_a41c_d9ec613ad509)) == 0; + } + return result; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + //IL_0024: Expected I, but got I8 + //IL_0044: Expected I, but got I8 + //IL_0044: Expected I, but got I8 + //IL_0064: Expected I, but got I8 + //IL_0064: Expected I, but got I8 + //IL_0083: Expected I, but got I8 + //IL_0083: Expected I, but got I8 + //IL_009b: Expected I, but got I8 + //IL_009b: Expected I, but got I8 + if (System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand) == 0) + { + _003CModule_003E.CoCreateInstance((_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.CLSID_TrayDeskBand), null, 4u, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.IID_ITrayDeskBand), (void**)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand)); + } + if (System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand) != 0L) + { + long microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand = System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand) + 48)))((nint)microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand); + if (value) + { + long microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand2 = System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand) + 24)))((nint)microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._GUID_f2d3efa4_12f4_466b_a41c_d9ec613ad509)); + } + else + { + long microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand3 = System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand) + 32)))((nint)microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand3, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._GUID_f2d3efa4_12f4_466b_a41c_d9ec613ad509)); + } + long microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand4 = System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand) + 48)))((nint)microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand4); + } + } + } + + public unsafe bool ShowToolbar + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_fShowToolbar; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + //IL_0044: Expected I4, but got I8 + //IL_0056: Expected I4, but got I8 + if (m_fShowToolbar != value) + { + m_fShowToolbar = value; + FirePropertyChanged("ShowToolbar"); + if (value) + { + HMONITOR__* ptr = _003CModule_003E.MonitorFromWindow(m_hWndFrame, 2u); + if (ptr != null) + { + tagMONITORINFO tagMONITORINFO; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagMONITORINFO, 4), 0, 36); + *(int*)(&tagMONITORINFO) = 40; + tagWINDOWPLACEMENT tagWINDOWPLACEMENT; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWINDOWPLACEMENT, 4), 0, 40); + *(int*)(&tagWINDOWPLACEMENT) = 44; + if (_003CModule_003E.GetMonitorInfoW(ptr, &tagMONITORINFO) != 0 && _003CModule_003E.GetWindowPlacement(m_hWndFrame, &tagWINDOWPLACEMENT) != 0) + { + WindowState windowState2 = (RestoreState = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWINDOWPLACEMENT, 4)) & WindowState.Maximized); + _003CModule_003E.OffsetRect((tagRECT*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWINDOWPLACEMENT, 28)), System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagMONITORINFO, 20)), System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagMONITORINFO, 24))); + tagRECT tagRECT; + if (_003CModule_003E.IntersectRect(&tagRECT, (tagRECT*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWINDOWPLACEMENT, 28)), (tagRECT*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagMONITORINFO, 20))) == 0) + { + _003CModule_003E.CopyRect((tagRECT*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWINDOWPLACEMENT, 28)), (tagRECT*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagMONITORINFO, 20))); + _003CModule_003E.InflateRect((tagRECT*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWINDOWPLACEMENT, 28)), -100, -100); + } + RestorePosition.X = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWINDOWPLACEMENT, 28)); + RestorePosition.Y = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWINDOWPLACEMENT, 32)); + RestoreSize.Width = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWINDOWPLACEMENT, 36)) - System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWINDOWPLACEMENT, 28)); + RestoreSize.Height = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWINDOWPLACEMENT, 40)) - System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWINDOWPLACEMENT, 32)); + } + } + } + } + DispatchCommand(ETaskbarPlayerCommand.PC_Connect, 0); + if (value) + { + HWND__* hWndTaskbarPlayer = m_hWndTaskbarPlayer; + if (hWndTaskbarPlayer == null || _003CModule_003E.IsWindow(hWndTaskbarPlayer) == 0) + { + return; + } + } + ToolbarVisible = value; + } + } + + public Command Restore => m_restoreCommand; + + public static TaskbarPlayer Instance + { + get + { + if (sm_taskbarPlayer == null) + { + sm_taskbarPlayer = new TaskbarPlayer(); + } + return sm_taskbarPlayer; + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool Initialize(IntPtr hWndFrame, TaskbarPlayerCommandHandler commandHandler) + { + //IL_0059: Expected I, but got I8 + //IL_0067: Expected I4, but got I8 + //IL_0088: Expected I8, but got I + //IL_008f: Expected I8, but got I + //IL_00a1: Expected I, but got I8 + //IL_00a1: Expected I, but got I8 + //IL_00a2: Expected I8, but got I + //IL_00e1: Expected I, but got I8 + //IL_00e1: Expected I, but got I8 + //IL_00e1: Expected I, but got I8 + if (!m_fInitialized) + { + m_hWndFrame = (HWND__*)hWndFrame.ToPointer(); + m_commandHandler = commandHandler; + _003CModule_003E.gcroot_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003ATaskbarPlayer_0020_005E_003E_002E_003D((gcroot_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003ATaskbarPlayer_0020_005E_003E*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002Esm_gcTaskbarPlayer), this); + m_uTaskbarPlayerStateMsg = _003CModule_003E.RegisterWindowMessageW((ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1DE_0040LJLIMGOK_0040_003F_0024AAZ_003F_0024AAu_003F_0024AAn_003F_0024AAe_003F_0024AAT_003F_0024AAa_003F_0024AAs_003F_0024AAk_003F_0024AAb_003F_0024AAa_003F_0024AAr_003F_0024AAP_003F_0024AAl_003F_0024AAa_003F_0024AAy_003F_0024AAe_003F_0024AAr_003F_0024AAS_003F_0024AAt_003F_0024AAa_003F_0024AAt_003F_0024AAe_003F_0024AAM_003F_0024AAs_003F_0024AAg_003F_0024AA_003F_0024AA_0040)); + m_uTaskbarPlayerCommandMsg = _003CModule_003E.RegisterWindowMessageW((ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1DI_0040BOCHIFKJ_0040_003F_0024AAZ_003F_0024AAu_003F_0024AAn_003F_0024AAe_003F_0024AAT_003F_0024AAa_003F_0024AAs_003F_0024AAk_003F_0024AAb_003F_0024AAa_003F_0024AAr_003F_0024AAP_003F_0024AAl_003F_0024AAa_003F_0024AAy_003F_0024AAe_003F_0024AAr_003F_0024AAC_003F_0024AAo_003F_0024AAm_003F_0024AAm_003F_0024AAa_003F_0024AAn_003F_0024AAd_003F_0024AAM_003F_0024AAs_003F_0024AAg_003F_0024AA_003F_0024AA_0040)); + HINSTANCE__* ptr = (HINSTANCE__*)_003CModule_003E.GetWindowLongPtrW(m_hWndFrame, -6); + tagWNDCLASSW tagWNDCLASSW; + *(int*)(&tagWNDCLASSW) = 0; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWNDCLASSW, 8), 0, 64); + if (_003CModule_003E.GetClassInfoW(ptr, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1EG_0040LILHHEEP_0040_003F_0024AAZ_003F_0024AAu_003F_0024AAn_003F_0024AAe_003F_0024AAT_003F_0024AAa_003F_0024AAs_003F_0024AAk_003F_0024AAb_003F_0024AAa_003F_0024AAr_003F_0024AAP_003F_0024AAl_003F_0024AAa_003F_0024AAy_003F_0024AAe_003F_0024AAr_003F_0024AAC_003F_0024AAo_003F_0024AAm_003F_0024AAm_003F_0024AAa_003F_0024AAn_003F_0024AAd_003F_0024AAD_003F_0024AAi_003F_0024AAs_003F_0024AAp_003F_0024AAa_003F_0024AAt_003F_0024AAc_003F_0024AAh_0040), &tagWNDCLASSW) == 0) + { + *(int*)(&tagWNDCLASSW) = 512; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWNDCLASSW, 8)) = (nint)_003CModule_003E.__unep_0040_003FCommandDispatcherWindowProc_0040Util_0040Zune_0040Microsoft_0040_0040_0024_0024FYA_JPEAUHWND___0040_0040I_K_J_0040Z; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWNDCLASSW, 24)) = (nint)ptr; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWNDCLASSW, 40)) = (nint)_003CModule_003E.LoadCursorW(null, (ushort*)32514); + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWNDCLASSW, 48)) = 1L; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagWNDCLASSW, 64)) = (nint)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1EG_0040LILHHEEP_0040_003F_0024AAZ_003F_0024AAu_003F_0024AAn_003F_0024AAe_003F_0024AAT_003F_0024AAa_003F_0024AAs_003F_0024AAk_003F_0024AAb_003F_0024AAa_003F_0024AAr_003F_0024AAP_003F_0024AAl_003F_0024AAa_003F_0024AAy_003F_0024AAe_003F_0024AAr_003F_0024AAC_003F_0024AAo_003F_0024AAm_003F_0024AAm_003F_0024AAa_003F_0024AAn_003F_0024AAd_003F_0024AAD_003F_0024AAi_003F_0024AAs_003F_0024AAp_003F_0024AAa_003F_0024AAt_003F_0024AAc_003F_0024AAh_0040); + _003CModule_003E.RegisterClassW(&tagWNDCLASSW); + } + if (_003CModule_003E.CreateWindowExW(128u, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1EG_0040LILHHEEP_0040_003F_0024AAZ_003F_0024AAu_003F_0024AAn_003F_0024AAe_003F_0024AAT_003F_0024AAa_003F_0024AAs_003F_0024AAk_003F_0024AAb_003F_0024AAa_003F_0024AAr_003F_0024AAP_003F_0024AAl_003F_0024AAa_003F_0024AAy_003F_0024AAe_003F_0024AAr_003F_0024AAC_003F_0024AAo_003F_0024AAm_003F_0024AAm_003F_0024AAa_003F_0024AAn_003F_0024AAd_003F_0024AAD_003F_0024AAi_003F_0024AAs_003F_0024AAp_003F_0024AAa_003F_0024AAt_003F_0024AAc_003F_0024AAh_0040), (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1EG_0040LILHHEEP_0040_003F_0024AAZ_003F_0024AAu_003F_0024AAn_003F_0024AAe_003F_0024AAT_003F_0024AAa_003F_0024AAs_003F_0024AAk_003F_0024AAb_003F_0024AAa_003F_0024AAr_003F_0024AAP_003F_0024AAl_003F_0024AAa_003F_0024AAy_003F_0024AAe_003F_0024AAr_003F_0024AAC_003F_0024AAo_003F_0024AAm_003F_0024AAm_003F_0024AAa_003F_0024AAn_003F_0024AAd_003F_0024AAD_003F_0024AAi_003F_0024AAs_003F_0024AAp_003F_0024AAa_003F_0024AAt_003F_0024AAc_003F_0024AAh_0040), 2147483648u, 0, 0, 0, 0, null, null, ptr, null) != null) + { + m_fInitialized = true; + } + } + return m_fInitialized; + } + + public unsafe void UpdateToolbar(ETaskbarPlayerState state) + { + HWND__* hWndTaskbarPlayer = m_hWndTaskbarPlayer; + if (hWndTaskbarPlayer != null && _003CModule_003E.IsWindow(hWndTaskbarPlayer) != 0) + { + if (ShowToolbar) + { + state |= ETaskbarPlayerState.PS_Minimized; + } + _003CModule_003E.PostMessageW(m_hWndTaskbarPlayer, m_uTaskbarPlayerStateMsg, (ulong)state, 0L); + } + } + + internal unsafe void OnCreate(HWND__* hWnd) + { + m_hWndCommandDispatcher = hWnd; + } + + internal unsafe void OnDestory(HWND__* hWnd) + { + //IL_0024: Expected I, but got I8 + StopTimer(hWnd, 1uL, ref m_fInteractivePopupTimer); + StopTimer(hWnd, 2uL, ref m_fHidePopupTimer); + m_hWndCommandDispatcher = null; + } + + internal unsafe void OnTimer(HWND__* hWnd, uint dwTimerId) + { + switch (dwTimerId) + { + case 2u: + if (MouseInWindow(m_hWndFrame) == 0 && MouseInWindow(m_hWndTaskbarPlayer) == 0) + { + DispatchCommand(ETaskbarPlayerCommand.PC_Popup, 0); + StopTimer(hWnd, 1uL, ref m_fInteractivePopupTimer); + } + StopTimer(hWnd, 2uL, ref m_fHidePopupTimer); + break; + case 1u: + if (MouseInWindow(m_hWndFrame) == 0 && MouseInWindow(m_hWndTaskbarPlayer) == 0) + { + StartTimer(hWnd, 2uL, 500u, ref m_fHidePopupTimer); + } + else + { + StopTimer(hWnd, 2uL, ref m_fHidePopupTimer); + } + break; + } + } + + internal unsafe void OnCommandMsg(ETaskbarPlayerCommand command, long param) + { + //IL_000d: Expected I, but got I8 + if (command == ETaskbarPlayerCommand.PC_Connect && param != 0L) + { + m_hWndTaskbarPlayer = (HWND__*)param; + if (ShowToolbar) + { + ToolbarVisible = true; + } + } + DispatchCommand(command, (int)param); + } + + private unsafe TaskbarPlayer() + { + //IL_0040: Expected I, but got I8 + //IL_0048: Expected I, but got I8 + //IL_0050: Expected I, but got I8 + try + { + m_restoreCommand = new Command(); + m_popupPosition = new Point(); + m_popupSize = new Size(); + m_restoreState = WindowState.Maximized; + m_restorePosition = new Point(); + m_restoreSize = new Size(); + } + catch + { + //try-fault + ((IDisposable)this).Dispose(); + throw; + } + } + + private void _007ETaskbarPlayer() + { + _0021TaskbarPlayer(); + } + + private unsafe void _0021TaskbarPlayer() + { + HWND__* hWndCommandDispatcher = m_hWndCommandDispatcher; + if (hWndCommandDispatcher != null && _003CModule_003E.IsWindow(hWndCommandDispatcher) != 0) + { + _003CModule_003E.PostMessageW(m_hWndCommandDispatcher, 16u, 0uL, 0L); + } + if (System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand) != 0L) + { + _003CModule_003E.CComPtrNtv_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003AITrayDeskBand_003E_002ERelease((CComPtrNtv_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003AITrayDeskBand_003E*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand)); + } + } + + private unsafe void DisplayPopup(int x, int y) + { + //IL_0030: Expected I4, but got I8 + if (PopupVisible) + { + return; + } + tagPOINT tagPOINT; + *(int*)(&tagPOINT) = x; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagPOINT, 4)) = y; + HMONITOR__* ptr = _003CModule_003E.MonitorFromPoint(tagPOINT, 2u); + if (ptr != null) + { + tagMONITORINFO tagMONITORINFO; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagMONITORINFO, 4), 0, 36); + *(int*)(&tagMONITORINFO) = 40; + if (_003CModule_003E.GetMonitorInfoW(ptr, &tagMONITORINFO) != 0) + { + if (x < System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagMONITORINFO, 20))) + { + PopupPosition.X = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagMONITORINFO, 20)); + } + else if (x > System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagMONITORINFO, 28)) - PopupSize.Width) + { + PopupPosition.X = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagMONITORINFO, 28)) - PopupSize.Width; + } + else + { + PopupPosition.X = x; + } + if (y < System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagMONITORINFO, 24))) + { + PopupPosition.Y = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagMONITORINFO, 24)); + } + else if (y > System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagMONITORINFO, 32)) - PopupSize.Height) + { + PopupPosition.Y = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagMONITORINFO, 32)) - PopupSize.Height; + } + else + { + PopupPosition.Y = y; + } + } + } + PopupVisible = true; + StartTimer(m_hWndCommandDispatcher, 1uL, 250u, ref m_fInteractivePopupTimer); + } + + private void DispatchCommand(ETaskbarPlayerCommand command, int value) + { + if (m_commandHandler == null) + { + return; + } + switch (command) + { + case ETaskbarPlayerCommand.PC_Restore: + if (ToolbarVisible) + { + ShowToolbar = false; + PopupVisible = false; + GetKeyboardFocus(); + Restore.Invoke(); + } + break; + case ETaskbarPlayerCommand.PC_Popup: + if (value != 0) + { + DisplayPopup((ushort)((ulong)value >> 16), (ushort)value); + } + else + { + PopupVisible = false; + } + break; + } + m_commandHandler(command, value); + } + + private unsafe void GetKeyboardFocus() + { + //IL_0029: Expected I4, but got I8 + HWND__* hWndFrame = m_hWndFrame; + if (hWndFrame != null && _003CModule_003E.IsWindow(hWndFrame) != 0 && _003CModule_003E.GetForegroundWindow() != m_hWndFrame) + { + tagINPUT tagINPUT; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagINPUT, 8), 0, 32); + *(int*)(&tagINPUT) = 1; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagINPUT, 8)) = 0; + _003CModule_003E.SendInput(1u, &tagINPUT, 40); + _003CModule_003E.SetForegroundWindow(m_hWndFrame); + } + } + + private unsafe static int MouseInWindow(HWND__* hWnd) + { + int result = 0; + if (hWnd != null && _003CModule_003E.IsWindow(hWnd) != 0) + { + tagPOINT tagPOINT; + _003CModule_003E.GetCursorPos(&tagPOINT); + _003CModule_003E.ScreenToClient(hWnd, &tagPOINT); + tagRECT tagRECT; + _003CModule_003E.GetClientRect(hWnd, &tagRECT); + result = _003CModule_003E.PtInRect(&tagRECT, tagPOINT); + } + return result; + } + + private unsafe static void StartTimer(HWND__* hWnd, ulong uTimerId, uint msDuration, ref bool fTimer) + { + //IL_000e: Expected I, but got I8 + if (!fTimer) + { + _003CModule_003E.SetTimer(hWnd, uTimerId, msDuration, null); + fTimer = true; + } + } + + private unsafe static void StopTimer(HWND__* hWnd, ulong uTimerId, ref bool fTimer) + { + if (fTimer) + { + _003CModule_003E.KillTimer(hWnd, uTimerId); + fTimer = false; + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007ETaskbarPlayer(); + } + finally + { + base.Dispose(); + } + } + else + { + try + { + _0021TaskbarPlayer(); + } + finally + { + base.Finalize(); + } + } + } + + public new void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~TaskbarPlayer() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/TaskbarPlayerCommandHandler.cs b/ZuneDBApi/Microsoft/Zune/Util/TaskbarPlayerCommandHandler.cs new file mode 100644 index 0000000..e954d77 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/TaskbarPlayerCommandHandler.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Util +{ + public delegate void TaskbarPlayerCommandHandler(ETaskbarPlayerCommand command, int value); +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/TelemetryAPI.cs b/ZuneDBApi/Microsoft/Zune/Util/TelemetryAPI.cs new file mode 100644 index 0000000..ff9ef5b --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/TelemetryAPI.cs @@ -0,0 +1,137 @@ +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Util +{ + public class TelemetryAPI + { + public unsafe static void SendDatapoint(string command, IDictionary dictionary) + { + //IL_01b1: Expected I, but got I8 + //IL_01b1: Expected I, but got I8 + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(command))) + { + int count = dictionary.Keys.Count; + tagSAFEARRAY* ptr = _003CModule_003E.SafeArrayCreateVector(12, 0, (uint)count); + tagSAFEARRAY* ptr2 = _003CModule_003E.SafeArrayCreateVector(12, 0, (uint)count); + int num = 0; + foreach (DictionaryEntry item in dictionary) + { + int num2 = 0; + if (((DictionaryEntry)item).Key.GetType() == typeof(string)) + { + tagVARIANT tagVARIANT; + IntPtr pDstNativeVariant = (IntPtr)(&tagVARIANT); + Marshal.GetNativeVariantForObject(((DictionaryEntry)item).Key, pDstNativeVariant); + tagVARIANT tagVARIANT2; + if (((DictionaryEntry)item).Value.GetType() == typeof(Guid)) + { + string obj = ((DictionaryEntry)item).Value.ToString(); + IntPtr pDstNativeVariant2 = (IntPtr)(&tagVARIANT2); + Marshal.GetNativeVariantForObject(obj, pDstNativeVariant2); + } + else + { + if (((DictionaryEntry)item).Value.GetType() != typeof(string) && ((DictionaryEntry)item).Value.GetType() != typeof(int) && ((DictionaryEntry)item).Value.GetType() != typeof(long)) + { + num2 = -2147024809; + continue; + } + IntPtr pDstNativeVariant3 = (IntPtr)(&tagVARIANT2); + Marshal.GetNativeVariantForObject(((DictionaryEntry)item).Value, pDstNativeVariant3); + } + _003CModule_003E.SafeArrayPutElement(ptr, &num, &tagVARIANT); + _003CModule_003E.SafeArrayPutElement(ptr2, &num, &tagVARIANT2); + num++; + } + else + { + num2 = -2147024809; + } + } + CComPtrNtv_003CITelemetryManager_003E cComPtrNtv_003CITelemetryManager_003E; + *(long*)(&cComPtrNtv_003CITelemetryManager_003E) = 0L; + try + { + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_ab28333b_a55c_4312_a7a3_2dd60d4a7154, (void**)(&cComPtrNtv_003CITelemetryManager_003E)) >= 0) + { + long num3 = *(long*)(*(ulong*)(&cComPtrNtv_003CITelemetryManager_003E)) + 48; + long num4 = *(long*)(&cComPtrNtv_003CITelemetryManager_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)num4, ptr3, ptr, ptr2); + } + if (ptr != null) + { + _003CModule_003E.SafeArrayDestroy(ptr); + } + if (ptr2 != null) + { + _003CModule_003E.SafeArrayDestroy(ptr2); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CITelemetryManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CITelemetryManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CITelemetryManager_003E_002ERelease(&cComPtrNtv_003CITelemetryManager_003E); + } + } + + public unsafe static void AddToSessionEvent(ETelemetryEvent evt, string key, int value) + { + //IL_0033: Expected I, but got I8 + //IL_0033: Expected I, but got I8 + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(key))) + { + CComPtrNtv_003CITelemetryManager_003E cComPtrNtv_003CITelemetryManager_003E; + *(long*)(&cComPtrNtv_003CITelemetryManager_003E) = 0L; + try + { + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_ab28333b_a55c_4312_a7a3_2dd60d4a7154, (void**)(&cComPtrNtv_003CITelemetryManager_003E)) >= 0) + { + long num = *(long*)(*(ulong*)(&cComPtrNtv_003CITelemetryManager_003E)) + 64; + long num2 = *(long*)(&cComPtrNtv_003CITelemetryManager_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)num2, evt, ptr, value); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CITelemetryManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CITelemetryManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CITelemetryManager_003E_002ERelease(&cComPtrNtv_003CITelemetryManager_003E); + } + } + + public unsafe static void SendEvent(ETelemetryEvent eEvent, string eventParameter) + { + //IL_0032: Expected I, but got I8 + //IL_0032: Expected I, but got I8 + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(eventParameter))) + { + CComPtrNtv_003CITelemetryManager_003E cComPtrNtv_003CITelemetryManager_003E; + *(long*)(&cComPtrNtv_003CITelemetryManager_003E) = 0L; + try + { + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_ab28333b_a55c_4312_a7a3_2dd60d4a7154, (void**)(&cComPtrNtv_003CITelemetryManager_003E)) >= 0) + { + long num = *(long*)(*(ulong*)(&cComPtrNtv_003CITelemetryManager_003E)) + 56; + long num2 = *(long*)(&cComPtrNtv_003CITelemetryManager_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)num2, eEvent, ptr); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CITelemetryManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CITelemetryManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CITelemetryManager_003E_002ERelease(&cComPtrNtv_003CITelemetryManager_003E); + } + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/ThumbBar.cs b/ZuneDBApi/Microsoft/Zune/Util/ThumbBar.cs new file mode 100644 index 0000000..cfcbc4f --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/ThumbBar.cs @@ -0,0 +1,94 @@ +using System; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Util +{ + public class ThumbBar : IDisposable + { + private readonly CComPtrMgd_003CIThumbBar_003E m_spThumbBar; + + public unsafe int CreateButton(out ThumbBarButton button) + { + //IL_0042: Expected I, but got I8 + //IL_004c: Expected I, but got I8 + if (m_spThumbBar.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 193u); + return -2147418113; + } + CComPtrNtv_003CIThumbBarButton_003E cComPtrNtv_003CIThumbBarButton_003E; + *(long*)(&cComPtrNtv_003CIThumbBarButton_003E) = 0L; + try + { + IThumbBar* p = m_spThumbBar.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p, (IThumbBarButton**)(&cComPtrNtv_003CIThumbBarButton_003E)); + button = new ThumbBarButton((IThumbBarButton*)(*(ulong*)(&cComPtrNtv_003CIThumbBarButton_003E))); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIThumbBarButton_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIThumbBarButton_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIThumbBarButton_003E_002ERelease(&cComPtrNtv_003CIThumbBarButton_003E); + return 0; + } + + public unsafe int UpdateThumbBar() + { + //IL_0031: Expected I, but got I8 + IThumbBar* p = m_spThumbBar.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 215u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)p); + } + + internal unsafe ThumbBar(IThumbBar* thumbBar) + { + CComPtrMgd_003CIThumbBar_003E spThumbBar = new CComPtrMgd_003CIThumbBar_003E(); + try + { + m_spThumbBar = spThumbBar; + base._002Ector(); + m_spThumbBar.op_Assign(thumbBar); + } + catch + { + //try-fault + ((IDisposable)m_spThumbBar).Dispose(); + throw; + } + } + + public void _007EThumbBar() + { + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + } + finally + { + ((IDisposable)m_spThumbBar).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/ThumbBarButton.cs b/ZuneDBApi/Microsoft/Zune/Util/ThumbBarButton.cs new file mode 100644 index 0000000..1dd22ea --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/ThumbBarButton.cs @@ -0,0 +1,183 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Util +{ + public class ThumbBarButton : IDisposable + { + private readonly CComPtrMgd_003CIThumbBarButton_003E m_spButton; + + public unsafe bool ShowBackground + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001d: Expected I, but got I8 + int num = 0; + IThumbBarButton* p = m_spButton.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 104)))((nint)p, &num); + return num == 1; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + //IL_0023: Expected I, but got I8 + int num = (value ? 1 : 0); + IThumbBarButton* p = m_spButton.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 112)))((nint)p, num); + } + } + + public unsafe bool IsHidden + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001d: Expected I, but got I8 + int num = 0; + IThumbBarButton* p = m_spButton.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 88)))((nint)p, &num); + return num == 1; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + //IL_0023: Expected I, but got I8 + int num = (value ? 1 : 0); + IThumbBarButton* p = m_spButton.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 96)))((nint)p, num); + } + } + + public unsafe bool IsEnabled + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001d: Expected I, but got I8 + int num = 0; + IThumbBarButton* p = m_spButton.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 72)))((nint)p, &num); + return num == 1; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + //IL_0023: Expected I, but got I8 + int num = (value ? 1 : 0); + IThumbBarButton* p = m_spButton.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 80)))((nint)p, num); + } + } + + public unsafe ThumbBarButtonIcons Icon + { + get + { + //IL_001e: Expected I, but got I8 + EThumbBarButtonIcons result = (EThumbBarButtonIcons)10; + IThumbBarButton* p = m_spButton.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 56)))((nint)p, &result); + return (ThumbBarButtonIcons)result; + } + set + { + //IL_001a: Expected I, but got I8 + IThumbBarButton* p = m_spButton.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 64)))((nint)p, (EThumbBarButtonIcons)value); + } + } + + public unsafe string Tooltip + { + get + { + //IL_0003: Expected I, but got I8 + //IL_001f: Expected I, but got I8 + ushort* ptr = null; + object result = null; + IThumbBarButton* p = m_spButton.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p, &ptr) >= 0) + { + result = new string((char*)ptr); + } + _003CModule_003E.SysFreeString(ptr); + return (string)result; + } + set + { + //IL_0023: Expected I, but got I8 + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(value))) + { + IThumbBarButton* p = m_spButton.p; + long num = *(long*)p + 48; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)p, ptr); + } + } + } + + public unsafe uint UniqueID + { + get + { + //IL_001d: Expected I, but got I8 + uint result = 0u; + IThumbBarButton* p = m_spButton.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p, &result); + return result; + } + set + { + //IL_001a: Expected I, but got I8 + IThumbBarButton* p = m_spButton.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)p, value); + } + } + + internal unsafe ThumbBarButton(IThumbBarButton* pButton) + { + CComPtrMgd_003CIThumbBarButton_003E spButton = new CComPtrMgd_003CIThumbBarButton_003E(); + try + { + m_spButton = spButton; + base._002Ector(); + m_spButton.op_Assign(pButton); + } + catch + { + //try-fault + ((IDisposable)m_spButton).Dispose(); + throw; + } + } + + public void _007EThumbBarButton() + { + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + } + finally + { + ((IDisposable)m_spButton).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/ThumbBarButtonPressHandler.cs b/ZuneDBApi/Microsoft/Zune/Util/ThumbBarButtonPressHandler.cs new file mode 100644 index 0000000..4104a77 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/ThumbBarButtonPressHandler.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Util +{ + public delegate void ThumbBarButtonPressHandler(uint iUniqueID); +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/UpdateCheckEventArguments.cs b/ZuneDBApi/Microsoft/Zune/Util/UpdateCheckEventArguments.cs new file mode 100644 index 0000000..9df80ee --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/UpdateCheckEventArguments.cs @@ -0,0 +1,41 @@ +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Util +{ + public class UpdateCheckEventArguments + { + private bool m_fUpdateFound; + + private bool m_fCriticalUpdateFound; + + private int m_hr; + + public int HR => m_hr; + + public bool CriticalUpdateFound + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_fCriticalUpdateFound; + } + } + + public bool UpdateFound + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_fUpdateFound; + } + } + + internal UpdateCheckEventArguments([MarshalAs(UnmanagedType.U1)] bool updateFound, [MarshalAs(UnmanagedType.U1)] bool criticalUpdateFound, int hr) + { + m_fUpdateFound = updateFound; + m_fCriticalUpdateFound = criticalUpdateFound; + m_hr = hr; + base._002Ector(); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/UpdateManager.cs b/ZuneDBApi/Microsoft/Zune/Util/UpdateManager.cs new file mode 100644 index 0000000..05b28d6 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/UpdateManager.cs @@ -0,0 +1,214 @@ +using System; +using System.Runtime.InteropServices; +using System.Threading; + +namespace Microsoft.Zune.Util +{ + public class UpdateManager : IDisposable + { + private readonly CComPtrMgd_003CIUpdateManager_003E m_spUpdateManager; + + private static UpdateManager sm_updateManager = null; + + private static object sm_lock = new object(); + + public static UpdateManager Instance + { + get + { + if (sm_updateManager == null) + { + try + { + Monitor.Enter(sm_lock); + if (sm_updateManager == null) + { + UpdateManager updateManager = new UpdateManager(); + Thread.MemoryBarrier(); + sm_updateManager = updateManager; + } + } + finally + { + Monitor.Exit(sm_lock); + } + } + return sm_updateManager; + } + } + + public unsafe void BeginUpdateCheck(UpdateProgressHandler updateProgressHandler) + { + //IL_0003: Expected I, but got I8 + //IL_001c: Expected I, but got I8 + //IL_0068: Expected I, but got I8 + //IL_007f: Expected I, but got I8 + //IL_0092: Expected I, but got I8 + //IL_0096: Expected I, but got I8 + IUpdateManager* ptr = null; + UpdateProxy* ptr2 = (UpdateProxy*)_003CModule_003E.@new(24uL); + UpdateProxy* ptr3; + try + { + ptr3 = ((ptr2 == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EUpdateProxy_002E_007Bctor_007D(ptr2, updateProgressHandler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr2); + throw; + } + UpdateProxy* ptr4 = ptr3; + try + { + Monitor.Enter(sm_lock); + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_9d21716a_ca61_4e24_a1ba_47b9e70e1e2c, (void**)(&ptr)) >= 0) + { + m_spUpdateManager.op_Assign(ptr); + IUpdateManager* p = m_spUpdateManager.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p, (IUpdateProgress*)ptr3); + } + } + finally + { + if (0L != (nint)ptr4) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr4 + 16)))((nint)ptr4); + } + if (0L != (nint)ptr) + { + IUpdateManager* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + ptr = null; + } + Monitor.Exit(sm_lock); + } + } + + public unsafe void CancelUpdateCheck() + { + //IL_002f: Expected I, but got I8 + try + { + Monitor.Enter(sm_lock); + CComPtrMgd_003CIUpdateManager_003E spUpdateManager = m_spUpdateManager; + IUpdateManager* p = spUpdateManager.p; + if (0L != (nint)p) + { + IUpdateManager* p2 = spUpdateManager.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p2 + 32)))((nint)p2); + } + } + finally + { + m_spUpdateManager.Release(); + Monitor.Exit(sm_lock); + } + } + + public unsafe void InstallUpdate(UpdateProgressHandler updateProgressHandler) + { + //IL_0019: Expected I, but got I8 + //IL_005d: Expected I, but got I8 + //IL_006b: Expected I, but got I8 + //IL_00ad: Expected I, but got I8 + UpdateProxy* ptr = (UpdateProxy*)_003CModule_003E.@new(24uL); + UpdateProxy* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EUpdateProxy_002E_007Bctor_007D(ptr, updateProgressHandler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + UpdateProxy* ptr3 = ptr2; + try + { + Monitor.Enter(sm_lock); + IUpdateManager* p = m_spUpdateManager.p; + if (0L == (nint)p) + { + CComPtrNtv_003CIUpdateManager_003E cComPtrNtv_003CIUpdateManager_003E; + *(long*)(&cComPtrNtv_003CIUpdateManager_003E) = 0L; + try + { + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_9d21716a_ca61_4e24_a1ba_47b9e70e1e2c, (void**)(&cComPtrNtv_003CIUpdateManager_003E)) >= 0) + { + IUpdateManager* ptr4 = (IUpdateManager*)(*(ulong*)(&cComPtrNtv_003CIUpdateManager_003E)); + m_spUpdateManager.op_Assign((IUpdateManager*)(*(ulong*)(&cComPtrNtv_003CIUpdateManager_003E))); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIUpdateManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIUpdateManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIUpdateManager_003E_002ERelease(&cComPtrNtv_003CIUpdateManager_003E); + } + CComPtrMgd_003CIUpdateManager_003E spUpdateManager = m_spUpdateManager; + IUpdateManager* p2 = spUpdateManager.p; + if (0L != (nint)p2) + { + IUpdateManager* p3 = spUpdateManager.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p3 + 40)))((nint)p3, (IUpdateProgress*)ptr2); + } + } + finally + { + _003CModule_003E.SafeRelease_003Cclass_0020Microsoft_003A_003AZune_003A_003AUtil_003A_003AUpdateProxy_003E(&ptr3); + m_spUpdateManager.Release(); + Monitor.Exit(sm_lock); + } + } + + private UpdateManager() + { + CComPtrMgd_003CIUpdateManager_003E spUpdateManager = new CComPtrMgd_003CIUpdateManager_003E(); + try + { + m_spUpdateManager = spUpdateManager; + base._002Ector(); + } + catch + { + //try-fault + ((IDisposable)m_spUpdateManager).Dispose(); + throw; + } + } + + private void _007EUpdateManager() + { + m_spUpdateManager.Release(); + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EUpdateManager(); + } + finally + { + ((IDisposable)m_spUpdateManager).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/UpdateProgressHandler.cs b/ZuneDBApi/Microsoft/Zune/Util/UpdateProgressHandler.cs new file mode 100644 index 0000000..e9a85a9 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/UpdateProgressHandler.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Util +{ + public delegate void UpdateProgressHandler(UpdateCheckEventArguments args); +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/UpdateProxy.cs b/ZuneDBApi/Microsoft/Zune/Util/UpdateProxy.cs new file mode 100644 index 0000000..fc8def7 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/UpdateProxy.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Util +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [DebugInfoInPDB] + [MiscellaneousBits(64)] + [NativeCppClass] + internal struct UpdateProxy + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/UsageDataService.cs b/ZuneDBApi/Microsoft/Zune/Util/UsageDataService.cs new file mode 100644 index 0000000..048371c --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/UsageDataService.cs @@ -0,0 +1,235 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Zune.Util +{ + public class UsageDataService + { + [return: MarshalAs(UnmanagedType.U1)] + public unsafe static bool GetPostUsageDataFlagForSignedInUser() + { + //IL_0005: Expected I, but got I8 + //IL_0025: Expected I, but got I8 + //IL_0042: Expected I, but got I8 + bool flag = false; + IUsageDataManager* ptr = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_2f36e709_c431_4836_ab2b_ab57aef0cf1a, (void**)(&ptr)) >= 0) + { + int num = 0; + IUsageDataManager* intPtr = ptr; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 24)))((nint)intPtr, &num) == 0) + { + flag = num != 0 || flag; + } + } + if (0L != (nint)ptr) + { + IUsageDataManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + return flag; + } + + public unsafe static void SetPostUsageDataFlagForSignedInUser([MarshalAs(UnmanagedType.U1)] bool fCanPostUsageData) + { + //IL_0003: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + //IL_0033: Expected I, but got I8 + IUsageDataManager* ptr = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_2f36e709_c431_4836_ab2b_ab57aef0cf1a, (void**)(&ptr)) >= 0) + { + IUsageDataManager* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 32)))((nint)intPtr, fCanPostUsageData ? 1 : 0); + } + if (0L != (nint)ptr) + { + IUsageDataManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + } + + public unsafe static void ReportTrackSubscriptionPlayback(Guid guidTrackId, string strReferrer) + { + //IL_0003: Expected I, but got I8 + //IL_0032: Expected I, but got I8 + //IL_004e: Expected I, but got I8 + IUsageDataManager* ptr = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_2f36e709_c431_4836_ab2b_ab57aef0cf1a, (void**)(&ptr)) >= 0) + { + _GUID gUID = _003CModule_003E.GuidToGUID(guidTrackId); + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strReferrer))) + { + try + { + long num = *(long*)ptr + 104; + IUsageDataManager* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)intPtr, &gUID, ptr2); + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + if (0L != (nint)ptr) + { + IUsageDataManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + } + + public unsafe static void ReportTrackPreviewPlayback(Guid guidTrackId, string strReferrer) + { + //IL_0003: Expected I, but got I8 + //IL_0032: Expected I, but got I8 + //IL_004e: Expected I, but got I8 + IUsageDataManager* ptr = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_2f36e709_c431_4836_ab2b_ab57aef0cf1a, (void**)(&ptr)) >= 0) + { + _GUID gUID = _003CModule_003E.GuidToGUID(guidTrackId); + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strReferrer))) + { + try + { + long num = *(long*)ptr + 112; + IUsageDataManager* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)intPtr, &gUID, ptr2); + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + if (0L != (nint)ptr) + { + IUsageDataManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + } + + public unsafe static void ReportTrackSubscriptionSkipPlay(Guid guidTrackId, string strReferrer) + { + //IL_0003: Expected I, but got I8 + //IL_0032: Expected I, but got I8 + //IL_004e: Expected I, but got I8 + IUsageDataManager* ptr = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_2f36e709_c431_4836_ab2b_ab57aef0cf1a, (void**)(&ptr)) >= 0) + { + _GUID gUID = _003CModule_003E.GuidToGUID(guidTrackId); + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strReferrer))) + { + try + { + long num = *(long*)ptr + 120; + IUsageDataManager* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)intPtr, &gUID, ptr2); + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + if (0L != (nint)ptr) + { + IUsageDataManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + } + + public unsafe static void ReportTrackPreviewSkipPlay(Guid guidTrackId, string strReferrer) + { + //IL_0003: Expected I, but got I8 + //IL_0035: Expected I, but got I8 + //IL_0051: Expected I, but got I8 + IUsageDataManager* ptr = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_2f36e709_c431_4836_ab2b_ab57aef0cf1a, (void**)(&ptr)) >= 0) + { + _GUID gUID = _003CModule_003E.GuidToGUID(guidTrackId); + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strReferrer))) + { + try + { + long num = *(long*)ptr + 128; + IUsageDataManager* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)intPtr, &gUID, ptr2); + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + if (0L != (nint)ptr) + { + IUsageDataManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + } + + public unsafe static void ReportTrackAddToCollection(Guid guidMediaId, string strReferrer) + { + //IL_0003: Expected I, but got I8 + //IL_0035: Expected I, but got I8 + //IL_0051: Expected I, but got I8 + IUsageDataManager* ptr = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_2f36e709_c431_4836_ab2b_ab57aef0cf1a, (void**)(&ptr)) >= 0) + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strReferrer))) + { + try + { + _GUID gUID = _003CModule_003E.GuidToGUID(guidMediaId); + long num = *(long*)ptr + 136; + IUsageDataManager* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)intPtr, &gUID, ptr2); + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + if (0L != (nint)ptr) + { + IUsageDataManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + } + + public unsafe static void ReportPlaylistDownload([MarshalAs(UnmanagedType.U1)] bool purchase, Guid guidMediaId) + { + //IL_0003: Expected I, but got I8 + //IL_0029: Expected I, but got I8 + //IL_003c: Expected I, but got I8 + IUsageDataManager* ptr = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_2f36e709_c431_4836_ab2b_ab57aef0cf1a, (void**)(&ptr)) >= 0) + { + _GUID gUID = _003CModule_003E.GuidToGUID(guidMediaId); + IUsageDataManager* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 40)))((nint)intPtr, purchase ? 1 : 0, &gUID); + } + if (0L != (nint)ptr) + { + IUsageDataManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + } + + private UsageDataService() + { + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/Win7ShellManager.cs b/ZuneDBApi/Microsoft/Zune/Util/Win7ShellManager.cs new file mode 100644 index 0000000..85645e0 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/Win7ShellManager.cs @@ -0,0 +1,406 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; + +namespace Microsoft.Zune.Util +{ + public class Win7ShellManager + { + private WindowPositionKeyPressHandler _003Cbacking_store_003EOnWindowPositionKeyPress; + + private ThumbBarButtonPressHandler _003Cbacking_store_003EOnThumbBarButtonPress; + + private MonitorChangeHandler _003Cbacking_store_003EOnMonitorChange; + + private static Win7ShellManager sm_win7ShellManager = null; + + private static object sm_lock = new object(); + + public static Win7ShellManager Instance + { + get + { + if (sm_win7ShellManager == null) + { + try + { + Monitor.Enter(sm_lock); + if (sm_win7ShellManager == null) + { + Win7ShellManager win7ShellManager = new Win7ShellManager(); + Thread.MemoryBarrier(); + sm_win7ShellManager = win7ShellManager; + } + } + finally + { + Monitor.Exit(sm_lock); + } + } + return sm_win7ShellManager; + } + } + + [SpecialName] + public event MonitorChangeHandler OnMonitorChange + { + [MethodImpl(MethodImplOptions.Synchronized)] + add + { + _003Cbacking_store_003EOnMonitorChange = (MonitorChangeHandler)Delegate.Combine(_003Cbacking_store_003EOnMonitorChange, value); + } + [MethodImpl(MethodImplOptions.Synchronized)] + remove + { + _003Cbacking_store_003EOnMonitorChange = (MonitorChangeHandler)Delegate.Remove(_003Cbacking_store_003EOnMonitorChange, value); + } + } + + [SpecialName] + public event ThumbBarButtonPressHandler OnThumbBarButtonPress + { + [MethodImpl(MethodImplOptions.Synchronized)] + add + { + _003Cbacking_store_003EOnThumbBarButtonPress = (ThumbBarButtonPressHandler)Delegate.Combine(_003Cbacking_store_003EOnThumbBarButtonPress, value); + } + [MethodImpl(MethodImplOptions.Synchronized)] + remove + { + _003Cbacking_store_003EOnThumbBarButtonPress = (ThumbBarButtonPressHandler)Delegate.Remove(_003Cbacking_store_003EOnThumbBarButtonPress, value); + } + } + + [SpecialName] + public event WindowPositionKeyPressHandler OnWindowPositionKeyPress + { + [MethodImpl(MethodImplOptions.Synchronized)] + add + { + _003Cbacking_store_003EOnWindowPositionKeyPress = (WindowPositionKeyPressHandler)Delegate.Combine(_003Cbacking_store_003EOnWindowPositionKeyPress, value); + } + [MethodImpl(MethodImplOptions.Synchronized)] + remove + { + _003Cbacking_store_003EOnWindowPositionKeyPress = (WindowPositionKeyPressHandler)Delegate.Remove(_003Cbacking_store_003EOnWindowPositionKeyPress, value); + } + } + + public unsafe int AddLocationToLibrary(EWin7LibraryKind libraryKind, [MarshalAs(UnmanagedType.U1)] bool defaultSaveFolder, string path) + { + //IL_0035: Expected I, but got I8 + //IL_0035: Expected I, but got I8 + CComPtrNtv_003CIWin7ShellManager_003E cComPtrNtv_003CIWin7ShellManager_003E; + *(long*)(&cComPtrNtv_003CIWin7ShellManager_003E) = 0L; + int num; + try + { + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_a89c52eb_97a9_417b_9872_46c040f1b76f, (void**)(&cComPtrNtv_003CIWin7ShellManager_003E)); + if (num >= 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(path))) + { + try + { + long num2 = *(long*)(*(ulong*)(&cComPtrNtv_003CIWin7ShellManager_003E)) + 96; + long num3 = *(long*)(&cComPtrNtv_003CIWin7ShellManager_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)num3, libraryKind, defaultSaveFolder ? 1 : 0, ptr); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIWin7ShellManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIWin7ShellManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIWin7ShellManager_003E_002ERelease(&cComPtrNtv_003CIWin7ShellManager_003E); + return num; + } + + public unsafe int RemoveLocationFromLibrary(EWin7LibraryKind libraryKind, out bool defaultSaveFolder, string path) + { + //IL_0037: Expected I, but got I8 + //IL_0037: Expected I, but got I8 + CComPtrNtv_003CIWin7ShellManager_003E cComPtrNtv_003CIWin7ShellManager_003E; + *(long*)(&cComPtrNtv_003CIWin7ShellManager_003E) = 0L; + int num; + try + { + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_a89c52eb_97a9_417b_9872_46c040f1b76f, (void**)(&cComPtrNtv_003CIWin7ShellManager_003E)); + int num2 = 0; + int num5; + if (num >= 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(path))) + { + try + { + long num3 = *(long*)(*(ulong*)(&cComPtrNtv_003CIWin7ShellManager_003E)) + 104; + long num4 = *(long*)(&cComPtrNtv_003CIWin7ShellManager_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)num4, libraryKind, &num2, ptr); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + if (num2 == 1) + { + num5 = 1; + goto IL_004c; + } + } + num5 = 0; + goto IL_004c; + IL_004c: + defaultSaveFolder = (byte)num5 != 0; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIWin7ShellManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIWin7ShellManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIWin7ShellManager_003E_002ERelease(&cComPtrNtv_003CIWin7ShellManager_003E); + return num; + } + + public unsafe int BeginJumpListSession(out JumpListSession session) + { + //IL_0003: Expected I, but got I8 + //IL_0006: Expected I, but got I8 + //IL_0026: Expected I, but got I8 + //IL_0045: Expected I, but got I8 + //IL_0049: Expected I, but got I8 + //IL_005b: Expected I, but got I8 + IWin7ShellManager* ptr = null; + IJumpList* ptr2 = null; + int num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_a89c52eb_97a9_417b_9872_46c040f1b76f, (void**)(&ptr)); + if (num >= 0) + { + IWin7ShellManager* intPtr = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 24)))((nint)intPtr, &ptr2); + if (num >= 0) + { + session = new JumpListSession(ptr2); + } + } + if (0L != (nint)ptr2) + { + IJumpList* intPtr2 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + ptr2 = null; + } + if (0L != (nint)ptr) + { + IWin7ShellManager* intPtr3 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + } + return num; + } + + public unsafe int BeginThumbBarSession(IntPtr hWnd, out ThumbBar thumbBar) + { + //IL_0003: Expected I, but got I8 + //IL_0006: Expected I, but got I8 + //IL_002f: Expected I, but got I8 + //IL_004e: Expected I, but got I8 + //IL_0052: Expected I, but got I8 + //IL_0064: Expected I, but got I8 + IWin7ShellManager* ptr = null; + IThumbBar* ptr2 = null; + int num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_a89c52eb_97a9_417b_9872_46c040f1b76f, (void**)(&ptr)); + if (num >= 0) + { + long num2 = *(long*)ptr + 32; + IWin7ShellManager* intPtr = ptr; + void* intPtr2 = hWnd.ToPointer(); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, (HWND__*)intPtr2, &ptr2); + if (num >= 0) + { + thumbBar = new ThumbBar(ptr2); + } + } + if (0L != (nint)ptr2) + { + IThumbBar* intPtr3 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + ptr2 = null; + } + if (0L != (nint)ptr) + { + IWin7ShellManager* intPtr4 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr4 + 16)))((nint)intPtr4); + } + return num; + } + + public unsafe int SubprocWindow(IntPtr hWnd) + { + //IL_0003: Expected I, but got I8 + //IL_002a: Expected I, but got I8 + //IL_003d: Expected I, but got I8 + IWin7ShellManager* ptr = null; + int num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_a89c52eb_97a9_417b_9872_46c040f1b76f, (void**)(&ptr)); + if (num >= 0) + { + long num2 = *(long*)ptr + 40; + IWin7ShellManager* intPtr = ptr; + void* intPtr2 = hWnd.ToPointer(); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, (HWND__*)intPtr2); + } + if (0L != (nint)ptr) + { + IWin7ShellManager* intPtr3 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + } + return num; + } + + public unsafe int ShowLibraryDialog(EWin7LibraryKind libraryKind, IntPtr hWnd, string title, string helpText) + { + //IL_0013: Expected I, but got I8 + //IL_003e: Expected I, but got I8 + //IL_0051: Expected I, but got I8 + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(title))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(helpText))) + { + IWin7ShellManager* ptr = null; + int num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_a89c52eb_97a9_417b_9872_46c040f1b76f, (void**)(&ptr)); + if (num >= 0) + { + long num2 = *(long*)ptr + 80; + IWin7ShellManager* intPtr = ptr; + void* intPtr2 = hWnd.ToPointer(); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)intPtr, libraryKind, (HWND__*)intPtr2, ptr2, ptr3); + } + if (0L != (nint)ptr) + { + IWin7ShellManager* intPtr3 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + } + return num; + } + } + } + + public unsafe int SyncLibraryFolders() + { + //IL_0003: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + //IL_0034: Expected I, but got I8 + IWin7ShellManager* ptr = null; + int num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_a89c52eb_97a9_417b_9872_46c040f1b76f, (void**)(&ptr)); + if (num >= 0) + { + IWin7ShellManager* intPtr = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 88)))((nint)intPtr); + } + if (0L != (nint)ptr) + { + IWin7ShellManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + return num; + } + + public unsafe int CreatePodcastLibraryTemplate() + { + //IL_0003: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + //IL_0034: Expected I, but got I8 + IWin7Libraries* ptr = null; + int num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_e24c5c6a_85a5_440e_93e1_bb51e32033ac, (void**)(&ptr)); + if (num >= 0) + { + IWin7Libraries* intPtr = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 56)))((nint)intPtr); + } + if (0L != (nint)ptr) + { + IWin7Libraries* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + return num; + } + + [SpecialName] + protected void raise_OnWindowPositionKeyPress(WindowPositionKeys value0) + { + _003Cbacking_store_003EOnWindowPositionKeyPress?.Invoke(value0); + } + + [SpecialName] + protected void raise_OnThumbBarButtonPress(uint value0) + { + _003Cbacking_store_003EOnThumbBarButtonPress?.Invoke(value0); + } + + [SpecialName] + protected void raise_OnMonitorChange() + { + _003Cbacking_store_003EOnMonitorChange?.Invoke(); + } + + internal int WindowPositionKeyPressDetected(WindowPositionKeys key) + { + raise_OnWindowPositionKeyPress(key); + return 0; + } + + internal int ThumbBarButtonPressed(uint iUniqueID) + { + raise_OnThumbBarButtonPress(iUniqueID); + return 0; + } + + internal int MonitorChanged() + { + raise_OnMonitorChange(); + return 0; + } + + private unsafe Win7ShellManager() + { + //IL_0009: Expected I, but got I8 + //IL_0031: Expected I, but got I8 + //IL_0048: Expected I, but got I8 + //IL_005b: Expected I, but got I8 + IWin7ShellManager* ptr = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_a89c52eb_97a9_417b_9872_46c040f1b76f, (void**)(&ptr)) >= 0) + { + Win7ShellManagerMediator* ptr2 = (Win7ShellManagerMediator*)_003CModule_003E.@new(24uL); + Win7ShellManagerMediator* ptr3; + try + { + ptr3 = ((ptr2 == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EWin7ShellManagerMediator_002E_007Bctor_007D(ptr2, this)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr2); + throw; + } + IWin7ShellManager* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 48)))((nint)intPtr, (IWin7ShellManagerMediator*)ptr3); + } + if (0L != (nint)ptr) + { + IWin7ShellManager* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/Win7ShellManagerMediator.cs b/ZuneDBApi/Microsoft/Zune/Util/Win7ShellManagerMediator.cs new file mode 100644 index 0000000..67aa4b0 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/Win7ShellManagerMediator.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Util +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [NativeCppClass] + [DebugInfoInPDB] + [MiscellaneousBits(64)] + internal struct Win7ShellManagerMediator + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/WindowPositionKeyPressHandler.cs b/ZuneDBApi/Microsoft/Zune/Util/WindowPositionKeyPressHandler.cs new file mode 100644 index 0000000..e81ecec --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/WindowPositionKeyPressHandler.cs @@ -0,0 +1,4 @@ +namespace Microsoft.Zune.Util +{ + public delegate void WindowPositionKeyPressHandler(WindowPositionKeys key); +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/Windowing.cs b/ZuneDBApi/Microsoft/Zune/Util/Windowing.cs new file mode 100644 index 0000000..782bce5 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/Windowing.cs @@ -0,0 +1,20 @@ +using System; +using System.Runtime.CompilerServices; + +namespace Microsoft.Zune.Util +{ + public class Windowing + { + public unsafe static void ForceSetForegroundWindow(IntPtr hwnd) + { + //IL_000a: Expected I4, but got I8 + tagINPUT tagINPUT; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagINPUT, 8), 0, 32); + *(int*)(&tagINPUT) = 1; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagINPUT, 8)) = 0; + _003CModule_003E.SendInput(1u, &tagINPUT, 40); + _003CModule_003E.SetForegroundWindow((HWND__*)hwnd.ToPointer()); + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/ZuneWebHost.cs b/ZuneDBApi/Microsoft/Zune/Util/ZuneWebHost.cs new file mode 100644 index 0000000..bc6d7f0 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/ZuneWebHost.cs @@ -0,0 +1,185 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using _003CCppImplementationDetails_003E; + +namespace Microsoft.Zune.Util +{ + public class ZuneWebHost + { + private static object s_lock = new object(); + + private static ZuneWebHost s_zuneWebHost = null; + + private unsafe ZuneWebHostEventSink* m_zuneWebHostEventSink; + + private NavigationCompleteHandler m_navCompleteHandler; + + private NavigationErrorHandler m_navErrorHandler; + + public unsafe static ZuneWebHost Instance + { + get + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 0x8000u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 10, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xd3863cf3_002EWPP_ZuneWebHostInterop_cpp_Traceguids)); + } + if (s_zuneWebHost == null) + { + try + { + Monitor.Enter(s_lock); + if (s_zuneWebHost == null) + { + ZuneWebHost zuneWebHost = new ZuneWebHost(); + Thread.MemoryBarrier(); + s_zuneWebHost = zuneWebHost; + } + } + finally + { + Monitor.Exit(s_lock); + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 0x8000u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 11, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xd3863cf3_002EWPP_ZuneWebHostInterop_cpp_Traceguids)); + } + return s_zuneWebHost; + } + } + + public unsafe long Initialize(string navUrl, long hWndHost, int width, int height) + { + //IL_0045: Expected I, but got I8 + //IL_0075: Expected I, but got I8 + //IL_007b: Expected I, but got I8 + //IL_00a8: Expected I, but got I8 + //IL_00a8: Expected I, but got I8 + //IL_00a8: Expected I, but got I8 + //IL_0102: Expected I8, but got I + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 0x8000u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 12, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xd3863cf3_002EWPP_ZuneWebHostInterop_cpp_Traceguids)); + } + HWND__* ptr = null; + CComPtrNtv_003CIZuneWebHost_003E cComPtrNtv_003CIZuneWebHost_003E; + *(long*)(&cComPtrNtv_003CIZuneWebHost_003E) = 0L; + long result; + try + { + _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_51005f8f_675e_45e1_ae94_8edef996a02e, (void**)(&cComPtrNtv_003CIZuneWebHost_003E)); + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(navUrl))) + { + ZuneWebHostEventSink* ptr2 = (ZuneWebHostEventSink*)_003CModule_003E.@new(24uL); + ZuneWebHostEventSink* zuneWebHostEventSink; + try + { + zuneWebHostEventSink = ((ptr2 == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EZuneWebHostEventSink_002E_007Bctor_007D(ptr2, this, (IZuneWebHost*)(*(ulong*)(&cComPtrNtv_003CIZuneWebHost_003E)))); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr2); + throw; + } + m_zuneWebHostEventSink = zuneWebHostEventSink; + long num = *(long*)(*(ulong*)(&cComPtrNtv_003CIZuneWebHost_003E)) + 24; + long num2 = *(long*)(&cComPtrNtv_003CIZuneWebHost_003E); + int num3 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)num2, ptr3, (HWND__*)hWndHost, width, height, &ptr); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 0x8000u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + sbyte* a = (sbyte*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref num3 < 0 ? ref _003CModule_003E._003F_003F_C_0040_07PPOLEBIF_0040_003F5ERROR_003F3_003F_0024AA_0040 : ref System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00_0024_0024CBD, _0024ArrayType_0024_0024_0024BY07_0024_0024CBD>(ref _003CModule_003E._003F_003F_C_0040_00CNPNBAHC_0040_003F_0024AA_0040)); + _003CModule_003E.WPP_SF_sD(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 13, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xd3863cf3_002EWPP_ZuneWebHostInterop_cpp_Traceguids), a, (uint)num3); + } + result = (nint)ptr; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIZuneWebHost_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIZuneWebHost_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIZuneWebHost_003E_002ERelease(&cComPtrNtv_003CIZuneWebHost_003E); + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool SetSize(long hWndHost, int width, int height) + { + //IL_004d: Expected I, but got I8 + bool result = false; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 0x8000u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 14, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xd3863cf3_002EWPP_ZuneWebHostInterop_cpp_Traceguids)); + } + if (hWndHost != 0L) + { + HWND__* window = _003CModule_003E.GetWindow((HWND__*)hWndHost, 5u); + if (window != null) + { + _003CModule_003E.MoveWindow(window, 0, 0, width, height, 0); + result = true; + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 0x8000u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 15, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xd3863cf3_002EWPP_ZuneWebHostInterop_cpp_Traceguids)); + } + return result; + } + + public unsafe void SetNavigationCompleteHandler(NavigationCompleteHandler navigationCompleteHandler) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 0x8000u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 16, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xd3863cf3_002EWPP_ZuneWebHostInterop_cpp_Traceguids)); + } + m_navCompleteHandler = navigationCompleteHandler; + } + + public unsafe void SetNavigationErrorHandler(NavigationErrorHandler navigationErrorHandler) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 0x8000u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 17, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xd3863cf3_002EWPP_ZuneWebHostInterop_cpp_Traceguids)); + } + m_navErrorHandler = navigationErrorHandler; + } + + public unsafe void OnNavigationComplete(string data) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 0x8000u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 18, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xd3863cf3_002EWPP_ZuneWebHostInterop_cpp_Traceguids)); + } + if (m_navCompleteHandler != null) + { + m_navCompleteHandler(data); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 0x8000u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 19, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xd3863cf3_002EWPP_ZuneWebHostInterop_cpp_Traceguids)); + } + } + + public unsafe void OnNavigationError(string navUrl, int errorCode) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 0x8000u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 20, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xd3863cf3_002EWPP_ZuneWebHostInterop_cpp_Traceguids)); + } + if (m_navErrorHandler != null) + { + m_navErrorHandler(navUrl, errorCode); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 0x8000u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 21, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xd3863cf3_002EWPP_ZuneWebHostInterop_cpp_Traceguids)); + } + } + } +} diff --git a/ZuneDBApi/Microsoft/Zune/Util/ZuneWebHostEventSink.cs b/ZuneDBApi/Microsoft/Zune/Util/ZuneWebHostEventSink.cs new file mode 100644 index 0000000..7377ae0 --- /dev/null +++ b/ZuneDBApi/Microsoft/Zune/Util/ZuneWebHostEventSink.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace Microsoft.Zune.Util +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [MiscellaneousBits(64)] + [DebugInfoInPDB] + [NativeCppClass] + internal struct ZuneWebHostEventSink + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/MicrosoftZuneInterop/PropIdMapEntry.cs b/ZuneDBApi/MicrosoftZuneInterop/PropIdMapEntry.cs new file mode 100644 index 0000000..e12021a --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneInterop/PropIdMapEntry.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace MicrosoftZuneInterop +{ + [StructLayout(LayoutKind.Sequential, Size = 16)] + [NativeCppClass] + [DebugInfoInPDB] + [MiscellaneousBits(65)] + internal struct PropIdMapEntry + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/MicrosoftZuneInterop/QueryPropertyBag.cs b/ZuneDBApi/MicrosoftZuneInterop/QueryPropertyBag.cs new file mode 100644 index 0000000..d894171 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneInterop/QueryPropertyBag.cs @@ -0,0 +1,277 @@ +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneInterop +{ + public class QueryPropertyBag : IDisposable + { + private unsafe IQueryPropertyBag* m_pPropertyBag; + + public unsafe QueryPropertyBag() + { + IQueryPropertyBag* pPropertyBag; + _003CModule_003E.ZuneLibraryExports_002ECreatePropertyBag(&pPropertyBag); + m_pPropertyBag = pPropertyBag; + } + + private unsafe void _0021QueryPropertyBag() + { + //IL_0019: Expected I, but got I8 + //IL_0022: Expected I, but got I8 + IQueryPropertyBag* pPropertyBag = m_pPropertyBag; + if (0L != (nint)pPropertyBag) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPropertyBag + 16)))((nint)pPropertyBag); + m_pPropertyBag = null; + } + } + + private void _007EQueryPropertyBag() + { + _0021QueryPropertyBag(); + } + + public unsafe void SetValue(string propertyName, object value) + { + //IL_004e: Expected I, but got I8 + //IL_007d: Expected I, but got I8 + //IL_00b6: Expected I, but got I8 + EQueryPropertyBagProp eQueryPropertyBagProp = MapNameToProp(propertyName); + if (eQueryPropertyBagProp == (EQueryPropertyBagProp)(-1) || value == null) + { + return; + } + int num = -2147024809; + Type type = value.GetType(); + if (type == typeof(int)) + { + IQueryPropertyBag* pPropertyBag = m_pPropertyBag; + int num2 = (int)value; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPropertyBag + 56)))((nint)pPropertyBag, eQueryPropertyBagProp, num2); + } + else if (type == typeof(bool)) + { + IQueryPropertyBag* pPropertyBag2 = m_pPropertyBag; + bool num3 = (bool)value; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPropertyBag2 + 56)))((nint)pPropertyBag2, eQueryPropertyBagProp, num3 ? 1 : 0); + } + else + { + if (type != typeof(string)) + { + goto IL_00c4; + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars((string)value))) + { + try + { + long num4 = *(long*)m_pPropertyBag + 40; + IQueryPropertyBag* pPropertyBag3 = m_pPropertyBag; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)pPropertyBag3, eQueryPropertyBagProp, ptr); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + if (num >= 0) + { + return; + } + goto IL_00c4; + IL_00c4: + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool IsSet(string propertyName) + { + //IL_0025: Expected I, but got I8 + int num = 0; + EQueryPropertyBagProp eQueryPropertyBagProp = MapNameToProp(propertyName); + if (eQueryPropertyBagProp != (EQueryPropertyBagProp)(-1)) + { + IQueryPropertyBag* pPropertyBag = m_pPropertyBag; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPropertyBag + 104)))((nint)pPropertyBag, eQueryPropertyBagProp, &num); + } + return num == 1; + } + + public unsafe EQueryPropertyBagProp MapNameToProp(string propertyName) + { + //IL_0017: Expected I, but got I8 + //IL_0023: Expected I, but got I8 + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(propertyName))) + { + int num = 0; + PropIdMapEntry* ptr = (PropIdMapEntry*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.MicrosoftZuneInterop_002E_003FA0x52c37a46_002EkPropIdMap); + EQueryPropertyBagProp eQueryPropertyBagProp; + while (true) + { + if (_003CModule_003E._wcsicmp(ptr2, (ushort*)(*(ulong*)ptr)) != 0) + { + num++; + ptr = (PropIdMapEntry*)((ulong)(nint)ptr + 16uL); + if ((uint)num < 37u) + { + continue; + } + } + else + { + eQueryPropertyBagProp = *(EQueryPropertyBagProp*)((long)num * 16L + (ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _003CModule_003E.MicrosoftZuneInterop_002E_003FA0x52c37a46_002EkPropIdMap, 8))); + if (eQueryPropertyBagProp != (EQueryPropertyBagProp)(-1)) + { + break; + } + } + throw new ArgumentException("Invalid property name: " + propertyName, "propertyName"); + } + return eQueryPropertyBagProp; + } + } + + public unsafe IQueryPropertyBag* GetIQueryPropertyBag() + { + return m_pPropertyBag; + } + + public unsafe IDList* PackIDList(IList multiIds) + { + //IL_0022: Expected I, but got I8 + //IL_0064: Expected I8, but got I + int count = multiIds.Count; + IDList* ptr = (IDList*)_003CModule_003E.@new(16uL); + IDList* ptr2; + try + { + if (ptr != null) + { + *(long*)((ulong)(nint)ptr + 8uL) = 0L; + ptr2 = ptr; + } + else + { + ptr2 = null; + } + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + if (ptr2 != null) + { + *(int*)ptr2 = count; + ulong num = (ulong)count; + ulong num2 = ((num > 4611686018427387903L) ? ulong.MaxValue : (num * 4)); + *(long*)((ulong)(nint)ptr2 + 8uL) = (nint)_003CModule_003E.new_005B_005D(num2); + int num3 = 0; + long num4 = 0L; + long num5 = count; + if (0 < num5) + { + do + { + *(int*)(num4 * 4 + *(long*)((ulong)(nint)ptr2 + 8uL)) = (int)multiIds[num3]; + num3++; + num4++; + } + while (num4 < num5); + } + } + return ptr2; + } + + public unsafe IMultiSortAttributes* PackMultiSortAttributes(string[] sortStrings, bool[] sortAscendings) + { + //IL_0008: Expected I, but got I8 + //IL_000c: Expected I, but got I8 + //IL_0026: Expected I, but got I8 + //IL_0036: Expected I, but got I8 + //IL_009a: Expected I, but got I8 + int num = sortStrings.Length; + int* ptr = null; + int* ptr2 = null; + IMultiSortAttributes* ptr3; + if (_003CModule_003E.ZuneLibraryExports_002ECreateMultiSortAttributes(num, &ptr3) >= 0) + { + IMultiSortAttributes* intPtr = ptr3; + ptr = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 32)))((nint)intPtr); + IMultiSortAttributes* intPtr2 = ptr3; + ptr2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 40)))((nint)intPtr2); + } + else + { + num = 0; + } + int num2 = 0; + long num3 = num; + if (0 < num3) + { + int* ptr4 = ptr2; + int* ptr5 = (int*)((byte*)ptr - (nuint)ptr2); + ulong num4 = (ulong)num3; + do + { + EQuerySortType eQuerySortType = (sortAscendings[num2] ? EQuerySortType.eQuerySortOrderAscending : EQuerySortType.eQuerySortOrderDescending); + fixed (ushort* wszName = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(sortStrings[num2]))) + { + try + { + int num5 = _003CModule_003E.CSchemaMap_002EGetIndex(wszName); + eQuerySortType = ((num5 != -1) ? eQuerySortType : EQuerySortType.eQuerySortOrderNone); + *(int*)((byte*)ptr5 + (nuint)ptr4) = num5; + *ptr4 = (int)eQuerySortType; + } + catch + { + //try-fault + wszName = null; + throw; + } + } + num2++; + ptr4 = (int*)((ulong)(nint)ptr4 + 4uL); + num4--; + } + while (num4 != 0); + } + return ptr3; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021QueryPropertyBag(); + return; + } + try + { + _0021QueryPropertyBag(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~QueryPropertyBag() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/AlbumMetadata.cs b/ZuneDBApi/MicrosoftZuneLibrary/AlbumMetadata.cs new file mode 100644 index 0000000..c0daee5 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/AlbumMetadata.cs @@ -0,0 +1,629 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class AlbumMetadata : IDisposable + { + private unsafe IAlbumInfo* m_pAlbumInfo; + + private bool m_fDisposed; + + internal unsafe IAlbumInfo* AlbumInfo => m_pAlbumInfo; + + public unsafe bool ExactMatch + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001e: Expected I, but got I8 + bool result = false; + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + int num; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 176)))((nint)pAlbumInfo, &num); + if (num2 < 0) + { + throw new COMException("IAlbumInfo::IsExactMatch failed", num2); + } + bool flag = ((num != 0) ? true : false); + result = flag; + } + return result; + } + } + + public unsafe uint TrackCount + { + get + { + //IL_001e: Expected I, but got I8 + uint result = 0u; + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 128)))((nint)pAlbumInfo, &result); + if (num < 0) + { + throw new COMException("IAlbumInfo::GetTrackCount failed", num); + } + } + return result; + } + } + + public unsafe uint WMISTrackCount + { + get + { + //IL_001e: Expected I, but got I8 + uint result = 0u; + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 168)))((nint)pAlbumInfo, &result); + if (num < 0) + { + throw new COMException("IAlbumInfo::GetWMISTrackCount failed", num); + } + } + return result; + } + } + + public unsafe int MediaId + { + get + { + //IL_001e: Expected I, but got I8 + int result = -1; + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 160)))((nint)pAlbumInfo, &result); + if (num < 0) + { + throw new COMException("IAlbumInfo::GetMediaId failed", num); + } + } + return result; + } + } + + public unsafe string CoverUrl + { + get + { + //IL_000f: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + string result = null; + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + ushort* ptr = null; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 144)))((nint)pAlbumInfo, &ptr); + if (num < 0) + { + throw new COMException("IAlbumInfo::GetCoverUrl failed", num); + } + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + set + { + //Discarded unreachable code: IL_0054 + //IL_003c: Expected I, but got I8 + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(value))) + { + try + { + ushort* ptr2 = _003CModule_003E.SysAllocString(ptr); + if (ptr2 == null) + { + throw new COMException("SysAllocString failed", -2147024882); + } + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 152)))((nint)pAlbumInfo, ptr2); + _003CModule_003E.SysFreeString(ptr2); + if (num != 0) + { + throw new COMException("IAlbumInfo::SetCoverUrl failed", num); + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + try + { + } + catch + { + //try-fault + throw; + } + } + } + + public unsafe int ReleaseYear + { + get + { + //IL_001b: Expected I, but got I8 + int result = -1; + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 112)))((nint)pAlbumInfo, &result); + if (num < 0) + { + throw new COMException("IAlbumInfo::GetReleaseYear failed", num); + } + } + return result; + } + set + { + //IL_0036: Expected I, but got I8 + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + switch (value) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + value += 2000; + break; + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + case 85: + case 86: + case 87: + case 88: + case 89: + case 90: + case 91: + case 92: + case 93: + case 94: + case 95: + case 96: + case 97: + case 98: + case 99: + value += 1900; + break; + } + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 120)))((nint)pAlbumInfo, value); + if (num < 0) + { + throw new COMException("IAlbumInfo::SetReleaseYear failed", num); + } + } + } + } + + public unsafe string AlbumArtistYomi + { + get + { + //IL_000f: Expected I, but got I8 + //IL_001e: Expected I, but got I8 + string result = null; + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + ushort* ptr = null; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 80)))((nint)pAlbumInfo, &ptr); + if (num < 0) + { + throw new COMException("IAlbumInfo::GetAlbumArtistYomi failed", num); + } + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + set + { + //Discarded unreachable code: IL_0051 + //IL_0039: Expected I, but got I8 + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(value))) + { + try + { + ushort* ptr2 = _003CModule_003E.SysAllocString(ptr); + if (ptr2 == null) + { + throw new COMException("SysAllocString failed", -2147024882); + } + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 88)))((nint)pAlbumInfo, ptr2); + _003CModule_003E.SysFreeString(ptr2); + if (num != 0) + { + throw new COMException("IAlbumInfo::SetAlbumArtistYomi failed", num); + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + try + { + } + catch + { + //try-fault + throw; + } + } + } + + public unsafe string AlbumArtist + { + get + { + //IL_000f: Expected I, but got I8 + //IL_001e: Expected I, but got I8 + string result = null; + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + ushort* ptr = null; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 64)))((nint)pAlbumInfo, &ptr); + if (num < 0) + { + throw new COMException("IAlbumInfo::GetAlbumArtist failed", num); + } + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + set + { + //Discarded unreachable code: IL_0051 + //IL_0039: Expected I, but got I8 + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(value))) + { + try + { + ushort* ptr2 = _003CModule_003E.SysAllocString(ptr); + if (ptr2 == null) + { + throw new COMException("SysAllocString failed", -2147024882); + } + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 72)))((nint)pAlbumInfo, ptr2); + _003CModule_003E.SysFreeString(ptr2); + if (num != 0) + { + throw new COMException("IAlbumInfo::SetAlbumArtist failed", num); + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + try + { + } + catch + { + //try-fault + throw; + } + } + } + + public unsafe string AlbumTitleYomi + { + get + { + //IL_000f: Expected I, but got I8 + //IL_001e: Expected I, but got I8 + string result = null; + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + ushort* ptr = null; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 48)))((nint)pAlbumInfo, &ptr); + if (num < 0) + { + throw new COMException("IAlbumInfo::GetTitleYomi failed", num); + } + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + set + { + //Discarded unreachable code: IL_0051 + //IL_0039: Expected I, but got I8 + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(value))) + { + try + { + ushort* ptr2 = _003CModule_003E.SysAllocString(ptr); + if (ptr2 == null) + { + throw new COMException("SysAllocString failed", -2147024882); + } + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 56)))((nint)pAlbumInfo, ptr2); + _003CModule_003E.SysFreeString(ptr2); + if (num != 0) + { + throw new COMException("IAlbumInfo::SetTitleYomi failed", num); + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + try + { + } + catch + { + //try-fault + throw; + } + } + } + + public unsafe string AlbumTitle + { + get + { + //IL_000f: Expected I, but got I8 + //IL_001e: Expected I, but got I8 + string result = null; + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + ushort* ptr = null; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 32)))((nint)pAlbumInfo, &ptr); + if (num < 0) + { + throw new COMException("IAlbumInfo::GetTitle failed", num); + } + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + set + { + //Discarded unreachable code: IL_0051 + //IL_0039: Expected I, but got I8 + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(value))) + { + try + { + ushort* ptr2 = _003CModule_003E.SysAllocString(ptr); + if (ptr2 == null) + { + throw new COMException("SysAllocString failed", -2147024882); + } + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 40)))((nint)pAlbumInfo, ptr2); + _003CModule_003E.SysFreeString(ptr2); + if (num != 0) + { + throw new COMException("IAlbumInfo::SetTitle failed", num); + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + try + { + } + catch + { + //try-fault + throw; + } + } + } + + public unsafe AlbumMetadata(IAlbumInfo* pAlbumInfo) + { + //IL_001c: Expected I, but got I8 + m_pAlbumInfo = pAlbumInfo; + if (pAlbumInfo != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 8)))((nint)pAlbumInfo); + } + } + + private void _007EAlbumMetadata() + { + _0021AlbumMetadata(); + } + + private unsafe void _0021AlbumMetadata() + { + //IL_001f: Expected I, but got I8 + //IL_0028: Expected I, but got I8 + if (!m_fDisposed) + { + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 16)))((nint)pAlbumInfo); + m_pAlbumInfo = null; + } + } + } + + public unsafe TrackMetadata GetTrack(uint index) + { + //IL_000f: Expected I, but got I8 + //IL_0022: Expected I, but got I8 + //IL_0047: Expected I, but got I8 + TrackMetadata result = null; + IAlbumInfo* pAlbumInfo = m_pAlbumInfo; + if (pAlbumInfo != null) + { + ITrackInfo* ptr = null; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pAlbumInfo + 136)))((nint)pAlbumInfo, index, &ptr); + if (num < 0) + { + throw new COMException("IAlbumInfo::GetTrack failed", num); + } + result = new TrackMetadata(ptr); + ITrackInfo* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + } + return result; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021AlbumMetadata(); + return; + } + try + { + _0021AlbumMetadata(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~AlbumMetadata() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/AppInitializationSequencer.cs b/ZuneDBApi/MicrosoftZuneLibrary/AppInitializationSequencer.cs new file mode 100644 index 0000000..98229dc --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/AppInitializationSequencer.cs @@ -0,0 +1,68 @@ +using System; +using System.Runtime.InteropServices; +using Microsoft.Iris; +using Microsoft.Zune.Util; +using ZuneUI; + +namespace MicrosoftZuneLibrary +{ + public class AppInitializationSequencer + { + public delegate void Phase3CompleteCallback(int hr); + + private CorePhase2ReadyCallback m_GcCorePhase2ReadyCallback; + + public AppInitializationSequencer(CorePhase2ReadyCallback corePhase2ReadyCallback) + { + m_GcCorePhase2ReadyCallback = corePhase2ReadyCallback; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool UIReady() + { + //IL_0024: Expected I, but got I8 + //IL_0043: Expected I, but got I8 + AsyncCallbackWrapper* ptr = (AsyncCallbackWrapper*)_003CModule_003E.@new(24uL); + AsyncCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EZune_002EUtil_002EAsyncCallbackWrapper_002E_007Bctor_007D(ptr, CorePhase2Ready)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + int num2; + if (ptr2 != null) + { + int num = _003CModule_003E.ZuneLibraryExports_002EPhase3Initialization((IAsyncCallback*)ptr2); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + if (num >= 0) + { + num2 = 1; + goto IL_004d; + } + } + num2 = 0; + goto IL_004d; + IL_004d: + return (byte)num2 != 0; + } + + public void CorePhase2Ready(HRESULT hr) + { + object[] array = new object[2] { hr.hr, null }; + byte b = (byte)((hr.hr >= 0) ? 1 : 0); + array[1] = b != 0; + Application.DeferredInvoke(CorePhase2ReadyMarshalled, array, DeferredInvokePriority.Normal); + } + + private void CorePhase2ReadyMarshalled(object args) + { + object[] array = (object[])args; + m_GcCorePhase2ReadyCallback((int)array[0], (bool)array[1]); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/AssociateWlanDeviceCompleteHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/AssociateWlanDeviceCompleteHandler.cs new file mode 100644 index 0000000..6fc4c8a --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/AssociateWlanDeviceCompleteHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void AssociateWlanDeviceCompleteHandler(Device device, int hr); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/AsyncGetThumbnailState.cs b/ZuneDBApi/MicrosoftZuneLibrary/AsyncGetThumbnailState.cs new file mode 100644 index 0000000..0e6feea --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/AsyncGetThumbnailState.cs @@ -0,0 +1,51 @@ +using System; +using System.Runtime.InteropServices; +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + internal class AsyncGetThumbnailState : IDisposable + { + public LibraryDataProviderItemBase listItem; + + public string thumbnailPropertyName; + + public int thumbnailIndex; + + public bool slowDataQuery; + + public Image thumbnail; + + public string strUrl; + + public int MediaId; + + public bool antialiasImageEdges; + + public bool isComplete; + + public AsyncGetThumbnailState(LibraryDataProviderItemBase item) + { + listItem = item; + isComplete = false; + } + + private void _007EAsyncGetThumbnailState() + { + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (!P_0) + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/AsyncQueryParams.cs b/ZuneDBApi/MicrosoftZuneLibrary/AsyncQueryParams.cs new file mode 100644 index 0000000..2557bb5 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/AsyncQueryParams.cs @@ -0,0 +1,52 @@ +using System; +using System.Runtime.InteropServices; +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + public class AsyncQueryParams + { + private Guid _artistId; + + private bool _getFriends; + + private bool _resolveZuneTags; + + private int _userId; + + private DeferredInvokeHandler _setResultsHandler; + + public DeferredInvokeHandler SetResultsHandler => _setResultsHandler; + + public bool ResolveZuneTags + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return _resolveZuneTags; + } + } + + public int UserId => _userId; + + public bool GetFriends + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return _getFriends; + } + } + + public Guid ArtistId => _artistId; + + public AsyncQueryParams(Guid artistId, [MarshalAs(UnmanagedType.U1)] bool getFriends, int userId, DeferredInvokeHandler setResultsHandler, [MarshalAs(UnmanagedType.U1)] bool resolveZuneTags) + { + _userId = userId; + _artistId = artistId; + _getFriends = getFriends; + _setResultsHandler = setResultsHandler; + _resolveZuneTags = resolveZuneTags; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/BulkItemAction.cs b/ZuneDBApi/MicrosoftZuneLibrary/BulkItemAction.cs new file mode 100644 index 0000000..3cb1347 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/BulkItemAction.cs @@ -0,0 +1,13 @@ +namespace MicrosoftZuneLibrary +{ + public enum BulkItemAction + { + ReverseSync = 2, + UnexcludeFromSync = 6, + ExcludeFromSync = 5, + RemoveSyncRules = 4, + AddSyncRules = 3, + DeleteFromDevice = 1, + DeleteFromLibrary = 0 + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/CBurnPublisherCallback.cs b/ZuneDBApi/MicrosoftZuneLibrary/CBurnPublisherCallback.cs new file mode 100644 index 0000000..4d79a24 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/CBurnPublisherCallback.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace MicrosoftZuneLibrary +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [MiscellaneousBits(64)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct CBurnPublisherCallback + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/CDDeviceCallback.cs b/ZuneDBApi/MicrosoftZuneLibrary/CDDeviceCallback.cs new file mode 100644 index 0000000..2f0a35e --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/CDDeviceCallback.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace MicrosoftZuneLibrary +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [NativeCppClass] + [MiscellaneousBits(64)] + [DebugInfoInPDB] + internal struct CDDeviceCallback + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/CallbackOnUIThread.cs b/ZuneDBApi/MicrosoftZuneLibrary/CallbackOnUIThread.cs new file mode 100644 index 0000000..d1e8b76 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/CallbackOnUIThread.cs @@ -0,0 +1,28 @@ +using System; +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + public class CallbackOnUIThread : IRequestCallbackOnUIThread + { + private CallbackOnUIThreadBimodalManaged_DONOTUSE bimodalHelper; + + public CallbackOnUIThread() + { + bimodalHelper = new CallbackOnUIThreadBimodalManaged_DONOTUSE(this); + } + + public virtual void CallbackOnUIThreadRequest(CallbackPriorityManaged priority, int id, IntPtr pData, IntPtr pInterface) + { + CallbackOnUIThreadPack args = new CallbackOnUIThreadPack(id, pData, pInterface); + DeferredInvokePriority priority2 = ((priority != 0) ? DeferredInvokePriority.Low : DeferredInvokePriority.Normal); + Application.DeferredInvoke(DeferredCallback, args, priority2); + } + + private void DeferredCallback(object args) + { + CallbackOnUIThreadPack callbackOnUIThreadPack = (CallbackOnUIThreadPack)args; + bimodalHelper.Callback(callbackOnUIThreadPack._id, callbackOnUIThreadPack._pData, callbackOnUIThreadPack._pInterface); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/CallbackOnUIThreadBimodalManaged_DONOTUSE.cs b/ZuneDBApi/MicrosoftZuneLibrary/CallbackOnUIThreadBimodalManaged_DONOTUSE.cs new file mode 100644 index 0000000..86d1da9 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/CallbackOnUIThreadBimodalManaged_DONOTUSE.cs @@ -0,0 +1,85 @@ +using System; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class CallbackOnUIThreadBimodalManaged_DONOTUSE : IDisposable + { + private IRequestCallbackOnUIThread _pUI; + + private unsafe CallbackOnUIThreadBimodalUnmanaged_DONOTUSE* _pUnmanaged; + + public unsafe CallbackOnUIThreadBimodalManaged_DONOTUSE(IRequestCallbackOnUIThread pUI) + { + //IL_0026: Expected I, but got I8 + _pUI = pUI; + CallbackOnUIThreadBimodalUnmanaged_DONOTUSE* ptr = (CallbackOnUIThreadBimodalUnmanaged_DONOTUSE*)_003CModule_003E.@new(16uL); + CallbackOnUIThreadBimodalUnmanaged_DONOTUSE* pUnmanaged; + try + { + pUnmanaged = ((ptr == null) ? null : _003CModule_003E.MicrosoftZuneLibrary_002ECallbackOnUIThreadBimodalUnmanaged_DONOTUSE_002E_007Bctor_007D(ptr, this)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + _pUnmanaged = pUnmanaged; + } + + private void _007ECallbackOnUIThreadBimodalManaged_DONOTUSE() + { + _0021CallbackOnUIThreadBimodalManaged_DONOTUSE(); + } + + private unsafe void _0021CallbackOnUIThreadBimodalManaged_DONOTUSE() + { + CallbackOnUIThreadBimodalUnmanaged_DONOTUSE* pUnmanaged = _pUnmanaged; + if (pUnmanaged != null) + { + _003CModule_003E.MicrosoftZuneLibrary_002ECallbackOnUIThreadBimodalUnmanaged_DONOTUSE_002E__delDtor(pUnmanaged, 1u); + } + } + + public unsafe virtual void CallbackOnUIThreadRequest(CallbackPriorityManaged priority, int id, void* pv, INativeDeferredCallback* pNativeDeferredCallback) + { + IntPtr pInterface = (IntPtr)pNativeDeferredCallback; + IntPtr pData = (IntPtr)pv; + _pUI.CallbackOnUIThreadRequest(priority, id, pData, pInterface); + } + + public unsafe void Callback(int id, IntPtr pData, IntPtr pInterface) + { + _003CModule_003E.MicrosoftZuneLibrary_002ECallbackOnUIThreadBimodalUnmanaged_DONOTUSE_002ECallback(_pUnmanaged, id, (void*)pData, (INativeDeferredCallback*)pInterface.ToPointer()); + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021CallbackOnUIThreadBimodalManaged_DONOTUSE(); + return; + } + try + { + _0021CallbackOnUIThreadBimodalManaged_DONOTUSE(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~CallbackOnUIThreadBimodalManaged_DONOTUSE() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/CallbackOnUIThreadBimodalUnmanaged_DONOTUSE.cs b/ZuneDBApi/MicrosoftZuneLibrary/CallbackOnUIThreadBimodalUnmanaged_DONOTUSE.cs new file mode 100644 index 0000000..12827c6 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/CallbackOnUIThreadBimodalUnmanaged_DONOTUSE.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace MicrosoftZuneLibrary +{ + [StructLayout(LayoutKind.Sequential, Size = 16)] + [NativeCppClass] + [DebugInfoInPDB] + [MiscellaneousBits(64)] + internal struct CallbackOnUIThreadBimodalUnmanaged_DONOTUSE + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/CallbackOnUIThreadPack.cs b/ZuneDBApi/MicrosoftZuneLibrary/CallbackOnUIThreadPack.cs new file mode 100644 index 0000000..b9faa69 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/CallbackOnUIThreadPack.cs @@ -0,0 +1,20 @@ +using System; + +namespace MicrosoftZuneLibrary +{ + public class CallbackOnUIThreadPack + { + public readonly int _id; + + public readonly IntPtr _pData; + + public readonly IntPtr _pInterface; + + public CallbackOnUIThreadPack(int id, IntPtr pData, IntPtr pInterface) + { + _id = id; + _pData = pData; + _pInterface = pInterface; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/CategorySpaceUsedUpdatedHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/CategorySpaceUsedUpdatedHandler.cs new file mode 100644 index 0000000..4059780 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/CategorySpaceUsedUpdatedHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void CategorySpaceUsedUpdatedHandler(GasGauge gasGauge, ESyncCategory syncCategory, long llNewSchemaSpace, long llNewFreeSpace); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/CheckDiskSpaceArgs.cs b/ZuneDBApi/MicrosoftZuneLibrary/CheckDiskSpaceArgs.cs new file mode 100644 index 0000000..6f9fe25 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/CheckDiskSpaceArgs.cs @@ -0,0 +1,29 @@ +namespace MicrosoftZuneLibrary +{ + public class CheckDiskSpaceArgs + { + private int m_HrStatus; + + private ulong m_AdditionalSpaceRequiredInBytes; + + private ulong m_TotalSpaceRequiredInBytes; + + private string m_DriveLetter; + + public string DriveLetter => m_DriveLetter; + + public ulong TotalSpaceRequiredInBytes => m_TotalSpaceRequiredInBytes; + + public ulong AdditionalSpaceRequiredInBytes => m_AdditionalSpaceRequiredInBytes; + + public int HrStatus => m_HrStatus; + + public CheckDiskSpaceArgs(int HrStatus, ulong AdditionalSpaceRequiredInBytes, ulong TotalSpaceRequiredInBytes, string DriveLetter) + { + m_HrStatus = HrStatus; + m_AdditionalSpaceRequiredInBytes = AdditionalSpaceRequiredInBytes; + m_TotalSpaceRequiredInBytes = TotalSpaceRequiredInBytes; + m_DriveLetter = DriveLetter; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/CheckForUpdatesArgs.cs b/ZuneDBApi/MicrosoftZuneLibrary/CheckForUpdatesArgs.cs new file mode 100644 index 0000000..d0aa0e9 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/CheckForUpdatesArgs.cs @@ -0,0 +1,33 @@ +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class CheckForUpdatesArgs + { + private FirmwareUpdateErrorInfo m_ErrorInfo; + + private UpdatePackageCollection m_UpdatePackages; + + private bool m_RequiresSyncBeforeUpdate; + + public bool RequiresSyncBeforeUpdate + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_RequiresSyncBeforeUpdate; + } + } + + public UpdatePackageCollection UpdatePackages => m_UpdatePackages; + + public FirmwareUpdateErrorInfo ErrorInfo => m_ErrorInfo; + + public CheckForUpdatesArgs(FirmwareUpdateErrorInfo ErrorInfo, UpdatePackageCollection UpdatePackages, [MarshalAs(UnmanagedType.U1)] bool RequiresSyncBeforeUpdate) + { + m_ErrorInfo = ErrorInfo; + m_UpdatePackages = UpdatePackages; + m_RequiresSyncBeforeUpdate = RequiresSyncBeforeUpdate; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/CheckForUpdatesCallback.cs b/ZuneDBApi/MicrosoftZuneLibrary/CheckForUpdatesCallback.cs new file mode 100644 index 0000000..ed98e74 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/CheckForUpdatesCallback.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace MicrosoftZuneLibrary +{ + [StructLayout(LayoutKind.Sequential, Size = 40)] + [MiscellaneousBits(64)] + [DebugInfoInPDB] + [NativeCppClass] + internal struct CheckForUpdatesCallback + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/CompletionAction.cs b/ZuneDBApi/MicrosoftZuneLibrary/CompletionAction.cs new file mode 100644 index 0000000..8f76bb2 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/CompletionAction.cs @@ -0,0 +1,11 @@ +namespace MicrosoftZuneLibrary +{ + public enum CompletionAction + { + Complete = 4, + Rollback = 3, + Reboot = 2, + Continue = 1, + None = 0 + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/ContinueFirmwareUpdateArgs.cs b/ZuneDBApi/MicrosoftZuneLibrary/ContinueFirmwareUpdateArgs.cs new file mode 100644 index 0000000..e8b384d --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/ContinueFirmwareUpdateArgs.cs @@ -0,0 +1,14 @@ +namespace MicrosoftZuneLibrary +{ + internal class ContinueFirmwareUpdateArgs + { + private FirmwareCompleteHandler m_OnCompleteHandler; + + public FirmwareCompleteHandler OnCompleteHandler => m_OnCompleteHandler; + + public ContinueFirmwareUpdateArgs(FirmwareCompleteHandler OnCompleteHandler) + { + m_OnCompleteHandler = OnCompleteHandler; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/CorePhase2ReadyCallback.cs b/ZuneDBApi/MicrosoftZuneLibrary/CorePhase2ReadyCallback.cs new file mode 100644 index 0000000..e2441e1 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/CorePhase2ReadyCallback.cs @@ -0,0 +1,6 @@ +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public delegate void CorePhase2ReadyCallback(int hr, [MarshalAs(UnmanagedType.U1)] bool success); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/DeferrableSyncEventArgs.cs b/ZuneDBApi/MicrosoftZuneLibrary/DeferrableSyncEventArgs.cs new file mode 100644 index 0000000..9064b95 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/DeferrableSyncEventArgs.cs @@ -0,0 +1,7 @@ +namespace MicrosoftZuneLibrary +{ + public class DeferrableSyncEventArgs : SyncEventArgs + { + public ESyncOperationStatus Status; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/DeferredSetResultArgs.cs b/ZuneDBApi/MicrosoftZuneLibrary/DeferredSetResultArgs.cs new file mode 100644 index 0000000..f919209 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/DeferredSetResultArgs.cs @@ -0,0 +1,21 @@ +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + internal class DeferredSetResultArgs + { + public int RequestGeneration; + + public ZuneQueryList QueryList; + + public bool RetainedList; + + public DeferredSetResultArgs(int requestGeneration, ZuneQueryList queryList, [MarshalAs(UnmanagedType.U1)] bool retainedList) + { + RequestGeneration = requestGeneration; + QueryList = queryList; + RetainedList = retainedList; + base._002Ector(); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/DeleteFromLibraryEventArgs.cs b/ZuneDBApi/MicrosoftZuneLibrary/DeleteFromLibraryEventArgs.cs new file mode 100644 index 0000000..713769f --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/DeleteFromLibraryEventArgs.cs @@ -0,0 +1,9 @@ +using System; + +namespace MicrosoftZuneLibrary +{ + public class DeleteFromLibraryEventArgs : EventArgs + { + public bool DeleteFromDisk; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/Device.cs b/ZuneDBApi/MicrosoftZuneLibrary/Device.cs new file mode 100644 index 0000000..903186e --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/Device.cs @@ -0,0 +1,3809 @@ +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Security; +using System.Threading; +using _003CCppImplementationDetails_003E; +using DataStructs; + +namespace MicrosoftZuneLibrary +{ + public class Device : IDisposable + { + private bool m_fInitializationCompleted; + + private object m_Lock; + + private readonly CComPtrMgd_003CIEndpointHost_003E m_spEndpointHost; + + private readonly CComPtrMgd_003CISyncEngine_003E m_spSyncEngine; + + private readonly CComPtrMgd_003CIWlanProvider_003E m_spWlanProvider; + + private readonly CComPtrMgd_003CDeviceMediator_003E m_spDeviceMediator; + + private SyncBeganHandler m_SyncBegan; + + private SyncProgressedHandler m_SyncProgressed; + + private SyncCompletedHandler m_SyncCompleted; + + private FriendlyNameChangedHandler m_FriendlyNameChanged; + + private DeviceStatusChangedHandler m_DeviceStatusChanged; + + private FormatCompleteHandler m_FormatComplete; + + private GetWlanProfilesCompleteHandler m_GetWlanProfilesComplete; + + private GetDeviceWlanNetworksCompleteHandler m_GetDeviceWlanNetworksComplete; + + private GetDeviceWlanProfilesCompleteHandler m_GetDeviceWlanProfilesComplete; + + private SetDeviceWlanProfilesCompleteHandler m_SetDeviceWlanProfilesComplete; + + private AssociateWlanDeviceCompleteHandler m_AssociateWlanDeviceComplete; + + private UnassociateWlanDeviceCompleteHandler m_UnassociateWlanDeviceComplete; + + private TestDeviceWlanCompleteHandler m_TestDeviceWlanComplete; + + private SyncRules m_syncRules; + + private FirmwareUpdater m_firmwareUpdater; + + private GasGauge m_predictedGasGauge; + + private GasGauge m_actualGasGauge; + + private bool m_fClientUpdateRequired; + + private bool m_fFirmwareUpdateRequired; + + private int m_hrEnumeration; + + private DeviceAssetSet m_DeviceAssetSet; + + private int m_iDeviceID; + + private uint m_dwModelID; + + private string m_strIconPath; + + private string m_strEndpointId; + + private string m_strCanonicalName; + + private bool m_fFirmwareUpdateSupported; + + private EEndpointStatus m_eLastDeviceStatus; + + public unsafe string MyPhoneDeviceID + { + get + { + //IL_0014: Expected I, but got I8 + //IL_002c: Expected I, but got I8 + string result = null; + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p != null) + { + ushort* ptr = null; + IEndpointHost* p = spEndpointHost.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 120)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyMyPhoneDeviceId, &ptr) >= 0 && ptr != null) + { + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + } + return result; + } + } + + public unsafe bool InStandardMode + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_0024: Expected I, but got I8 + bool result = false; + IEndpointHost* p = m_spEndpointHost.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 152)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyIsInStandardMode, &result); + } + return result; + } + } + + public DeviceAssetSet DeviceAssetSet => m_DeviceAssetSet; + + public unsafe int LastFirmwareUpdateError + { + get + { + //IL_003a: Expected I, but got I8 + int result = 0; + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 3517u); + return -2147418113; + } + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 136)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyLastFirmwareUpdateError, &result); + return result; + } + } + + public FirmwareUpdater FirmwareUpdater => m_firmwareUpdater; + + public unsafe string PicturesVideosViewUrl + { + get + { + //IL_0014: Expected I, but got I8 + //IL_002c: Expected I, but got I8 + string result = null; + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p != null) + { + ushort* ptr = null; + IEndpointHost* p = spEndpointHost.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 120)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyPicturesVideosViewUrl, &ptr) >= 0 && ptr != null) + { + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + } + return result; + } + } + + public unsafe string PicturesVideosViewText + { + get + { + //IL_0014: Expected I, but got I8 + //IL_002c: Expected I, but got I8 + string result = null; + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p != null) + { + ushort* ptr = null; + IEndpointHost* p = spEndpointHost.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 120)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyPicturesVideosViewText, &ptr) >= 0 && ptr != null) + { + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + } + return result; + } + } + + public bool SyncSetupRequired + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + ESyncRelationship relationship = ESyncRelationship.srNone; + if (GetSyncRelationship(ref relationship) >= 0 && (ESyncRelationship.srNone == relationship || ESyncRelationship.srSyncWithOtherMachine == relationship)) + { + return true; + } + return false; + } + } + + public bool ClientUpdateRequired + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_fClientUpdateRequired; + } + } + + public bool FirmwareUpdateRequired + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_fFirmwareUpdateRequired; + } + } + + public GasGauge ActualGasGauge => m_actualGasGauge; + + public GasGauge PredictedGasGauge => m_predictedGasGauge; + + public SyncRules Rules => m_syncRules; + + public unsafe DateTime LastConnectTime + { + get + { + //IL_002d: Expected I, but got I8 + DateTime result = DateTime.Now; + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p != null) + { + IEndpointHost* p = spEndpointHost.p; + _FILETIME fILETIME; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 88)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyLastConnectTime, &fILETIME) >= 0) + { + long fileTime = (long)(uint)System.Runtime.CompilerServices.Unsafe.As<_FILETIME, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref fILETIME, 4)) * 4294967296L + (uint)(*(int*)(&fILETIME)); + try + { + result = DateTime.FromFileTime(fileTime); + return result; + } + catch (ArgumentOutOfRangeException) + { + return result; + } + } + } + return result; + } + } + + public unsafe DateTime LastSyncTime + { + get + { + //IL_002d: Expected I, but got I8 + DateTime result = DateTime.Now; + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p != null) + { + IEndpointHost* p = spEndpointHost.p; + _FILETIME fILETIME; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 88)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyLastSyncTime, &fILETIME) >= 0) + { + long fileTime = (long)(uint)System.Runtime.CompilerServices.Unsafe.As<_FILETIME, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref fILETIME, 4)) * 4294967296L + (uint)(*(int*)(&fILETIME)); + try + { + result = DateTime.FromFileTime(fileTime); + return result; + } + catch (ArgumentOutOfRangeException) + { + return result; + } + } + } + return result; + } + } + + public unsafe bool IsFormatting + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_0024: Expected I, but got I8 + bool result = false; + IEndpointHost* p = m_spEndpointHost.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 152)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyIsFormatting, &result); + } + return result; + } + } + + public unsafe bool IsConnectedWirelessly + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_0024: Expected I, but got I8 + bool result = false; + IEndpointHost* p = m_spEndpointHost.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 152)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyIsConnectedWirelessly, &result); + } + return result; + } + } + + public unsafe bool IsConnected + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_0024: Expected I, but got I8 + bool result = false; + IEndpointHost* p = m_spEndpointHost.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 152)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyIsConnected, &result); + } + return result; + } + } + + public unsafe bool IsAvailable + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_0024: Expected I, but got I8 + bool result = false; + IEndpointHost* p = m_spEndpointHost.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 152)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyIsAvailable, &result); + } + return result; + } + } + + public unsafe EEndpointStatus DeviceStatus + { + get + { + int result = 1; + if (m_spEndpointHost.p != null) + { + result = (int)m_eLastDeviceStatus; + } + return (EEndpointStatus)result; + } + } + + public unsafe string OwnerApplicationName + { + get + { + //IL_0018: Expected I, but got I8 + //IL_0030: Expected I, but got I8 + string result = string.Empty; + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p != null) + { + ushort* ptr = null; + IEndpointHost* p = spEndpointHost.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 120)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyOwnerApplicationName, &ptr) >= 0 && ptr != null) + { + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + } + return result; + } + } + + public unsafe bool IsReady + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_0024: Expected I, but got I8 + bool flag = false; + IEndpointHost* p = m_spEndpointHost.p; + if (p != null) + { + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 152)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyIsReady, &flag); + int num2 = ((flag && num >= 0 && m_hrEnumeration >= 0) ? 1 : 0); + flag = (byte)num2 != 0; + } + return flag; + } + } + + public unsafe bool IsSyncSuspended + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001c: Expected I, but got I8 + ISyncEngine* p = m_spSyncEngine.p; + if (p != null) + { + return (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 80)))((nint)p) != 0) ? true : false; + } + return false; + } + } + + public unsafe bool IsSyncRunning + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_0025: Expected I, but got I8 + bool result = false; + IEndpointHost* p = m_spEndpointHost.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 152)))((nint)p, EEndpointHostProperty.eEndpointHostPropertySyncing, &result); + } + return result; + } + } + + public unsafe ulong DeviceCapacity + { + get + { + //IL_0023: Expected I, but got I8 + ulong result = 0uL; + IEndpointHost* p = m_spEndpointHost.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 128)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyTotalSpace, &result); + return result; + } + } + + public string CanonicalName => m_strCanonicalName; + + public string EndpointId => m_strEndpointId; + + public unsafe uint StatedCapacity + { + get + { + //IL_0025: Expected I, but got I8 + uint result = 0u; + IEndpointHost* p = m_spEndpointHost.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 144)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyStatedCapacity, &result); + } + return result; + } + } + + public unsafe uint BackgroundID + { + get + { + //IL_0025: Expected I, but got I8 + uint result = 0u; + IEndpointHost* p = m_spEndpointHost.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 144)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyBackgroundId, &result); + } + return result; + } + } + + public unsafe uint TattooID + { + get + { + //IL_0025: Expected I, but got I8 + uint result = 0u; + IEndpointHost* p = m_spEndpointHost.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 144)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyTattooId, &result); + } + return result; + } + } + + public unsafe ulong ColorID + { + get + { + //IL_0026: Expected I, but got I8 + ulong result = 0uL; + IEndpointHost* p = m_spEndpointHost.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 128)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyColorId, &result); + } + return result; + } + } + + public unsafe uint PrimaryColorID + { + get + { + //IL_0025: Expected I, but got I8 + uint result = 0u; + IEndpointHost* p = m_spEndpointHost.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 144)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyPrimaryColorId, &result); + } + return result; + } + } + + public unsafe uint FamilyID + { + get + { + //IL_0025: Expected I, but got I8 + uint result = 0u; + IEndpointHost* p = m_spEndpointHost.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 144)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyFamilyId, &result); + } + return result; + } + } + + public unsafe int ClassID + { + get + { + //IL_0025: Expected I, but got I8 + int result = 0; + IEndpointHost* p = m_spEndpointHost.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 136)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyClassId, &result); + } + return result; + } + } + + public int DeviceID => m_iDeviceID; + + [SpecialName] + public virtual event TestDeviceWlanCompleteHandler TestDeviceWlanCompleteEvent + { + add + { + m_TestDeviceWlanComplete = (TestDeviceWlanCompleteHandler)Delegate.Combine(m_TestDeviceWlanComplete, value); + } + remove + { + m_TestDeviceWlanComplete = (TestDeviceWlanCompleteHandler)Delegate.Remove(m_TestDeviceWlanComplete, value); + } + } + + [SpecialName] + public virtual event UnassociateWlanDeviceCompleteHandler UnassociateWlanDeviceCompleteEvent + { + add + { + m_UnassociateWlanDeviceComplete = (UnassociateWlanDeviceCompleteHandler)Delegate.Combine(m_UnassociateWlanDeviceComplete, value); + } + remove + { + m_UnassociateWlanDeviceComplete = (UnassociateWlanDeviceCompleteHandler)Delegate.Remove(m_UnassociateWlanDeviceComplete, value); + } + } + + [SpecialName] + public virtual event AssociateWlanDeviceCompleteHandler AssociateWlanDeviceCompleteEvent + { + add + { + m_AssociateWlanDeviceComplete = (AssociateWlanDeviceCompleteHandler)Delegate.Combine(m_AssociateWlanDeviceComplete, value); + } + remove + { + m_AssociateWlanDeviceComplete = (AssociateWlanDeviceCompleteHandler)Delegate.Remove(m_AssociateWlanDeviceComplete, value); + } + } + + [SpecialName] + public virtual event SetDeviceWlanProfilesCompleteHandler SetDeviceWlanProfilesCompleteEvent + { + add + { + m_SetDeviceWlanProfilesComplete = (SetDeviceWlanProfilesCompleteHandler)Delegate.Combine(m_SetDeviceWlanProfilesComplete, value); + } + remove + { + m_SetDeviceWlanProfilesComplete = (SetDeviceWlanProfilesCompleteHandler)Delegate.Remove(m_SetDeviceWlanProfilesComplete, value); + } + } + + [SpecialName] + public virtual event GetDeviceWlanProfilesCompleteHandler GetDeviceWlanProfilesCompleteEvent + { + add + { + m_GetDeviceWlanProfilesComplete = (GetDeviceWlanProfilesCompleteHandler)Delegate.Combine(m_GetDeviceWlanProfilesComplete, value); + } + remove + { + m_GetDeviceWlanProfilesComplete = (GetDeviceWlanProfilesCompleteHandler)Delegate.Remove(m_GetDeviceWlanProfilesComplete, value); + } + } + + [SpecialName] + public virtual event GetDeviceWlanNetworksCompleteHandler GetDeviceWlanNetworksCompleteEvent + { + add + { + m_GetDeviceWlanNetworksComplete = (GetDeviceWlanNetworksCompleteHandler)Delegate.Combine(m_GetDeviceWlanNetworksComplete, value); + } + remove + { + m_GetDeviceWlanNetworksComplete = (GetDeviceWlanNetworksCompleteHandler)Delegate.Remove(m_GetDeviceWlanNetworksComplete, value); + } + } + + [SpecialName] + public virtual event GetWlanProfilesCompleteHandler GetWlanProfilesCompleteEvent + { + add + { + m_GetWlanProfilesComplete = (GetWlanProfilesCompleteHandler)Delegate.Combine(m_GetWlanProfilesComplete, value); + } + remove + { + m_GetWlanProfilesComplete = (GetWlanProfilesCompleteHandler)Delegate.Remove(m_GetWlanProfilesComplete, value); + } + } + + [SpecialName] + public virtual event FormatCompleteHandler FormatCompleteEvent + { + add + { + m_FormatComplete = (FormatCompleteHandler)Delegate.Combine(m_FormatComplete, value); + } + remove + { + m_FormatComplete = (FormatCompleteHandler)Delegate.Remove(m_FormatComplete, value); + } + } + + [SpecialName] + public virtual event DeviceStatusChangedHandler DeviceStatusChangedEvent + { + add + { + m_DeviceStatusChanged = (DeviceStatusChangedHandler)Delegate.Combine(m_DeviceStatusChanged, value); + } + remove + { + m_DeviceStatusChanged = (DeviceStatusChangedHandler)Delegate.Remove(m_DeviceStatusChanged, value); + } + } + + [SpecialName] + public virtual event FriendlyNameChangedHandler FriendlyNameChangedEvent + { + add + { + m_FriendlyNameChanged = (FriendlyNameChangedHandler)Delegate.Combine(m_FriendlyNameChanged, value); + } + remove + { + m_FriendlyNameChanged = (FriendlyNameChangedHandler)Delegate.Remove(m_FriendlyNameChanged, value); + } + } + + [SpecialName] + public virtual event SyncCompletedHandler SyncCompleted + { + add + { + m_SyncCompleted = (SyncCompletedHandler)Delegate.Combine(m_SyncCompleted, value); + } + remove + { + m_SyncCompleted = (SyncCompletedHandler)Delegate.Remove(m_SyncCompleted, value); + } + } + + [SpecialName] + public virtual event SyncProgressedHandler SyncProgressed + { + add + { + m_SyncProgressed = (SyncProgressedHandler)Delegate.Combine(m_SyncProgressed, value); + } + remove + { + m_SyncProgressed = (SyncProgressedHandler)Delegate.Remove(m_SyncProgressed, value); + } + } + + [SpecialName] + public virtual event SyncBeganHandler SyncBegan + { + add + { + m_SyncBegan = (SyncBeganHandler)Delegate.Combine(m_SyncBegan, value); + } + remove + { + m_SyncBegan = (SyncBeganHandler)Delegate.Remove(m_SyncBegan, value); + } + } + + private unsafe void _007EDevice() + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 12, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), m_iDeviceID); + } + DeviceMediator* p = m_spDeviceMediator.p; + if (p != null) + { + _003CModule_003E.DeviceMediator_002EShutdown(p); + } + m_spEndpointHost.Release(); + m_spSyncEngine.Release(); + m_spDeviceMediator.Release(); + m_spWlanProvider.Release(); + SyncRules syncRules = m_syncRules; + if (syncRules != null) + { + ((IDisposable)syncRules).Dispose(); + m_syncRules = null; + } + FirmwareUpdater firmwareUpdater = m_firmwareUpdater; + if (firmwareUpdater != null) + { + ((IDisposable)firmwareUpdater).Dispose(); + m_firmwareUpdater = null; + } + GasGauge actualGasGauge = m_actualGasGauge; + if (actualGasGauge != null) + { + ((IDisposable)actualGasGauge).Dispose(); + m_actualGasGauge = null; + } + GasGauge predictedGasGauge = m_predictedGasGauge; + if (predictedGasGauge != null) + { + ((IDisposable)predictedGasGauge).Dispose(); + m_predictedGasGauge = null; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 13, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids)); + } + } + + public unsafe int StartSync() + { + //IL_0036: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 723u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 296)))((nint)p, EEndpointHostAction.eEndpointHostActionStartSync); + } + + public unsafe int StartSyncNextNotify() + { + //IL_0036: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 732u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 296)))((nint)p, EEndpointHostAction.eEndpointHostActionStartSyncNextNotify); + } + + public unsafe int StopSync() + { + //IL_0036: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 741u); + return -2147418113; + } + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 296)))((nint)p, EEndpointHostAction.eEndpointHostActionCancelSync); + return 0; + } + + public unsafe int StartEnumeration() + { + //IL_0037: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 751u); + return -2147418113; + } + IEndpointHost* ptr = p; + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 296)))((nint)ptr, EEndpointHostAction.eEndpointHostActionIngestMetadataAsync); + } + + public unsafe int Format() + { + //IL_0039: Expected I, but got I8 + //IL_003e: Expected I, but got I8 + //IL_0052: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 764u); + return -2147418113; + } + DeviceMediator* p2 = m_spDeviceMediator.p; + DeviceMediator* ptr = (DeviceMediator*)((p2 == null) ? 0 : ((ulong)(nint)p2 + 24uL)); + IEndpointHost* ptr2 = p; + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 304)))((nint)ptr2, EEndpointHostAction.eEndpointHostActionFormat, (IUnknown*)ptr); + } + + public unsafe int GetFriendlyName(ref string strName) + { + //IL_0027: Expected I, but got I8 + //IL_003f: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 777u); + return -2147418113; + } + ushort* ptr = null; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 120)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyName, &ptr); + if (num >= 0 && ptr != null) + { + strName = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return num; + } + + public unsafe int SetFriendlyName(string strName) + { + //IL_004d: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 798u); + return -2147418113; + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strName))) + { + int result; + if (ptr != null) + { + IEndpointHost* p = m_spEndpointHost.p; + long num = *(long*)p + 184; + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)p, EEndpointHostProperty.eEndpointHostPropertyName, ptr); + } + else + { + result = -2147418113; + } + return result; + } + } + + public unsafe int GetManufacturer(ref string strManufacturer) + { + //IL_0027: Expected I, but got I8 + //IL_003f: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 821u); + return -2147418113; + } + ushort* ptr = null; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 120)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyManufacturer, &ptr); + if (num >= 0 && ptr != null) + { + strManufacturer = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return num; + } + + public unsafe int GetModelName(ref string strModelName) + { + //IL_0027: Expected I, but got I8 + //IL_003f: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 842u); + return -2147418113; + } + ushort* ptr = null; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 120)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyModelName, &ptr); + if (num >= 0 && ptr != null) + { + strModelName = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return num; + } + + public unsafe int GetUserGuid(ref Guid guidUserGuid) + { + //IL_0042: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 863u); + return -2147418113; + } + _GUID gUID_NULL = _003CModule_003E.GUID_NULL; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 112)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyUserGuid, &gUID_NULL); + if (num >= 0) + { + Guid guid = (guidUserGuid = _003CModule_003E.GUIDToGuid(gUID_NULL)); + } + return num; + } + + public unsafe int GetUserId(ref int userId) + { + //IL_0038: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 884u); + return -2147418113; + } + int num; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 136)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyAssociatedUserId, &num); + userId = ((num2 >= 0) ? num : 0); + return num2; + } + + public unsafe int GetZuneTag(ref string strZuneTag) + { + //IL_0027: Expected I, but got I8 + //IL_003f: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1029u); + return -2147418113; + } + ushort* ptr = null; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 120)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyZuneTag, &ptr); + if (num >= 0 && ptr != null) + { + strZuneTag = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return num; + } + + public unsafe int GetLiveId(ref string strLiveId) + { + //IL_0027: Expected I, but got I8 + //IL_003f: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1051u); + return -2147418113; + } + ushort* ptr = null; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 120)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyLiveId, &ptr); + if (num >= 0 && ptr != null) + { + strLiveId = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return num; + } + + public unsafe int GetIsTvOutSupported(ref bool fIsTvOutSupported) + { + //IL_003d: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1073u); + return -2147418113; + } + bool flag = false; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 80)))((nint)p, EEndpointCapability.eEndpointCapabilityTvOut, &flag); + if (num >= 0) + { + fIsTvOutSupported = flag; + } + return num; + } + + public unsafe int GetIsRestorePointSupported(ref bool fIsRestorePointSupported) + { + //IL_003e: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1095u); + return -2147418113; + } + bool flag = false; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 80)))((nint)p, EEndpointCapability.eEndpointCapabilityRestorePoint, &flag); + if (num >= 0) + { + fIsRestorePointSupported = flag; + } + return num; + } + + public unsafe int GetCapability(EEndpointCapability capabilityId, ref bool fHasCapability) + { + //IL_003d: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1117u); + return -2147418113; + } + bool flag = false; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 80)))((nint)p, capabilityId, &flag); + if (num >= 0) + { + fHasCapability = flag; + } + return num; + } + + public unsafe int GetGeoId(ref uint dwGeoId) + { + //IL_0038: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 909u); + return -2147418113; + } + uint num; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 144)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyGeoId, &num); + dwGeoId = ((num2 >= 0) ? num : 0u); + return num2; + } + + public unsafe int SetGeoId(uint dwGeoId) + { + //IL_0039: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 934u); + return -2147418113; + } + IEndpointHost* ptr = p; + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 208)))((nint)ptr, EEndpointHostProperty.eEndpointHostPropertyGeoId, dwGeoId); + } + + public unsafe int GetTimeZoneBias(ref int lTimeZoneBias) + { + //IL_0038: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 949u); + return -2147418113; + } + int num; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 136)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyTimeZoneBias, &num); + lTimeZoneBias = ((num2 >= 0) ? num : 0); + return num2; + } + + public unsafe int SetTimeZoneBias(int lTimeZoneBias) + { + //IL_0039: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 974u); + return -2147418113; + } + IEndpointHost* ptr = p; + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 200)))((nint)ptr, EEndpointHostProperty.eEndpointHostPropertyTimeZoneBias, lTimeZoneBias); + } + + public unsafe int GetWatsonSetting(ref uint dwWatsonSetting) + { + //IL_0038: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 989u); + return -2147418113; + } + uint num; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 144)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyWatsonSetting, &num); + dwWatsonSetting = ((num2 >= 0) ? num : 0u); + return num2; + } + + public unsafe int SetWatsonSetting(uint dwWatsonSetting) + { + //IL_0039: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1014u); + return -2147418113; + } + IEndpointHost* ptr = p; + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 208)))((nint)ptr, EEndpointHostProperty.eEndpointHostPropertyWatsonSetting, dwWatsonSetting); + } + + public unsafe int SetUserGuidandZuneTag(Guid guidUserGuid, string strZuneTag) + { + //IL_004d: Expected I, but got I8 + //IL_007f: Expected I, but got I8 + //IL_00b1: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1139u); + return -2147418113; + } + _GUID gUID = _003CModule_003E.GuidToGUID(guidUserGuid); + IEndpointHost* p = m_spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 176)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyUserGuid, &gUID); + if (num >= 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strZuneTag))) + { + try + { + if (ptr != null) + { + IEndpointHost* p2 = m_spEndpointHost.p; + long num2 = *(long*)p2 + 184; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)p2, EEndpointHostProperty.eEndpointHostPropertyZuneTag, ptr); + } + else + { + num = -2147418113; + } + if (num < 0) + { + IEndpointHost* p3 = m_spEndpointHost.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p3 + 176)))((nint)p3, EEndpointHostProperty.eEndpointHostPropertyUserGuid, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.GUID_NULL)); + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return num; + } + + public int ClearUserGuidandZuneTag() + { + return SetUserGuidandZuneTag(default(Guid), ""); + } + + public unsafe int SetMarketplaceCredentials(SecureString strUsername, SecureString strPassword) + { + //IL_005e: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1191u); + return -2147418113; + } + IntPtr hglobal = Marshal.SecureStringToGlobalAllocUnicode(strUsername); + IntPtr hglobal2 = Marshal.SecureStringToGlobalAllocUnicode(strPassword); + IEndpointHost* p = m_spEndpointHost.p; + long num = *(long*)p + 160; + void* intPtr = hglobal.ToPointer(); + void* intPtr2 = hglobal2.ToPointer(); + int result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)p, EEndpointHostProperty.eEndpointHostPropertyMarketplaceCredentials, (ushort*)intPtr, (ushort*)intPtr2); + Marshal.FreeHGlobal(hglobal); + Marshal.FreeHGlobal(hglobal2); + return result; + } + + public unsafe int GetOOBECompleted(ref bool oobeCompleted) + { + //IL_0040: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1241u); + return -2147418113; + } + bool flag = false; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 152)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyOOBECompleted, &flag); + if (num >= 0) + { + oobeCompleted = flag; + } + return num; + } + + public unsafe int GetPurchaseEnabled(ref bool purchaseEnabled) + { + //IL_0040: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1220u); + return -2147418113; + } + bool flag = false; + IEndpointHost* p = spEndpointHost.p; + int result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 152)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyPurchaseEnabled, &flag); + purchaseEnabled = flag; + return result; + } + + public unsafe int SetPurchaseEnabled([MarshalAs(UnmanagedType.U1)] bool purchaseEnabled) + { + //IL_0036: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1265u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 216)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyPurchaseEnabled, purchaseEnabled ? ((byte)1) : ((byte)0)); + } + + public unsafe int GetAndResetLastLoginError(ref int hrLogin) + { + //IL_0042: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1279u); + return -2147418113; + } + int num = 0; + IEndpointHost* p = spEndpointHost.p; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 136)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyLastLoginError, &num); + int num3 = (hrLogin = ((num2 >= 0) ? num : 0)); + return num2; + } + + public unsafe int GetAndResetLastDownloadError(ref int hrDownload) + { + //IL_0042: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1301u); + return -2147418113; + } + int num = 0; + IEndpointHost* p = spEndpointHost.p; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 136)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyLastDownloadError, &num); + int num3 = (hrDownload = ((num2 >= 0) ? num : 0)); + return num2; + } + + public unsafe int LoadWlanProvider() + { + //IL_0067: Expected I, but got I8 + //IL_007d: Expected I, but got I8 + //IL_0082: Expected I, but got I8 + //IL_009c: Expected I, but got I8 + int num = 0; + if ((long)(nint)m_spWlanProvider.p == 0) + { + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 1325u); + return -2147467261; + } + CComPtrNtv_003CIWlanProvider_003E cComPtrNtv_003CIWlanProvider_003E; + *(long*)(&cComPtrNtv_003CIWlanProvider_003E) = 0L; + try + { + num = _003CModule_003E.GetInterfaceProperty_003Cstruct_0020IEndpointHost_002Cenum_0020EEndpointHostProperty_002Cstruct_0020IWlanProvider_003E(m_spEndpointHost.p, EEndpointHostProperty.eEndpointHostPropertyWlanProvider, (IWlanProvider**)(&cComPtrNtv_003CIWlanProvider_003E)); + if (num >= 0) + { + m_spWlanProvider.op_Assign((IWlanProvider*)(*(ulong*)(&cComPtrNtv_003CIWlanProvider_003E))); + DeviceMediator* p = m_spDeviceMediator.p; + DeviceMediator* ptr = (DeviceMediator*)((p == null) ? 0 : ((ulong)(nint)p + 16uL)); + IWlanProvider* p2 = m_spWlanProvider.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p2 + 24)))((nint)p2, (IZuneWlanCallback*)ptr); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIWlanProvider_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIWlanProvider_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIWlanProvider_003E_002ERelease(&cComPtrNtv_003CIWlanProvider_003E); + } + return num; + } + + public unsafe int SetWlanProfileList(WlanProfileList profileList) + { + //IL_0026: Expected I, but got I8 + //IL_0095: Expected I, but got I8 + //IL_00b0: Expected I, but got I8 + //IL_00d9: Expected I, but got I8 + //IL_0160: Expected I, but got I8 + //IL_0177: Expected I, but got I8 + //IL_0192: Expected I, but got I8 + //IL_01ad: Expected I, but got I8 + //IL_01d3: Expected I, but got I8 + //IL_022b: Expected I, but got I8 + //IL_024d: Expected I, but got I8 + //IL_0274: Expected I, but got I8 + //IL_0274: Expected I, but got I8 + //IL_0296: Expected I, but got I8 + //IL_02ae: Expected I, but got I8 + //IL_02c9: Expected I, but got I8 + //IL_02e4: Expected I, but got I8 + //IL_02f9: Expected I, but got I8 + //IL_031c: Expected I, but got I8 + //IL_03a5: Expected I, but got I8 + //IL_03b4: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1356u); + return -2147418113; + } + IWlanProfileList* ptr = null; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 29, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), m_iDeviceID); + } + int num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p, &ptr); + if (num >= 0) + { + int num2 = 0; + while (num2 < profileList.Count) + { + IWlanProfile* ptr2 = null; + WlanProfile wlanProfile = profileList[num2]; + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(wlanProfile.SSID))) + { + try + { + ushort* ptr4; + ushort* ptr5; + if (ptr3 != null) + { + ptr4 = _003CModule_003E.SysAllocString(ptr3); + ptr5 = null; + if ((!wlanProfile.Encrypted && (string)null == wlanProfile.Key) || (wlanProfile.Encrypted && null == wlanProfile.EncryptedKey)) + { + goto IL_035c; + } + if (!((string)null != wlanProfile.Key)) + { + goto IL_0142; + } + fixed (ushort* ptr6 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(wlanProfile.Key))) + { + try + { + if (ptr6 != null) + { + ptr5 = _003CModule_003E.SysAllocString(ptr6); + goto IL_0142; + } + } + catch + { + //try-fault + ptr6 = null; + throw; + } + } + goto IL_035d; + } + goto end_IL_00c5; + IL_0142: + IWlanProvider* p2 = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p2 + 32)))((nint)p2, &ptr2); + if (num >= 0) + { + IWlanProfile* intPtr = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 32)))((nint)intPtr, ptr4); + if (num >= 0) + { + IWlanProfile* intPtr2 = ptr2; + WirelessAuthenticationTypes auth = wlanProfile.Auth; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 48)))((nint)intPtr2, (_DOT11_AUTH_ALGORITHM)auth); + if (num >= 0) + { + IWlanProfile* intPtr3 = ptr2; + WirelessCiphers cipher = wlanProfile.Cipher; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 64)))((nint)intPtr3, (_DOT11_CIPHER_ALGORITHM)cipher); + if (num >= 0) + { + int num3 = (wlanProfile.PassPhrase ? 1 : 0); + IWlanProfile* intPtr4 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 80)))((nint)intPtr4, num3); + if (num >= 0) + { + if (wlanProfile.Encrypted) + { + num = ((256 < (nuint)wlanProfile.EncryptedKey.LongLength) ? (-2147024774) : num); + if (num < 0) + { + goto IL_02fa; + } + int num4 = 0; + _0024ArrayType_0024_0024_0024BY0BAA_0040E _0024ArrayType_0024_0024_0024BY0BAA_0040E; + if (0 < (nint)wlanProfile.EncryptedKey.LongLength) + { + _0024ArrayType_0024_0024_0024BY0BAA_0040E* ptr7 = &_0024ArrayType_0024_0024_0024BY0BAA_0040E; + do + { + *(byte*)ptr7 = wlanProfile.EncryptedKey[num4]; + num4++; + ptr7 = (_0024ArrayType_0024_0024_0024BY0BAA_0040E*)((ulong)(nint)ptr7 + 1uL); + } + while (num4 < (nint)wlanProfile.EncryptedKey.LongLength); + } + IWlanProfile* intPtr5 = ptr2; + IntPtr intPtr6 = (nint)wlanProfile.EncryptedKey.LongLength; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 96)))((nint)intPtr5, (byte*)(&_0024ArrayType_0024_0024_0024BY0BAA_0040E), (uint)(nint)intPtr6, 1); + } + else if (WirelessCiphers.None == wlanProfile.Cipher && 0 == _003CModule_003E.SysStringLen(ptr5)) + { + IWlanProfile* intPtr7 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 96)))((nint)intPtr7, null, 0u, 1); + } + else + { + long num5 = *(long*)ptr2 + 96; + IWlanProfile* intPtr8 = ptr2; + ushort* intPtr9 = ptr5; + uint num6 = _003CModule_003E.SysStringLen(intPtr9); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num5))((nint)intPtr8, (byte*)intPtr9, (uint)((ulong)num6 * 2uL), 0); + } + if (num >= 0) + { + IWlanProfile* intPtr10 = ptr2; + uint keyIndex = wlanProfile.KeyIndex; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 112)))((nint)intPtr10, keyIndex); + if (num >= 0) + { + IWlanProfile* intPtr11 = ptr2; + uint signalQuality = wlanProfile.SignalQuality; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 144)))((nint)intPtr11, signalQuality); + if (num >= 0) + { + IWlanProfile* intPtr12 = ptr2; + bool connected = wlanProfile.Connected; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 160)))((nint)intPtr12, connected ? 1 : 0); + if (num >= 0) + { + IWlanProfileList* intPtr13 = ptr; + IWlanProfile* intPtr14 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 40)))((nint)intPtr13, intPtr14); + } + } + } + } + } + } + } + } + } + goto IL_02fa; + IL_02fa: + _003CModule_003E.SysFreeString(ptr4); + _003CModule_003E.SysFreeString(ptr5); + if (0L != (nint)ptr2) + { + IWlanProfile* intPtr15 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr15 + 16)))((nint)intPtr15); + } + goto IL_032a; + end_IL_00c5:; + } + catch + { + //try-fault + ptr3 = null; + throw; + } + try + { + _003CModule_003E._ZuneShipAssert(1002u, 1382u); + } + catch + { + //try-fault + ptr3 = null; + throw; + } + goto IL_0353; + IL_035d: + try + { + try + { + _003CModule_003E._ZuneShipAssert(1002u, 1398u); + } + catch + { + //try-fault + throw; + } + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + return -2147418113; + IL_032a: + num2++; + if (num < 0) + { + break; + } + continue; + IL_035c: + return -2147024809; + IL_0353: + return -2147418113; + } + IWlanProvider* p3 = m_spWlanProvider.p; + IWlanProfileList* intPtr16 = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p3 + 48)))((nint)p3, intPtr16); + IWlanProfileList* intPtr17 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr17 + 16)))((nint)intPtr17); + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 30, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), num); + } + return num; + } + + public unsafe int GetWlanProfileList(ref WlanProfileList profileList) + { + //IL_0025: Expected I, but got I8 + //IL_0094: Expected I, but got I8 + //IL_00ae: Expected I, but got I8 + //IL_00c5: Expected I, but got I8 + //IL_00d6: Expected I, but got I8 + //IL_00e2: Expected I, but got I8 + //IL_010d: Expected I, but got I8 + //IL_0124: Expected I, but got I8 + //IL_013b: Expected I, but got I8 + //IL_0152: Expected I, but got I8 + //IL_016d: Expected I, but got I8 + //IL_0184: Expected I, but got I8 + //IL_019e: Expected I, but got I8 + //IL_01b8: Expected I, but got I8 + //IL_023f: Expected I, but got I8 + //IL_0294: Expected I, but got I8 + //IL_02af: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1503u); + return -2147418113; + } + IWlanProfileList* ptr = null; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 31, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), m_iDeviceID); + } + int num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 56)))((nint)p, &ptr); + if (num >= 0) + { + int num2 = 0; + IWlanProfileList* intPtr = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 32)))((nint)intPtr, &num2); + int num3 = 0; + if (num >= 0) + { + while (num3 < num2) + { + IWlanProfile* ptr2 = null; + IWlanProfileList* intPtr2 = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 48)))((nint)intPtr2, num3, &ptr2); + if (num >= 0) + { + ushort* ptr3 = null; + _DOT11_AUTH_ALGORITHM auth = (_DOT11_AUTH_ALGORITHM)1; + _DOT11_CIPHER_ALGORITHM cipher = (_DOT11_CIPHER_ALGORITHM)0; + int num4 = 0; + uint num5 = 256u; + int num6 = 0; + uint keyIndex = 0u; + uint signalQuality = 0u; + int num7 = 0; + IWlanProfile* intPtr3 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 24)))((nint)intPtr3, &ptr3); + if (num >= 0) + { + IWlanProfile* intPtr4 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 40)))((nint)intPtr4, &auth); + if (num >= 0) + { + IWlanProfile* intPtr5 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 56)))((nint)intPtr5, &cipher); + if (num >= 0) + { + IWlanProfile* intPtr6 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 72)))((nint)intPtr6, &num4); + if (num >= 0) + { + IWlanProfile* intPtr7 = ptr2; + _0024ArrayType_0024_0024_0024BY0BAA_0040E _0024ArrayType_0024_0024_0024BY0BAA_0040E; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 88)))((nint)intPtr7, (byte*)(&_0024ArrayType_0024_0024_0024BY0BAA_0040E), &num5, &num6); + if (num >= 0) + { + IWlanProfile* intPtr8 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 104)))((nint)intPtr8, &keyIndex); + if (num >= 0) + { + IWlanProfile* intPtr9 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 136)))((nint)intPtr9, &signalQuality); + if (num >= 0) + { + IWlanProfile* intPtr10 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 152)))((nint)intPtr10, &num7); + if (num >= 0) + { + WlanProfile wlanProfile = new WlanProfile(); + wlanProfile.SSID = new string((char*)ptr3); + wlanProfile.Auth = (WirelessAuthenticationTypes)auth; + wlanProfile.Cipher = (WirelessCiphers)cipher; + byte b = ((wlanProfile.PassPhrase = ((num4 != 0) ? true : false)) ? ((byte)1) : ((byte)0)); + if (0 == num5) + { + wlanProfile.EncryptedKey = new byte[0]; + } + else if (num6 != 0) + { + wlanProfile.EncryptedKey = new byte[num5]; + uint num8 = 0u; + if (0 < num5) + { + _0024ArrayType_0024_0024_0024BY0BAA_0040E* ptr4 = &_0024ArrayType_0024_0024_0024BY0BAA_0040E; + do + { + wlanProfile.EncryptedKey[num8] = *(byte*)ptr4; + num8++; + ptr4 = (_0024ArrayType_0024_0024_0024BY0BAA_0040E*)((ulong)(nint)ptr4 + 1uL); + } + while (num8 < num5); + } + } + else + { + wlanProfile.Key = new string((char*)(&_0024ArrayType_0024_0024_0024BY0BAA_0040E)); + } + wlanProfile.KeyIndex = keyIndex; + wlanProfile.SignalQuality = signalQuality; + byte b2 = ((wlanProfile.Connected = num7 == 1) ? ((byte)1) : ((byte)0)); + profileList.Add(wlanProfile); + } + } + } + } + } + } + } + } + _003CModule_003E.SysFreeString(ptr3); + if (0L != (nint)ptr2) + { + IWlanProfile* intPtr11 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr11 + 16)))((nint)intPtr11); + } + } + num3++; + if (num < 0) + { + break; + } + } + } + } + } + IWlanProfileList* intPtr12 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr12 + 16)))((nint)intPtr12); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 32, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), num); + } + return num; + } + + public unsafe int GetWlanProfiles() + { + //IL_0044: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1636u); + return -2147418113; + } + int num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 64)))((nint)p); + } + return num; + } + + public unsafe int IsWlanFirewallEnabled(ref bool bEnabled) + { + //IL_004a: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1664u); + return -2147418113; + } + int num = 0; + int num2 = LoadWlanProvider(); + if (num2 >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 72)))((nint)p, &num); + } + bool flag = (bEnabled = ((num != 0) ? true : false)); + return num2; + } + + public void GetWlanProfilesComplete(int hr) + { + if (m_GetWlanProfilesComplete != null) + { + m_GetWlanProfilesComplete(this, hr); + } + } + + public unsafe int GetDeviceWlanNetworks() + { + //IL_0044: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1686u); + return -2147418113; + } + int num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 80)))((nint)p); + } + return num; + } + + public void GetDeviceWlanNetworksComplete(int hr) + { + if (m_GetDeviceWlanNetworksComplete != null) + { + m_GetDeviceWlanNetworksComplete(this, hr); + } + } + + public unsafe int GetDeviceWlanProfiles() + { + //IL_0044: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1714u); + return -2147418113; + } + int num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 88)))((nint)p); + } + return num; + } + + public void GetDeviceWlanProfilesComplete(int hr) + { + if (m_GetDeviceWlanProfilesComplete != null) + { + m_GetDeviceWlanProfilesComplete(this, hr); + } + } + + public unsafe int SetDeviceWlanProfiles() + { + //IL_0044: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1742u); + return -2147418113; + } + int num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 96)))((nint)p); + } + return num; + } + + public void SetDeviceWlanProfilesComplete(int hr) + { + if (m_SetDeviceWlanProfilesComplete != null) + { + m_SetDeviceWlanProfilesComplete(this, hr); + } + } + + public unsafe int GetWlanDeviceAuthCipherPairList(ref WlanAuthCipherPairList authCipherPairList) + { + //IL_0025: Expected I, but got I8 + //IL_0094: Expected I, but got I8 + //IL_00ab: Expected I, but got I8 + //IL_00c7: Expected I, but got I8 + //IL_0103: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1770u); + return -2147418113; + } + IWlanAuthCipherPairList* ptr = null; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 33, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), m_iDeviceID); + } + int num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 104)))((nint)p, &ptr); + if (num >= 0) + { + int num2 = 0; + IWlanAuthCipherPairList* intPtr = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 32)))((nint)intPtr, &num2); + int num3 = 0; + if (num >= 0) + { + while (num3 < num2) + { + IWlanAuthCipherPairList* intPtr2 = ptr; + DOT11_AUTH_CIPHER_PAIR dOT11_AUTH_CIPHER_PAIR; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 48)))((nint)intPtr2, num3, &dOT11_AUTH_CIPHER_PAIR); + if (num >= 0) + { + WlanAuthCipherPair wlanAuthCipherPair = new WlanAuthCipherPair(); + wlanAuthCipherPair.Auth = *(WirelessAuthenticationTypes*)(&dOT11_AUTH_CIPHER_PAIR); + wlanAuthCipherPair.Cipher = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref dOT11_AUTH_CIPHER_PAIR, 4)); + authCipherPairList.Add(wlanAuthCipherPair); + } + num3++; + if (num < 0) + { + break; + } + } + } + IWlanAuthCipherPairList* intPtr3 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 34, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), num); + } + return num; + } + + public unsafe int GetDisconnectedWlanDeviceUuid(ref string strDeviceUuid) + { + //IL_0025: Expected I, but got I8 + //IL_004b: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1818u); + return -2147418113; + } + ushort* ptr = null; + int num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 112)))((nint)p, &ptr); + if (num >= 0) + { + strDeviceUuid = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + } + return num; + } + + public unsafe int GetAssociatedWlanDeviceUuidList(ref List deviceUuidList) + { + //IL_0071: Expected I, but got I8 + //IL_0091: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1845u); + return -2147418113; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 35, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), m_iDeviceID); + } + int num = LoadWlanProvider(); + uint num2 = 0u; + do + { + ushort* ptr = null; + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 120)))((nint)p, num2, &ptr); + if (num >= 0) + { + string item = new string((char*)ptr); + deviceUuidList.Add(item); + _003CModule_003E.SysFreeString(ptr); + } + } + num2++; + } + while (num >= 0); + if (-2147024894 == num || -2147024637 == num) + { + num = 0; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 36, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), num); + } + return num; + } + + public unsafe int AssociateWlanDevice() + { + //IL_0047: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1893u); + return -2147418113; + } + int num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 128)))((nint)p); + } + return num; + } + + public void AssociateWlanDeviceComplete(int hr) + { + if (m_AssociateWlanDeviceComplete != null) + { + m_AssociateWlanDeviceComplete(this, hr); + } + } + + public unsafe int UnassociateWlanDevice() + { + //IL_0047: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1921u); + return -2147418113; + } + int num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 136)))((nint)p); + } + return num; + } + + public void UnassociateWlanDeviceComplete(int hr) + { + if (m_UnassociateWlanDeviceComplete != null) + { + m_UnassociateWlanDeviceComplete(this, hr); + } + } + + public unsafe int UnassociateWlanDeviceUuid(string strDeviceUuid) + { + //IL_0058: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1949u); + return -2147418113; + } + int num = 0; + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strDeviceUuid))) + { + if (ptr != null) + { + num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + long num2 = *(long*)p + 144; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)p, ptr); + } + } + return num; + } + } + + public unsafe int IsWlanDeviceDisabled(ref bool bDisabled) + { + //IL_004d: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1973u); + return -2147418113; + } + int num = 1; + int num2 = LoadWlanProvider(); + if (num2 >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 152)))((nint)p, &num); + } + bool flag = (bDisabled = ((num != 0) ? true : false)); + return num2; + } + + public unsafe int IsWlanDeviceUuidDisabled(string strDeviceUuid, ref bool bDisabled) + { + //IL_005f: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1995u); + return -2147418113; + } + int num = 0; + int num2 = 1; + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strDeviceUuid))) + { + if (ptr != null) + { + num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + long num3 = *(long*)p + 160; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)p, ptr, &num2); + } + } + bool flag = (bDisabled = ((num2 != 0) ? true : false)); + return num; + } + } + + public unsafe int TestDeviceWlan() + { + //IL_0047: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2022u); + return -2147418113; + } + int num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 168)))((nint)p); + } + return num; + } + + public unsafe int CancelTestDeviceWlan() + { + //IL_0047: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2041u); + return -2147418113; + } + int num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 176)))((nint)p); + } + return num; + } + + public unsafe void TestDeviceWlanComplete(int hr) + { + //IL_002b: Expected I, but got I8 + uint result = 7u; + int num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 184)))((nint)p, &result); + if (num >= 0) + { + goto IL_003a; + } + } + hr = ((hr >= 0) ? num : hr); + goto IL_003a; + IL_003a: + if (m_TestDeviceWlanComplete != null) + { + m_TestDeviceWlanComplete(this, (WlanTestResultCode)result, hr); + } + } + + public unsafe int GetDeviceWlanConnectedSSID(ref string strSSID) + { + //IL_0025: Expected I, but got I8 + //IL_004e: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2089u); + return -2147418113; + } + ushort* ptr = null; + int num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 192)))((nint)p, &ptr); + if (num >= 0) + { + strSSID = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + } + return num; + } + + public unsafe int GetDeviceWlanMediaSyncSSID(ref string strSSID) + { + //IL_0025: Expected I, but got I8 + //IL_004e: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2116u); + return -2147418113; + } + ushort* ptr = null; + int num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 200)))((nint)p, &ptr); + if (num >= 0) + { + strSSID = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + } + return num; + } + + public unsafe int SetDeviceWlanMediaSyncSSID(string strSSID) + { + //IL_0056: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2143u); + return -2147418113; + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strSSID))) + { + int num; + if (ptr != null) + { + num = LoadWlanProvider(); + if (num >= 0) + { + IWlanProvider* p = m_spWlanProvider.p; + long num2 = *(long*)p + 208; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)p, ptr); + } + } + else + { + num = -2147467261; + } + return num; + } + } + + public unsafe int GetSyncRelationship(ref ESyncRelationship relationship) + { + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2172u); + return -2147418113; + } + ESyncRelationship eSyncRelationship = ESyncRelationship.srNone; + int num = _003CModule_003E.GetEnumProperty_003Cstruct_0020IEndpointHost_002Cenum_0020EEndpointHostProperty_002Cenum_0020ESyncRelationship_003E(p, EEndpointHostProperty.eEndpointHostPropertySyncRelationship, &eSyncRelationship); + if (num >= 0) + { + relationship = eSyncRelationship; + } + return num; + } + + public unsafe int SetSyncRelationship(ESyncRelationship relationship) + { + //IL_0037: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2196u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 200)))((nint)p, EEndpointHostProperty.eEndpointHostPropertySyncRelationship, (int)relationship); + } + + public unsafe int GetPromptGuest(ref bool bPromptGuest) + { + //IL_0037: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2206u); + return -2147418113; + } + bool flag; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 248)))((nint)p, EEndpointHostSetting.eEndpointHostSettingPromptGuest, &flag); + if (num >= 0) + { + bPromptGuest = flag; + } + return num; + } + + public unsafe int SetPromptGuest([MarshalAs(UnmanagedType.U1)] bool bPromptGuest) + { + //IL_0036: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2225u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 280)))((nint)p, EEndpointHostSetting.eEndpointHostSettingPromptGuest, bPromptGuest ? ((byte)1) : ((byte)0)); + } + + public unsafe int GetPromptLink(ref bool bPromptLink) + { + //IL_0037: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2236u); + return -2147418113; + } + bool flag; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 248)))((nint)p, EEndpointHostSetting.eEndpointHostSettingPromptLink, &flag); + if (num >= 0) + { + bPromptLink = flag; + } + return num; + } + + public unsafe int SetPromptLink([MarshalAs(UnmanagedType.U1)] bool bPromptLink) + { + //IL_0036: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2255u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 280)))((nint)p, EEndpointHostSetting.eEndpointHostSettingPromptLink, bPromptLink ? ((byte)1) : ((byte)0)); + } + + public unsafe int GetFirmwareVersion(ref string strFirmwareVersion) + { + //IL_0027: Expected I, but got I8 + //IL_003f: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2266u); + return -2147418113; + } + ushort* ptr = null; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 120)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyFirmwareVersion, &ptr); + if (num >= 0 && ptr != null) + { + strFirmwareVersion = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return num; + } + + public unsafe int GetSpaceFree(ref ulong ui64SpaceFree) + { + //IL_0042: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2286u); + return -2147418113; + } + ulong num = 0uL; + IEndpointHost* p = spEndpointHost.p; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 128)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyAvailableSpace, &num); + if (num2 >= 0) + { + ui64SpaceFree = num; + } + return num2; + } + + public unsafe int GetSyncOnConnect(ref bool bSyncOnConnect) + { + //IL_0037: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2306u); + return -2147418113; + } + bool flag; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 248)))((nint)p, EEndpointHostSetting.eEndpointHostSettingSyncOnConnect, &flag); + if (num >= 0) + { + bSyncOnConnect = flag; + } + return num; + } + + public unsafe int SetSyncOnConnect([MarshalAs(UnmanagedType.U1)] bool bSyncOnConnect) + { + //IL_0036: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2326u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 280)))((nint)p, EEndpointHostSetting.eEndpointHostSettingSyncOnConnect, bSyncOnConnect ? ((byte)1) : ((byte)0)); + } + + public unsafe int GetPercentSpaceReserved(ref uint ulPercentage) + { + //IL_0038: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2336u); + return -2147418113; + } + uint num; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 144)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyPercentSpaceReserved, &num); + if (num2 >= 0) + { + ulPercentage = num; + } + return num2; + } + + public unsafe int SetPercentSpaceReserved(uint ulPercentage) + { + //IL_0037: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2356u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 208)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyPercentSpaceReserved, ulPercentage); + } + + public unsafe int DeleteMedia(int[] rgIds, EMediaTypes mediaType, ref ESyncOperationStatus operationStatus) + { + //IL_0103: Expected I, but got I8 + if (m_spSyncEngine.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2366u); + return -2147418113; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 37, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), m_iDeviceID); + } + fixed (int* ptr3 = &rgIds[0]) + { + int num = ((EMediaTypes.eMediaTypeFolder != mediaType) ? m_syncRules.Remove(rgIds, mediaType, fDeviceFolderIds: false) : m_syncRules.Remove(rgIds, EMediaTypes.eMediaTypeFolder, fDeviceFolderIds: true)); + if (num >= 0) + { + num = m_syncRules.Exclude(rgIds, mediaType); + } + int num2 = rgIds.Length; + int[] array = new int[num2]; + int num3 = 0; + if (0 < num2) + { + do + { + array[num3] = (int)mediaType; + num3++; + } + while (num3 < (nint)rgIds.LongLength); + } + fixed (int* ptr = &array[0]) + { + try + { + int* ptr2 = ptr; + ESyncOperationStatus eSyncOperationStatus = ESyncOperationStatus.osInvalid; + if (num >= 0) + { + ISyncEngine* p = m_spSyncEngine.p; + IntPtr intPtr = (nint)rgIds.LongLength; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 200)))((nint)p, (int)(nint)intPtr, ptr3, ptr2, &eSyncOperationStatus); + if (num >= 0) + { + operationStatus = eSyncOperationStatus; + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 38, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), num); + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + return num; + } + } + + public unsafe int ReverseSync(int[] rgIds, EMediaTypes mediaType, ref ESyncOperationStatus operationStatus) + { + //IL_00c7: Expected I, but got I8 + if (m_spSyncEngine.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2461u); + return -2147418113; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 39, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), m_iDeviceID); + } + fixed (int* ptr3 = &rgIds[0]) + { + int num = rgIds.Length; + int[] array = new int[num]; + int num2 = 0; + if (0 < num) + { + do + { + array[num2] = (int)mediaType; + num2++; + } + while (num2 < (nint)rgIds.LongLength); + } + int num3; + fixed (int* ptr = &array[0]) + { + try + { + int* ptr2 = ptr; + ESyncOperationStatus eSyncOperationStatus = ESyncOperationStatus.osInvalid; + ISyncEngine* p = m_spSyncEngine.p; + IntPtr intPtr = (nint)rgIds.LongLength; + num3 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 208)))((nint)p, (int)(nint)intPtr, ptr3, ptr2, &eSyncOperationStatus); + if (num3 >= 0) + { + operationStatus = eSyncOperationStatus; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 40, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), num3); + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + return num3; + } + } + + public unsafe int GetDeviceVideoDeleteSet(out int[] rgIds) + { + //IL_005f: Expected I, but got I8 + //IL_005f: Expected I, but got I8 + //IL_007f: Expected I, but got I8 + //IL_007f: Expected I, but got I8 + CComPtrNtv_003CIMetadataManager_003E cComPtrNtv_003CIMetadataManager_003E; + *(long*)(&cComPtrNtv_003CIMetadataManager_003E) = 0L; + int num; + try + { + CComPtrNtv_003CIDeviceContentProvider_003E cComPtrNtv_003CIDeviceContentProvider_003E; + *(long*)(&cComPtrNtv_003CIDeviceContentProvider_003E) = 0L; + try + { + IntSet intSet; + *(int*)(&intSet) = 0; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref intSet, 4)) = -1; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref intSet, 8)) = -1; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref intSet, 12)) = 0; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref intSet, 16)) = 0L; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref intSet, 24)) = 0L; + try + { + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_6dd7146d_7a19_4fbb_9235_9e6c382fcc71, (void**)(&cComPtrNtv_003CIMetadataManager_003E)); + if (num >= 0) + { + long num2 = *(long*)(&cComPtrNtv_003CIMetadataManager_003E); + __s_GUID gUID_7472ae89_073d_420b_9828_51f9d80ca2a = _003CModule_003E._GUID_7472ae89_073d_420b_9828_51f9d80ca2a6; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIMetadataManager_003E)) + 24)))((nint)num2, (_GUID)gUID_7472ae89_073d_420b_9828_51f9d80ca2a, (void**)(&cComPtrNtv_003CIDeviceContentProvider_003E)); + if (num >= 0) + { + long num3 = *(long*)(&cComPtrNtv_003CIDeviceContentProvider_003E); + int iDeviceID = m_iDeviceID; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIDeviceContentProvider_003E)) + 96)))((nint)num3, iDeviceID, &intSet); + if (num >= 0 && !(System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref intSet, 8)) == -1)) + { + rgIds = new int[_003CModule_003E.DataStructs_002EIntSet_002EMemberCount(&intSet)]; + int num4 = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref intSet, 4)); + int num5 = 0; + if (System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref intSet, 4)) != -1) + { + do + { + rgIds[num5] = num4; + num5++; + num4 = _003CModule_003E.DataStructs_002EIntSet_002EGetNextMember(&intSet, num4); + } + while (num4 != -1); + } + } + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.DataStructs_002EIntSet_002E_007Bdtor_007D), &intSet); + throw; + } + _003CModule_003E.DataStructs_002EIntSet_002EFreeData(&intSet); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIDeviceContentProvider_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIDeviceContentProvider_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIDeviceContentProvider_003E_002ERelease(&cComPtrNtv_003CIDeviceContentProvider_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIMetadataManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIMetadataManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIMetadataManager_003E_002ERelease(&cComPtrNtv_003CIMetadataManager_003E); + return num; + } + + public unsafe int GetVideoTranscodeOptimization(ref ETranscodeOptimization transcodeOptimization) + { + //IL_0040: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2500u); + return -2147418113; + } + ETranscodeOptimization eTranscodeOptimization = ETranscodeOptimization.toOptimizeForSize; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 232)))((nint)p, EEndpointHostSetting.eEndpointHostSettingVideoTranscodeOptimization, (int*)(&eTranscodeOptimization)); + if (num >= 0) + { + transcodeOptimization = eTranscodeOptimization; + } + return num; + } + + public unsafe int SetVideoTranscodeOptimization(ETranscodeOptimization transcodeOptimization) + { + //IL_0036: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2519u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 264)))((nint)p, EEndpointHostSetting.eEndpointHostSettingVideoTranscodeOptimization, (int)transcodeOptimization); + } + + public unsafe int GetPhotoVideoReverseSync(ref bool bReverseSync) + { + //IL_0040: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2530u); + return -2147418113; + } + bool flag = false; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 248)))((nint)p, EEndpointHostSetting.eEndpointHostSettingReverseSyncUGC, &flag); + if (num >= 0) + { + bReverseSync = flag; + } + return num; + } + + public unsafe int SetPhotoVideoReverseSync([MarshalAs(UnmanagedType.U1)] bool bReverseSync) + { + //IL_0036: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2551u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 280)))((nint)p, EEndpointHostSetting.eEndpointHostSettingReverseSyncUGC, bReverseSync ? ((byte)1) : ((byte)0)); + } + + public unsafe int GetDeletePhotoVideoAfterReverseSync(ref bool bDeleteAfterSync) + { + //IL_0041: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2563u); + return -2147418113; + } + bool flag = false; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 248)))((nint)p, EEndpointHostSetting.eEndpointHostSettingDeleteUGCAfterSync, &flag); + if (num >= 0) + { + bDeleteAfterSync = flag; + } + return num; + } + + public unsafe int SetDeletePhotoVideoAfterReverseSync([MarshalAs(UnmanagedType.U1)] bool bDeleteAfterSync) + { + //IL_0037: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2584u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 280)))((nint)p, EEndpointHostSetting.eEndpointHostSettingDeleteUGCAfterSync, bDeleteAfterSync ? ((byte)1) : ((byte)0)); + } + + public unsafe int GetCameraRollDestinationFolder(ref string strDestinationFolder) + { + //IL_0027: Expected I, but got I8 + //IL_0042: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2596u); + return -2147418113; + } + ushort* ptr = null; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 224)))((nint)p, EEndpointHostSetting.eEndpointHostCameraRollDestinationFolder, &ptr); + if (num >= 0 && ptr != null) + { + strDestinationFolder = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return num; + } + + public unsafe int SetCameraRollDestinationFolder(string strDestinationFolder) + { + //IL_004d: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2619u); + return -2147418113; + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strDestinationFolder))) + { + int result; + if (ptr != null) + { + IEndpointHost* p = m_spEndpointHost.p; + long num = *(long*)p + 256; + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)p, EEndpointHostSetting.eEndpointHostCameraRollDestinationFolder, ptr); + } + else + { + result = -2147418113; + } + return result; + } + } + + public unsafe int GetSavedDestinationFolder(ref string strDestinationFolder) + { + //IL_0027: Expected I, but got I8 + //IL_0042: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2643u); + return -2147418113; + } + ushort* ptr = null; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 224)))((nint)p, EEndpointHostSetting.eEndpointHostSavedDestinationFolder, &ptr); + if (num >= 0 && ptr != null) + { + strDestinationFolder = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return num; + } + + public unsafe int SetSavedDestinationFolder(string strDestinationFolder) + { + //IL_004d: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2666u); + return -2147418113; + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strDestinationFolder))) + { + int result; + if (ptr != null) + { + IEndpointHost* p = m_spEndpointHost.p; + long num = *(long*)p + 256; + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)p, EEndpointHostSetting.eEndpointHostSavedDestinationFolder, ptr); + } + else + { + result = -2147418113; + } + return result; + } + } + + public unsafe int GetPhotoTranscodeSetting(ref ETranscodePhotoSetting ePhotoSetting) + { + //IL_0040: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2690u); + return -2147418113; + } + ETranscodePhotoSetting eTranscodePhotoSetting = ETranscodePhotoSetting.tsPhotoSettingDevicePreferred; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 232)))((nint)p, EEndpointHostSetting.eEndpointHostSettingPhotoTranscodeSetting, (int*)(&eTranscodePhotoSetting)); + if (num >= 0) + { + ePhotoSetting = eTranscodePhotoSetting; + } + return num; + } + + public unsafe int SetPhotoTranscodeSetting(ETranscodePhotoSetting ePhotoSetting) + { + //IL_0036: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2709u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 264)))((nint)p, EEndpointHostSetting.eEndpointHostSettingPhotoTranscodeSetting, (int)ePhotoSetting); + } + + public unsafe int GetAudioTranscodeParams(ref int audioThresholdBitRate, ref int audioTargetBitRate) + { + //IL_0023: Expected I, but got I8 + //IL_0047: Expected I, but got I8 + uint num = 0u; + uint num2 = 0u; + IEndpointHost* p = m_spEndpointHost.p; + int num3 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 240)))((nint)p, EEndpointHostSetting.eEndpointHostSettingAudioThresholdBitRate, &num); + if (num3 >= 0) + { + p = m_spEndpointHost.p; + num3 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 240)))((nint)p, EEndpointHostSetting.eEndpointHostSettingAudioTargetBitRate, &num2); + if (num3 >= 0) + { + audioThresholdBitRate = (int)num; + audioTargetBitRate = (int)num2; + } + } + return num3; + } + + public unsafe int SetAudioTranscodeParams(int audioThresholdBitRate, int audioTargetBitRate) + { + //IL_001e: Expected I, but got I8 + //IL_0041: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 272)))((nint)p, EEndpointHostSetting.eEndpointHostSettingAudioThresholdBitRate, (uint)audioThresholdBitRate); + if (num >= 0) + { + p = m_spEndpointHost.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 272)))((nint)p, EEndpointHostSetting.eEndpointHostSettingAudioTargetBitRate, (uint)audioTargetBitRate); + } + return num; + } + + public unsafe int GetLocalizedDevicePath(ref string strPath) + { + //IL_0025: Expected I, but got I8 + //IL_0052: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2770u); + return -2147418113; + } + ushort* ptr = null; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strPath))) + { + IEndpointHost* p = m_spEndpointHost.p; + long num = *(long*)p + 288; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)p, EEndpointHostAction.eEndpointHostActionLocalizeDevicePath, ptr2, &ptr); + if (num2 >= 0 && ptr != null) + { + strPath = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return num2; + } + } + + public unsafe int ClearCache() + { + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2794u); + return -2147418113; + } + DeviceList instance = DeviceList.Instance; + int result; + if (instance != null) + { + IEndpointHost* p = m_spEndpointHost.p; + result = instance.ForgetEndpoint(p); + } + else + { + result = -2147418113; + } + return result; + } + + public unsafe int ClearRules() + { + //IL_0036: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2815u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 296)))((nint)p, EEndpointHostAction.eEndpointHostActionClearRules); + } + + public unsafe int ClearManualModeRules() + { + //IL_0036: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2826u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 296)))((nint)p, EEndpointHostAction.eEndpointHostActionClearManualModeRules); + } + + public unsafe int DeleteAllGuestContent(ref ESyncOperationStatus operationStatus) + { + //IL_003f: Expected I, but got I8 + CComPtrMgd_003CISyncEngine_003E spSyncEngine = m_spSyncEngine; + if (spSyncEngine.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2836u); + return -2147418113; + } + ESyncOperationStatus eSyncOperationStatus = ESyncOperationStatus.osInvalid; + ISyncEngine* p = spSyncEngine.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 224)))((nint)p, &eSyncOperationStatus); + if (num >= 0) + { + operationStatus = eSyncOperationStatus; + } + return num; + } + + public unsafe int ForceAppUpdate() + { + //IL_0035: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2853u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 296)))((nint)p, EEndpointHostAction.eEndpointHostActionForceAppUpdate); + } + + public int SyncBeginCallback() + { + if (m_SyncBegan != null) + { + m_SyncBegan(this); + } + return 0; + } + + public unsafe int SyncProgressCallback(uint uiPercentComplete, uint uiPercentItemComplete, uint uiPercentTranscodeComplete, ushort* bstrGroup, ushort* bstrTitle, ESyncEngineState engineState) + { + if (m_SyncProgressed != null) + { + m_SyncProgressed(this, uiPercentComplete, uiPercentItemComplete, uiPercentTranscodeComplete, new string((char*)bstrGroup), new string((char*)bstrTitle), engineState); + } + return 0; + } + + public int SyncCompleteCallback(int hrResult) + { + if (m_SyncCompleted != null) + { + ESyncEventReason reason = ((hrResult < 0) ? ESyncEventReason.eSyncEventFailed : ESyncEventReason.eSyncEventSucceeded); + m_SyncCompleted(this, reason); + } + return 0; + } + + public unsafe void FriendlyNameChanged(ushort* wszFriendlyName) + { + if (m_FriendlyNameChanged != null) + { + m_FriendlyNameChanged(this, new string((char*)wszFriendlyName)); + } + } + + public unsafe void EndpointStatusChanged(int hrEnumeration, EEndpointStatus eDeviceStatus) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_Dd(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 41, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), (uint)hrEnumeration, m_iDeviceID); + } + m_hrEnumeration = hrEnumeration; + if (eDeviceStatus == EEndpointStatus.eEndpointStatusAvailable && !m_fInitializationCompleted) + { + int num = CompleteInitialization(); + if (-1072885173 == num || -1072885172 == num) + { + DeviceList.Instance.HideDevice(this); + } + } + m_eLastDeviceStatus = eDeviceStatus; + if (m_DeviceStatusChanged != null) + { + m_DeviceStatusChanged(this, m_hrEnumeration, eDeviceStatus); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 42, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids)); + } + } + + public void FormatComplete(int hrResult) + { + if (m_FormatComplete != null) + { + m_FormatComplete(this, hrResult); + } + } + + public unsafe int FileExistsForTranscode(int iMediaId, EMediaTypes eMediaType, ref string strTranscodedFileName) + { + //IL_0027: Expected I, but got I8 + //IL_0042: Expected I, but got I8 + CComPtrMgd_003CISyncEngine_003E spSyncEngine = m_spSyncEngine; + if (spSyncEngine.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 2986u); + return -2147418113; + } + ushort* ptr = null; + ISyncEngine* p = spSyncEngine.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 192)))((nint)p, iMediaId, (int)eMediaType, &ptr); + if (num >= 0 && ptr != null) + { + strTranscodedFileName = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return num; + } + + internal unsafe Device() + { + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = new CComPtrMgd_003CIEndpointHost_003E(); + try + { + m_spEndpointHost = spEndpointHost; + CComPtrMgd_003CISyncEngine_003E spSyncEngine = new CComPtrMgd_003CISyncEngine_003E(); + try + { + m_spSyncEngine = spSyncEngine; + CComPtrMgd_003CIWlanProvider_003E spWlanProvider = new CComPtrMgd_003CIWlanProvider_003E(); + try + { + m_spWlanProvider = spWlanProvider; + CComPtrMgd_003CDeviceMediator_003E spDeviceMediator = new CComPtrMgd_003CDeviceMediator_003E(); + try + { + m_spDeviceMediator = spDeviceMediator; + base._002Ector(); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 10, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids)); + } + m_Lock = new object(); + m_eLastDeviceStatus = EEndpointStatus.eEndpointStatusUndefined; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 11, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids)); + } + } + catch + { + //try-fault + ((IDisposable)m_spDeviceMediator).Dispose(); + throw; + } + } + catch + { + //try-fault + ((IDisposable)m_spWlanProvider).Dispose(); + throw; + } + } + catch + { + //try-fault + ((IDisposable)m_spSyncEngine).Dispose(); + throw; + } + } + catch + { + //try-fault + ((IDisposable)m_spEndpointHost).Dispose(); + throw; + } + } + + internal unsafe int Initialize(IEndpointHost* pEndpointHost) + { + //IL_01a6: Expected I, but got I8 + //IL_01e2: Expected I, but got I8 + //IL_0233: Expected I, but got I8 + //IL_0246: Expected I, but got I8 + //IL_0266: Expected I, but got I8 + //IL_02ab: Expected I, but got I8 + ManagedLock managedLock = null; + int num = 0; + if (pEndpointHost == null) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 14, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids)); + } + return -2147467261; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 15, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids)); + } + ManagedLock managedLock2 = new ManagedLock(m_Lock); + try + { + managedLock = managedLock2; + m_fInitializationCompleted = false; + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p != pEndpointHost) + { + spEndpointHost.op_Assign(pEndpointHost); + } + EEndpointStatus eLastDeviceStatus = EEndpointStatus.eEndpointStatusUndefined; + if (_003CModule_003E.GetEndpointHostEnumProperty_003Cenum_0020EEndpointStatus_003E(m_spEndpointHost.p, EEndpointHostProperty.eEndpointHostPropertyEndpointStatus, &eLastDeviceStatus) >= 0) + { + m_eLastDeviceStatus = eLastDeviceStatus; + } + else + { + m_eLastDeviceStatus = EEndpointStatus.eEndpointStatusUndefined; + } + SyncRules syncRules = m_syncRules; + if (syncRules != null) + { + ((IDisposable)syncRules).Dispose(); + m_syncRules = null; + } + if ((m_syncRules = new SyncRules(pEndpointHost)) == null) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 2u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 16, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), 0); + } + num = -2147024882; + } + m_spSyncEngine.Release(); + DeviceMediator* p = m_spDeviceMediator.p; + CComPtrNtv_003CDeviceMediator_003E cComPtrNtv_003CDeviceMediator_003E; + _003CModule_003E.CComPtrNtv_003CDeviceMediator_003E_002E_007Bctor_007D(&cComPtrNtv_003CDeviceMediator_003E, p); + try + { + if (num >= 0) + { + DeviceMediator* ptr = (DeviceMediator*)_003CModule_003E.@new(72uL); + DeviceMediator* lp; + try + { + if (ptr != null) + { + IEndpointHost* p2 = m_spEndpointHost.p; + lp = _003CModule_003E.DeviceMediator_002E_007Bctor_007D(ptr, this, p2); + } + else + { + lp = null; + } + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + m_spDeviceMediator.op_Assign(lp); + num = (((long)(nint)m_spDeviceMediator.p == 0) ? (-2147024882) : num); + } + if (*(long*)(&cComPtrNtv_003CDeviceMediator_003E) != 0L) + { + _003CModule_003E.DeviceMediator_002EShutdown((DeviceMediator*)(*(ulong*)(&cComPtrNtv_003CDeviceMediator_003E))); + } + _003CModule_003E.CComPtrNtv_003CDeviceMediator_003E_002ERelease(&cComPtrNtv_003CDeviceMediator_003E); + m_spWlanProvider.Release(); + m_fClientUpdateRequired = false; + m_fFirmwareUpdateRequired = false; + m_hrEnumeration = 0; + if (num >= 0) + { + IEndpointHost* p3 = m_spEndpointHost.p; + int iDeviceID; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p3 + 136)))((nint)p3, EEndpointHostProperty.eEndpointHostPropertyDatabaseEndpointId, &iDeviceID); + m_iDeviceID = iDeviceID; + if (num >= 0) + { + ushort* ptr2 = null; + IEndpointHost* p4 = m_spEndpointHost.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p4 + 120)))((nint)p4, EEndpointHostProperty.eEndpointHostPropertyEndpointId, &ptr2); + if (num >= 0 && ptr2 != null) + { + m_strEndpointId = new string((char*)ptr2); + } + _003CModule_003E.SysFreeString(ptr2); + if (num >= 0) + { + CComPtrNtv_003CIDeviceAssetProvider_003E cComPtrNtv_003CIDeviceAssetProvider_003E; + *(long*)(&cComPtrNtv_003CIDeviceAssetProvider_003E) = 0L; + try + { + if (_003CModule_003E.GetEndpointHostInterfaceProperty_003Cstruct_0020IDeviceAssetProvider_003E(m_spEndpointHost.p, EEndpointHostProperty.eEndpointHostPropertyDeviceAssetProvider, (IDeviceAssetProvider**)(&cComPtrNtv_003CIDeviceAssetProvider_003E)) >= 0) + { + CreateDeviceAssetSet((IDeviceAssetProvider*)(*(ulong*)(&cComPtrNtv_003CIDeviceAssetProvider_003E))); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIDeviceAssetProvider_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIDeviceAssetProvider_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIDeviceAssetProvider_003E_002ERelease(&cComPtrNtv_003CIDeviceAssetProvider_003E); + } + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 17, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids)); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CDeviceMediator_003E_002E_007Bdtor_007D), &cComPtrNtv_003CDeviceMediator_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CDeviceMediator_003E_002ERelease(&cComPtrNtv_003CDeviceMediator_003E); + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + return num; + } + + internal unsafe int CompleteInitialization() + { + //IL_0090: Expected I, but got I8 + //IL_01a1: Expected I, but got I8 + //IL_01c1: Expected I, but got I8 + //IL_0318: Expected I, but got I8 + //IL_037f: Expected I, but got I8 + //IL_03b1: Expected I, but got I8 + ManagedLock managedLock = null; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 18, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids)); + } + bool flag = false; + bool flag2 = false; + ManagedLock managedLock2 = new ManagedLock(m_Lock); + int num; + try + { + managedLock = managedLock2; + num = GetCapability(EEndpointCapability.eEndpointCapabilityFirmwareUpdate, ref m_fFirmwareUpdateSupported); + bool flag3 = false; + if (num >= 0) + { + IEndpointHost* p = m_spEndpointHost.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 152)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyIsAvailable, &flag3); + if (flag3) + { + if (num < 0) + { + goto IL_0404; + } + num = IsFirmwareProcessInProgress(&flag, &flag2); + } + if (num >= 0) + { + if (flag2) + { + num = m_firmwareUpdater.Restorer.ContinueFirmwareProcess(OnFirmwareProcessComplete); + if (num < 0) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 2u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 19, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), num); + } + goto IL_03fc; + } + } + else + { + if (!flag) + { + ESyncRelationship eSyncRelationship = ESyncRelationship.srNone; + EEndpointCompatibilityStatus eEndpointCompatibilityStatus = (EEndpointCompatibilityStatus)0; + if (!flag3) + { + goto IL_0341; + } + ushort* ptr = null; + IEndpointHost* p2 = m_spEndpointHost.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p2 + 120)))((nint)p2, EEndpointHostProperty.eEndpointHostPropertyCanonicalName, &ptr); + if (num >= 0 && ptr != null) + { + m_strCanonicalName = new string((char*)ptr); + } + _003CModule_003E.SysFreeString(ptr); + if (num >= 0) + { + _003CModule_003E.GetEndpointHostEnumProperty_003Cenum_0020ESyncRelationship_003E(m_spEndpointHost.p, EEndpointHostProperty.eEndpointHostPropertySyncRelationship, &eSyncRelationship); + if (IsConnectedWirelessly && eSyncRelationship != ESyncRelationship.srSyncWithThisMachine) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 21, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), (uint)eSyncRelationship); + } + num = -1072885172; + } + if (num >= 0) + { + num = _003CModule_003E.GetEnumProperty_003Cstruct_0020IEndpointHost_002Cenum_0020EEndpointHostProperty_002Cenum_0020EEndpointCompatibilityStatus_003E(m_spEndpointHost.p, EEndpointHostProperty.eEndpointHostPropertyCompatibilityStatus, &eEndpointCompatibilityStatus); + if (num >= 0) + { + if ((EEndpointCompatibilityStatus)3 == eEndpointCompatibilityStatus) + { + m_fClientUpdateRequired = true; + } + else if ((EEndpointCompatibilityStatus)2 == eEndpointCompatibilityStatus) + { + m_fFirmwareUpdateRequired = true; + } + if ((m_fClientUpdateRequired || m_fFirmwareUpdateRequired) && IsConnectedWirelessly) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 22, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids)); + } + num = -1072885173; + } + if (num >= 0) + { + CComPtrNtv_003CISyncEngine_003E cComPtrNtv_003CISyncEngine_003E; + *(long*)(&cComPtrNtv_003CISyncEngine_003E) = 0L; + try + { + m_spSyncEngine.Release(); + num = _003CModule_003E.GetInterfaceProperty_003Cstruct_0020IEndpointHost_002Cenum_0020EEndpointHostProperty_002Cstruct_0020ISyncEngine_003E(m_spEndpointHost.p, EEndpointHostProperty.eEndpointHostPropertySyncEngine, (ISyncEngine**)(&cComPtrNtv_003CISyncEngine_003E)); + if (num >= 0) + { + ISyncEngine* p3 = (ISyncEngine*)(*(ulong*)(&cComPtrNtv_003CISyncEngine_003E)); + *(long*)(&cComPtrNtv_003CISyncEngine_003E) = 0L; + m_spSyncEngine.Attach(p3); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CISyncEngine_003E_002E_007Bdtor_007D), &cComPtrNtv_003CISyncEngine_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CISyncEngine_003E_002ERelease(&cComPtrNtv_003CISyncEngine_003E); + goto IL_0341; + } + } + } + } + goto IL_0404; + } + num = m_firmwareUpdater.ContinueFirmwareProcess(OnFirmwareProcessComplete); + if (num < 0) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 2u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 20, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), num); + } + goto IL_03fc; + } + } + goto IL_0400; + } + } + goto IL_0404; + IL_0406: + int fInitializationCompleted; + m_fInitializationCompleted = (byte)fInitializationCompleted != 0; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_dd(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 23, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), num, m_iDeviceID); + } + goto end_IL_0052; + IL_0341: + if (num >= 0) + { + CComPtrNtv_003CIGasGauge_003E cComPtrNtv_003CIGasGauge_003E; + *(long*)(&cComPtrNtv_003CIGasGauge_003E) = 0L; + try + { + CComPtrNtv_003CIGasGauge_003E cComPtrNtv_003CIGasGauge_003E2; + *(long*)(&cComPtrNtv_003CIGasGauge_003E2) = 0L; + try + { + num = _003CModule_003E.GetEndpointHostInterfaceProperty_003Cstruct_0020IGasGauge_003E(m_spEndpointHost.p, EEndpointHostProperty.eEndpointHostPropertyPredictedGasGauge, (IGasGauge**)(&cComPtrNtv_003CIGasGauge_003E)); + if (num >= 0) + { + if (null == m_predictedGasGauge) + { + m_predictedGasGauge = new GasGauge((IGasGauge*)(*(ulong*)(&cComPtrNtv_003CIGasGauge_003E))); + } + num = _003CModule_003E.GetEndpointHostInterfaceProperty_003Cstruct_0020IGasGauge_003E(m_spEndpointHost.p, EEndpointHostProperty.eEndpointHostPropertyActualGasGauge, (IGasGauge**)(&cComPtrNtv_003CIGasGauge_003E2)); + if (num >= 0) + { + if (null == m_actualGasGauge) + { + m_actualGasGauge = new GasGauge((IGasGauge*)(*(ulong*)(&cComPtrNtv_003CIGasGauge_003E2))); + } + if (m_predictedGasGauge == null || m_actualGasGauge == null) + { + num = -2147024882; + } + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIGasGauge_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIGasGauge_003E2); + throw; + } + _003CModule_003E.CComPtrNtv_003CIGasGauge_003E_002ERelease(&cComPtrNtv_003CIGasGauge_003E2); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIGasGauge_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIGasGauge_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIGasGauge_003E_002ERelease(&cComPtrNtv_003CIGasGauge_003E); + goto IL_03fc; + } + goto IL_0404; + IL_0400: + fInitializationCompleted = 1; + goto IL_0406; + IL_03fc: + if (num >= 0) + { + goto IL_0400; + } + goto IL_0404; + IL_0404: + fInitializationCompleted = 0; + goto IL_0406; + end_IL_0052:; + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + return num; + } + + private unsafe void OnFirmwareProcessComplete(int hr) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 27, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), hr); + } + Initialize(m_spEndpointHost.p); + CompleteInitialization(); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 28, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids)); + } + } + + private unsafe int IsFirmwareProcessInProgress(bool* pfFirmwareUpdateInProgress, bool* pfFirmwareRestoreInProgress) + { + if (pfFirmwareUpdateInProgress == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 647u); + return -2147467261; + } + if (pfFirmwareRestoreInProgress == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 648u); + return -2147467261; + } + *pfFirmwareUpdateInProgress = false; + *pfFirmwareRestoreInProgress = false; + int num = 0; + try + { + Monitor.Enter(m_Lock); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 24, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids)); + int num2 = 1; + } + else + { + int num2 = 0; + } + FirmwareUpdater firmwareUpdater = m_firmwareUpdater; + if (firmwareUpdater == null) + { + IEndpointHost* p = m_spEndpointHost.p; + m_firmwareUpdater = new FirmwareUpdater(p, m_fFirmwareUpdateSupported); + } + else + { + num = firmwareUpdater.Reset(deviceRebooting: false); + } + if (m_fFirmwareUpdateSupported && num >= 0) + { + int num3 = ((*pfFirmwareUpdateInProgress = ((m_firmwareUpdater.IsUpdateInProgress() != 0) ? true : false)) ? 1 : 0); + byte b = ((*pfFirmwareRestoreInProgress = m_firmwareUpdater.Restorer.IsRestoreInProgress()) ? ((byte)1) : ((byte)0)); + if (*pfFirmwareUpdateInProgress || b != 0) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 25, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), m_iDeviceID); + int num4 = 1; + return num; + } + int num5 = 0; + return num; + } + return num; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 2u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 26, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), num); + int num6 = 1; + return num; + } + int num7 = 0; + return num; + } + finally + { + Monitor.Exit(m_Lock); + } + } + + private unsafe int CreateDeviceAssetSet(IDeviceAssetProvider* pDeviceAssetProvider) + { + //IL_0041: Expected I, but got I8 + //IL_0047: Expected I, but got I8 + //IL_0062: Expected I, but got I8 + //IL_0062: Expected I, but got I8 + //IL_00cb: Expected I, but got I8 + //IL_00f7: Expected I, but got I8 + //IL_00f7: Expected I, but got I8 + //IL_0140: Expected I, but got I8 + //IL_016c: Expected I, but got I8 + //IL_016c: Expected I, but got I8 + //IL_01d7: Expected I, but got I8 + //IL_0210: Expected I, but got I8 + //IL_021e: Expected I, but got I8 + //IL_0246: Expected I, but got I8 + //IL_0254: Expected I, but got I8 + //IL_0283: Expected I, but got I8 + //IL_02af: Expected I, but got I8 + //IL_02d1: Expected I, but got I8 + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 43, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids)); + } + uint* ptr = null; + int num = 0; + ushort** ptr2 = null; + int num2 = 0; + int num3 = 0; + if (-2147024774 != ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDeviceAssetProvider + 40)))((nint)pDeviceAssetProvider, null, 0, &num2)) + { + _003CModule_003E._ZuneShipAssert(1004u, 3551u); + } + ulong num4 = (ulong)num2; + ushort** ptr3 = (ushort**)_003CModule_003E.new_005B_005D((num4 > 2305843009213693951L) ? ulong.MaxValue : (num4 * 8)); + int num5; + if (ptr3 == null) + { + num5 = -2147024882; + _003CModule_003E._ZuneShipAssert(1012u, 3554u); + } + else + { + ushort** intPtr = ptr3; + int num6 = num2; + num5 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDeviceAssetProvider + 40)))((nint)pDeviceAssetProvider, intPtr, num6, &num2); + if (num5 < 0) + { + _003CModule_003E._ZuneShipAssertForHr(num5, 3557u); + } + else + { + if (-2147024774 != ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDeviceAssetProvider + 48)))((nint)pDeviceAssetProvider, null, 0, &num3)) + { + _003CModule_003E._ZuneShipAssert(1004u, 3563u); + } + ulong num7 = (ulong)num3; + ptr2 = (ushort**)_003CModule_003E.new_005B_005D((num7 > 2305843009213693951L) ? ulong.MaxValue : (num7 * 8)); + ushort** intPtr2 = ptr2; + int num8 = num3; + num5 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDeviceAssetProvider + 48)))((nint)pDeviceAssetProvider, intPtr2, num8, &num3); + if (num5 < 0) + { + _003CModule_003E._ZuneShipAssertForHr(num5, 3569u); + } + else + { + if (-2147024774 != ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDeviceAssetProvider + 56)))((nint)pDeviceAssetProvider, null, 0, &num)) + { + _003CModule_003E._ZuneShipAssert(1004u, 3575u); + } + ulong num9 = (ulong)num; + ptr = (uint*)_003CModule_003E.new_005B_005D((num9 > 4611686018427387903L) ? ulong.MaxValue : (num9 * 4)); + if (ptr == null) + { + num5 = -2147024882; + _003CModule_003E._ZuneShipAssert(1012u, 3578u); + } + else + { + uint* intPtr3 = ptr; + int num10 = num; + num5 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDeviceAssetProvider + 56)))((nint)pDeviceAssetProvider, intPtr3, num10, &num); + if (num5 < 0) + { + _003CModule_003E._ZuneShipAssertForHr(num5, 3581u); + } + else + { + string[] array = new string[num2]; + int num11 = 0; + if (0 < num2) + { + ushort** ptr4 = ptr3; + do + { + if (*(long*)ptr4 != 0L) + { + array[num11] = new string((char*)(*(ulong*)ptr4)); + } + num11++; + ptr4 = (ushort**)((ulong)(nint)ptr4 + 8uL); + } + while (num11 < num2); + } + string[] array2 = new string[num3]; + int num12 = 0; + if (0 < num3) + { + ushort** ptr5 = ptr2; + do + { + if (*(long*)ptr5 != 0L) + { + array2[num12] = new string((char*)(*(ulong*)ptr5)); + } + num12++; + ptr5 = (ushort**)((ulong)(nint)ptr5 + 8uL); + } + while (num12 < num3); + } + uint[] array3 = new uint[num]; + int num13 = 0; + if (0 < num) + { + uint* ptr6 = ptr; + do + { + array3[num13] = *ptr6; + num13++; + ptr6 = (uint*)((ulong)(nint)ptr6 + 4uL); + } + while (num13 < num); + } + m_DeviceAssetSet = new DeviceAssetSet(array, array2, array3); + } + } + } + } + int num14 = 0; + if (0 < num2) + { + do + { + _003CModule_003E.WString_002ESysFreeString((ushort**)((long)num14 * 8L + (nint)ptr3)); + num14++; + } + while (num14 < num2); + } + if (ptr2 != null) + { + int num15 = 0; + if (0 < num3) + { + do + { + _003CModule_003E.WString_002ESysFreeString((ushort**)((long)num15 * 8L + (nint)ptr2)); + num15++; + } + while (num15 < num3); + } + } + } + _003CModule_003E.SafeDeleteArray_003Cunsigned_0020short_0020_002A_003E(&ptr3); + _003CModule_003E.SafeDeleteArray_003Cunsigned_0020short_0020_002A_003E(&ptr2); + _003CModule_003E.SafeDeleteArray_003Cunsigned_0020long_003E(&ptr); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 44, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xc0985b64_002EWPP_DeviceAPI_cpp_Traceguids), num5); + } + return num5; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EDevice(); + } + finally + { + try + { + ((IDisposable)m_spDeviceMediator).Dispose(); + } + finally + { + try + { + ((IDisposable)m_spWlanProvider).Dispose(); + } + finally + { + try + { + ((IDisposable)m_spSyncEngine).Dispose(); + } + finally + { + try + { + ((IDisposable)m_spEndpointHost).Dispose(); + } + finally + { + } + } + } + } + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/DeviceAddedHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/DeviceAddedHandler.cs new file mode 100644 index 0000000..b4c90cd --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/DeviceAddedHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void DeviceAddedHandler(Device device); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/DeviceAssetSet.cs b/ZuneDBApi/MicrosoftZuneLibrary/DeviceAssetSet.cs new file mode 100644 index 0000000..14f875b --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/DeviceAssetSet.cs @@ -0,0 +1,24 @@ +namespace MicrosoftZuneLibrary +{ + public class DeviceAssetSet + { + private string[] m_ImageUris; + + private string[] m_DefaultImageUris; + + private uint[] m_Colors; + + public uint[] Colors => m_Colors; + + public string[] ImageUris => m_ImageUris; + + public string[] DefaultImageUris => m_DefaultImageUris; + + public DeviceAssetSet(string[] imageUris, string[] defaultImageUris, uint[] colors) + { + m_DefaultImageUris = defaultImageUris; + m_ImageUris = imageUris; + m_Colors = colors; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/DeviceList.cs b/ZuneDBApi/MicrosoftZuneLibrary/DeviceList.cs new file mode 100644 index 0000000..4b45725 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/DeviceList.cs @@ -0,0 +1,730 @@ +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class DeviceList : IDisposable + { + private static DeviceList m_singletonInstance = null; + + private DeviceAddedHandler _003Cbacking_store_003EAdded; + + private readonly CComPtrMgd_003CIEndpointHostManager_003E m_spEndpointHostManager; + + private readonly CComPtrMgd_003CEndpointHostManagerMediator_003E m_spEndpointHostManagerMediator; + + private SortedList m_slDevices; + + private object m_lock; + + private bool m_fInitialized; + + public unsafe bool Initialized + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_l(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 39, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids), m_fInitialized ? 1 : 0); + } + return m_fInitialized; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_l(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 40, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids), value ? 1 : 0); + } + m_fInitialized = value; + } + } + + public unsafe int Count + { + get + { + ManagedLock managedLock = null; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 37, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids), m_slDevices.Count); + } + if (!m_fInitialized && _003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 38, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + object @lock = m_lock; + if (@lock != null && m_slDevices != null) + { + ManagedLock managedLock2 = new ManagedLock(@lock); + int count; + try + { + managedLock = managedLock2; + count = m_slDevices.Count; + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + return count; + } + return 0; + } + } + + public static DeviceList Instance + { + get + { + if (m_singletonInstance == null) + { + m_singletonInstance = new DeviceList(); + } + return m_singletonInstance; + } + } + + [SpecialName] + public event DeviceAddedHandler Added + { + [MethodImpl(MethodImplOptions.Synchronized)] + add + { + _003Cbacking_store_003EAdded = (DeviceAddedHandler)Delegate.Combine(_003Cbacking_store_003EAdded, value); + } + [MethodImpl(MethodImplOptions.Synchronized)] + remove + { + _003Cbacking_store_003EAdded = (DeviceAddedHandler)Delegate.Remove(_003Cbacking_store_003EAdded, value); + } + } + + private unsafe DeviceList() + { + //IL_0093: Expected I, but got I8 + CComPtrMgd_003CIEndpointHostManager_003E spEndpointHostManager = new CComPtrMgd_003CIEndpointHostManager_003E(); + try + { + m_spEndpointHostManager = spEndpointHostManager; + CComPtrMgd_003CEndpointHostManagerMediator_003E spEndpointHostManagerMediator = new CComPtrMgd_003CEndpointHostManagerMediator_003E(); + try + { + m_spEndpointHostManagerMediator = spEndpointHostManagerMediator; + base._002Ector(); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 10, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + m_fInitialized = false; + m_lock = new object(); + m_slDevices = new SortedList(); + EndpointHostManagerMediator* ptr = (EndpointHostManagerMediator*)_003CModule_003E.@new(56uL); + EndpointHostManagerMediator* lp; + try + { + lp = ((ptr == null) ? null : _003CModule_003E.EndpointHostManagerMediator_002E_007Bctor_007D(ptr, this)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + m_spEndpointHostManagerMediator.op_Assign(lp); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 11, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + } + catch + { + //try-fault + ((IDisposable)m_spEndpointHostManagerMediator).Dispose(); + throw; + } + } + catch + { + //try-fault + ((IDisposable)m_spEndpointHostManager).Dispose(); + throw; + } + } + + private unsafe void _007EDeviceList() + { + ManagedLock managedLock = null; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 12, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + m_spEndpointHostManager.Release(); + CComPtrMgd_003CEndpointHostManagerMediator_003E spEndpointHostManagerMediator = m_spEndpointHostManagerMediator; + if ((long)(nint)spEndpointHostManagerMediator.p == 0) + { + _003CModule_003E.EndpointHostManagerMediator_002EShutdown(spEndpointHostManagerMediator.p); + } + m_spEndpointHostManagerMediator.Release(); + ManagedLock managedLock2 = new ManagedLock(m_lock); + try + { + managedLock = managedLock2; + foreach (object slDevice in m_slDevices) + { + DictionaryEntry dictionaryEntry = (DictionaryEntry)slDevice; + (dictionaryEntry.Value as IDisposable)?.Dispose(); + } + m_slDevices = null; + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + m_lock = null; + m_singletonInstance = null; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 13, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + } + + public unsafe int InitializeAndEnumerate() + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 14, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + int num = _003CModule_003E.EndpointHostManagerMediator_002EInitializeAndEnumerate(m_spEndpointHostManagerMediator.p); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 15, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids), num); + } + return num; + } + + public unsafe void SetEndpointHostManager(IEndpointHostManager* pEndpointHostManager) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 16, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + m_spEndpointHostManager.op_Assign(pEndpointHostManager); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 17, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + } + + public unsafe Device GetItem(int idx) + { + ManagedLock managedLock = null; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 18, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids), idx); + } + ManagedLock managedLock2 = new ManagedLock(m_lock); + Device result; + try + { + managedLock = managedLock2; + if (!m_fInitialized && _003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 19, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + SortedList slDevices = m_slDevices; + if (slDevices != null && idx < slDevices.Count) + { + object byIndex = m_slDevices.GetByIndex(idx); + if (byIndex != null) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 20, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + result = (Device)byIndex; + goto IL_010f; + } + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + Device result2; + try + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 21, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + result2 = null; + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + return result2; + IL_010f: + ((IDisposable)managedLock).Dispose(); + return result; + } + + public unsafe void HideDevice(Device device) + { + string strName = null; + device.GetFriendlyName(ref strName); + fixed (ushort* a = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strName))) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_S(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 22, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids), a); + } + if (!m_fInitialized && _003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 23, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + HideDeviceInternal(device.EndpointId, fHide: true); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 24, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + } + } + + public unsafe void UnhideDevice(Device device) + { + string strName = null; + device.GetFriendlyName(ref strName); + fixed (ushort* a = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strName))) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_S(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 25, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids), a); + } + if (!m_fInitialized && _003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 26, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + HideDeviceInternal(device.EndpointId, fHide: false); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 27, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + } + } + + public unsafe virtual int DeviceArrived(IEndpointHost* pEndpointHost) + { + //IL_006f: Expected I, but got I8 + Device device = null; + if (pEndpointHost == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 184u); + return -2147467261; + } + int num = -1; + device = null; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 28, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pEndpointHost + 136)))((nint)pEndpointHost, EEndpointHostProperty.eEndpointHostPropertyDatabaseEndpointId, &num); + if (num2 >= 0 && num > 0) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 29, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + num2 = AddDeviceToList(pEndpointHost, ref device); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 30, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids), num2); + } + return num2; + } + + public unsafe virtual int DeviceDisconnected(IEndpointHost* pEndpointHost) + { + //IL_0098: Expected I, but got I8 + ManagedLock managedLock = null; + if (pEndpointHost == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 284u); + return -2147467261; + } + object @lock = m_lock; + if (@lock == null) + { + return -2147467261; + } + ManagedLock managedLock2 = new ManagedLock(@lock); + int num; + try + { + managedLock = managedLock2; + int nDeviceId = -1; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 33, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + if (m_slDevices == null) + { + num = -2147418113; + } + else + { + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pEndpointHost + 136)))((nint)pEndpointHost, EEndpointHostProperty.eEndpointHostPropertyDatabaseEndpointId, &nDeviceId); + if (num >= 0) + { + ResetUpdater(nDeviceId, fFireDisconnect: true); + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 34, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids), num); + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + return num; + } + + [SpecialName] + protected void raise_Added(Device value0) + { + _003Cbacking_store_003EAdded?.Invoke(value0); + } + + public unsafe int GetTranscodedFilesCachePath(ref string strCachePath) + { + //IL_0003: Expected I, but got I8 + //IL_0036: Expected I, but got I8 + ushort* ptr = null; + IEndpointHostManager* p = m_spEndpointHostManager.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 329u); + return -2147418113; + } + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 120)))((nint)p, &ptr); + if (num >= 0 && ptr != null) + { + strCachePath = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return num; + } + + public unsafe int SetTranscodedFilesCachePath(string strCachePath) + { + //IL_0046: Expected I, but got I8 + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strCachePath))) + { + int result; + if (ptr != null) + { + ushort* ptr2 = _003CModule_003E.SysAllocString(ptr); + IEndpointHostManager* p = m_spEndpointHostManager.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 353u); + return -2147418113; + } + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 128)))((nint)p, ptr2); + _003CModule_003E.SysFreeString(ptr2); + } + else + { + result = -2147418113; + } + return result; + } + } + + public unsafe int SetTranscodedFilesCacheSize(int lCacheSize) + { + //IL_0034: Expected I, but got I8 + IEndpointHostManager* p = m_spEndpointHostManager.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 372u); + return -2147418113; + } + IEndpointHostManager* ptr = p; + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 104)))((nint)ptr, lCacheSize); + } + + public unsafe int ClearTranscodeCache() + { + //IL_0031: Expected I, but got I8 + IEndpointHostManager* p = m_spEndpointHostManager.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 384u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 112)))((nint)p); + } + + internal unsafe virtual int AddDeviceToList(IEndpointHost* pEndpointHost, ref Device device) + { + //IL_009f: Expected I, but got I8 + ManagedLock managedLock = null; + if (pEndpointHost == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 220u); + return -2147467261; + } + if (m_lock == null) + { + return -2147467261; + } + int num = -1; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 31, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + ManagedLock managedLock2 = new ManagedLock(m_lock); + int num2; + try + { + managedLock = managedLock2; + if (m_slDevices == null) + { + num2 = -2147418113; + } + else + { + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pEndpointHost + 136)))((nint)pEndpointHost, EEndpointHostProperty.eEndpointHostPropertyDatabaseEndpointId, &num); + if (num2 >= 0) + { + if (m_slDevices.ContainsKey(num)) + { + num2 = (device = (Device)m_slDevices[num]).Initialize(pEndpointHost); + } + else + { + Device device2 = (device = new Device()); + if (device2 != null) + { + num2 = device2.Initialize(pEndpointHost); + if (num2 >= 0) + { + Device device3 = device; + m_slDevices.Add(device3.DeviceID, device3); + raise_Added(device); + } + } + else + { + num2 = -2147024882; + } + } + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 32, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids), num2); + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + return num2; + } + + internal unsafe int ForgetEndpoint(IEndpointHost* pEndpointHost) + { + //IL_00ae: Expected I, but got I8 + //IL_00cd: Expected I, but got I8 + ManagedLock managedLock = null; + if (m_spEndpointHostManager.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 397u); + return -2147418113; + } + if (pEndpointHost == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 398u); + return -2147467261; + } + object @lock = m_lock; + if (@lock == null) + { + return -2147467261; + } + ManagedLock managedLock2 = new ManagedLock(@lock); + int num2; + try + { + managedLock = managedLock2; + int num = 0; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 35, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids)); + } + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pEndpointHost + 136)))((nint)pEndpointHost, EEndpointHostProperty.eEndpointHostPropertyDatabaseEndpointId, &num); + if (num2 >= 0) + { + IEndpointHostManager* p = m_spEndpointHostManager.p; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 80)))((nint)p, pEndpointHost); + } + ResetUpdater(num, fFireDisconnect: false); + if (num2 >= 0) + { + m_slDevices?.Remove(num); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 36, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x6a82d7e8_002EWPP_DeviceListAPI_cpp_Traceguids), num2); + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + return num2; + } + + protected unsafe void HideDeviceInternal(string strEndpointId, [MarshalAs(UnmanagedType.U1)] bool fHide) + { + //IL_0052: Expected I, but got I8 + //IL_0052: Expected I, but got I8 + //IL_0069: Expected I, but got I8 + //IL_0069: Expected I, but got I8 + if (!(strEndpointId != (string)null)) + { + return; + } + CComPtrNtv_003CIEndpointNotification_003E cComPtrNtv_003CIEndpointNotification_003E; + *(long*)(&cComPtrNtv_003CIEndpointNotification_003E) = 0L; + try + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strEndpointId))) + { + try + { + CComPtrMgd_003CIEndpointHostManager_003E spEndpointHostManager = m_spEndpointHostManager; + if (spEndpointHostManager.p != null && _003CModule_003E.IUnknown_002EQueryInterface_003Cstruct_0020IEndpointNotification_003E((IUnknown*)spEndpointHostManager.p, (IEndpointNotification**)(&cComPtrNtv_003CIEndpointNotification_003E)) >= 0) + { + if (fHide) + { + long num = *(long*)(*(ulong*)(&cComPtrNtv_003CIEndpointNotification_003E)) + 32; + long num2 = *(long*)(&cComPtrNtv_003CIEndpointNotification_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)num2, ptr); + } + else + { + long num3 = *(long*)(*(ulong*)(&cComPtrNtv_003CIEndpointNotification_003E)) + 24; + long num4 = *(long*)(&cComPtrNtv_003CIEndpointNotification_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)num4, ptr); + } + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIEndpointNotification_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIEndpointNotification_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIEndpointNotification_003E_002ERelease(&cComPtrNtv_003CIEndpointNotification_003E); + } + + private void ResetUpdater(int nDeviceId, [MarshalAs(UnmanagedType.U1)] bool fFireDisconnect) + { + if (!m_slDevices.ContainsKey(nDeviceId)) + { + return; + } + Device device = (Device)m_slDevices[nDeviceId]; + if (device == null) + { + return; + } + FirmwareUpdater firmwareUpdater = device.FirmwareUpdater; + if (firmwareUpdater != null) + { + bool flag = firmwareUpdater.Restorer.IsDeviceRebooting(); + if (!flag) + { + flag = firmwareUpdater.IsDeviceRebooting(); + } + firmwareUpdater.Reset(flag); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EDeviceList(); + } + finally + { + try + { + ((IDisposable)m_spEndpointHostManagerMediator).Dispose(); + } + finally + { + try + { + ((IDisposable)m_spEndpointHostManager).Dispose(); + } + finally + { + } + } + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/DeviceOverflowHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/DeviceOverflowHandler.cs new file mode 100644 index 0000000..1349d44 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/DeviceOverflowHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void DeviceOverflowHandler(GasGauge gasGauge); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/DeviceStatusChangedHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/DeviceStatusChangedHandler.cs new file mode 100644 index 0000000..320d3c4 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/DeviceStatusChangedHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void DeviceStatusChangedHandler(Device device, int hrEnumeration, EEndpointStatus eDeviceStatus); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/EBurnProgressStatus.cs b/ZuneDBApi/MicrosoftZuneLibrary/EBurnProgressStatus.cs new file mode 100644 index 0000000..6426426 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/EBurnProgressStatus.cs @@ -0,0 +1,15 @@ +namespace MicrosoftZuneLibrary +{ + public enum EBurnProgressStatus + { + ebpsComplete = 8, + ebpsFinalizing = 7, + ebpsReadyToWriteToCD = 6, + ebpsTAOConvertingAndWriting = 5, + ebpsConvertingTrack = 4, + ebpsInspectingFile = 3, + ebpsWritingImageToCD = 2, + ebpsAddingFileToCDImage = 1, + ebpsConvertingFile = 0 + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/EBurnState.cs b/ZuneDBApi/MicrosoftZuneLibrary/EBurnState.cs new file mode 100644 index 0000000..6a0c117 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/EBurnState.cs @@ -0,0 +1,16 @@ +namespace MicrosoftZuneLibrary +{ + public enum EBurnState + { + ebsErasing = 9, + ebsStopped = 8, + ebsBurning = 7, + ebsPreparingToBurn = 6, + ebsRefreshStatusPending = 5, + ebsPlaylistItemErrors = 4, + ebsWaitingForDisc = 3, + ebsReady = 2, + ebsBusy = 1, + ebsUnknown = 0 + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/ESyncEventReason.cs b/ZuneDBApi/MicrosoftZuneLibrary/ESyncEventReason.cs new file mode 100644 index 0000000..fcb805e --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/ESyncEventReason.cs @@ -0,0 +1,9 @@ +namespace MicrosoftZuneLibrary +{ + public enum ESyncEventReason + { + eSyncEventFailed = 1, + eSyncEventSucceeded = 0, + eSyncEventInvalid = -1 + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FileEntry.cs b/ZuneDBApi/MicrosoftZuneLibrary/FileEntry.cs new file mode 100644 index 0000000..7799c64 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FileEntry.cs @@ -0,0 +1,19 @@ +namespace MicrosoftZuneLibrary +{ + public class FileEntry + { + private EMediaTypes _mediaType; + + private string _path; + + public string Path => _path; + + public EMediaTypes MediaType => _mediaType; + + public unsafe FileEntry(ushort* path, EMediaTypes mediaType) + { + _path = new string((char*)path); + _mediaType = mediaType; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FirmwareCompleteHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareCompleteHandler.cs new file mode 100644 index 0000000..fbcd2ec --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareCompleteHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + internal delegate void FirmwareCompleteHandler(int hr); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FirmwareOperationBase.cs b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareOperationBase.cs new file mode 100644 index 0000000..a9233fe --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareOperationBase.cs @@ -0,0 +1,508 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.Iris; +using Microsoft.Zune.Util; +using ZuneUI; + +namespace MicrosoftZuneLibrary +{ + public abstract class FirmwareOperationBase : IDisposable + { + internal readonly CComPtrMgd_003CIEndpointHost_003E m_spEndpointHost; + + internal object m_FirmwareLock; + + internal bool m_fFirmwareProcessSupported; + + internal bool m_Canceled; + + internal bool m_DeviceRebooting; + + internal readonly CComPtrMgd_003CMicrosoftZuneLibrary_003A_003AFirmwareUpdateMediator_003E m_spFirmwareMediator; + + internal FirmwareCompleteHandler m_OnCompleteHandler; + + internal DeferredInvokeHandler m_HandlerComplete; + + [return: MarshalAs(UnmanagedType.U1)] + public bool EnterContinuousPowerMode() + { + return (_003CModule_003E.SetThreadExecutionState(2147483649u) != 0) ? true : false; + } + + [return: MarshalAs(UnmanagedType.U1)] + public bool LeaveContinuousPowerMode() + { + return (_003CModule_003E.SetThreadExecutionState(2147483648u) != 0) ? true : false; + } + + [return: MarshalAs(UnmanagedType.U1)] + public virtual bool IsValid() + { + return true; + } + + public HRESULT CheckPowerRequirements(out bool fOnBatteryPower) + { + bool fOnBatteryPower2 = true; + HRESULT hRESULT = PowerRequirements.CheckOnBatteryPower(out fOnBatteryPower2); + HRESULT hRESULT2 = hRESULT; + if ((byte)((hRESULT2.hr >= 0) ? 1u : 0u) != 0) + { + fOnBatteryPower = fOnBatteryPower2; + } + return hRESULT; + } + + internal FirmwareOperationBase() + { + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = new CComPtrMgd_003CIEndpointHost_003E(); + try + { + m_spEndpointHost = spEndpointHost; + CComPtrMgd_003CMicrosoftZuneLibrary_003A_003AFirmwareUpdateMediator_003E spFirmwareMediator = new CComPtrMgd_003CMicrosoftZuneLibrary_003A_003AFirmwareUpdateMediator_003E(); + try + { + m_spFirmwareMediator = spFirmwareMediator; + base._002Ector(); + m_Canceled = false; + m_FirmwareLock = new object(); + } + catch + { + //try-fault + ((IDisposable)m_spFirmwareMediator).Dispose(); + throw; + } + } + catch + { + //try-fault + ((IDisposable)m_spEndpointHost).Dispose(); + throw; + } + } + + private void _007EFirmwareOperationBase() + { + m_spEndpointHost.Release(); + m_spFirmwareMediator.Release(); + } + + [return: MarshalAs(UnmanagedType.U1)] + internal unsafe bool IsDeviceRebooting() + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 18, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + return m_DeviceRebooting; + } + + internal unsafe int Reset([MarshalAs(UnmanagedType.U1)] bool deviceRebooting) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 19, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + int result = InternalReset(); + m_DeviceRebooting = deviceRebooting; + return result; + } + + internal unsafe void SendCompleteNotification(int hr, [MarshalAs(UnmanagedType.U1)] bool disconnectDeviceOnComplete) + { + //IL_001e: Expected I, but got I8 + //IL_0038: Expected I, but got I8 + CComPtrNtv_003CIFirmwareUpdateErrorInfo_003E cComPtrNtv_003CIFirmwareUpdateErrorInfo_003E; + *(long*)(&cComPtrNtv_003CIFirmwareUpdateErrorInfo_003E) = 0L; + try + { + InternalErrorInfo* ptr = (InternalErrorInfo*)_003CModule_003E.@new(56uL); + InternalErrorInfo* lp; + try + { + lp = ((ptr == null) ? null : _003CModule_003E.MicrosoftZuneLibrary_002EInternalErrorInfo_002E_007Bctor_007D(ptr, hr)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + _003CModule_003E.CComPtrNtv_003CIFirmwareUpdateErrorInfo_003E_002E_003D(&cComPtrNtv_003CIFirmwareUpdateErrorInfo_003E, (IFirmwareUpdateErrorInfo*)lp); + FirmwareProcessCompleteArgs args = new FirmwareProcessCompleteArgs(new FirmwareUpdateErrorInfo((IFirmwareUpdateErrorInfo*)(*(ulong*)(&cComPtrNtv_003CIFirmwareUpdateErrorInfo_003E))), null, CompletionAction.Complete, disconnectDeviceOnComplete); + Application.DeferredInvokeOnWorkerThread(ProcessCompleteWorker, ProcessCompleteWorkerComplete, args); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIFirmwareUpdateErrorInfo_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIFirmwareUpdateErrorInfo_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIFirmwareUpdateErrorInfo_003E_002ERelease(&cComPtrNtv_003CIFirmwareUpdateErrorInfo_003E); + } + + internal unsafe void OnFirmwareProcessCompleteWorker(object data) + { + FirmwareProcessCompleteArgs firmwareProcessCompleteArgs = (FirmwareProcessCompleteArgs)data; + switch (firmwareProcessCompleteArgs.Action) + { + case CompletionAction.Complete: + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 6u) + { + _003CModule_003E.WPP_SF_d(_a1: firmwareProcessCompleteArgs.ErrorInfo.HrStatus.hr, Logger: *(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), id: 23, TraceGuid: (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + ProcessCompleteWorker(firmwareProcessCompleteArgs); + break; + case CompletionAction.Rollback: + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 2u) + { + _003CModule_003E.WPP_SF_d(_a1: firmwareProcessCompleteArgs.ErrorInfo.HrStatus.hr, Logger: *(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), id: 22, TraceGuid: (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + DeferredInvokeHandler handlerComplete2 = m_HandlerComplete; + if (handlerComplete2 != null) + { + handlerComplete2(firmwareProcessCompleteArgs); + } + ContinueFirmwareProcess(null); + break; + } + case CompletionAction.Reboot: + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 6u) + { + _003CModule_003E.WPP_SF_d(_a1: firmwareProcessCompleteArgs.ErrorInfo.HrStatus.hr, Logger: *(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), id: 21, TraceGuid: (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + Reset(deviceRebooting: true); + DeferredInvokeHandler handlerComplete = m_HandlerComplete; + if (handlerComplete != null) + { + handlerComplete(firmwareProcessCompleteArgs); + } + break; + } + case CompletionAction.Continue: + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 6u) + { + _003CModule_003E.WPP_SF_d(_a1: firmwareProcessCompleteArgs.ErrorInfo.HrStatus.hr, Logger: *(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), id: 20, TraceGuid: (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + ContinueFirmwareProcess(null); + break; + } + } + + internal unsafe void ProcessCompleteWorker(object data) + { + //IL_006c: Expected I, but got I8 + FirmwareProcessCompleteArgs firmwareProcessCompleteArgs = (FirmwareProcessCompleteArgs)data; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(_a1: firmwareProcessCompleteArgs.ErrorInfo.HrStatus.hr, Logger: *(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), id: 24, TraceGuid: (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + Reset(deviceRebooting: false); + m_spFirmwareMediator.op_Assign(null); + if (m_OnCompleteHandler != null) + { + HRESULT hrStatus = firmwareProcessCompleteArgs.ErrorInfo.HrStatus; + m_OnCompleteHandler(hrStatus.hr); + m_OnCompleteHandler = null; + } + if (m_HandlerComplete != null) + { + m_HandlerComplete(firmwareProcessCompleteArgs); + m_HandlerComplete = null; + } + if (firmwareProcessCompleteArgs.DisconnectDeviceOnComplete) + { + IEndpointHost* p = m_spEndpointHost.p; + DeviceList.Instance.DeviceDisconnected(p); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 25, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + } + + internal void ProcessCompleteWorkerComplete(object P_0) + { + } + + internal unsafe void DeferredCancel() + { + //IL_0086: Expected I, but got I8 + //IL_00cd: Expected I, but got I8 + //IL_00e1: Expected I, but got I8 + //IL_00e1: Expected I, but got I8 + //IL_00e1: Expected I, but got I8 + CComPtrNtv_003CIFirmwareUpdateNotification_003E cComPtrNtv_003CIFirmwareUpdateNotification_003E; + *(long*)(&cComPtrNtv_003CIFirmwareUpdateNotification_003E) = 0L; + try + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 26, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + m_DeviceRebooting = false; + int firmwareUpdateNotification = GetFirmwareUpdateNotification((IFirmwareUpdateNotification**)(&cComPtrNtv_003CIFirmwareUpdateNotification_003E)); + if (*(long*)(&cComPtrNtv_003CIFirmwareUpdateNotification_003E) != 0L && firmwareUpdateNotification >= 0) + { + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + try + { + IEndpointHost* p = m_spEndpointHost.p; + firmwareUpdateNotification = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 120)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyEndpointId, (ushort**)(&wBSTRString)); + if (firmwareUpdateNotification >= 0) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_S(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 27, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), (ushort*)(*(ulong*)(&wBSTRString))); + } + long num = *(long*)(&cComPtrNtv_003CIFirmwareUpdateNotification_003E); + long num2 = *(long*)(&wBSTRString); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIFirmwareUpdateNotification_003E)) + 48)))((nint)num, (ushort*)num2); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + } + SendCompleteNotification(-2147467260, disconnectDeviceOnComplete: true); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 28, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIFirmwareUpdateNotification_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIFirmwareUpdateNotification_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIFirmwareUpdateNotification_003E_002ERelease(&cComPtrNtv_003CIFirmwareUpdateNotification_003E); + } + + internal unsafe int GetFirmwareUpdateNotification(IFirmwareUpdateNotification** ppNotification) + { + //IL_0152: Expected I, but got I8 + //IL_0152: Expected I, but got I8 + //IL_016b: Expected I, but got I8 + //IL_016b: Expected I, but got I8 + //IL_0174: Expected I, but got I8 + //IL_017c: Expected I8, but got I + CComPtrNtv_003CIEndpointHostManager_003E cComPtrNtv_003CIEndpointHostManager_003E; + *(long*)(&cComPtrNtv_003CIEndpointHostManager_003E) = 0L; + CComPtrNtv_003CIEndpointManager_003E cComPtrNtv_003CIEndpointManager_003E; + CComPtrNtv_003CIFirmwareUpdateNotification_003E cComPtrNtv_003CIFirmwareUpdateNotification_003E; + EEndpointClass eEndpointClass; + try + { + *(long*)(&cComPtrNtv_003CIEndpointManager_003E) = 0L; + try + { + *(long*)(&cComPtrNtv_003CIFirmwareUpdateNotification_003E) = 0L; + try + { + eEndpointClass = EEndpointClass.eEndpointClassInvalid; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 29, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + if (ppNotification == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 1289u); + goto IL_0072; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIFirmwareUpdateNotification_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIFirmwareUpdateNotification_003E); + throw; + } + goto end_IL_000a; + IL_0072: + _003CModule_003E.CComPtrNtv_003CIFirmwareUpdateNotification_003E_002ERelease(&cComPtrNtv_003CIFirmwareUpdateNotification_003E); + goto IL_0089; + end_IL_000a:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIEndpointManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIEndpointManager_003E); + throw; + } + goto end_IL_0005; + IL_0089: + _003CModule_003E.CComPtrNtv_003CIEndpointManager_003E_002ERelease(&cComPtrNtv_003CIEndpointManager_003E); + goto IL_00a0; + end_IL_0005:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIEndpointHostManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIEndpointHostManager_003E); + throw; + } + CComPtrMgd_003CIEndpointHost_003E spEndpointHost; + try + { + try + { + try + { + spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 1290u); + goto IL_00de; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIFirmwareUpdateNotification_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIFirmwareUpdateNotification_003E); + throw; + } + goto end_IL_00ae; + IL_00de: + _003CModule_003E.CComPtrNtv_003CIFirmwareUpdateNotification_003E_002ERelease(&cComPtrNtv_003CIFirmwareUpdateNotification_003E); + goto IL_00f5; + end_IL_00ae:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIEndpointManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIEndpointManager_003E); + throw; + } + goto end_IL_00ae_2; + IL_00f5: + _003CModule_003E.CComPtrNtv_003CIEndpointManager_003E_002ERelease(&cComPtrNtv_003CIEndpointManager_003E); + goto IL_010c; + end_IL_00ae_2:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIEndpointHostManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIEndpointHostManager_003E); + throw; + } + int num; + try + { + try + { + try + { + num = _003CModule_003E.GetEnumProperty_003Cstruct_0020IEndpointHost_002Cenum_0020EEndpointHostProperty_002Cenum_0020EEndpointClass_003E(spEndpointHost.p, EEndpointHostProperty.eEndpointHostPropertyClassId, &eEndpointClass); + if (num >= 0) + { + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_0a3d3343_00d9_4c61_9a86_2d778793e05f, (void**)(&cComPtrNtv_003CIEndpointHostManager_003E)); + if (num >= 0) + { + long num2 = *(long*)(&cComPtrNtv_003CIEndpointHostManager_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIEndpointHostManager_003E)) + 88)))((nint)num2, (IEndpointManager**)(&cComPtrNtv_003CIEndpointManager_003E)); + if (num >= 0) + { + long num3 = *(long*)(&cComPtrNtv_003CIEndpointManager_003E); + EEndpointClass num4 = eEndpointClass; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIEndpointManager_003E)) + 88)))((nint)num3, num4, (IFirmwareUpdateNotification**)(&cComPtrNtv_003CIFirmwareUpdateNotification_003E)); + if (num >= 0) + { + IFirmwareUpdateNotification* ptr = (IFirmwareUpdateNotification*)(*(ulong*)(&cComPtrNtv_003CIFirmwareUpdateNotification_003E)); + *(long*)(&cComPtrNtv_003CIFirmwareUpdateNotification_003E) = 0L; + *(long*)ppNotification = (nint)ptr; + } + } + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 30, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), num); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIFirmwareUpdateNotification_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIFirmwareUpdateNotification_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIFirmwareUpdateNotification_003E_002ERelease(&cComPtrNtv_003CIFirmwareUpdateNotification_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIEndpointManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIEndpointManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIEndpointManager_003E_002ERelease(&cComPtrNtv_003CIEndpointManager_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIEndpointHostManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIEndpointHostManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIEndpointHostManager_003E_002ERelease(&cComPtrNtv_003CIEndpointHostManager_003E); + return num; + IL_00a0: + _003CModule_003E.CComPtrNtv_003CIEndpointHostManager_003E_002ERelease(&cComPtrNtv_003CIEndpointHostManager_003E); + return -2147467261; + IL_010c: + _003CModule_003E.CComPtrNtv_003CIEndpointHostManager_003E_002ERelease(&cComPtrNtv_003CIEndpointHostManager_003E); + return -2147418113; + } + + internal abstract int ContinueFirmwareProcess(FirmwareCompleteHandler onCompleteHandler); + + internal abstract void ReleaseNativeObject(); + + internal abstract int InternalReset(); + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EFirmwareOperationBase(); + } + finally + { + try + { + ((IDisposable)m_spFirmwareMediator).Dispose(); + } + finally + { + try + { + ((IDisposable)m_spEndpointHost).Dispose(); + } + finally + { + } + } + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FirmwareProcessCompleteArgs.cs b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareProcessCompleteArgs.cs new file mode 100644 index 0000000..cc4a1f4 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareProcessCompleteArgs.cs @@ -0,0 +1,38 @@ +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class FirmwareProcessCompleteArgs + { + private FirmwareUpdateErrorInfo m_ErrorInfo; + + private UpdateStep m_Step; + + private CompletionAction m_Action; + + private bool m_DisconnectDeviceOnComplete; + + public bool DisconnectDeviceOnComplete + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_DisconnectDeviceOnComplete; + } + } + + public CompletionAction Action => m_Action; + + public UpdateStep Step => m_Step; + + public FirmwareUpdateErrorInfo ErrorInfo => m_ErrorInfo; + + public FirmwareProcessCompleteArgs(FirmwareUpdateErrorInfo ErrorInfo, UpdateStep Step, CompletionAction Action, [MarshalAs(UnmanagedType.U1)] bool DisconnectDeviceOnComplete) + { + m_ErrorInfo = ErrorInfo; + m_Step = Step; + m_Action = Action; + m_DisconnectDeviceOnComplete = DisconnectDeviceOnComplete; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FirmwareRestorePoint.cs b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareRestorePoint.cs new file mode 100644 index 0000000..5ce3544 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareRestorePoint.cs @@ -0,0 +1,130 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class FirmwareRestorePoint : IDisposable + { + private readonly CComPtrMgd_003CIFirmwareRestorePoint_003E m_spRestorePoint; + + internal unsafe IFirmwareRestorePoint* NativeRestorePointPtr => m_spRestorePoint.p; + + public unsafe TimeSpan EstimatedRestoreTime + { + get + { + //IL_0026: Expected I, but got I8 + TimeSpan result = TimeSpan.Zero; + uint num = 0u; + IFirmwareRestorePoint* p = m_spRestorePoint.p; + if (p != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p, &num) >= 0) + { + result = TimeSpan.FromMilliseconds(num); + } + return result; + } + } + + public unsafe DateTime CreationDate + { + get + { + //IL_0019: Expected I4, but got I8 + //IL_0037: Expected I, but got I8 + DateTime result = default(DateTime); + _SYSTEMTIME stValue; + *(short*)(&stValue) = 0; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref stValue, 2), 0, 14); + IFirmwareRestorePoint* p = m_spRestorePoint.p; + if (p != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)p, &stValue) >= 0) + { + return _003CModule_003E.SystemTimeToDateTime(stValue); + } + return result; + } + } + + public unsafe string OSVersion + { + get + { + //IL_0005: Expected I, but got I8 + //IL_0023: Expected I, but got I8 + string result = null; + ushort* ptr = null; + IFirmwareRestorePoint* p = m_spRestorePoint.p; + if (p != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p, &ptr) >= 0) + { + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + } + + internal unsafe FirmwareRestorePoint(IFirmwareRestorePoint* pRestorePoint) + { + CComPtrMgd_003CIFirmwareRestorePoint_003E spRestorePoint = new CComPtrMgd_003CIFirmwareRestorePoint_003E(); + try + { + m_spRestorePoint = spRestorePoint; + base._002Ector(); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_q(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 64, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), pRestorePoint); + } + m_spRestorePoint.op_Assign(pRestorePoint); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 65, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + } + catch + { + //try-fault + ((IDisposable)m_spRestorePoint).Dispose(); + throw; + } + } + + private unsafe void _007EFirmwareRestorePoint() + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 66, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + m_spRestorePoint.Release(); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 67, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EFirmwareRestorePoint(); + } + finally + { + ((IDisposable)m_spRestorePoint).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FirmwareRestorePointCollection.cs b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareRestorePointCollection.cs new file mode 100644 index 0000000..f8ff283 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareRestorePointCollection.cs @@ -0,0 +1,119 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class FirmwareRestorePointCollection : IDisposable + { + private readonly CComPtrMgd_003CIFirmwareRestorePointCollection_003E m_spRestorePointCollection; + + public unsafe int Count + { + get + { + //IL_0022: Expected I, but got I8 + int num = 0; + uint num2 = 0u; + IFirmwareRestorePointCollection* p = m_spRestorePointCollection.p; + if (p != null) + { + num = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p, &num2) >= 0) ? ((int)num2) : num); + } + return num; + } + } + + public unsafe FirmwareRestorePoint GetRestorePoint(int index) + { + //IL_002f: Expected I, but got I8 + //IL_003c: Expected I, but got I8 + FirmwareRestorePoint result = null; + CComPtrNtv_003CIFirmwareRestorePoint_003E cComPtrNtv_003CIFirmwareRestorePoint_003E; + *(long*)(&cComPtrNtv_003CIFirmwareRestorePoint_003E) = 0L; + try + { + CComPtrMgd_003CIFirmwareRestorePointCollection_003E spRestorePointCollection = m_spRestorePointCollection; + if (spRestorePointCollection.p != null) + { + IFirmwareRestorePointCollection* p = spRestorePointCollection.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)p, (uint)index, (IFirmwareRestorePoint**)(&cComPtrNtv_003CIFirmwareRestorePoint_003E)) >= 0) + { + result = new FirmwareRestorePoint((IFirmwareRestorePoint*)(*(ulong*)(&cComPtrNtv_003CIFirmwareRestorePoint_003E))); + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIFirmwareRestorePoint_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIFirmwareRestorePoint_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIFirmwareRestorePoint_003E_002ERelease(&cComPtrNtv_003CIFirmwareRestorePoint_003E); + return result; + } + + internal unsafe FirmwareRestorePointCollection(IFirmwareRestorePointCollection* pRestorePointCollection) + { + CComPtrMgd_003CIFirmwareRestorePointCollection_003E spRestorePointCollection = new CComPtrMgd_003CIFirmwareRestorePointCollection_003E(); + try + { + m_spRestorePointCollection = spRestorePointCollection; + base._002Ector(); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_q(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 68, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), pRestorePointCollection); + } + m_spRestorePointCollection.op_Assign(pRestorePointCollection); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 69, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + } + catch + { + //try-fault + ((IDisposable)m_spRestorePointCollection).Dispose(); + throw; + } + } + + private unsafe void _007EFirmwareRestorePointCollection() + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 70, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + m_spRestorePointCollection.Release(); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 71, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EFirmwareRestorePointCollection(); + } + finally + { + ((IDisposable)m_spRestorePointCollection).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FirmwareRestorer.cs b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareRestorer.cs new file mode 100644 index 0000000..6a1634b --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareRestorer.cs @@ -0,0 +1,577 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using Microsoft.Iris; +using ZuneUI; + +namespace MicrosoftZuneLibrary +{ + public class FirmwareRestorer : FirmwareOperationBase + { + private readonly CComPtrMgd_003CIFirmwareRestorer_003E m_spFirmwareRestorer; + + private FirmwareUpdater m_Updater; + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool IsRestoreInProgress() + { + //IL_00a6: Expected I, but got I8 + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 76, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + int num = (((long)(nint)m_spFirmwareMediator.p != 0) ? 1 : 0); + if (!m_Canceled) + { + if (Application.IsApplicationThread) + { + _003CModule_003E._ZuneShipAssert(1004u, 2313u); + } + Monitor.Enter(m_FirmwareLock); + try + { + if (m_fFirmwareProcessSupported && EnsureNativeObject() >= 0) + { + IFirmwareRestorer* p = m_spFirmwareRestorer.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)p, &num); + } + } + finally + { + Monitor.Exit(m_FirmwareLock); + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_ql(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 77, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), m_spFirmwareRestorer.p, num); + } + return (byte)((num != 0) ? 1u : 0u) != 0; + } + + public unsafe HRESULT StartGetRestorePointCollection(DeferredInvokeHandler getCollectionComplete) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 88, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + int num = 0; + if (m_fFirmwareProcessSupported) + { + if (getCollectionComplete == null) + { + num = -2147418113; + } + else if (!ThreadPool.QueueUserWorkItem(StartGetRestorePointCollectionWorker, getCollectionComplete)) + { + _003CModule_003E._ZuneShipAssert(1004u, 2660u); + num = -2147467259; + } + } + else + { + _003CModule_003E._ZuneShipAssert(1004u, 2667u); + num = -2147024846; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 89, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), num); + } + return num; + } + + public unsafe HRESULT StartFirmwareRestore(FirmwareRestorePoint restorePoint, DeferredInvokeHandler restoreBegin, DeferredInvokeHandler restoreProgress, DeferredInvokeHandler restoreComplete) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 78, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + m_Canceled = false; + int num = 0; + if (m_fFirmwareProcessSupported) + { + if (restorePoint == null) + { + num = -2147418113; + } + else + { + StartFirmwareRestoreArgs startFirmwareRestoreArgs = new StartFirmwareRestoreArgs(restorePoint, restoreBegin, restoreProgress, restoreComplete); + if (Application.IsApplicationThread) + { + if (!ThreadPool.QueueUserWorkItem(StartFirmwareRestoreWorker, startFirmwareRestoreArgs)) + { + _003CModule_003E._ZuneShipAssert(1004u, 2375u); + num = -2147467259; + } + } + else + { + StartFirmwareRestoreWorker(startFirmwareRestoreArgs); + num = startFirmwareRestoreArgs.HrStatus; + } + } + } + else + { + _003CModule_003E._ZuneShipAssert(1004u, 2388u); + num = -2147024846; + } + return num; + } + + public unsafe HRESULT Cancel() + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 92, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + int num = 0; + if (m_fFirmwareProcessSupported) + { + m_Canceled = true; + if (Application.IsApplicationThread) + { + if (!ThreadPool.QueueUserWorkItem(CancelWorker, null)) + { + _003CModule_003E._ZuneShipAssert(1004u, 2735u); + } + } + else + { + CancelWorker(null); + } + } + else + { + _003CModule_003E._ZuneShipAssert(1004u, 2745u); + num = -2147024846; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 93, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + return num; + } + + internal unsafe FirmwareRestorer(IEndpointHost* pEndpointHost, [MarshalAs(UnmanagedType.U1)] bool fFirmwareProcessSupported, FirmwareUpdater updater) + { + CComPtrMgd_003CIFirmwareRestorer_003E spFirmwareRestorer = new CComPtrMgd_003CIFirmwareRestorer_003E(); + try + { + m_spFirmwareRestorer = spFirmwareRestorer; + base._002Ector(); + try + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_q(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 72, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), pEndpointHost); + } + m_spEndpointHost.op_Assign(pEndpointHost); + m_fFirmwareProcessSupported = fFirmwareProcessSupported; + m_Updater = updater; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 73, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + } + catch + { + //try-fault + base.Dispose(true); + throw; + } + } + catch + { + //try-fault + ((IDisposable)m_spFirmwareRestorer).Dispose(); + throw; + } + } + + private unsafe void _007EFirmwareRestorer() + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 74, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + if (IsRestoreInProgress()) + { + _003CModule_003E._ZuneShipAssert(1004u, 2290u); + } + m_spFirmwareRestorer.Release(); + m_Updater = null; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 75, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + } + + internal unsafe override int InternalReset() + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 85, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + m_Updater?.InternalReset(); + return 0; + } + + internal override int ContinueFirmwareProcess(FirmwareCompleteHandler onCompleteHandler) + { + int result = 0; + if (!ThreadPool.QueueUserWorkItem(state: new ContinueFirmwareUpdateArgs(onCompleteHandler), callBack: ContinueFirmwareRestoreWorker)) + { + _003CModule_003E._ZuneShipAssert(1004u, 2470u); + result = -2147467259; + SendCompleteNotification(-2147467259, disconnectDeviceOnComplete: false); + } + return result; + } + + internal unsafe override void ReleaseNativeObject() + { + //IL_0055: Expected I, but got I8 + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 7u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 87, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + Monitor.Enter(m_FirmwareLock); + try + { + m_spFirmwareRestorer.op_Assign(null); + } + finally + { + Monitor.Exit(m_FirmwareLock); + } + } + + private unsafe int EnsureNativeObject() + { + //IL_00b3: Expected I, but got I8 + //IL_00bd: Expected I, but got I8 + //IL_00c8: Expected I, but got I8 + //IL_00d6: Expected I, but got I8 + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 7u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 86, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + int result = 0; + if (Application.IsApplicationThread) + { + _003CModule_003E._ZuneShipAssert(1004u, 2582u); + } + Monitor.Enter(m_FirmwareLock); + try + { + if (!m_fFirmwareProcessSupported) + { + int num = -2147024846; + return -2147024846; + } + if (m_spFirmwareRestorer.p == null) + { + CComPtrNtv_003CIFirmwareUpdater_003E cComPtrNtv_003CIFirmwareUpdater_003E; + *(long*)(&cComPtrNtv_003CIFirmwareUpdater_003E) = 0L; + try + { + result = m_Updater.GetNativeObject((IFirmwareUpdater**)(&cComPtrNtv_003CIFirmwareUpdater_003E)); + if (result >= 0 && *(long*)(&cComPtrNtv_003CIFirmwareUpdater_003E) != 0L) + { + CComPtrNtv_003CIFirmwareRestorer_003E cComPtrNtv_003CIFirmwareRestorer_003E; + *(long*)(&cComPtrNtv_003CIFirmwareRestorer_003E) = 0L; + try + { + IFirmwareUpdater* ptr = (IFirmwareUpdater*)(*(ulong*)(&cComPtrNtv_003CIFirmwareUpdater_003E)); + result = _003CModule_003E.IUnknown_002EQueryInterface_003Cstruct_0020IFirmwareRestorer_003E((IUnknown*)(*(ulong*)(&cComPtrNtv_003CIFirmwareUpdater_003E)), (IFirmwareRestorer**)(&cComPtrNtv_003CIFirmwareRestorer_003E)); + if (result >= 0) + { + IFirmwareRestorer* ptr2 = (IFirmwareRestorer*)(*(ulong*)(&cComPtrNtv_003CIFirmwareRestorer_003E)); + m_spFirmwareRestorer.op_Assign((IFirmwareRestorer*)(*(ulong*)(&cComPtrNtv_003CIFirmwareRestorer_003E))); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIFirmwareRestorer_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIFirmwareRestorer_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIFirmwareRestorer_003E_002ERelease(&cComPtrNtv_003CIFirmwareRestorer_003E); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIFirmwareUpdater_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIFirmwareUpdater_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIFirmwareUpdater_003E_002ERelease(&cComPtrNtv_003CIFirmwareUpdater_003E); + return result; + } + return result; + } + finally + { + Monitor.Exit(m_FirmwareLock); + } + } + + private unsafe void ContinueFirmwareRestoreWorker(object data) + { + //IL_015e: Expected I, but got I8 + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 80, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + int num = 0; + if (m_Canceled) + { + num = -2147467260; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 81, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + } + else if ((long)(nint)m_spFirmwareMediator.p == 0) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 2u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 82, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + num = -2147418113; + } + if (Application.IsApplicationThread) + { + _003CModule_003E._ZuneShipAssert(1004u, 2514u); + } + Monitor.Enter(m_FirmwareLock); + try + { + if (num >= 0) + { + num = EnsureNativeObject(); + if (num >= 0) + { + ContinueFirmwareUpdateArgs continueFirmwareUpdateArgs = (ContinueFirmwareUpdateArgs)data; + if (continueFirmwareUpdateArgs.OnCompleteHandler != null) + { + m_OnCompleteHandler = continueFirmwareUpdateArgs.OnCompleteHandler; + } + IFirmwareRestorer* p = m_spFirmwareRestorer.p; + FirmwareUpdateMediator* p2 = m_spFirmwareMediator.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 48)))((nint)p, (IFirmwareUpdateCallback*)p2); + } + } + } + finally + { + Monitor.Exit(m_FirmwareLock); + } + if (num < 0) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 2u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 83, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), num); + } + SendCompleteNotification(num, disconnectDeviceOnComplete: false); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 84, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), num); + } + } + + private unsafe void StartFirmwareRestoreWorker(object data) + { + //IL_0014: Expected I, but got I8 + //IL_0053: Expected I, but got I8 + //IL_00da: Expected I, but got I8 + StartFirmwareRestoreArgs startFirmwareRestoreArgs = (StartFirmwareRestoreArgs)data; + m_spFirmwareMediator.op_Assign(null); + m_HandlerComplete = startFirmwareRestoreArgs.FirmwareUpdateComplete; + int num = 0; + FirmwareUpdateMediator* ptr = (FirmwareUpdateMediator*)_003CModule_003E.@new(64uL); + FirmwareUpdateMediator* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.MicrosoftZuneLibrary_002EFirmwareUpdateMediator_002E_007Bctor_007D(ptr, startFirmwareRestoreArgs.FirmwareUpdateBegin, startFirmwareRestoreArgs.FirmwareUpdateProgress, base.OnFirmwareProcessCompleteWorker)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + if (ptr2 != null) + { + m_spFirmwareMediator.op_Assign(ptr2); + } + else + { + num = -2147024882; + } + if (Application.IsApplicationThread) + { + _003CModule_003E._ZuneShipAssert(1004u, 2424u); + } + Monitor.Enter(m_FirmwareLock); + try + { + if (num >= 0) + { + num = EnsureNativeObject(); + if (num >= 0) + { + IFirmwareRestorer* p = m_spFirmwareRestorer.p; + FirmwareUpdateMediator* p2 = m_spFirmwareMediator.p; + IFirmwareRestorePoint* nativeRestorePointPtr = startFirmwareRestoreArgs.RestorePoint.NativeRestorePointPtr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p, nativeRestorePointPtr, (IFirmwareUpdateCallback*)p2); + } + } + } + finally + { + Monitor.Exit(m_FirmwareLock); + } + startFirmwareRestoreArgs.HrStatus = num; + if (num < 0) + { + Reset(deviceRebooting: false); + SendCompleteNotification(num, disconnectDeviceOnComplete: false); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 79, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), num); + } + } + + private unsafe void StartGetRestorePointCollectionWorker(object data) + { + //IL_0092: Expected I, but got I8 + //IL_00a5: Expected I, but got I8 + //IL_00ad: Expected I, but got I8 + CComPtrNtv_003CIFirmwareRestorePointCollection_003E cComPtrNtv_003CIFirmwareRestorePointCollection_003E; + *(long*)(&cComPtrNtv_003CIFirmwareRestorePointCollection_003E) = 0L; + try + { + DeferredInvokeHandler deferredInvokeHandler = (DeferredInvokeHandler)data; + int num = 0; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 90, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + if (Application.IsApplicationThread) + { + _003CModule_003E._ZuneShipAssert(1004u, 2687u); + } + Monitor.Enter(m_FirmwareLock); + try + { + num = EnsureNativeObject(); + if (num >= 0) + { + IFirmwareRestorer* p = m_spFirmwareRestorer.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p, (IFirmwareRestorePointCollection**)(&cComPtrNtv_003CIFirmwareRestorePointCollection_003E)); + } + if (deferredInvokeHandler != null) + { + FirmwareRestorePointCollection args; + if (num >= 0) + { + IFirmwareRestorePointCollection* ptr = (IFirmwareRestorePointCollection*)(*(ulong*)(&cComPtrNtv_003CIFirmwareRestorePointCollection_003E)); + args = new FirmwareRestorePointCollection((IFirmwareRestorePointCollection*)(*(ulong*)(&cComPtrNtv_003CIFirmwareRestorePointCollection_003E))); + } + else + { + args = null; + } + deferredInvokeHandler(args); + } + } + finally + { + Monitor.Exit(m_FirmwareLock); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 91, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), num); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIFirmwareRestorePointCollection_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIFirmwareRestorePointCollection_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIFirmwareRestorePointCollection_003E_002ERelease(&cComPtrNtv_003CIFirmwareRestorePointCollection_003E); + } + + private unsafe void CancelWorker(object data) + { + //IL_005c: Expected I, but got I8 + if (Application.IsApplicationThread) + { + _003CModule_003E._ZuneShipAssert(1004u, 2758u); + } + Monitor.Enter(m_FirmwareLock); + try + { + CComPtrMgd_003CMicrosoftZuneLibrary_003A_003AFirmwareUpdateMediator_003E spFirmwareMediator = m_spFirmwareMediator; + if (spFirmwareMediator.p != null) + { + _003CModule_003E.MicrosoftZuneLibrary_002EFirmwareUpdateMediator_002EFirmwareProcessCanceled(spFirmwareMediator.p); + } + CComPtrMgd_003CIFirmwareRestorer_003E spFirmwareRestorer = m_spFirmwareRestorer; + if (spFirmwareRestorer.p != null) + { + IFirmwareRestorer* p = spFirmwareRestorer.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 56)))((nint)p) < 0) + { + _003CModule_003E._ZuneShipAssert(1004u, 2773u); + } + Reset(deviceRebooting: false); + } + else if (IsDeviceRebooting()) + { + DeferredCancel(); + } + } + finally + { + Monitor.Exit(m_FirmwareLock); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 94, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + } + + protected override void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EFirmwareRestorer(); + } + finally + { + try + { + base.Dispose(true); + } + finally + { + ((IDisposable)m_spFirmwareRestorer).Dispose(); + } + } + } + else + { + base.Dispose(false); + } + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateBeginArgs.cs b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateBeginArgs.cs new file mode 100644 index 0000000..da71753 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateBeginArgs.cs @@ -0,0 +1,14 @@ +namespace MicrosoftZuneLibrary +{ + public class FirmwareUpdateBeginArgs + { + private UpdateStep m_Step; + + public UpdateStep Step => m_Step; + + public FirmwareUpdateBeginArgs(UpdateStep Step) + { + m_Step = Step; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateErrorInfo.cs b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateErrorInfo.cs new file mode 100644 index 0000000..d615f7b --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateErrorInfo.cs @@ -0,0 +1,109 @@ +using System; +using System.Runtime.InteropServices; +using ZuneUI; + +namespace MicrosoftZuneLibrary +{ + public class FirmwareUpdateErrorInfo : IDisposable + { + private readonly CComPtrMgd_003CIFirmwareUpdateErrorInfo_003E m_spErrorInfo; + + public unsafe string Url + { + get + { + //IL_0005: Expected I, but got I8 + //IL_0023: Expected I, but got I8 + string result = null; + ushort* ptr = null; + IFirmwareUpdateErrorInfo* p = m_spErrorInfo.p; + if (p != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p, &ptr) >= 0) + { + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + } + + public unsafe string Description + { + get + { + //IL_0005: Expected I, but got I8 + //IL_0023: Expected I, but got I8 + string result = null; + ushort* ptr = null; + IFirmwareUpdateErrorInfo* p = m_spErrorInfo.p; + if (p != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)p, &ptr) >= 0) + { + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + } + + public unsafe HRESULT HrStatus + { + get + { + //IL_0024: Expected I, but got I8 + int num = -2147467259; + IFirmwareUpdateErrorInfo* p = m_spErrorInfo.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p, &num); + } + return num; + } + } + + internal unsafe FirmwareUpdateErrorInfo(IFirmwareUpdateErrorInfo* pErrorInfo) + { + CComPtrMgd_003CIFirmwareUpdateErrorInfo_003E spErrorInfo = new CComPtrMgd_003CIFirmwareUpdateErrorInfo_003E(); + try + { + m_spErrorInfo = spErrorInfo; + base._002Ector(); + m_spErrorInfo.op_Assign(pErrorInfo); + } + catch + { + //try-fault + ((IDisposable)m_spErrorInfo).Dispose(); + throw; + } + } + + private void _007EFirmwareUpdateErrorInfo() + { + m_spErrorInfo.Release(); + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EFirmwareUpdateErrorInfo(); + } + finally + { + ((IDisposable)m_spErrorInfo).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateMediator.cs b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateMediator.cs new file mode 100644 index 0000000..c4ccc75 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateMediator.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace MicrosoftZuneLibrary +{ + [StructLayout(LayoutKind.Sequential, Size = 64)] + [MiscellaneousBits(64)] + [DebugInfoInPDB] + [NativeCppClass] + internal struct FirmwareUpdateMediator + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateOption.cs b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateOption.cs new file mode 100644 index 0000000..aedafa2 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateOption.cs @@ -0,0 +1,8 @@ +namespace MicrosoftZuneLibrary +{ + public enum FirmwareUpdateOption + { + NoBackup = 1, + None = 0 + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdatePackage.cs b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdatePackage.cs new file mode 100644 index 0000000..a148fa6 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdatePackage.cs @@ -0,0 +1,199 @@ +using System; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class FirmwareUpdatePackage : IDisposable + { + private readonly CComPtrMgd_003CIFirmwareMetadata_003E m_spFirmwareMetadata; + + private bool m_fSelected; + + internal bool Selected + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_fSelected; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + m_fSelected = value; + } + } + + public unsafe TimeSpan UpdateEstimatedTime + { + get + { + //IL_002f: Expected I, but got I8 + TimeSpan result = default(TimeSpan); + CComPtrMgd_003CIFirmwareMetadata_003E spFirmwareMetadata = m_spFirmwareMetadata; + if (spFirmwareMetadata.p != null) + { + uint num = 0u; + IFirmwareMetadata* p = spFirmwareMetadata.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 72)))((nint)p, &num) >= 0) + { + return TimeSpan.FromMilliseconds(num); + } + } + return result; + } + } + + public unsafe string MoreInfoURL + { + get + { + //IL_0005: Expected I, but got I8 + //IL_0023: Expected I, but got I8 + string result = null; + ushort* ptr = null; + IFirmwareMetadata* p = m_spFirmwareMetadata.p; + if (p != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 64)))((nint)p, &ptr) >= 0) + { + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + } + + public unsafe string EULAContent + { + get + { + //IL_0005: Expected I, but got I8 + //IL_0023: Expected I, but got I8 + string result = null; + ushort* ptr = null; + IFirmwareMetadata* p = m_spFirmwareMetadata.p; + if (p != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 56)))((nint)p, &ptr) >= 0) + { + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + } + + public unsafe string Version + { + get + { + //IL_0005: Expected I, but got I8 + //IL_0023: Expected I, but got I8 + string result = null; + ushort* ptr = null; + IFirmwareMetadata* p = m_spFirmwareMetadata.p; + if (p != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p, &ptr) >= 0) + { + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + } + + public unsafe string Description + { + get + { + //IL_0005: Expected I, but got I8 + //IL_0023: Expected I, but got I8 + string result = null; + ushort* ptr = null; + IFirmwareMetadata* p = m_spFirmwareMetadata.p; + if (p != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)p, &ptr) >= 0) + { + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + } + + public unsafe string Name + { + get + { + //IL_0005: Expected I, but got I8 + //IL_0023: Expected I, but got I8 + string result = null; + ushort* ptr = null; + IFirmwareMetadata* p = m_spFirmwareMetadata.p; + if (p != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p, &ptr) >= 0) + { + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + } + + public unsafe FirmwareUpdateType Type + { + get + { + //IL_0020: Expected I, but got I8 + EFirmwareUpdateType result = (EFirmwareUpdateType)(-1); + IFirmwareMetadata* p = m_spFirmwareMetadata.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 48)))((nint)p, &result); + } + return (FirmwareUpdateType)result; + } + } + + internal unsafe FirmwareUpdatePackage(IFirmwareMetadata* pFirmwareMetadata) + { + CComPtrMgd_003CIFirmwareMetadata_003E spFirmwareMetadata = new CComPtrMgd_003CIFirmwareMetadata_003E(); + try + { + m_spFirmwareMetadata = spFirmwareMetadata; + base._002Ector(); + m_spFirmwareMetadata.op_Assign(pFirmwareMetadata); + m_fSelected = false; + } + catch + { + //try-fault + ((IDisposable)m_spFirmwareMetadata).Dispose(); + throw; + } + } + + private void _007EFirmwareUpdatePackage() + { + m_spFirmwareMetadata.Release(); + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EFirmwareUpdatePackage(); + } + finally + { + ((IDisposable)m_spFirmwareMetadata).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateProgressArgs.cs b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateProgressArgs.cs new file mode 100644 index 0000000..dedb343 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateProgressArgs.cs @@ -0,0 +1,14 @@ +namespace MicrosoftZuneLibrary +{ + public class FirmwareUpdateProgressArgs + { + private UpdateStep m_Step; + + public UpdateStep Step => m_Step; + + public FirmwareUpdateProgressArgs(UpdateStep Step) + { + m_Step = Step; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateType.cs b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateType.cs new file mode 100644 index 0000000..1bc73f6 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdateType.cs @@ -0,0 +1,12 @@ +namespace MicrosoftZuneLibrary +{ + public enum FirmwareUpdateType + { + FFU = 4, + IU = 3, + CABRomShadow = 2, + Firmware = 1, + Games = 0, + Undefined = -1 + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdater.cs b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdater.cs new file mode 100644 index 0000000..5e4208a --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FirmwareUpdater.cs @@ -0,0 +1,880 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using Microsoft.Iris; +using ZuneUI; + +namespace MicrosoftZuneLibrary +{ + public class FirmwareUpdater : FirmwareOperationBase + { + private readonly CComPtrMgd_003CIFirmwareUpdater_003E m_spFirmwareUpdater; + + private FirmwareRestorer m_Restorer; + + public unsafe FirmwareRestorer Restorer + { + get + { + if (m_Restorer == null) + { + IEndpointHost* p = m_spEndpointHost.p; + m_Restorer = new FirmwareRestorer(p, m_fFirmwareProcessSupported, this); + } + return m_Restorer; + } + } + + public unsafe UpdateAction IsUpdateInProgress() + { + //IL_00aa: Expected I, but got I8 + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 37, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + EUpdateAction eUpdateAction = (((long)(nint)m_spFirmwareMediator.p != 0) ? ((EUpdateAction)1) : ((EUpdateAction)0)); + EUpdateAction eUpdateAction2 = eUpdateAction; + if (!m_Canceled) + { + if (Application.IsApplicationThread) + { + _003CModule_003E._ZuneShipAssert(1004u, 1435u); + } + Monitor.Enter(m_FirmwareLock); + try + { + if (m_fFirmwareProcessSupported && EnsureNativeObject() >= 0) + { + IFirmwareUpdater* p = m_spFirmwareUpdater.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)p, &eUpdateAction2); + } + } + finally + { + Monitor.Exit(m_FirmwareLock); + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_qd(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 38, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), m_spFirmwareUpdater.p, (int)eUpdateAction2); + } + return (UpdateAction)eUpdateAction2; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool RequiresSyncBeforeUpdate() + { + //IL_0089: Expected I, but got I8 + //IL_0089: Expected I, but got I8 + ManagedLock managedLock = null; + bool flag = false; + CComPtrNtv_003CIFirmwareUpdater2_003E cComPtrNtv_003CIFirmwareUpdater2_003E; + *(long*)(&cComPtrNtv_003CIFirmwareUpdater2_003E) = 0L; + try + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 35, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + ManagedLock managedLock2 = new ManagedLock(m_FirmwareLock); + try + { + managedLock = managedLock2; + int num = EnsureNativeObject(); + if (num >= 0) + { + num = m_spFirmwareUpdater.QueryInterface_003CIFirmwareUpdater2_003E((IFirmwareUpdater2**)(&cComPtrNtv_003CIFirmwareUpdater2_003E)); + if (num >= 0) + { + int num2 = 0; + long num3 = *(long*)(&cComPtrNtv_003CIFirmwareUpdater2_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIFirmwareUpdater2_003E)) + 72)))((nint)num3, &num2); + int num4 = ((num >= 0 && num2 != 0) ? 1 : 0); + flag = (byte)num4 != 0; + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_dl(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 36, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), num, flag ? 1 : 0); + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIFirmwareUpdater2_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIFirmwareUpdater2_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIFirmwareUpdater2_003E_002ERelease(&cComPtrNtv_003CIFirmwareUpdater2_003E); + return flag; + } + + public unsafe HRESULT StartCheckForDiskSpace(DeferredInvokeHandler checkForDiskSpaceComplete) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 47, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + int num = 0; + if (Application.IsApplicationThread) + { + if (!ThreadPool.QueueUserWorkItem(StartCheckForDiskSpaceWorker, checkForDiskSpaceComplete)) + { + _003CModule_003E._ZuneShipAssert(1004u, 1753u); + num = -2147467259; + } + } + else + { + StartCheckForDiskSpaceWorker(checkForDiskSpaceComplete); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 48, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), num); + } + return num; + } + + public unsafe HRESULT StartCheckForUpdates([MarshalAs(UnmanagedType.U1)] bool fForceServerRequest, DeferredInvokeHandler checkForUpdatesComplete) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_l(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 39, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), fForceServerRequest ? 1 : 0); + } + int num = 0; + if (m_fFirmwareProcessSupported) + { + if (checkForUpdatesComplete == null) + { + _003CModule_003E._ZuneShipAssert(1004u, 1479u); + num = -2147467261; + } + else + { + m_Canceled = false; + StartCheckForUpdatesArgs startCheckForUpdatesArgs = new StartCheckForUpdatesArgs(fForceServerRequest, checkForUpdatesComplete); + if (Application.IsApplicationThread) + { + if (!ThreadPool.QueueUserWorkItem(StartCheckForUpdatesWorker, startCheckForUpdatesArgs)) + { + _003CModule_003E._ZuneShipAssert(1004u, 1497u); + num = -2147467259; + } + } + else + { + StartCheckForUpdatesWorker(startCheckForUpdatesArgs); + num = startCheckForUpdatesArgs.HrStatus; + } + } + } + else + { + num = -2147024846; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 40, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), num); + } + return num; + } + + public unsafe HRESULT StartFirmwareUpdate(UpdatePackageCollection updates, DeferredInvokeHandler firmwareUpdateBegin, DeferredInvokeHandler firmwareUpdateProgress, DeferredInvokeHandler firmwareUpdateComplete, FirmwareUpdateOption updateOption) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 43, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + m_Canceled = false; + int num = 0; + if (updates == null) + { + num = -2147418113; + } + else + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 6u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 44, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), updates.Count); + } + int num2 = 0; + if (0 < updates.Count) + { + do + { + FirmwareUpdatePackage firmwareUpdatePackage = updates[num2]; + fixed (ushort* a = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(firmwareUpdatePackage.Name))) + { + try + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 6u) + { + _003CModule_003E.WPP_SF_dSl(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 45, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), num2, a, firmwareUpdatePackage.Selected ? 1 : 0); + } + } + catch + { + //try-fault + a = null; + throw; + } + } + num2++; + } + while (num2 < updates.Count); + } + StartFirmwareUpdateArgs startFirmwareUpdateArgs = new StartFirmwareUpdateArgs(updates, firmwareUpdateBegin, firmwareUpdateProgress, firmwareUpdateComplete, updateOption); + if (Application.IsApplicationThread) + { + if (!ThreadPool.QueueUserWorkItem(StartFirmwareUpdateWorker, startFirmwareUpdateArgs)) + { + _003CModule_003E._ZuneShipAssert(1004u, 1641u); + num = -2147467259; + } + } + else + { + StartFirmwareUpdateWorker(startFirmwareUpdateArgs); + num = startFirmwareUpdateArgs.HrStatus; + } + } + return num; + } + + public unsafe HRESULT Cancel() + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 56, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + int num = 0; + if (m_fFirmwareProcessSupported) + { + m_Canceled = true; + if (Application.IsApplicationThread) + { + if (!ThreadPool.QueueUserWorkItem(CancelWorker, null)) + { + _003CModule_003E._ZuneShipAssert(1004u, 1945u); + } + } + else + { + CancelWorker(null); + } + } + else + { + _003CModule_003E._ZuneShipAssert(1004u, 1955u); + num = -2147024846; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 57, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + return num; + } + + internal unsafe FirmwareUpdater(IEndpointHost* pEndpointHost, [MarshalAs(UnmanagedType.U1)] bool fFirmwareProcessSupported) + { + CComPtrMgd_003CIFirmwareUpdater_003E spFirmwareUpdater = new CComPtrMgd_003CIFirmwareUpdater_003E(); + try + { + m_spFirmwareUpdater = spFirmwareUpdater; + base._002Ector(); + try + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_q(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 31, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), pEndpointHost); + } + m_spEndpointHost.op_Assign(pEndpointHost); + m_fFirmwareProcessSupported = fFirmwareProcessSupported; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 32, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + } + catch + { + //try-fault + base.Dispose(true); + throw; + } + } + catch + { + //try-fault + ((IDisposable)m_spFirmwareUpdater).Dispose(); + throw; + } + } + + private unsafe void _007EFirmwareUpdater() + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 33, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + if (IsUpdateInProgress() != 0) + { + _003CModule_003E._ZuneShipAssert(1004u, 1355u); + } + m_spFirmwareUpdater.Release(); + FirmwareRestorer restorer = m_Restorer; + if (restorer != null) + { + ((IDisposable)restorer).Dispose(); + m_Restorer = null; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 34, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + } + + internal unsafe override int InternalReset() + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 59, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + m_Restorer?.ReleaseNativeObject(); + ReleaseNativeObject(); + return 0; + } + + internal override int ContinueFirmwareProcess(FirmwareCompleteHandler onCompleteHandler) + { + int result = 0; + if (!ThreadPool.QueueUserWorkItem(state: new ContinueFirmwareUpdateArgs(onCompleteHandler), callBack: ContinueFirmwareUpdateWorker)) + { + _003CModule_003E._ZuneShipAssert(1004u, 1838u); + result = -2147467259; + SendCompleteNotification(-2147467259, disconnectDeviceOnComplete: false); + } + return result; + } + + internal unsafe override void ReleaseNativeObject() + { + //IL_0055: Expected I, but got I8 + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 7u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 61, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + Monitor.Enter(m_FirmwareLock); + try + { + m_spFirmwareUpdater.op_Assign(null); + } + finally + { + Monitor.Exit(m_FirmwareLock); + } + } + + internal unsafe int GetNativeObject(IFirmwareUpdater** ppUpdater) + { + int num = 0; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 62, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + if (ppUpdater == null) + { + _003CModule_003E._ZuneShipAssert(1001u, 2089u); + return -2147467261; + } + if (Application.IsApplicationThread) + { + _003CModule_003E._ZuneShipAssert(1004u, 2091u); + } + Monitor.Enter(m_FirmwareLock); + try + { + num = EnsureNativeObject(); + if (num >= 0) + { + num = m_spFirmwareUpdater.CopyTo(ppUpdater); + } + } + finally + { + Monitor.Exit(m_FirmwareLock); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 63, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), num); + } + return num; + } + + private unsafe int EnsureNativeObject() + { + //IL_00a7: Expected I, but got I8 + //IL_00b5: Expected I, but got I8 + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 7u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 60, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + int result = 0; + if (Application.IsApplicationThread) + { + _003CModule_003E._ZuneShipAssert(1004u, 2028u); + } + Monitor.Enter(m_FirmwareLock); + try + { + if (!m_fFirmwareProcessSupported) + { + int num = -2147024846; + return -2147024846; + } + if (m_spFirmwareUpdater.p == null) + { + CComPtrNtv_003CIFirmwareUpdater_003E cComPtrNtv_003CIFirmwareUpdater_003E; + *(long*)(&cComPtrNtv_003CIFirmwareUpdater_003E) = 0L; + try + { + result = _003CModule_003E.GetEndpointHostInterfaceProperty_003Cstruct_0020IFirmwareUpdater_003E(m_spEndpointHost.p, EEndpointHostProperty.eEndpointHostPropertyFirmwareUpdater, (IFirmwareUpdater**)(&cComPtrNtv_003CIFirmwareUpdater_003E)); + if (result >= 0) + { + IFirmwareUpdater* ptr = (IFirmwareUpdater*)(*(ulong*)(&cComPtrNtv_003CIFirmwareUpdater_003E)); + m_spFirmwareUpdater.op_Assign((IFirmwareUpdater*)(*(ulong*)(&cComPtrNtv_003CIFirmwareUpdater_003E))); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIFirmwareUpdater_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIFirmwareUpdater_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIFirmwareUpdater_003E_002ERelease(&cComPtrNtv_003CIFirmwareUpdater_003E); + return result; + } + return result; + } + finally + { + Monitor.Exit(m_FirmwareLock); + } + } + + private unsafe void ContinueFirmwareUpdateWorker(object data) + { + //IL_015e: Expected I, but got I8 + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 51, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + int num = 0; + if (m_Canceled) + { + num = -2147467260; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 52, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + } + else if ((long)(nint)m_spFirmwareMediator.p == 0) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 2u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 53, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + num = -2147418113; + } + if (Application.IsApplicationThread) + { + _003CModule_003E._ZuneShipAssert(1004u, 1882u); + } + Monitor.Enter(m_FirmwareLock); + try + { + if (num >= 0) + { + num = EnsureNativeObject(); + if (num >= 0) + { + ContinueFirmwareUpdateArgs continueFirmwareUpdateArgs = (ContinueFirmwareUpdateArgs)data; + if (continueFirmwareUpdateArgs.OnCompleteHandler != null) + { + m_OnCompleteHandler = continueFirmwareUpdateArgs.OnCompleteHandler; + } + IFirmwareUpdater* p = m_spFirmwareUpdater.p; + FirmwareUpdateMediator* p2 = m_spFirmwareMediator.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 56)))((nint)p, (IFirmwareUpdateCallback*)p2); + } + } + } + finally + { + Monitor.Exit(m_FirmwareLock); + } + if (num < 0) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 2u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 54, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), num); + } + SendCompleteNotification(num, disconnectDeviceOnComplete: false); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 55, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), num); + } + } + + private unsafe void StartCheckForUpdatesWorker(object data) + { + //IL_00a6: Expected I, but got I8 + //IL_00e0: Expected I, but got I8 + //IL_00f8: Expected I, but got I8 + //IL_00f8: Expected I, but got I8 + //IL_0132: Expected I, but got I8 + //IL_0153: Expected I, but got I8 + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 41, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + StartCheckForUpdatesArgs startCheckForUpdatesArgs = (StartCheckForUpdatesArgs)data; + int num = 0; + CComPtrNtv_003CIFirmwareUpdateCallback_003E cComPtrNtv_003CIFirmwareUpdateCallback_003E; + *(long*)(&cComPtrNtv_003CIFirmwareUpdateCallback_003E) = 0L; + try + { + bool requiresSyncBeforeUpdate = false; + if (Application.IsApplicationThread) + { + _003CModule_003E._ZuneShipAssert(1004u, 1533u); + } + Monitor.Enter(m_FirmwareLock); + try + { + num = EnsureNativeObject(); + if (num >= 0) + { + requiresSyncBeforeUpdate = RequiresSyncBeforeUpdate(); + } + CheckForUpdatesCallback* ptr = (CheckForUpdatesCallback*)_003CModule_003E.@new(40uL); + CheckForUpdatesCallback* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.MicrosoftZuneLibrary_002ECheckForUpdatesCallback_002E_007Bctor_007D(ptr, this, startCheckForUpdatesArgs.CheckForUpdatesComplete, requiresSyncBeforeUpdate)); + CheckForUpdatesCallback* ptr3 = ptr2; + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + CheckForUpdatesCallback* ptr4 = ptr2; + if (ptr2 != null) + { + _003CModule_003E.CComPtrNtv_003CIFirmwareUpdateCallback_003E_002E_003D(&cComPtrNtv_003CIFirmwareUpdateCallback_003E, (IFirmwareUpdateCallback*)ptr2); + } + else + { + num = -2147024882; + } + if (num >= 0) + { + IFirmwareUpdater* p = m_spFirmwareUpdater.p; + IFirmwareUpdateCallback* ptr5 = (IFirmwareUpdateCallback*)(*(ulong*)(&cComPtrNtv_003CIFirmwareUpdateCallback_003E)); + bool forceServerRequest = startCheckForUpdatesArgs.ForceServerRequest; + long num2 = *(long*)(&cComPtrNtv_003CIFirmwareUpdateCallback_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p, forceServerRequest ? 1 : 0, (IFirmwareUpdateCallback*)num2); + } + } + finally + { + Monitor.Exit(m_FirmwareLock); + } + startCheckForUpdatesArgs.HrStatus = num; + if (num < 0) + { + CComPtrNtv_003CIFirmwareUpdateErrorInfo_003E cComPtrNtv_003CIFirmwareUpdateErrorInfo_003E; + *(long*)(&cComPtrNtv_003CIFirmwareUpdateErrorInfo_003E) = 0L; + try + { + InternalErrorInfo* ptr6 = (InternalErrorInfo*)_003CModule_003E.@new(56uL); + InternalErrorInfo* lp; + try + { + lp = ((ptr6 == null) ? null : _003CModule_003E.MicrosoftZuneLibrary_002EInternalErrorInfo_002E_007Bctor_007D(ptr6, num)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr6); + throw; + } + _003CModule_003E.CComPtrNtv_003CIFirmwareUpdateErrorInfo_003E_002E_003D(&cComPtrNtv_003CIFirmwareUpdateErrorInfo_003E, (IFirmwareUpdateErrorInfo*)lp); + startCheckForUpdatesArgs.CheckForUpdatesComplete(new CheckForUpdatesArgs(new FirmwareUpdateErrorInfo((IFirmwareUpdateErrorInfo*)(*(ulong*)(&cComPtrNtv_003CIFirmwareUpdateErrorInfo_003E))), null, RequiresSyncBeforeUpdate())); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIFirmwareUpdateErrorInfo_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIFirmwareUpdateErrorInfo_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIFirmwareUpdateErrorInfo_003E_002ERelease(&cComPtrNtv_003CIFirmwareUpdateErrorInfo_003E); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 42, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), num); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIFirmwareUpdateCallback_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIFirmwareUpdateCallback_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIFirmwareUpdateCallback_003E_002ERelease(&cComPtrNtv_003CIFirmwareUpdateCallback_003E); + } + + private unsafe void StartFirmwareUpdateWorker(object data) + { + //IL_0014: Expected I, but got I8 + //IL_0053: Expected I, but got I8 + //IL_00e8: Expected I, but got I8 + //IL_0135: Expected I, but got I8 + //IL_0135: Expected I, but got I8 + StartFirmwareUpdateArgs startFirmwareUpdateArgs = (StartFirmwareUpdateArgs)data; + m_spFirmwareMediator.op_Assign(null); + m_HandlerComplete = startFirmwareUpdateArgs.FirmwareUpdateComplete; + int num = 0; + FirmwareUpdateMediator* ptr = (FirmwareUpdateMediator*)_003CModule_003E.@new(64uL); + FirmwareUpdateMediator* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.MicrosoftZuneLibrary_002EFirmwareUpdateMediator_002E_007Bctor_007D(ptr, startFirmwareUpdateArgs.FirmwareUpdateBegin, startFirmwareUpdateArgs.FirmwareUpdateProgress, base.OnFirmwareProcessCompleteWorker)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + if (ptr2 != null) + { + m_spFirmwareMediator.op_Assign(ptr2); + } + else + { + num = -2147024882; + } + if (Application.IsApplicationThread) + { + _003CModule_003E._ZuneShipAssert(1004u, 1684u); + } + Monitor.Enter(m_FirmwareLock); + try + { + if (num >= 0) + { + num = EnsureNativeObject(); + if (num >= 0) + { + if (startFirmwareUpdateArgs.UpdateOption == FirmwareUpdateOption.None) + { + IFirmwareUpdater* p = m_spFirmwareUpdater.p; + FirmwareUpdateMediator* p2 = m_spFirmwareMediator.p; + IFirmwareUpdateCollection* nativeCollectionPtr = startFirmwareUpdateArgs.Updates.NativeCollectionPtr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 48)))((nint)p, nativeCollectionPtr, (IFirmwareUpdateCallback*)p2); + } + else + { + CComPtrNtv_003CIFirmwareUpdater2_003E cComPtrNtv_003CIFirmwareUpdater2_003E; + *(long*)(&cComPtrNtv_003CIFirmwareUpdater2_003E) = 0L; + try + { + num = m_spFirmwareUpdater.QueryInterface_003CIFirmwareUpdater2_003E((IFirmwareUpdater2**)(&cComPtrNtv_003CIFirmwareUpdater2_003E)); + if (num >= 0) + { + FirmwareUpdateMediator* p3 = m_spFirmwareMediator.p; + long num2 = *(long*)(&cComPtrNtv_003CIFirmwareUpdater2_003E); + IFirmwareUpdateCollection* nativeCollectionPtr2 = startFirmwareUpdateArgs.Updates.NativeCollectionPtr; + FirmwareUpdateOption updateOption = startFirmwareUpdateArgs.UpdateOption; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIFirmwareUpdater2_003E)) + 80)))((nint)num2, nativeCollectionPtr2, (IFirmwareUpdateCallback*)p3, (EFirmwareUpdateOption)updateOption); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIFirmwareUpdater2_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIFirmwareUpdater2_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIFirmwareUpdater2_003E_002ERelease(&cComPtrNtv_003CIFirmwareUpdater2_003E); + } + } + } + } + finally + { + Monitor.Exit(m_FirmwareLock); + } + startFirmwareUpdateArgs.HrStatus = num; + if (num < 0) + { + Reset(deviceRebooting: false); + SendCompleteNotification(num, disconnectDeviceOnComplete: false); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 46, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), num); + } + } + + private unsafe void StartCheckForDiskSpaceWorker(object data) + { + //IL_00b7: Expected I, but got I8 + //IL_00b7: Expected I, but got I8 + //IL_00c3: Expected I, but got I8 + //IL_00cb: Expected I, but got I8 + DeferredInvokeHandler deferredInvokeHandler = (DeferredInvokeHandler)data; + int num = 0; + ulong additionalSpaceRequiredInBytes = 0uL; + ulong totalSpaceRequiredInBytes = 0uL; + string driveLetter = null; + if (Application.IsApplicationThread) + { + _003CModule_003E._ZuneShipAssert(1004u, 1779u); + } + Monitor.Enter(m_FirmwareLock); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 49, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + try + { + WBSTRString wBSTRString; + _003CModule_003E.WBSTRString_002E_007Bctor_007D(&wBSTRString); + try + { + CComPtrNtv_003CIFirmwareUpdater2_003E cComPtrNtv_003CIFirmwareUpdater2_003E; + *(long*)(&cComPtrNtv_003CIFirmwareUpdater2_003E) = 0L; + try + { + num = EnsureNativeObject(); + if (num >= 0) + { + num = m_spFirmwareUpdater.QueryInterface_003CIFirmwareUpdater2_003E((IFirmwareUpdater2**)(&cComPtrNtv_003CIFirmwareUpdater2_003E)); + if (num >= 0) + { + long num2 = *(long*)(&cComPtrNtv_003CIFirmwareUpdater2_003E); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIFirmwareUpdater2_003E)) + 88)))((nint)num2, &additionalSpaceRequiredInBytes, &totalSpaceRequiredInBytes, (ushort**)(&wBSTRString)); + if (num >= 0) + { + ushort* ptr = (ushort*)(*(ulong*)(&wBSTRString)); + driveLetter = new string((char*)(*(ulong*)(&wBSTRString))); + } + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIFirmwareUpdater2_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIFirmwareUpdater2_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIFirmwareUpdater2_003E_002ERelease(&cComPtrNtv_003CIFirmwareUpdater2_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.WBSTRString_002E_007Bdtor_007D), &wBSTRString); + throw; + } + _003CModule_003E.WBSTRString_002E_007Bdtor_007D(&wBSTRString); + } + finally + { + Monitor.Exit(m_FirmwareLock); + } + CheckDiskSpaceArgs args = new CheckDiskSpaceArgs(num, additionalSpaceRequiredInBytes, totalSpaceRequiredInBytes, driveLetter); + deferredInvokeHandler(args); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 50, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), num); + } + } + + private unsafe void CancelWorker(object data) + { + //IL_005c: Expected I, but got I8 + if (Application.IsApplicationThread) + { + _003CModule_003E._ZuneShipAssert(1004u, 1968u); + } + Monitor.Enter(m_FirmwareLock); + try + { + CComPtrMgd_003CMicrosoftZuneLibrary_003A_003AFirmwareUpdateMediator_003E spFirmwareMediator = m_spFirmwareMediator; + if (spFirmwareMediator.p != null) + { + _003CModule_003E.MicrosoftZuneLibrary_002EFirmwareUpdateMediator_002EFirmwareProcessCanceled(spFirmwareMediator.p); + } + CComPtrMgd_003CIFirmwareUpdater_003E spFirmwareUpdater = m_spFirmwareUpdater; + if (spFirmwareUpdater.p != null) + { + IFirmwareUpdater* p = spFirmwareUpdater.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 64)))((nint)p) < 0) + { + _003CModule_003E._ZuneShipAssert(1004u, 1983u); + } + Reset(deviceRebooting: false); + } + else if (IsDeviceRebooting()) + { + DeferredCancel(); + } + } + finally + { + Monitor.Exit(m_FirmwareLock); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 58, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + } + + protected override void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EFirmwareUpdater(); + } + finally + { + try + { + base.Dispose(true); + } + finally + { + ((IDisposable)m_spFirmwareUpdater).Dispose(); + } + } + } + else + { + base.Dispose(false); + } + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FormatCompleteHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/FormatCompleteHandler.cs new file mode 100644 index 0000000..6efbecd --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FormatCompleteHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void FormatCompleteHandler(Device device, int hrResult); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FriendOfArtist.cs b/ZuneDBApi/MicrosoftZuneLibrary/FriendOfArtist.cs new file mode 100644 index 0000000..b42d248 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FriendOfArtist.cs @@ -0,0 +1,33 @@ +namespace MicrosoftZuneLibrary +{ + public class FriendOfArtist + { + private int _id; + + private string _zuneTag; + + public string ZuneTag + { + get + { + return _zuneTag; + } + set + { + _zuneTag = value; + } + } + + public int Id + { + get + { + return _id; + } + set + { + _id = value; + } + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FriendlyNameChangedHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/FriendlyNameChangedHandler.cs new file mode 100644 index 0000000..0cb4f48 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FriendlyNameChangedHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void FriendlyNameChangedHandler(Device device, string strFriendlyName); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/FriendsOfArtistQuery.cs b/ZuneDBApi/MicrosoftZuneLibrary/FriendsOfArtistQuery.cs new file mode 100644 index 0000000..ff212d8 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/FriendsOfArtistQuery.cs @@ -0,0 +1,270 @@ +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using _003CCppImplementationDetails_003E; +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + public class FriendsOfArtistQuery : ModelItem, IDisposable + { + private Guid m_artistId; + + private bool m_getFriends; + + private int m_userId; + + private bool m_resolveZuneTags; + + private bool m_hasFriends = false; + + private bool m_queryComplete = false; + + private IList m_friends = null; + + private IList m_friendsWithFavs = null; + + private IList m_friendsWithMostPlayedSongs = null; + + private IList m_friendsWithMostPlayedArtists = null; + + private static FriendsOfArtistQuery m_singletonInstance = null; + + public IList FriendsWithMostPlayedArtists => m_friendsWithMostPlayedArtists; + + public IList FriendsWithMostPlayedSongs => m_friendsWithMostPlayedSongs; + + public IList FriendsWithFavs => m_friendsWithFavs; + + public IList Friends => m_friends; + + public bool HasFriends + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_hasFriends; + } + } + + public bool QueryComplete + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_queryComplete; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + if (value != m_queryComplete) + { + m_queryComplete = value; + FirePropertyChanged("QueryComplete"); + } + } + } + + public static FriendsOfArtistQuery Instance + { + get + { + if (m_singletonInstance == null) + { + m_singletonInstance = new FriendsOfArtistQuery(); + } + return m_singletonInstance; + } + } + + public void Query(Guid artistId, [MarshalAs(UnmanagedType.U1)] bool getFriends, int userId) + { + Query(artistId, getFriends, userId, resolveZuneTags: true); + } + + public void Query(Guid artistId, [MarshalAs(UnmanagedType.U1)] bool getFriends, int userId, [MarshalAs(UnmanagedType.U1)] bool resolveZuneTags) + { + try + { + Monitor.Enter(m_singletonInstance); + QueryComplete = false; + if (!(artistId != m_artistId) && (!getFriends || m_getFriends) && userId == m_userId) + { + QueryComplete = true; + return; + } + m_artistId = artistId; + m_getFriends = getFriends; + m_userId = userId; + m_resolveZuneTags = resolveZuneTags; + SetResults(hasFriends: false, null, null, null, null); + if (artistId != Guid.Empty) + { + AsyncQueryParams state = new AsyncQueryParams(artistId, getFriends, userId, DeferredSetResults, m_resolveZuneTags); + ThreadPool.QueueUserWorkItem(AsyncQuery, state); + } + else + { + QueryComplete = true; + } + } + finally + { + Monitor.Exit(m_singletonInstance); + } + } + + private FriendsOfArtistQuery() + { + } + + private void _007EFriendsOfArtistQuery() + { + } + + private unsafe static void AsyncQuery(object obj) + { + //IL_000d: Expected I, but got I8 + //IL_0011: Expected I, but got I8 + //IL_00d2: Expected I, but got I8 + //IL_00f7: Expected I, but got I8 + AsyncQueryParams asyncQueryParams = (AsyncQueryParams)obj; + int num = 0; + int* ptr = null; + int* ptr2 = null; + int num2 = ((!asyncQueryParams.GetFriends) ? 1 : 100); + if (_003CModule_003E.ZuneLibraryExports_002EUserCardsForMedia(_003CModule_003E.GuidToGUID(asyncQueryParams.ArtistId), EMediaTypes.eMediaTypePersonArtist, asyncQueryParams.UserId, 14, num2, &num, &ptr, &ptr2) >= 0) + { + bool flag = num > 0; + IList list = null; + IList list2 = null; + IList list3 = null; + IList list4 = null; + if (asyncQueryParams.GetFriends && flag) + { + list = new ArrayList(num); + list2 = new ArrayList(num); + list3 = new ArrayList(num); + list4 = new ArrayList(num); + int num3 = 0; + if (0 < num) + { + long num4 = 0L; + do + { + FriendOfArtist friendOfArtist = new FriendOfArtist(); + friendOfArtist.Id = *(int*)(num4 + (nint)ptr); + if (asyncQueryParams.ResolveZuneTags) + { + _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040 _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040; + _003CModule_003E.DBPropertyRequestStruct_002E_007Bctor_007D((DBPropertyRequestStruct*)(&_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040), 187u); + try + { + if (_003CModule_003E.ZuneLibraryExports_002EGetFieldValues(*(int*)(num4 + (nint)ptr), EListType.eUserCardList, 1, (DBPropertyRequestStruct*)(&_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040), null) >= 0 && System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, 4)) >= 0 && System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, ushort>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, 8)) == 8) + { + friendOfArtist.ZuneTag = new string((char*)System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, ulong>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, 16))); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindVecDtor((delegate*, void>)(&_003CModule_003E.__ehvec_dtor), (void*)(&_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040), 32uL, 1, (delegate*)(delegate*)(&_003CModule_003E.DBPropertyRequestStruct_002E_007Bdtor_007D)); + throw; + } + _003CModule_003E.__ehvec_dtor(&_0024ArrayType_0024_0024_0024BY00UDBPropertyRequestStruct_0040_0040, 32uL, 1, (delegate*)(delegate*)(&_003CModule_003E.DBPropertyRequestStruct_002E_007Bdtor_007D)); + } + list.Add(friendOfArtist); + if (((uint)(*(int*)(num4 + (nint)ptr2)) & 2u) != 0) + { + list2.Add(friendOfArtist); + } + if (((uint)(*(int*)(num4 + (nint)ptr2)) & 4u) != 0) + { + list3.Add(friendOfArtist); + } + if (((uint)(*(int*)(num4 + (nint)ptr2)) & 8u) != 0) + { + list4.Add(friendOfArtist); + } + num3++; + num4 += 4; + } + while (num3 < num); + } + } + SetResultsParams args = new SetResultsParams(flag, list, list2, list3, list4); + Application.DeferredInvoke(asyncQueryParams.SetResultsHandler, args); + } + if (ptr != null) + { + _003CModule_003E.delete_005B_005D(ptr); + } + if (ptr2 != null) + { + _003CModule_003E.delete_005B_005D(ptr2); + } + } + + private void SetResults([MarshalAs(UnmanagedType.U1)] bool hasFriends, IList friends, IList friendsWithFavs, IList friendsWithMostPlayedSongs, IList friendsWithMostPlayedArtists) + { + if (m_friends != friends) + { + m_friends = friends; + FirePropertyChanged("Friends"); + } + if (m_friendsWithFavs != friendsWithFavs) + { + m_friendsWithFavs = friendsWithFavs; + FirePropertyChanged("FriendsWithFavs"); + } + if (m_friendsWithMostPlayedSongs != friendsWithMostPlayedSongs) + { + m_friendsWithMostPlayedSongs = friendsWithMostPlayedSongs; + FirePropertyChanged("FriendsWithMostPlayedSongs"); + } + if (m_friendsWithMostPlayedArtists != friendsWithMostPlayedArtists) + { + m_friendsWithMostPlayedArtists = friendsWithMostPlayedArtists; + FirePropertyChanged("FriendsWithMostPlayedArtists"); + } + if (m_hasFriends != hasFriends) + { + m_hasFriends = hasFriends; + FirePropertyChanged("HasFriends"); + } + } + + private void DeferredSetResults(object obj) + { + QueryComplete = true; + SetResultsParams setResultsParams = (SetResultsParams)obj; + SetResults(setResultsParams.HasFriends, setResultsParams.Friends, setResultsParams.FriendsWithFavs, setResultsParams.FriendsWithMostPlayedSongs, setResultsParams.FriendsWithMostPlayedArtists); + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + } + finally + { + base.Dispose(); + } + } + else + { + Finalize(); + } + } + + public new void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/GasGauge.cs b/ZuneDBApi/MicrosoftZuneLibrary/GasGauge.cs new file mode 100644 index 0000000..d1b2d39 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/GasGauge.cs @@ -0,0 +1,229 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class GasGauge : IDisposable + { + private readonly CComPtrMgd_003CIGasGauge_003E m_spGasGauge; + + private readonly CComPtrMgd_003CGasGaugeMediator_003E m_spGasGaugeMediator; + + private CategorySpaceUsedUpdatedHandler m_categorySpaceUsedUpdatedHandler; + + private ReservedSpaceUpdatedHandler m_reservedSpaceUpdatedHandler; + + private DeviceOverflowHandler m_deviceOverflowHandler; + + public unsafe ulong Capacity + { + get + { + //IL_001c: Expected I, but got I8 + IGasGauge* p = m_spGasGauge.p; + if (p != null) + { + return (ulong)((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 56)))((nint)p); + } + return 0uL; + } + } + + public unsafe long SpaceAvailable + { + get + { + //IL_001c: Expected I, but got I8 + IGasGauge* p = m_spGasGauge.p; + if (p != null) + { + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 48)))((nint)p); + } + return 0L; + } + } + + public unsafe long SpaceReserved + { + get + { + //IL_001c: Expected I, but got I8 + IGasGauge* p = m_spGasGauge.p; + if (p != null) + { + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p); + } + return 0L; + } + } + + [SpecialName] + public virtual event DeviceOverflowHandler DeviceOverflowEvent + { + add + { + m_deviceOverflowHandler = (DeviceOverflowHandler)Delegate.Combine(m_deviceOverflowHandler, value); + } + remove + { + m_deviceOverflowHandler = (DeviceOverflowHandler)Delegate.Remove(m_deviceOverflowHandler, value); + } + } + + [SpecialName] + public virtual event ReservedSpaceUpdatedHandler ReservedSpaceUpdatedEvent + { + add + { + m_reservedSpaceUpdatedHandler = (ReservedSpaceUpdatedHandler)Delegate.Combine(m_reservedSpaceUpdatedHandler, value); + } + remove + { + m_reservedSpaceUpdatedHandler = (ReservedSpaceUpdatedHandler)Delegate.Remove(m_reservedSpaceUpdatedHandler, value); + } + } + + [SpecialName] + public virtual event CategorySpaceUsedUpdatedHandler CategorySpaceUsedUpdatedEvent + { + add + { + m_categorySpaceUsedUpdatedHandler = (CategorySpaceUsedUpdatedHandler)Delegate.Combine(m_categorySpaceUsedUpdatedHandler, value); + } + remove + { + m_categorySpaceUsedUpdatedHandler = (CategorySpaceUsedUpdatedHandler)Delegate.Remove(m_categorySpaceUsedUpdatedHandler, value); + } + } + + internal unsafe GasGauge(IGasGauge* pGasGauge) + { + //IL_004a: Expected I, but got I8 + CComPtrMgd_003CIGasGauge_003E spGasGauge = new CComPtrMgd_003CIGasGauge_003E(); + try + { + m_spGasGauge = spGasGauge; + CComPtrMgd_003CGasGaugeMediator_003E spGasGaugeMediator = new CComPtrMgd_003CGasGaugeMediator_003E(); + try + { + m_spGasGaugeMediator = spGasGaugeMediator; + base._002Ector(); + if (pGasGauge != null) + { + m_spGasGauge.op_Assign(pGasGauge); + } + GasGaugeMediator* ptr = (GasGaugeMediator*)_003CModule_003E.@new(32uL); + GasGaugeMediator* lp; + try + { + lp = ((ptr == null) ? null : _003CModule_003E.GasGaugeMediator_002E_007Bctor_007D(ptr, this, pGasGauge)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + m_spGasGaugeMediator.op_Assign(lp); + } + catch + { + //try-fault + ((IDisposable)m_spGasGaugeMediator).Dispose(); + throw; + } + } + catch + { + //try-fault + ((IDisposable)m_spGasGauge).Dispose(); + throw; + } + } + + internal void CategorySpaceUsedUpdated(ESyncCategory syncCategory, long llNewSchemaSpace, long llNewFreeSpace) + { + if (m_categorySpaceUsedUpdatedHandler != null) + { + m_categorySpaceUsedUpdatedHandler(this, syncCategory, llNewSchemaSpace, llNewFreeSpace); + } + } + + internal void ReservedSpaceUpdated(long llNewReservedSpace, long llNewFreeSpace) + { + if (m_reservedSpaceUpdatedHandler != null) + { + m_reservedSpaceUpdatedHandler(this, llNewReservedSpace, llNewFreeSpace); + } + } + + internal void DeviceOverflow() + { + if (m_deviceOverflowHandler != null) + { + m_deviceOverflowHandler(this); + } + } + + private unsafe void _007EGasGauge() + { + GasGaugeMediator* p = m_spGasGaugeMediator.p; + if (p != null) + { + _003CModule_003E.GasGaugeMediator_002EShutdown(p); + } + m_spGasGauge.Release(); + m_spGasGaugeMediator.Release(); + } + + public unsafe long GetSpaceUsedByCategory(ESyncCategory syncCategory) + { + //IL_001d: Expected I, but got I8 + IGasGauge* p = m_spGasGauge.p; + if (p != null) + { + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)p, syncCategory); + } + return 0L; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EGasGauge(); + } + finally + { + try + { + ((IDisposable)m_spGasGaugeMediator).Dispose(); + } + finally + { + try + { + ((IDisposable)m_spGasGauge).Dispose(); + } + finally + { + } + } + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/GetAlbumForAlbumIdCompleteHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/GetAlbumForAlbumIdCompleteHandler.cs new file mode 100644 index 0000000..523e62b --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/GetAlbumForAlbumIdCompleteHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void GetAlbumForAlbumIdCompleteHandler(long WMISAlbumId, int Volume, int hr, AlbumMetadata AlbumMetadata); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/GetDeviceWlanNetworksCompleteHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/GetDeviceWlanNetworksCompleteHandler.cs new file mode 100644 index 0000000..db8ed64 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/GetDeviceWlanNetworksCompleteHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void GetDeviceWlanNetworksCompleteHandler(Device device, int hr); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/GetDeviceWlanProfilesCompleteHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/GetDeviceWlanProfilesCompleteHandler.cs new file mode 100644 index 0000000..513fb94 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/GetDeviceWlanProfilesCompleteHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void GetDeviceWlanProfilesCompleteHandler(Device device, int hr); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/GetWlanProfilesCompleteHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/GetWlanProfilesCompleteHandler.cs new file mode 100644 index 0000000..6cbe36c --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/GetWlanProfilesCompleteHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void GetWlanProfilesCompleteHandler(Device device, int hr); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/HMESettings.cs b/ZuneDBApi/MicrosoftZuneLibrary/HMESettings.cs new file mode 100644 index 0000000..82676de --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/HMESettings.cs @@ -0,0 +1,778 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class HMESettings : IDisposable + { + private unsafe IHMESettings* m_pSettings; + + private unsafe INSSManager* m_pNSSManager; + + private unsafe INSSDevices* m_pDeviceList; + + private unsafe NSSMediator* m_pNSSMediator; + + private NSSDeviceListChangeHandler m_NSSDeviceListChange; + + public unsafe bool VelaSharingEnabled + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001c: Expected I, but got I8 + IHMESettings* pSettings = m_pSettings; + if (pSettings == null) + { + return false; + } + return (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 168)))((nint)pSettings) != 0) ? true : false; + } + } + + public unsafe bool SharingEnableRequiresLoginAsAdmin + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_0019: Expected I, but got I8 + IHMESettings* pSettings = m_pSettings; + if (pSettings == null) + { + return true; + } + return (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 112)))((nint)pSettings) != 0) ? true : false; + } + } + + public unsafe bool SharingEnableRequiresElevation + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_0019: Expected I, but got I8 + IHMESettings* pSettings = m_pSettings; + if (pSettings == null) + { + return true; + } + return (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 104)))((nint)pSettings) != 0) ? true : false; + } + } + + public unsafe bool SharingEnabled + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001c: Expected I, but got I8 + IHMESettings* pSettings = m_pSettings; + if (pSettings == null) + { + return false; + } + return (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 152)))((nint)pSettings) != 0) ? true : false; + } + } + + public bool SharingBroken + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return false; + } + } + + [SpecialName] + public virtual event NSSDeviceListChangeHandler NSSDeviceListChangeEvent + { + add + { + m_NSSDeviceListChange = (NSSDeviceListChangeHandler)Delegate.Combine(m_NSSDeviceListChange, value); + } + remove + { + m_NSSDeviceListChange = (NSSDeviceListChangeHandler)Delegate.Remove(m_NSSDeviceListChange, value); + } + } + + public unsafe HMESettings() + { + //IL_000e: Expected I, but got I8 + //IL_0016: Expected I, but got I8 + //IL_001e: Expected I, but got I8 + m_pSettings = null; + m_pNSSManager = null; + m_pDeviceList = null; + } + + private void _007EHMESettings() + { + _0021HMESettings(); + } + + private unsafe void _0021HMESettings() + { + //IL_001c: Expected I, but got I8 + //IL_0025: Expected I, but got I8 + //IL_003e: Expected I, but got I8 + //IL_0047: Expected I, but got I8 + //IL_0060: Expected I, but got I8 + //IL_0069: Expected I, but got I8 + //IL_0092: Expected I, but got I8 + //IL_009b: Expected I, but got I8 + IHMESettings* pSettings = m_pSettings; + if (0L != (nint)pSettings) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 16)))((nint)pSettings); + m_pSettings = null; + } + INSSManager* pNSSManager = m_pNSSManager; + if (0L != (nint)pNSSManager) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pNSSManager + 16)))((nint)pNSSManager); + m_pNSSManager = null; + } + INSSDevices* pDeviceList = m_pDeviceList; + if (0L != (nint)pDeviceList) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDeviceList + 16)))((nint)pDeviceList); + m_pDeviceList = null; + } + NSSMediator* pNSSMediator = m_pNSSMediator; + if (pNSSMediator != null) + { + _003CModule_003E.NSSMediator_002EShutdown(pNSSMediator); + } + NSSMediator* pNSSMediator2 = m_pNSSMediator; + if (0L != (nint)pNSSMediator2) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pNSSMediator2 + 16)))((nint)pNSSMediator2); + m_pNSSMediator = null; + } + } + + public unsafe int Init() + { + //IL_003d: Expected I, but got I8 + //IL_0046: Expected I, but got I8 + //IL_0065: Expected I, but got I8 + fixed (IHMESettings** ptr = &m_pSettings) + { + int num = _003CModule_003E.CreateHMESettings(ptr); + fixed (INSSManager** ptr2 = &m_pNSSManager) + { + if (num >= 0) + { + num = _003CModule_003E.CreateNSSManager(ptr2); + } + NSSMediator* pNSSMediator = m_pNSSMediator; + if (0L != (nint)pNSSMediator) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pNSSMediator + 16)))((nint)pNSSMediator); + m_pNSSMediator = null; + } + NSSMediator* ptr3 = (NSSMediator*)_003CModule_003E.@new(40uL); + NSSMediator* ptr4; + try + { + ptr4 = ((ptr3 == null) ? null : _003CModule_003E.NSSMediator_002E_007Bctor_007D(ptr3, m_pNSSManager, this)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr3); + throw; + } + m_pNSSMediator = ptr4; + _003CModule_003E.SafeAddRef_003Cclass_0020NSSMediator_003E(ptr4); + return num; + } + } + } + + public unsafe int RepairSharing() + { + //IL_002c: Expected I, but got I8 + IHMESettings* pSettings = m_pSettings; + if (pSettings == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 76u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 136)))((nint)pSettings); + } + + public unsafe int EnableSharingForUser() + { + //IL_0029: Expected I, but got I8 + //IL_0040: Expected I, but got I8 + //IL_005d: Expected I, but got I8 + //IL_0077: Expected I, but got I8 + IHMESettings* pSettings = m_pSettings; + if (pSettings == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 119u); + return -2147418113; + } + IHMESettings* intPtr = pSettings; + int num; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 96)))((nint)intPtr) == 0) + { + pSettings = m_pSettings; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 120)))((nint)pSettings, 1); + if (num < 0) + { + goto IL_0078; + } + } + pSettings = m_pSettings; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 160)))((nint)pSettings, 1); + if (num >= 0) + { + pSettings = m_pSettings; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 24)))((nint)pSettings, 0); + } + goto IL_0078; + IL_0078: + return num; + } + + public unsafe int DisableSharingForUser() + { + //IL_0030: Expected I, but got I8 + IHMESettings* pSettings = m_pSettings; + if (pSettings == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 144u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 160)))((nint)pSettings, 0); + } + + public unsafe int DisableSharingForMachine() + { + //IL_002d: Expected I, but got I8 + IHMESettings* pSettings = m_pSettings; + if (pSettings == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 153u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 120)))((nint)pSettings, 0); + } + + public unsafe int SetSharedFoldersList([MarshalAs(UnmanagedType.U1)] bool fForce) + { + //IL_002d: Expected I, but got I8 + IHMESettings* pSettings = m_pSettings; + if (pSettings == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 162u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 24)))((nint)pSettings, fForce ? ((byte)1) : ((byte)0)); + } + + public unsafe int GetDisplayName(ref string strName) + { + //IL_0031: Expected I, but got I8 + IHMESettings* pSettings = m_pSettings; + if (pSettings == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 181u); + return -2147418113; + } + ushort* ptr; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 224)))((nint)pSettings, &ptr); + if (num >= 0) + { + strName = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return num; + } + + public unsafe int SetDisplayName(string strName) + { + //IL_0044: Expected I, but got I8 + if (m_pSettings == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 197u); + return -2147418113; + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strName))) + { + int result; + if (ptr != null) + { + long num = *(long*)m_pSettings + 232; + IHMESettings* pSettings = m_pSettings; + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pSettings, ptr); + } + else + { + result = -2147418113; + } + return result; + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool GetSharingEnabledForMediaType(EMediaTypes mediaType) + { + //IL_0028: Expected I, but got I8 + //IL_003b: Expected I, but got I8 + //IL_004e: Expected I, but got I8 + IHMESettings* pSettings = m_pSettings; + if (pSettings == null) + { + return false; + } + int num; + if (mediaType != EMediaTypes.eMediaTypeAudio) + { + if (mediaType != EMediaTypes.eMediaTypeVideo) + { + if (mediaType != EMediaTypes.eMediaTypeImage) + { + goto IL_0056; + } + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 192)))((nint)pSettings); + } + else + { + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 208)))((nint)pSettings); + } + } + else + { + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 176)))((nint)pSettings); + } + if (num != 0) + { + return true; + } + goto IL_0056; + IL_0056: + return false; + } + + public unsafe int SetSharingEnabledForMediaType(EMediaTypes mediaType, [MarshalAs(UnmanagedType.U1)] bool bEnabled) + { + //IL_004d: Expected I, but got I8 + //IL_0061: Expected I, but got I8 + //IL_0075: Expected I, but got I8 + IHMESettings* pSettings = m_pSettings; + if (pSettings == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 248u); + return -2147418113; + } + int num = (bEnabled ? 1 : 0); + return mediaType switch + { + EMediaTypes.eMediaTypeImage => ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 200)))((nint)pSettings, num), + EMediaTypes.eMediaTypeVideo => ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 216)))((nint)pSettings, num), + EMediaTypes.eMediaTypeAudio => ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pSettings + 184)))((nint)pSettings, num), + _ => -2147024809, + }; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool GetAllDevicesEnabled() + { + //IL_001b: Expected I, but got I8 + INSSManager* pNSSManager = m_pNSSManager; + if (pNSSManager == null) + { + return false; + } + short num; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pNSSManager + 56)))((nint)pNSSManager, &num) >= 0) + { + return num == -1; + } + return false; + } + + public unsafe int SetAllDevicesEnabled([MarshalAs(UnmanagedType.U1)] bool bEnabled) + { + //IL_0034: Expected I, but got I8 + INSSManager* pNSSManager = m_pNSSManager; + if (pNSSManager == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 297u); + return -2147418113; + } + int num = -1; + if (!bEnabled) + { + num = ~num; + } + short num2 = (short)num; + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pNSSManager + 64)))((nint)pNSSManager, num2); + } + + public unsafe uint GetDeviceCount() + { + //IL_0037: Expected I, but got I8 + //IL_005a: Expected I, but got I8 + if (m_pNSSManager == null) + { + return 0u; + } + uint num = 0u; + if (m_pDeviceList == null) + { + fixed (INSSDevices** ptr = &m_pDeviceList) + { + try + { + long num2 = *(long*)m_pNSSManager + 88; + INSSManager* pNSSManager = m_pNSSManager; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pNSSManager, ptr); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + INSSDevices* pDeviceList = m_pDeviceList; + if (pDeviceList != null) + { + int num3; + num = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDeviceList + 64)))((nint)pDeviceList, &num3) >= 0) ? ((uint)num3) : num); + } + return num; + } + + public unsafe int GetDeviceProps(uint dwIndex, ref string strName, ref string strMAC, ref string strSerialNumber) + { + //IL_0020: Expected I, but got I8 + //IL_0023: Expected I, but got I8 + //IL_0026: Expected I, but got I8 + //IL_002a: Expected I, but got I8 + //IL_0057: Expected I, but got I8 + //IL_0076: Expected I, but got I8 + //IL_009d: Expected I, but got I8 + //IL_00b4: Expected I, but got I8 + //IL_00e3: Expected I, but got I8 + //IL_00ed: Expected I, but got I8 + //IL_0117: Expected I, but got I8 + //IL_0133: Expected I, but got I8 + //IL_014e: Expected I, but got I8 + //IL_0152: Expected I, but got I8 + //IL_016e: Expected I, but got I8 + //IL_0178: Expected I, but got I8 + //IL_019f: Expected I, but got I8 + //IL_01b9: Expected I, but got I8 + //IL_01d4: Expected I, but got I8 + //IL_01d8: Expected I, but got I8 + //IL_01f5: Expected I, but got I8 + //IL_01f9: Expected I, but got I8 + //IL_020b: Expected I, but got I8 + //IL_020f: Expected I, but got I8 + //IL_0221: Expected I, but got I8 + //IL_0225: Expected I, but got I8 + if (m_pDeviceList == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 338u); + return -2147418113; + } + INSSDevice* ptr = null; + INSSProperties* ptr2 = null; + INSSProperty* ptr3 = null; + ushort* ptr4 = null; + tagVARIANT tagVARIANT; + fixed (tagVARIANT* ptr5 = &System.Runtime.CompilerServices.Unsafe.AsRef(&tagVARIANT)) + { + _003CModule_003E.VariantInit(ptr5); + fixed (INSSDevice** ptr6 = &System.Runtime.CompilerServices.Unsafe.AsRef(&ptr)) + { + long num = *(long*)m_pDeviceList + 56; + INSSDevices* pDeviceList = m_pDeviceList; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pDeviceList, (int)dwIndex, ptr6); + if (num2 >= 0) + { + fixed (ushort** ptr7 = &System.Runtime.CompilerServices.Unsafe.AsRef(&ptr4)) + { + try + { + long num3 = *(long*)ptr + 56; + INSSDevice* intPtr = ptr; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)intPtr, ptr7); + } + catch + { + //try-fault + ptr7 = null; + throw; + } + } + if (num2 >= 0) + { + strMAC = new string((char*)ptr4); + _003CModule_003E.SysFreeString(ptr4); + ptr4 = null; + fixed (INSSProperties** ptr8 = &System.Runtime.CompilerServices.Unsafe.AsRef(&ptr2)) + { + try + { + long num4 = *(long*)ptr + 96; + INSSDevice* intPtr2 = ptr; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)intPtr2, ptr8); + } + catch + { + //try-fault + ptr8 = null; + throw; + } + } + if (num2 >= 0) + { + fixed (INSSProperty** ptr9 = &System.Runtime.CompilerServices.Unsafe.AsRef(&ptr3)) + { + try + { + long num5 = *(long*)ptr2 + 72; + INSSProperties* intPtr3 = ptr2; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num5))((nint)intPtr3, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BK_0040BFIEKNFP_0040_003F_0024AAF_003F_0024AAr_003F_0024AAi_003F_0024AAe_003F_0024AAn_003F_0024AAd_003F_0024AAl_003F_0024AAy_003F_0024AAN_003F_0024AAa_003F_0024AAm_003F_0024AAe_003F_0024AA_003F_0024AA_0040), ptr9); + if (num2 < 0) + { + ptr3 = null; + num2 = 0; + } + } + catch + { + //try-fault + ptr9 = null; + throw; + } + } + if (num2 >= 0) + { + if (ptr3 != null) + { + long num6 = *(long*)ptr3 + 64; + INSSProperty* intPtr4 = ptr3; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num6))((nint)intPtr4, ptr5); + } + if (num2 >= 0) + { + if (ptr3 != null) + { + if (*(ushort*)(&tagVARIANT) == 8) + { + strName = new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagVARIANT, 8))); + } + _003CModule_003E.VariantClear(ptr5); + if (0L != (nint)ptr3) + { + INSSProperty* intPtr5 = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr5 + 16)))((nint)intPtr5); + ptr3 = null; + } + } + fixed (INSSProperty** ptr10 = &System.Runtime.CompilerServices.Unsafe.AsRef(&ptr3)) + { + try + { + long num7 = *(long*)ptr2 + 72; + INSSProperties* intPtr6 = ptr2; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num7))((nint)intPtr6, (ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BK_0040GBMCOKGG_0040_003F_0024AAS_003F_0024AAe_003F_0024AAr_003F_0024AAi_003F_0024AAa_003F_0024AAl_003F_0024AAN_003F_0024AAu_003F_0024AAm_003F_0024AAb_003F_0024AAe_003F_0024AAr_003F_0024AA_003F_0024AA_0040), ptr10); + if (num2 < 0) + { + ptr3 = null; + num2 = 0; + } + } + catch + { + //try-fault + ptr10 = null; + throw; + } + } + if (num2 >= 0) + { + if (ptr3 != null) + { + long num8 = *(long*)ptr3 + 64; + INSSProperty* intPtr7 = ptr3; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num8))((nint)intPtr7, ptr5); + } + if (num2 >= 0 && ptr3 != null) + { + if (*(ushort*)(&tagVARIANT) == 8) + { + strSerialNumber = new string((char*)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagVARIANT, 8))); + } + _003CModule_003E.VariantClear(ptr5); + if (0L != (nint)ptr3) + { + INSSProperty* intPtr8 = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr8 + 16)))((nint)intPtr8); + ptr3 = null; + } + } + } + } + } + } + } + } + if (ptr4 != null) + { + _003CModule_003E.SysFreeString(ptr4); + } + if (0L != (nint)ptr) + { + INSSDevice* intPtr9 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr9 + 16)))((nint)intPtr9); + ptr = null; + } + if (0L != (nint)ptr2) + { + INSSProperties* intPtr10 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr10 + 16)))((nint)intPtr10); + ptr2 = null; + } + if (0L != (nint)ptr3) + { + INSSProperty* intPtr11 = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr11 + 16)))((nint)intPtr11); + ptr3 = null; + } + _003CModule_003E.VariantClear(ptr5); + return num2; + } + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool GetDeviceEnabled(uint dwIndex) + { + //IL_000f: Expected I, but got I8 + //IL_0034: Expected I, but got I8 + //IL_004e: Expected I, but got I8 + //IL_0078: Expected I, but got I8 + if (m_pDeviceList == null) + { + return false; + } + bool flag = false; + INSSDevice* ptr = null; + AuthorizationStatus authorizationStatus = (AuthorizationStatus)0; + fixed (INSSDevice** ptr2 = &System.Runtime.CompilerServices.Unsafe.AsRef(&ptr)) + { + long num = *(long*)m_pDeviceList + 56; + INSSDevices* pDeviceList = m_pDeviceList; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pDeviceList, (int)dwIndex, ptr2); + if (num2 >= 0) + { + fixed (AuthorizationStatus* ptr3 = &System.Runtime.CompilerServices.Unsafe.AsRef(&authorizationStatus)) + { + try + { + long num3 = *(long*)ptr + 64; + INSSDevice* intPtr = ptr; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)intPtr, ptr3); + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + if (num2 >= 0) + { + flag = authorizationStatus == (AuthorizationStatus)2 || flag; + } + } + if (0L != (nint)ptr) + { + INSSDevice* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + return flag; + } + } + + public unsafe int EnableDevice(uint dwIndex, [MarshalAs(UnmanagedType.U1)] bool bEnabled) + { + //IL_0020: Expected I, but got I8 + //IL_003e: Expected I, but got I8 + //IL_005d: Expected I, but got I8 + //IL_0070: Expected I, but got I8 + if (m_pDeviceList == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 470u); + return -2147418113; + } + INSSDevice* ptr = null; + fixed (INSSDevice** ptr2 = &System.Runtime.CompilerServices.Unsafe.AsRef(&ptr)) + { + long num = *(long*)m_pDeviceList + 56; + INSSDevices* pDeviceList = m_pDeviceList; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pDeviceList, (int)dwIndex, ptr2); + if (num2 >= 0) + { + AuthorizationStatus authorizationStatus = (bEnabled ? ((AuthorizationStatus)2) : ((AuthorizationStatus)3)); + INSSDevice* intPtr = ptr; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 72)))((nint)intPtr, authorizationStatus); + } + if (0L != (nint)ptr) + { + INSSDevice* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + return num2; + } + } + + internal void NSSDeviceListChange() + { + if (m_NSSDeviceListChange != null) + { + m_NSSDeviceListChange(); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021HMESettings(); + return; + } + try + { + _0021HMESettings(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~HMESettings() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/HrStatusBase.cs b/ZuneDBApi/MicrosoftZuneLibrary/HrStatusBase.cs new file mode 100644 index 0000000..8d5ad8d --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/HrStatusBase.cs @@ -0,0 +1,24 @@ +namespace MicrosoftZuneLibrary +{ + internal class HrStatusBase + { + protected int m_HrStatus; + + public int HrStatus + { + get + { + return m_HrStatus; + } + set + { + m_HrStatus = value; + } + } + + public HrStatusBase() + { + m_HrStatus = 0; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/IDatabaseMedia.cs b/ZuneDBApi/MicrosoftZuneLibrary/IDatabaseMedia.cs new file mode 100644 index 0000000..e6945ec --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/IDatabaseMedia.cs @@ -0,0 +1,7 @@ +namespace MicrosoftZuneLibrary +{ + public interface IDatabaseMedia + { + void GetMediaIdAndType(out int mediaId, out EMediaTypes mediaType); + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/IQueryListEvents.cs b/ZuneDBApi/MicrosoftZuneLibrary/IQueryListEvents.cs new file mode 100644 index 0000000..693f775 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/IQueryListEvents.cs @@ -0,0 +1,17 @@ +namespace MicrosoftZuneLibrary +{ + public interface IQueryListEvents + { + void ListBeginBulkEvents(); + + void ListEndBulkEvents(); + + void ListInsert(int index); + + void ListRemoveAt(int index); + + void ListModified(int dwItem); + + void ListNotifyCount(uint ulCount); + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/IRequestCallbackOnUIThread.cs b/ZuneDBApi/MicrosoftZuneLibrary/IRequestCallbackOnUIThread.cs new file mode 100644 index 0000000..66a21ff --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/IRequestCallbackOnUIThread.cs @@ -0,0 +1,9 @@ +using System; + +namespace MicrosoftZuneLibrary +{ + public interface IRequestCallbackOnUIThread + { + void CallbackOnUIThreadRequest(CallbackPriorityManaged priority, int id, IntPtr pData, IntPtr pInterface); + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/InternalErrorInfo.cs b/ZuneDBApi/MicrosoftZuneLibrary/InternalErrorInfo.cs new file mode 100644 index 0000000..b05dc6c --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/InternalErrorInfo.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace MicrosoftZuneLibrary +{ + [StructLayout(LayoutKind.Sequential, Size = 56)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(64)] + internal struct InternalErrorInfo + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/InteropNotifications.cs b/ZuneDBApi/MicrosoftZuneLibrary/InteropNotifications.cs new file mode 100644 index 0000000..67ed87b --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/InteropNotifications.cs @@ -0,0 +1,118 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class InteropNotifications : IDisposable + { + private bool m_fDisposed = false; + + private bool m_fAdvised = false; + + private ulong m_AdviseCookie; + + internal OnShowErrorDialogHandler m_ShowErrorDialogHandler; + + [SpecialName] + public virtual event OnShowErrorDialogHandler ShowErrorDialog + { + add + { + m_ShowErrorDialogHandler = (OnShowErrorDialogHandler)Delegate.Combine(m_ShowErrorDialogHandler, value); + } + remove + { + m_ShowErrorDialogHandler = (OnShowErrorDialogHandler)Delegate.Remove(m_ShowErrorDialogHandler, value); + } + } + + public unsafe InteropNotifications() + { + //IL_002d: Expected I, but got I8 + //IL_0049: Expected I, but got I8 + //IL_0071: Expected I, but got I8 + NativeInteropNotifications* ptr = (NativeInteropNotifications*)_003CModule_003E.@new(24uL); + NativeInteropNotifications* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.MicrosoftZuneLibrary_002ENativeInteropNotifications_002E_007Bctor_007D(ptr, this)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + IInteropNotify* ptr3; + if (ptr2 == null || ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(ulong*)ptr2)))((nint)ptr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._GUID_3fb2d757_8ddb_46a9_9dd2_3424e2903e46), (void**)(&ptr3)) < 0) + { + return; + } + fixed (ulong* ptr4 = &m_AdviseCookie) + { + try + { + if (_003CModule_003E.ZuneLibraryExports_002EInteropNotifyAdvise(ptr3, ptr4) >= 0) + { + m_fAdvised = true; + } + IInteropNotify* intPtr = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + + private void _007EInteropNotifications() + { + _0021InteropNotifications(); + } + + private void _0021InteropNotifications() + { + if (!m_fDisposed) + { + m_fDisposed = true; + if (m_fAdvised) + { + _003CModule_003E.ZuneLibraryExports_002EInteropNotifyUnAdvise(m_AdviseCookie); + m_fAdvised = false; + } + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021InteropNotifications(); + return; + } + try + { + _0021InteropNotifications(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~InteropNotifications() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/LaunchFromShellHelper.cs b/ZuneDBApi/MicrosoftZuneLibrary/LaunchFromShellHelper.cs new file mode 100644 index 0000000..e107897 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/LaunchFromShellHelper.cs @@ -0,0 +1,162 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + public class LaunchFromShellHelper + { + private unsafe delegate void FileFoundCallback(ushort* fileName, EMediaTypes mediaType); + + private string _003Cbacking_store_003ETaskName; + + private DeferredInvokeHandler _completeHandler; + + private string _startParam; + + private string _eventName; + + private bool _startParamIsDataObject; + + private bool _cancelled; + + private List _files; + + public string TaskName + { + get + { + return _003Cbacking_store_003ETaskName; + } + set + { + _003Cbacking_store_003ETaskName = value; + } + } + + public List Files => _files; + + public LaunchFromShellHelper(string taskName, string marshalledDataObject, string eventName) + { + Init(taskName, marshalledDataObject, eventName, startParamIsDataObject: true); + } + + public LaunchFromShellHelper(string taskName, string initialUrl) + { + Init(taskName, initialUrl, null, startParamIsDataObject: false); + } + + public void Go(DeferredInvokeHandler completeHandler) + { + _completeHandler = completeHandler; + Thread thread = new Thread(ThreadProc); + thread.SetApartmentState(ApartmentState.STA); + thread.IsBackground = true; + thread.Start(); + } + + public void Cancel() + { + _cancelled = true; + } + + private void Init(string taskName, string startParam, string eventName, [MarshalAs(UnmanagedType.U1)] bool startParamIsDataObject) + { + _003Cbacking_store_003ETaskName = taskName.ToLowerInvariant(); + _startParam = startParam; + _eventName = eventName; + _startParamIsDataObject = startParamIsDataObject; + _files = new List(); + } + + private unsafe void ThreadProc() + { + //IL_0005: Expected I, but got I8 + //IL_0053: Expected I, but got I8 + //IL_00be: Expected I, but got I8 + //IL_00d0: Expected I, but got I8 + EventWaitHandle eventWaitHandle = null; + IDataObjectEnumerator* ptr = null; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(_startParam))) + { + FileFoundCallback fileFoundCallback = FileFound; + delegate* unmanaged[Cdecl, Cdecl] delegate_002A = (delegate* unmanaged[Cdecl, Cdecl])Marshal.GetFunctionPointerForDelegate(fileFoundCallback).ToPointer(); + int num = _003CModule_003E.ZuneLibraryExports_002ECreateDataObjectEnum(&ptr); + try + { + if (num >= 0) + { + long num2 = *(long*)ptr; + IDataObjectEnumerator* intPtr = ptr; + _003F val = ptr2; + bool startParamIsDataObject = _startParamIsDataObject; + num = ((delegate* unmanaged[Cdecl, Cdecl], int>)(*(ulong*)num2))((nint)intPtr, (ushort*)(nint)val, startParamIsDataObject ? 1 : 0, delegate_002A); + } + if (_eventName != (string)null) + { + try + { + eventWaitHandle = EventWaitHandle.OpenExisting(_eventName); + eventWaitHandle.Set(); + } + catch (ArgumentException) + { + } + catch (WaitHandleCannotBeOpenedException) + { + } + catch (IOException) + { + } + catch (UnauthorizedAccessException) + { + } + finally + { + ((IDisposable)eventWaitHandle)?.Dispose(); + } + } + if (num >= 0) + { + bool flag = true; + while (!_cancelled && num >= 0 && flag) + { + IDataObjectEnumerator* intPtr2 = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 8)))((nint)intPtr2, &flag); + } + } + } + finally + { + if (ptr != null) + { + _003CModule_003E.ZuneLibraryExports_002EDestroyDataObjectEnum(ptr); + ptr = null; + } + } + GC.KeepAlive(fileFoundCallback); + if (!_cancelled) + { + Application.DeferredInvoke(CompletedOnAppThread, null); + } + } + } + + private void CompletedOnAppThread(object unused) + { + if (!_cancelled) + { + _completeHandler(this); + } + } + + private unsafe void FileFound(ushort* fileName, EMediaTypes mediaType) + { + _files.Add(new FileEntry(fileName, mediaType)); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProvider.cs b/ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProvider.cs new file mode 100644 index 0000000..d14e94f --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProvider.cs @@ -0,0 +1,227 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + public class LibraryDataProvider + { + public static void Register() + { + Application.RegisterDataProvider("Library", ConstructQuery); + } + + public static DataProviderQuery ConstructQuery(object queryTypeCookie) + { + return new LibraryDataProviderQuery(queryTypeCookie); + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe static bool ActOnItems(IList mediaList, BulkItemAction action, EventArgs args) + { + if (mediaList != null && mediaList.Count != 0) + { + int num = 0; + IDatabaseMedia databaseMedia = mediaList[0] as IDatabaseMedia; + if (databaseMedia == null) + { + do + { + num++; + databaseMedia = mediaList[num] as IDatabaseMedia; + } + while (databaseMedia == null); + } + databaseMedia.GetMediaIdAndType(out var _, out var mediaType); + ArrayList arrayList = null; + List list = new List(mediaList.Count); + int num2 = num; + if (num < mediaList.Count) + { + do + { + IDatabaseMedia databaseMedia2 = mediaList[num2] as IDatabaseMedia; + if (databaseMedia2 != null) + { + databaseMedia2.GetMediaIdAndType(out var mediaId2, out var mediaType2); + if (mediaId2 >= 0) + { + if (mediaType == mediaType2) + { + list.Add(mediaId2); + } + else + { + if (arrayList == null) + { + arrayList = new ArrayList(); + } + arrayList.Add(databaseMedia2); + } + } + } + num2++; + } + while (num2 < mediaList.Count); + } + bool flag = true; + if (list.Count > 0) + { + switch (action) + { + case BulkItemAction.UnexcludeFromSync: + flag = (byte)((uint)(byte)((((SyncEventArgs)args).Device.Rules.Unexclude(list.ToArray(), mediaType) >= 0) ? 1u : 0u) & (true ? 1u : 0u)) != 0; + break; + case BulkItemAction.ExcludeFromSync: + flag = (byte)((uint)(byte)((((SyncEventArgs)args).Device.Rules.Exclude(list.ToArray(), mediaType) >= 0) ? 1u : 0u) & (true ? 1u : 0u)) != 0; + break; + case BulkItemAction.RemoveSyncRules: + flag = (byte)((uint)(byte)((((SyncEventArgs)args).Device.Rules.Remove(list.ToArray(), mediaType, fDeviceFolderIds: false) >= 0) ? 1u : 0u) & (true ? 1u : 0u)) != 0; + break; + case BulkItemAction.AddSyncRules: + flag = (byte)((uint)(byte)((((SyncEventArgs)args).Device.Rules.Add(list.ToArray(), mediaType) >= 0) ? 1u : 0u) & (true ? 1u : 0u)) != 0; + if (((TypeDiscoveringSyncEventArgs)args).ContainedTypes == null) + { + ((TypeDiscoveringSyncEventArgs)args).ContainedTypes = new List(); + } + ((TypeDiscoveringSyncEventArgs)args).ContainedTypes.Add(mediaType); + break; + case BulkItemAction.DeleteFromDevice: + case BulkItemAction.ReverseSync: + { + ESyncOperationStatus operationStatus = ESyncOperationStatus.osInvalid; + flag = (byte)((action != BulkItemAction.DeleteFromDevice) ? ((uint)(byte)((((SyncEventArgs)args).Device.ReverseSync(list.ToArray(), mediaType, ref operationStatus) >= 0) ? 1u : 0u) & (true ? 1u : 0u)) : ((uint)(byte)((((SyncEventArgs)args).Device.DeleteMedia(list.ToArray(), mediaType, ref operationStatus) >= 0) ? 1u : 0u) & (true ? 1u : 0u))) != 0; + ((DeferrableSyncEventArgs)args).Status = operationStatus; + break; + } + default: + flag = false; + break; + case BulkItemAction.DeleteFromLibrary: + fixed (int* ptr = &list.ToArray()[0]) + { + try + { + flag = (byte)((uint)(byte)((_003CModule_003E.ZuneLibraryExports_002EDeleteMedia(mediaType, ptr, list.Count, ((DeleteFromLibraryEventArgs)args).DeleteFromDisk ? 1 : 0, 1) >= 0) ? 1u : 0u) & (true ? 1u : 0u)) != 0; + } + catch + { + //try-fault + ptr = null; + throw; + } + } + break; + } + LogAction(action, mediaType, list.Count); + } + return ActOnItems(arrayList, action, args) && flag; + } + return true; + } + + public static EMediaTypes NameToMediaType(string typeName) + { + int result; + switch (typeName) + { + case "Artist": + return EMediaTypes.eMediaTypePersonArtist; + case "Album": + return EMediaTypes.eMediaTypeAudioAlbum; + case "Track": + return EMediaTypes.eMediaTypeAudio; + case "Photo": + return EMediaTypes.eMediaTypeImage; + case "Video": + return EMediaTypes.eMediaTypeVideo; + case "PodcastSeries": + return EMediaTypes.eMediaTypePodcastSeries; + case "PodcastEpisode": + return EMediaTypes.eMediaTypePodcastEpisode; + case "Playlist": + return EMediaTypes.eMediaTypePlaylist; + case "MediaFolder": + return EMediaTypes.eMediaTypeFolder; + case "Genre": + return EMediaTypes.eMediaTypeGenre; + case "UserCard": + return EMediaTypes.eMediaTypeUserCard; + default: + result = -1; + break; + case "App": + result = 110; + break; + } + return (EMediaTypes)result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public static bool GetSortAttributes(string sortString, out string[] sorts, out bool[] ascendings) + { + bool result = false; + if (!string.IsNullOrEmpty(sortString)) + { + int num = (sorts = sortString.Split(',')).Length; + if (num > 0) + { + ascendings = new bool[num]; + } + int num2 = 0; + if (0 < num) + { + do + { + bool flag = true; + if (sorts[num2][0] == '-') + { + flag = false; + } + else + { + if (sorts[num2][0] != '+') + { + goto IL_006c; + } + flag = true; + } + sorts[num2] = sorts[num2].Substring(1); + goto IL_006c; + IL_006c: + ascendings[num2] = flag; + num2++; + } + while (num2 < num); + } + result = true; + } + return result; + } + + private LibraryDataProvider() + { + } + + private static void LogAction(BulkItemAction action, EMediaTypes mediaType, int count) + { + if (mediaType == EMediaTypes.eMediaTypeUserCard) + { + switch (action) + { + case BulkItemAction.DeleteFromDevice: + case BulkItemAction.RemoveSyncRules: + case BulkItemAction.ExcludeFromSync: + _003CModule_003E.SQMAddWrapper("SocialSyncDeleteProfileCard", count); + break; + case BulkItemAction.AddSyncRules: + case BulkItemAction.UnexcludeFromSync: + _003CModule_003E.SQMAddWrapper("SocialSyncAddProfileCard", count); + break; + } + } + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProviderItemBase.cs b/ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProviderItemBase.cs new file mode 100644 index 0000000..3726333 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProviderItemBase.cs @@ -0,0 +1,824 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + public class LibraryDataProviderItemBase : DataProviderObject, IDatabaseMedia + { + protected uint m_uTraceId; + + private static Stack m_thumbnailsToProcess = new Stack(); + + private static bool m_thumbnailWorkerAlive = false; + + private static object m_lockObject = new object(); + + private AsyncGetThumbnailState[] m_fThumbnailRequested; + + private Image[] m_thumbnail; + + private long[] m_thumbnailSize; + + private Dictionary m_setProperties; + + private bool m_fSlowDataThumbnailExtraction; + + private bool m_fHasGottenSlowDataRequest; + + private static int TinyThumbnailSize = 38; + + private static int SmallThumbnailSize = 86; + + private static int LargeThumbnailSize = 159; + + private static int SuperLargeThumbnailSize = 240; + + private static int NowPlayingThumbnailSize = 200; + + private static int c_MaxThumbnails = 3; + + private static int[] s_thumbnailSizes = new int[3] { 86, 159, 240 }; + + internal unsafe LibraryDataProviderItemBase(DataProviderQuery query, object typeCookie) + : base(query, typeCookie) + { + m_uTraceId = _003CModule_003E.MicrosoftZuneLibrary_002E_003FA0xea57f500_002Es_uNextTraceId; + _003CModule_003E.MicrosoftZuneLibrary_002E_003FA0xea57f500_002Es_uNextTraceId++; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 10, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + } + + public unsafe override object GetProperty(string propertyName) + { + object obj = null; + DataProviderMapping value = null; + Dictionary setProperties = m_setProperties; + if (setProperties != null) + { + obj = null; + if (setProperties.TryGetValue(propertyName, out obj)) + { + return obj; + } + } + if (base.Mappings.TryGetValue(propertyName, out value)) + { + if (!string.IsNullOrEmpty(value.Source)) + { + if (value.Source == "ThumbnailPath") + { + throw new NotImplementedException(); + } + int num = ThumbnailSizeIndexFromSizeName(value.Source, -1); + if (num >= 0) + { + EnsureThumbnailStorage(); + Image[] thumbnail = m_thumbnail; + if (thumbnail[num] != null) + { + if (((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + fixed (ushort* a = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(thumbnail[num].Source))) + { + try + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_DdS(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 14, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId, num, a); + } + } + catch + { + //try-fault + a = null; + throw; + } + } + } + return m_thumbnail[num]; + } + if (num != 0 || !m_fSlowDataThumbnailExtraction) + { + BeginGetThumbnail(propertyName, num, slowDataQuery: false); + } + return null; + } + return GetFieldValue(value.PropertyType, value.Source, value.DefaultValue); + } + return value.DefaultValue; + } + return null; + } + + public override void SetProperty(string propertyName, object value) + { + DataProviderMapping value2 = null; + if (!base.Mappings.TryGetValue(propertyName, out value2) || string.IsNullOrEmpty(value2.Source)) + { + return; + } + if (value2.Source == "ThumbnailPath") + { + string newThumbnail = (string)value; + SetNewThumbnail(newThumbnail); + return; + } + if (object.Equals(value, GetProperty(propertyName))) + { + return; + } + if (!(base.TypeName == "Playlist") || !(value2.Source == "Title")) + { + int num = SetFieldValue(value2.Source, value); + if (num < 0) + { + _003CModule_003E.SQMAddNumbersToStream("IgnoredErrorEvent", 1u, (uint)num); + goto IL_00eb; + } + if (value2.Source == "UserRating") + { + DateTime utcNow = DateTime.UtcNow; + SetFieldValue("UserLastRatedDate", utcNow); + } + } + if (m_setProperties == null) + { + m_setProperties = new Dictionary(); + } + m_setProperties[propertyName] = value; + goto IL_00eb; + IL_00eb: + FirePropertyChanged(propertyName); + } + + public virtual void GetMediaIdAndType(out int mediaId, out EMediaTypes mediaType) + { + if (base.TypeName == "PlaylistContentItem") + { + mediaId = (int)GetProperty("MediaId"); + mediaType = (EMediaTypes)GetProperty("MediaType"); + } + else if (base.TypeName == "SyncItem") + { + mediaId = (int)GetProperty("LibraryId"); + mediaType = (EMediaTypes)GetProperty("MediaType"); + } + else + { + mediaId = (int)GetProperty("LibraryId"); + mediaType = LibraryDataProvider.NameToMediaType(base.TypeName); + } + } + + public unsafe static string GetArtUrl(int MediaId, string typeName, [MarshalAs(UnmanagedType.U1)] bool fCacheOnly) + { + //IL_0003: Expected I, but got I8 + ushort* ptr = null; + EMediaTypes eMediaTypes = LibraryDataProvider.NameToMediaType(typeName); + if (_003CModule_003E.ZuneLibraryExports_002ELocateArt(MediaId, eMediaTypes, fCacheOnly, &ptr) >= 0) + { + string result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + return result; + } + return null; + } + + public unsafe virtual void InvalidateAllProperties() + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 55, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + foreach (DataProviderMapping value in base.Mappings.Values) + { + FirePropertyChanged(value.PropertyName); + } + m_setProperties = null; + if (HasThumbnailArt() && (base.TypeName == "Album" || base.TypeName == "Artist" || base.TypeName == "App" || base.TypeName == "Photo")) + { + CheckThumbnail(); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 56, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + } + + public void SetSlowDataThumbnailExtraction([MarshalAs(UnmanagedType.U1)] bool useSlowData) + { + m_fSlowDataThumbnailExtraction = useSlowData; + } + + [return: MarshalAs(UnmanagedType.U1)] + protected unsafe bool SetNewThumbnail(string strThumbnailPath) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 28, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + int num = -2147418113; + if (base.TypeName == "Album") + { + int num2 = (int)GetFieldValue(typeof(int), 355u, -1); + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strThumbnailPath))) + { + try + { + num = _003CModule_003E.ZuneLibraryExports_002ESetAlbumArt(num2, ptr); + if (num < 0) + { + _003CModule_003E.SQMAddNumbersToStream("IgnoredErrorEvent", 1u, (uint)num); + } + SetSlowDataThumbnailExtraction(useSlowData: false); + InvalidateAllProperties(); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_Dd(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 29, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId, num); + } + return (byte)((num >= 0) ? 1u : 0u) != 0; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool SetNewThumbnail(SafeBitmap safeBitmap) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 30, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + int num = -2147418113; + if (base.TypeName == "Album" && safeBitmap != null) + { + int num2 = (int)GetFieldValue(typeof(int), 355u, -1); + void* ptr = (void*)safeBitmap.DangerousGetHandle(); + num = _003CModule_003E.ZuneLibraryExports_002ESetAlbumArt(num2, (HBITMAP__*)ptr); + if (num < 0) + { + _003CModule_003E.SQMAddNumbersToStream("IgnoredErrorEvent", 1u, (uint)num); + } + SetSlowDataThumbnailExtraction(useSlowData: false); + InvalidateAllProperties(); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 31, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + return (byte)((num >= 0) ? 1u : 0u) != 0; + } + + protected internal unsafe virtual void OnRequestSlowData() + { + DataProviderMapping value = null; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 18, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + int thumbnailIndex = 0; + _ = string.Empty; + string typeName = base.TypeName; + m_fHasGottenSlowDataRequest = true; + string text; + switch (typeName) + { + case "Album": + text = "AlbumArtSmall"; + break; + default: + text = string.Empty; + break; + case "Photo": + case "Video": + case "MediaFolder": + case "App": + text = "Thumbnail"; + break; + } + if (!string.IsNullOrEmpty(text)) + { + if (base.Mappings.TryGetValue(text, out value) && !string.IsNullOrEmpty(value.Source)) + { + thumbnailIndex = ThumbnailSizeIndexFromSizeName(value.Source, 0); + } + if (BeginGetThumbnail(text, thumbnailIndex, slowDataQuery: true)) + { + goto IL_00fa; + } + } + NotifySlowDataAcquireComplete(); + goto IL_00fa; + IL_00fa: + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 19, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + } + + [return: MarshalAs(UnmanagedType.U1)] + protected unsafe bool BeginGetThumbnail(string thumbnailPropertyName, int thumbnailIndex, [MarshalAs(UnmanagedType.U1)] bool slowDataQuery) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 23, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + EnsureThumbnailStorage(); + bool flag = false; + if (m_thumbnail[thumbnailIndex] == null || base.TypeName == "Album") + { + try + { + Monitor.Enter(m_lockObject); + AsyncGetThumbnailState asyncGetThumbnailState = m_fThumbnailRequested[thumbnailIndex]; + if (asyncGetThumbnailState == null) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 24, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + int num = 1; + } + else + { + int num = 0; + } + asyncGetThumbnailState = new AsyncGetThumbnailState(this); + asyncGetThumbnailState.thumbnailPropertyName = thumbnailPropertyName; + asyncGetThumbnailState.thumbnailIndex = thumbnailIndex; + asyncGetThumbnailState.slowDataQuery = slowDataQuery; + asyncGetThumbnailState.antialiasImageEdges = AntialiasImageEdges(); + asyncGetThumbnailState.MediaId = (int)GetFieldValue(typeof(int), 355u, -1); + m_fThumbnailRequested[thumbnailIndex] = asyncGetThumbnailState; + flag = true; + goto IL_018d; + } + bool isComplete = asyncGetThumbnailState.isComplete; + flag = !isComplete; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_Dl(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 25, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId, isComplete ? 1 : 0); + int num2 = 1; + } + else + { + int num2 = 0; + } + if (flag) + { + goto IL_018d; + } + goto end_IL_006c; + IL_018d: + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 26, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + int num3 = 1; + } + else + { + int num3 = 0; + } + m_thumbnailsToProcess.Push(asyncGetThumbnailState); + if (!m_thumbnailWorkerAlive) + { + m_thumbnailWorkerAlive = true; + ThreadPool.QueueUserWorkItem(GetThumbnailOnWorkerThread, null); + } + end_IL_006c:; + } + finally + { + Monitor.Exit(m_lockObject); + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 27, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + return flag; + } + + protected unsafe static void GetThumbnailOnWorkerThread(object listItem) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 34, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids)); + } + bool flag = true; + while (flag) + { + AsyncGetThumbnailState asyncGetThumbnailState = null; + bool flag2 = true; + try + { + Monitor.Enter(m_lockObject); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 35, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_thumbnailsToProcess.Count); + int num = 1; + } + else + { + int num = 0; + } + if (m_thumbnailsToProcess.Count > 0) + { + listItem = m_thumbnailsToProcess.Pop(); + asyncGetThumbnailState = (AsyncGetThumbnailState)listItem; + if (asyncGetThumbnailState != null) + { + flag2 = asyncGetThumbnailState.isComplete; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_Dll(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 36, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), asyncGetThumbnailState.listItem.m_uTraceId, flag2 ? 1 : 0, asyncGetThumbnailState.slowDataQuery ? 1 : 0); + int num2 = 1; + } + else + { + int num2 = 0; + } + asyncGetThumbnailState.isComplete = true; + } + } + else + { + m_thumbnailWorkerAlive = false; + flag = false; + flag2 = true; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 37, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids)); + int num3 = 1; + } + else + { + int num4 = 0; + } + } + } + finally + { + Monitor.Exit(m_lockObject); + } + if (asyncGetThumbnailState == null) + { + continue; + } + if (flag2) + { + if (!asyncGetThumbnailState.slowDataQuery) + { + continue; + } + LibraryDataProviderItemBase listItem2 = asyncGetThumbnailState.listItem; + if (listItem2 != null) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 38, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), listItem2.m_uTraceId); + } + Application.DeferredInvoke(asyncGetThumbnailState.listItem.NotifySlowDataAcquireCompleteDelegate, null); + } + continue; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 39, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), asyncGetThumbnailState.listItem.m_uTraceId); + } + LibraryDataProviderItemBase listItem3 = asyncGetThumbnailState.listItem; + asyncGetThumbnailState.thumbnail = null; + if (listItem3.TypeName == "Album" || listItem3.TypeName == "Artist" || listItem3.TypeName == "App" || listItem3.TypeName == "MediaFolder" || listItem3.TypeName == "Photo" || listItem3.TypeName == "Video") + { + string artUrl = GetArtUrl(asyncGetThumbnailState.MediaId, listItem3.TypeName, fCacheOnly: false); + if (!string.IsNullOrEmpty(artUrl)) + { + if (!listItem3.ArtNeedsUpdating(artUrl, asyncGetThumbnailState.thumbnailIndex)) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 40, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), listItem3.m_uTraceId); + } + continue; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 41, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), listItem3.m_uTraceId); + } + int num5 = s_thumbnailSizes[asyncGetThumbnailState.thumbnailIndex]; + asyncGetThumbnailState.thumbnail = new Image("file://" + artUrl, num5, num5, flippable: false, asyncGetThumbnailState.antialiasImageEdges); + } + } + Application.DeferredInvoke(listItem3.UpdateThumbnail, asyncGetThumbnailState); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 42, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids)); + } + } + + protected unsafe virtual void UpdateThumbnail(object args) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 43, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids)); + } + AsyncGetThumbnailState asyncGetThumbnailState = (AsyncGetThumbnailState)args; + if (asyncGetThumbnailState.slowDataQuery) + { + NotifySlowDataAcquireComplete(); + } + uint a = (uint)(((int?)asyncGetThumbnailState.listItem?.m_uTraceId) ?? (-1)); + if (asyncGetThumbnailState.thumbnail == null) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 44, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), a); + } + string text = ThumbnailFallbackImageUrl(); + if (!string.IsNullOrEmpty(text)) + { + asyncGetThumbnailState.thumbnail = new Image(text); + } + } + int thumbnailIndex = asyncGetThumbnailState.thumbnailIndex; + if (m_thumbnail[thumbnailIndex] != asyncGetThumbnailState.thumbnail) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_Dd(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 45, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), a, thumbnailIndex); + } + m_thumbnail[asyncGetThumbnailState.thumbnailIndex] = asyncGetThumbnailState.thumbnail; + if (asyncGetThumbnailState.thumbnailPropertyName != (string)null) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 46, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), a); + } + FirePropertyChanged(asyncGetThumbnailState.thumbnailPropertyName); + } + } + ((IDisposable)asyncGetThumbnailState).Dispose(); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 47, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids)); + } + } + + protected void CheckThumbnail() + { + string artUrl = GetArtUrl((int)GetFieldValue(typeof(int), 355u, -1), base.TypeName, fCacheOnly: true); + if (!string.IsNullOrEmpty(artUrl) && ArtNeedsUpdating(artUrl)) + { + Application.DeferredInvoke(ClearThumbnailCacheOnAppThread, null); + } + else if (string.IsNullOrEmpty(artUrl) && base.TypeName == "Photo") + { + Application.DeferredInvoke(ClearThumbnailCacheOnAppThread, null); + } + } + + protected unsafe void ClearThumbnailCacheOnAppThread(object stateObj) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 53, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + if (base.TypeName == "Album") + { + ClearThumbnailCache(); + FirePropertyChanged("AlbumArtSmall"); + } + else if (base.TypeName == "Photo") + { + ClearThumbnailCache(); + FirePropertyChanged("Thumbnail"); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 54, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + } + + protected virtual object GetFieldValue(Type type, uint atom) + { + return null; + } + + protected virtual object GetFieldValue(Type type, string atomName, object defaultValue) + { + return null; + } + + protected virtual object GetFieldValue(Type type, uint atom, object defaultValue) + { + return null; + } + + protected virtual int SetFieldValue(string atomName, object value) + { + return -2147467263; + } + + protected virtual int SetFieldValue(uint atom, object value) + { + return -2147467263; + } + + protected virtual void NotifySlowDataAcquireComplete() + { + } + + protected void NotifySlowDataAcquireCompleteDelegate(object P_0) + { + NotifySlowDataAcquireComplete(); + } + + [return: MarshalAs(UnmanagedType.U1)] + protected virtual bool AntialiasImageEdges() + { + return false; + } + + protected virtual string ThumbnailFallbackImageUrl() + { + return null; + } + + private unsafe void EnsureThumbnailStorage() + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 15, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + if (m_thumbnail == null) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 16, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + m_fThumbnailRequested = new AsyncGetThumbnailState[3]; + m_thumbnail = new Image[3]; + m_thumbnailSize = new long[3]; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 17, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + } + + private unsafe void ClearThumbnailCache() + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 32, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + if (m_thumbnail != null) + { + string text = null; + bool antialiasEdges = AntialiasImageEdges(); + int num = 0; + if (0 < (nint)s_thumbnailSizes.LongLength) + { + do + { + if (m_thumbnail[num] != null) + { + int num2 = s_thumbnailSizes[num]; + Image.RemoveCache(m_thumbnail[num].Source, num2, num2, flippable: false, antialiasEdges); + text = m_thumbnail[num].Source; + m_thumbnail[num] = null; + } + m_fThumbnailRequested[num] = null; + m_thumbnailSize[num] = 0L; + num++; + } + while (num < (nint)s_thumbnailSizes.LongLength); + } + if (text != (string)null) + { + Image.RemoveCache(text, 200, 200, flippable: false, antialiasEdges); + Image.RemoveCache(text, 38, 38, flippable: false, antialiasEdges); + } + if (m_fHasGottenSlowDataRequest) + { + SetSlowDataThumbnailExtraction(useSlowData: false); + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 33, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + } + + [return: MarshalAs(UnmanagedType.U1)] + private bool HasThumbnailArt() + { + int num = ((base.TypeName != "Album" || (bool)GetFieldValue(typeof(bool), 191u, false)) ? 1 : 0); + return (byte)num != 0; + } + + [return: MarshalAs(UnmanagedType.U1)] + private unsafe bool ArtNeedsUpdating(string strThumbnailPath, int thumbnailIndex) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 51, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + bool flag = false; + if (m_thumbnailSize != null) + { + FileInfo fileInfo = new FileInfo(strThumbnailPath); + if (fileInfo.Exists) + { + try + { + EnsureThumbnailStorage(); + long length = fileInfo.Length; + if (thumbnailIndex != -1) + { + long[] thumbnailSize = m_thumbnailSize; + long num = thumbnailSize[thumbnailIndex]; + if (num == 0L || length != num) + { + thumbnailSize[thumbnailIndex] = length; + flag = true; + } + } + else + { + flag = true; + for (int i = 0; i < 3; i++) + { + long num2 = m_thumbnailSize[i]; + if (num2 != 0L && length == num2) + { + flag = false; + break; + } + } + } + } + catch (IOException) + { + int num3 = 0; + do + { + m_thumbnailSize[num3] = 0L; + num3++; + } + while (num3 < 3); + flag = true; + } + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_Dl(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 52, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId, flag ? 1 : 0); + } + return flag; + } + + [return: MarshalAs(UnmanagedType.U1)] + private bool ArtNeedsUpdating(string strThumbnailPath) + { + return ArtNeedsUpdating(strThumbnailPath, -1); + } + + private static int ThumbnailSizeIndexFromSizeName(string thumbnailSizeName, int defaultSizeIndex) + { + int result; + switch (thumbnailSizeName) + { + case "LargeThumbnail": + return 1; + default: + result = defaultSizeIndex; + goto IL_003b; + case "SuperLargeThumbnail": + result = 2; + goto IL_003b; + case "SmallThumbnail": + case "Thumbnail": + { + return 0; + } + IL_003b: + return result; + } + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProviderListItem.cs b/ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProviderListItem.cs new file mode 100644 index 0000000..ed89497 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProviderListItem.cs @@ -0,0 +1,136 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class LibraryDataProviderListItem : LibraryDataProviderItemBase + { + protected internal int m_LibraryId; + + protected LibraryVirtualList m_listOwner; + + protected int m_DontUseDirectly_Index; + + protected int m_QueryRN; + + internal unsafe LibraryDataProviderListItem(LibraryDataProviderQuery owner, LibraryVirtualList listOwner, object typeCookie, int QueryRN, int index) + : base(owner, typeCookie) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_DD(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 11, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId, (uint)index); + } + m_DontUseDirectly_Index = index; + m_QueryRN = QueryRN; + m_listOwner = listOwner; + if (QueryRN != -1) + { + m_LibraryId = (int)m_listOwner.QueryList.GetFieldValue((uint)index, typeof(int), 355u, -1); + } + SetSlowDataThumbnailExtraction(useSlowData: true); + } + + public LibraryVirtualList GetOwner() + { + return m_listOwner; + } + + protected internal unsafe int GetIndex() + { + int queryRN = m_QueryRN; + if (queryRN != -1) + { + LibraryVirtualList listOwner = m_listOwner; + if (queryRN != listOwner.GetQueryRN()) + { + int indexForLibraryId = (int)listOwner.QueryList.GetIndexForLibraryId(m_DontUseDirectly_Index, m_LibraryId); + if (indexForLibraryId != -1) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_DDD(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 50, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId, (uint)m_DontUseDirectly_Index, (uint)indexForLibraryId); + } + m_DontUseDirectly_Index = indexForLibraryId; + m_QueryRN = m_listOwner.GetQueryRN(); + } + } + } + return m_DontUseDirectly_Index; + } + + protected override object GetFieldValue(Type type, uint Atom) + { + return m_listOwner.QueryList.GetFieldValue((uint)GetIndex(), type, Atom); + } + + protected override object GetFieldValue(Type type, string AtomName, object defaultValue) + { + return m_listOwner.QueryList.GetFieldValue((uint)GetIndex(), type, AtomName, defaultValue); + } + + protected override object GetFieldValue(Type type, uint Atom, object defaultValue) + { + return m_listOwner.QueryList.GetFieldValue((uint)GetIndex(), type, Atom, defaultValue); + } + + protected override int SetFieldValue(string AtomName, object Value) + { + return m_listOwner.QueryList.SetFieldValue((uint)GetIndex(), AtomName, Value); + } + + protected override int SetFieldValue(uint Atom, object Value) + { + return m_listOwner.QueryList.SetFieldValue((uint)GetIndex(), Atom, Value); + } + + protected unsafe override void NotifySlowDataAcquireComplete() + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 20, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + int index = GetIndex(); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_DD(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 21, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId, (uint)index); + } + m_listOwner.NotifySlowDataAcquireComplete(index); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 22, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids), m_uTraceId); + } + } + + [return: MarshalAs(UnmanagedType.U1)] + protected override bool AntialiasImageEdges() + { + return m_listOwner.AntialiasImageEdges; + } + + protected override string ThumbnailFallbackImageUrl() + { + return m_listOwner.QueryOwner.ThumbnailFallbackImageUrl; + } + + protected unsafe override void UpdateThumbnail(object args) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 48, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids)); + } + if (!m_listOwner.IsDisposed) + { + base.UpdateThumbnail(args); + } + else + { + ((IDisposable)(AsyncGetThumbnailState)args).Dispose(); + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 92uL)) & 0x40u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 89uL)) >= 7u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 80uL), 49, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xea57f500_002EWPP_LibraryDataProvider_cpp_Traceguids)); + } + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProviderQuery.cs b/ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProviderQuery.cs new file mode 100644 index 0000000..a729915 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProviderQuery.cs @@ -0,0 +1,667 @@ +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.Iris; +using Microsoft.Zune.Playlist; +using MicrosoftZuneInterop; + +namespace MicrosoftZuneLibrary +{ + internal class LibraryDataProviderQuery : DataProviderQuery + { + protected LibraryVirtualList m_virtualListResultSet; + + private bool m_disposed = false; + + private int m_requestGeneration; + + private string m_thumbnailFallbackImageUrl; + + private static WorkerQueue m_libQueriesQueue = WorkerQueue.CreateInstance(); + + public string ThumbnailFallbackImageUrl => m_thumbnailFallbackImageUrl; + + internal LibraryDataProviderQuery(object queryTypeCookie) + : base(queryTypeCookie) + { + LibraryDataProviderQueryResult libraryDataProviderQueryResult = new LibraryDataProviderQueryResult(this, null, base.ResultTypeCookie); + libraryDataProviderQueryResult.SetIsEmpty(isEmpty: true); + Result = libraryDataProviderQueryResult; + } + + [return: MarshalAs(UnmanagedType.U1)] + public bool GetSortAttributes(out string[] sorts, out bool[] ascendings) + { + return LibraryDataProvider.GetSortAttributes((string)GetProperty("Sort"), out sorts, out ascendings); + } + + protected unsafe override void BeginExecute() + { + if (m_disposed) + { + return; + } + if ((uint)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _003CModule_003E.g_EtwControlerState, 8)) > 1u && ((uint)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _003CModule_003E.g_EtwControlerState, 4)) & 0x10u) != 0) + { + fixed (ushort* pwszDetail = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(ToString()))) + { + try + { + _003CModule_003E.PERFTRACE_COLLECTIONEVENT((_COLLECTION_EVENT)28, pwszDetail); + } + catch + { + //try-fault + pwszDetail = null; + throw; + } + } + } + LibraryVirtualList virtualListResultSet = m_virtualListResultSet; + if (virtualListResultSet != null) + { + ((IDisposable)virtualListResultSet).Dispose(); + m_virtualListResultSet = null; + } + m_thumbnailFallbackImageUrl = null; + m_requestGeneration++; + Status = DataProviderQueryStatus.RequestingData; + m_libQueriesQueue.QueueSequentialWorkItem(BeginExecuteWorker, m_requestGeneration); + } + + protected override void OnDispose() + { + m_disposed = true; + LibraryVirtualList virtualListResultSet = m_virtualListResultSet; + if (virtualListResultSet != null) + { + ((IDisposable)virtualListResultSet).Dispose(); + m_virtualListResultSet = null; + } + } + + private unsafe void BeginExecuteWorker(object state) + { + //IL_005b: Expected I, but got I8 + //IL_006e: Expected I, but got I8 + //IL_00a0: Expected I, but got I8 + //IL_00d3: Expected I, but got I8 + //IL_0105: Expected I, but got I8 + //IL_0138: Expected I, but got I8 + //IL_0160: Expected I, but got I8 + //IL_0172: Expected I, but got I8 + //IL_019b: Expected I, but got I8 + //IL_01c3: Expected I, but got I8 + //IL_01d5: Expected I, but got I8 + //IL_01fe: Expected I, but got I8 + //IL_020e: Expected I, but got I8 + //IL_0340: Expected I, but got I8 + //IL_0375: Expected I, but got I8 + //IL_03a8: Expected I, but got I8 + //IL_03d0: Expected I, but got I8 + //IL_03f9: Expected I, but got I8 + //IL_0421: Expected I, but got I8 + //IL_044a: Expected I, but got I8 + //IL_0476: Expected I, but got I8 + //IL_04a7: Expected I, but got I8 + //IL_04d0: Expected I, but got I8 + //IL_0505: Expected I, but got I8 + //IL_0538: Expected I, but got I8 + //IL_0561: Expected I, but got I8 + //IL_057f: Expected I, but got I8 + //IL_05a8: Expected I, but got I8 + //IL_05dd: Expected I, but got I8 + //IL_0611: Expected I, but got I8 + //IL_063a: Expected I, but got I8 + //IL_0689: Expected I, but got I8 + //IL_06ba: Expected I, but got I8 + //IL_06e0: Expected I, but got I8 + //IL_070e: Expected I, but got I8 + //IL_0830: Expected I, but got I8 + //IL_0b62: Expected I, but got I8 + //IL_0bc8: Expected I, but got I8 + //IL_0be6: Expected I, but got I8 + //IL_0bff: Expected I, but got I8 + //IL_0c87: Expected I, but got I8 + //IL_0c8c: Expected I, but got I8 + bool[] ascendings = null; + string[] sorts = null; + string text = null; + int num = (int)state; + if (num != m_requestGeneration) + { + return; + } + QueryPropertyBag queryPropertyBag = new QueryPropertyBag(); + IQueryPropertyBag* iQueryPropertyBag = queryPropertyBag.GetIQueryPropertyBag(); + bool retainedList = false; + if (GetSortAttributes(out sorts, out ascendings)) + { + IMultiSortAttributes* ptr = queryPropertyBag.PackMultiSortAttributes(sorts, ascendings); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 32)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)23, ptr); + if (ptr != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 16)))((nint)ptr); + } + } + object property = GetProperty("ArtistIds"); + if (property != null) + { + long num2 = *(long*)iQueryPropertyBag + 24; + IDList* intPtr = queryPropertyBag.PackIDList((IList)property); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)4, intPtr); + } + object property2 = GetProperty("GenreIds"); + if (property2 != null) + { + long num3 = *(long*)iQueryPropertyBag + 24; + IDList* intPtr2 = queryPropertyBag.PackIDList((IList)property2); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)12, intPtr2); + } + object property3 = GetProperty("AlbumIds"); + if (property3 != null) + { + long num4 = *(long*)iQueryPropertyBag + 24; + IDList* intPtr3 = queryPropertyBag.PackIDList((IList)property3); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num4))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)7, intPtr3); + } + object property4 = GetProperty("UserCardIds"); + if (property4 != null) + { + long num5 = *(long*)iQueryPropertyBag + 24; + IDList* intPtr4 = queryPropertyBag.PackIDList((IList)property4); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num5))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)30, intPtr4); + } + object property5 = GetProperty("DeviceId"); + if (property5 != null) + { + int num6 = (int)property5; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)1, num6); + } + else + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)1, 1); + } + object property6 = GetProperty("SyncMappedError"); + if (property6 != null) + { + int num7 = (int)property6; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)18, num7); + } + property6 = GetProperty("UserId"); + if (property6 != null) + { + int num8 = (int)property6; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)0, num8); + } + else + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)0, 1); + } + object property7 = GetProperty("InLibrary"); + if (property7 != null) + { + int num9 = (int)property7; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)26, num9); + } + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)2, 0); + EQueryTypeView eQueryTypeView = EQueryTypeView.eQueryTypeLibraryView; + object property8 = GetProperty("ShowDeviceContents"); + if (property8 != null) + { + eQueryTypeView = (((bool)property8) ? EQueryTypeView.eQueryTypeDeviceView : eQueryTypeView); + } + property8 = GetProperty("DiscMediaView"); + if (property8 != null) + { + eQueryTypeView = (((bool)property8) ? EQueryTypeView.eQueryTypeDiscMediaView : eQueryTypeView); + } + property8 = GetProperty("Remaining"); + if (property8 != null) + { + eQueryTypeView = (((bool)property8) ? EQueryTypeView.eQueryTypeSyncRemaining : eQueryTypeView); + } + property8 = GetProperty("Complete"); + if (property8 != null) + { + eQueryTypeView = (((bool)property8) ? EQueryTypeView.eQueryTypeSyncSucceeded : eQueryTypeView); + } + property8 = GetProperty("Failed"); + if (property8 != null) + { + eQueryTypeView = (((bool)property8) ? EQueryTypeView.eQueryTypeSyncFailed : eQueryTypeView); + } + property8 = GetProperty("MultiSelect"); + if (property8 != null && (bool)property8) + { + eQueryTypeView = ((EQueryTypeView.eQueryTypeDeviceView == eQueryTypeView) ? EQueryTypeView.eQueryTypeDeviceMultiSelectView : EQueryTypeView.eQueryTypeLibraryMultiSelectView); + } + object property9 = GetProperty("RulesOnly"); + if (property9 != null) + { + eQueryTypeView = (((bool)property9) ? EQueryTypeView.eQueryTypeDeviceSyncRuleView : eQueryTypeView); + } + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)15, (int)eQueryTypeView); + object property10 = GetProperty("Keywords"); + if (property10 != null) + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars((string)property10))) + { + try + { + long num10 = *(long*)iQueryPropertyBag + 40; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num10))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)19, ptr2); + } + catch + { + //try-fault + ptr2 = null; + throw; + } + } + } + object property11 = GetProperty("ContributingArtistId"); + if (property11 != null) + { + int num11 = (int)property11; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)5, num11); + } + property11 = GetProperty("ArtistId"); + if (property11 != null) + { + int num12 = (int)property11; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)3, num12); + } + property11 = GetProperty("GenreId"); + if (property11 != null) + { + int num13 = (int)property11; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)11, num13); + } + property11 = GetProperty("AlbumId"); + if (property11 != null) + { + int num14 = (int)property11; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)6, num14); + } + property11 = GetProperty("FolderId"); + if (property11 != null) + { + int num15 = (int)property11; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)9, num15); + } + property11 = GetProperty("RecurseIntoFolders"); + if (property11 != null && (int)property11 != 0) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)36, 1); + } + object property12 = GetProperty("FolderMediaType"); + if (property12 != null) + { + EMediaTypes eMediaTypes = LibraryDataProvider.NameToMediaType((string)property12); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)13, (int)eMediaTypes); + } + object property13 = GetProperty("MediaType"); + if (property13 != null) + { + int num16 = (int)property13; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)13, num16); + } + object property14 = GetProperty("TOC"); + if (property14 != null) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars((string)property14))) + { + try + { + long num17 = *(long*)iQueryPropertyBag + 40; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num17))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)20, ptr3); + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + } + object property15 = GetProperty("SeriesId"); + if (property15 != null) + { + int num18 = (int)property15; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)8, num18); + } + property15 = GetProperty("WatchType"); + if (property15 != null) + { + int num19 = (int)property15; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)32, num19); + } + if (GetProperty("ExpiresOnly") != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)33, 1); + } + object property16 = GetProperty("Operation"); + if (property16 != null) + { + int num20 = (int)property16; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)16, num20); + } + property16 = GetProperty("InitTime"); + if (property16 != null) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars((string)property16))) + { + try + { + long num21 = *(long*)iQueryPropertyBag + 40; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num21))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)17, ptr4); + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + object property17 = GetProperty("PlaylistId"); + if (property17 != null) + { + int num22 = (int)property17; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)10, num22); + } + property17 = GetProperty("CategoryId"); + if (property17 != null) + { + int num23 = (int)property17; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)27, num23); + } + property17 = GetProperty("PlaylistType"); + if (property17 != null && !string.IsNullOrEmpty((string)property17)) + { + PlaylistType playlistType = (PlaylistType)Enum.Parse(typeof(PlaylistType), (string)property17); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)24, (int)playlistType); + } + object property18 = GetProperty("PlaylistTypeMask"); + if (property18 != null) + { + int num24 = (int)property18; + if (num24 != 0) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)25, num24); + } + } + object property19 = GetProperty("MaxResultCount"); + if (property19 != null) + { + int num25 = (int)property19; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)31, num25); + } + property19 = GetProperty("DrmStateMask"); + if (property19 != null) + { + ulong num26 = (ulong)(long)property19; + if (num26 != 0L) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 48)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)34, num26); + } + } + string text2 = (string)GetProperty("QueryType"); + EQueryType eQueryType = EQueryType.eQueryTypeInvalid; + if (queryPropertyBag.IsSet("Keywords")) + { + switch (text2) + { + case "Artist": + eQueryType = EQueryType.eQueryTypeArtistsWithKeyword; + break; + case "Album": + eQueryType = EQueryType.eQueryTypeAlbumsWithKeyword; + break; + case "Track": + eQueryType = EQueryType.eQueryTypeTracksWithKeyword; + break; + case "Playlist": + eQueryType = EQueryType.eQueryTypePlaylistsWithKeyword; + break; + case "Photo": + eQueryType = EQueryType.eQueryTypePhotosWithKeyword; + break; + case "PodcastSeries": + eQueryType = EQueryType.eQueryTypeSubscriptionsSeriesWithKeyword; + break; + case "PodcastEpisode": + eQueryType = EQueryType.eQueryTypeSubscriptionsEpisodesWithKeyword; + break; + case "Video": + eQueryType = EQueryType.eQueryTypeVideoWithKeyword; + break; + } + } + else + { + int num27; + switch (text2) + { + case "Artist": + eQueryType = EQueryType.eQueryTypeAllAlbumArtists; + break; + case "Genres": + { + object property21 = GetProperty("MediaType"); + int num28 = ((property21 == null) ? 3 : ((int)property21)); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)13, num28); + eQueryType = EQueryType.eQueryTypeAllGenres; + break; + } + case "Album": + property19 = GetProperty("ArtistId"); + if ((property19 != null && (int)property19 != -1) || queryPropertyBag.IsSet("ArtistIds")) + { + eQueryType = EQueryType.eQueryTypeAlbumsForAlbumArtistId; + } + else + { + property19 = GetProperty("GenreId"); + eQueryType = (((property19 == null || (int)property19 == -1) && !queryPropertyBag.IsSet("GenreIds")) ? EQueryType.eQueryTypeAllAlbums : EQueryType.eQueryTypeAlbumsByGenreId); + } + retainedList = true; + break; + case "Track": + { + object property20 = GetProperty("RulesOnly"); + if (property20 != null && (bool)property20) + { + eQueryType = EQueryType.eQueryTypeAllTracks; + break; + } + property20 = GetProperty("AlbumId"); + if ((property20 != null && (int)property20 != -1) || queryPropertyBag.IsSet("AlbumIds")) + { + property19 = GetProperty("ArtistId"); + eQueryType = (((property19 == null || (int)property19 == -1) && !queryPropertyBag.IsSet("ArtistIds")) ? EQueryType.eQueryTypeTracksForAlbumId : EQueryType.eQueryTypeTracksForAlbumArtistId); + break; + } + property19 = GetProperty("ArtistId"); + if ((property19 != null && (int)property19 != -1) || queryPropertyBag.IsSet("ArtistIds")) + { + eQueryType = EQueryType.eQueryTypeTracksForAlbumArtistId; + break; + } + property19 = GetProperty("GenreId"); + if ((property19 != null && (int)property19 != -1) || queryPropertyBag.IsSet("GenreIds")) + { + eQueryType = EQueryType.eQueryTypeTracksByGenreId; + break; + } + property19 = GetProperty("Detailed"); + if (property19 != null && (bool)property19) + { + eQueryType = EQueryType.eQueryTypeAllTracksDetailed; + break; + } + property19 = GetProperty("TOC"); + eQueryType = ((property19 != null && !string.IsNullOrEmpty((string)property19)) ? EQueryType.eQueryTypeTracksForTOC : EQueryType.eQueryTypeAllTracks); + break; + } + case "AlbumByTOC": + eQueryType = EQueryType.eQueryTypeAlbumsByTOC; + if (!queryPropertyBag.IsSet("TOC")) + { + eQueryType = EQueryType.eQueryTypeInvalid; + } + break; + case "Photo": + eQueryType = ((eQueryTypeView == EQueryTypeView.eQueryTypeDeviceSyncRuleView) ? EQueryType.eQueryTypeAllPhotos : EQueryType.eQueryTypePhotosByFolderId); + break; + case "MediaFolder": + eQueryType = EQueryType.eQueryTypeMediaFolders; + break; + case "Video": + property19 = GetProperty("CategoryId"); + eQueryType = ((property19 == null || (int)property19 == -1) ? EQueryType.eQueryTypeAllVideos : EQueryType.eQueryTypeVideosByCategoryId); + break; + case "PodcastSeries": + eQueryType = EQueryType.eQueryTypeAllPodcastSeries; + break; + case "PodcastEpisode": + property19 = GetProperty("SeriesId"); + eQueryType = ((property19 == null || (int)property19 == -1) ? EQueryType.eQueryTypeAllPodcastEpisodes : EQueryType.eQueryTypeEpisodesForSeriesId); + break; + case "SyncItem": + eQueryType = EQueryType.eQueryTypeSyncProgress; + break; + case "Playlist": + eQueryType = EQueryType.eQueryTypeAllPlaylists; + break; + case "PlaylistContent": + eQueryType = EQueryType.eQueryTypePlaylistContentByPlaylistId; + break; + case "UserCard": + eQueryType = EQueryType.eQueryTypeUserCards; + break; + case "Person": + { + eQueryType = EQueryType.eQueryTypePersonsByTypeId; + EMediaTypes eMediaTypes2 = EMediaTypes.eMediaTypePersonArtist; + eMediaTypes2 = (((string)GetProperty("PersonType") == "Composer") ? EMediaTypes.eMediaTypePersonComposer : eMediaTypes2); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)28, (int)eMediaTypes2); + break; + } + case "ArtistsRanking": + eQueryType = EQueryType.eQueryTypeArtistsRanking; + break; + case "TVSeries": + eQueryType = EQueryType.eQueryTypeVideoSeriesTitles; + break; + case "Pin": + { + eQueryType = EQueryType.eQueryTypePinsByPinType; + EPinType ePinType = EPinType.ePinTypeGeneric; + property19 = GetProperty("PinType"); + if (property19 != null) + { + ePinType = (EPinType)property19; + } + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)35, (int)ePinType); + break; + } + default: + num27 = (int)eQueryType; + goto IL_0bde; + case "App": + { + num27 = 38; + goto IL_0bde; + } + IL_0bde: + eQueryType = (EQueryType)num27; + break; + } + } + int num29 = 0; + IDatabaseQueryResults* ptr5 = null; + if ((byte)((num != m_requestGeneration) ? 1 : 0) == 0) + { + if (eQueryType != EQueryType.eQueryTypeInvalid) + { + ushort* ptr6 = null; + num29 = _003CModule_003E.ZuneLibraryExports_002EQueryDatabase(eQueryType, iQueryPropertyBag, &ptr5, &ptr6); + text = new string((char*)ptr6); + _003CModule_003E.SysFreeString(ptr6); + } + else + { + num29 = 0; + } + } + if ((byte)((num != m_requestGeneration) ? 1 : 0) == 0 && num29 >= 0) + { + ZuneQueryList queryList = null; + if (ptr5 != null) + { + queryList = new ZuneQueryList(ptr5, text2); + } + Application.DeferredInvoke(DeferredSetResult, new DeferredSetResultArgs(num, queryList, retainedList)); + } + ((IDisposable)queryPropertyBag)?.Dispose(); + if (0L != (nint)ptr5) + { + IDatabaseQueryResults* intPtr5 = ptr5; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr5 + 16)))((nint)intPtr5); + ptr5 = null; + } + if (num29 < 0) + { + throw new COMException("Could not perform query " + text, num29); + } + } + + private unsafe void DeferredSetResult(object state) + { + DeferredSetResultArgs deferredSetResultArgs = (DeferredSetResultArgs)state; + if (!m_disposed && deferredSetResultArgs.RequestGeneration == m_requestGeneration) + { + bool isEmpty = true; + if (deferredSetResultArgs.QueryList != null) + { + object property = GetProperty("AutoRefresh"); + bool autoRefresh = property == null || (bool)property; + object property2 = GetProperty("AntialiasImageEdges"); + bool antialiasEdges = property2 != null && (bool)property2; + m_thumbnailFallbackImageUrl = (string)GetProperty("ThumbnailFallbackImageUrl"); + ((IDisposable)m_virtualListResultSet)?.Dispose(); + ReleaseBehavior releaseBehavior2 = ((m_virtualListResultSet = new LibraryVirtualList(this, deferredSetResultArgs.QueryList, autoRefresh, antialiasEdges)).VisualReleaseBehavior = ((!deferredSetResultArgs.RetainedList) ? ReleaseBehavior.ReleaseReference : ReleaseBehavior.KeepReference)); + isEmpty = deferredSetResultArgs.QueryList.IsEmpty; + } + LibraryDataProviderQueryResult libraryDataProviderQueryResult = new LibraryDataProviderQueryResult(this, m_virtualListResultSet, base.ResultTypeCookie); + libraryDataProviderQueryResult.SetIsEmpty(isEmpty); + Result = libraryDataProviderQueryResult; + Status = DataProviderQueryStatus.Complete; + if ((uint)System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _003CModule_003E.g_EtwControlerState, 8)) <= 1u || (System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _003CModule_003E.g_EtwControlerState, 4)) & 0x10) == 0) + { + return; + } + fixed (ushort* pwszDetail = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(ToString()))) + { + try + { + _003CModule_003E.PERFTRACE_COLLECTIONEVENT((_COLLECTION_EVENT)29, pwszDetail); + } + catch + { + //try-fault + pwszDetail = null; + throw; + } + } + } + else + { + ((IDisposable)deferredSetResultArgs.QueryList)?.Dispose(); + } + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProviderQueryResult.cs b/ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProviderQueryResult.cs new file mode 100644 index 0000000..ff62e7c --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/LibraryDataProviderQueryResult.cs @@ -0,0 +1,59 @@ +using System; +using System.Runtime.InteropServices; +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + internal class LibraryDataProviderQueryResult : DataProviderObject + { + protected LibraryVirtualList m_virtualListResultSet; + + protected bool m_isEmpty; + + public LibraryDataProviderQueryResult(LibraryDataProviderQuery owner, LibraryVirtualList virtualListResultSet, object resultTypeCookie) + : base(owner, resultTypeCookie) + { + m_virtualListResultSet = virtualListResultSet; + if (virtualListResultSet == null) + { + return; + } + foreach (DataProviderMapping value in base.Mappings.Values) + { + if (value.UnderlyingCollectionTypeCookie != null) + { + m_virtualListResultSet.SetItemTypeCookie(value.UnderlyingCollectionTypeName, value.UnderlyingCollectionTypeCookie); + } + } + } + + public override object GetProperty(string propertyName) + { + DataProviderMapping value = null; + if (propertyName == "IsEmpty") + { + return m_isEmpty; + } + if (base.Mappings.TryGetValue(propertyName, out value)) + { + return m_virtualListResultSet; + } + return null; + } + + public override void SetProperty(string propertyName, object value) + { + //Discarded unreachable code: IL_0006 + throw new NotSupportedException(); + } + + public void SetIsEmpty([MarshalAs(UnmanagedType.U1)] bool isEmpty) + { + if (m_isEmpty != isEmpty) + { + m_isEmpty = isEmpty; + FirePropertyChanged("IsEmpty"); + } + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/LibraryVirtualList.cs b/ZuneDBApi/MicrosoftZuneLibrary/LibraryVirtualList.cs new file mode 100644 index 0000000..ee2cf12 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/LibraryVirtualList.cs @@ -0,0 +1,181 @@ +using System.Collections; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + [DefaultMember("Item")] + public class LibraryVirtualList : VirtualDatabaseList, ISearchableList + { + private LibraryDataProviderQuery m_owner; + + private new ZuneQueryList m_pQueryList; + + private string m_itemTypeName; + + private object m_itemTypeCookie; + + private bool m_autoRefresh; + + private bool m_useSlowDataRequests; + + private bool m_antialiasImageEdges; + + internal LibraryDataProviderQuery QueryOwner => m_owner; + + public bool AntialiasImageEdges + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_antialiasImageEdges; + } + } + + public virtual ZuneQueryList QueryList => m_pQueryList; + + internal LibraryVirtualList(LibraryDataProviderQuery owner, ZuneQueryList pQueryList, [MarshalAs(UnmanagedType.U1)] bool autoRefresh, [MarshalAs(UnmanagedType.U1)] bool antialiasEdges) + : base(pQueryList, enableSlowDataRequests: true) + { + try + { + m_owner = owner; + base.StoreQueryResults = true; + m_pQueryList = pQueryList; + pQueryList.AddRef(); + m_fBlockChanges = false; + m_fEndBulkArrivedDuringBlock = false; + m_antialiasImageEdges = antialiasEdges; + m_autoRefresh = autoRefresh; + if (autoRefresh) + { + m_pQueryList.Advise(this); + } + base.Count = m_pQueryList.Count; + } + catch + { + //try-fault + base.Dispose(true); + throw; + } + } + + private void _007ELibraryVirtualList() + { + if (m_autoRefresh) + { + m_pQueryList.Unadvise(this); + } + m_pQueryList.Release(); + } + + internal void SetItemTypeCookie(string itemTypeName, object itemTypeCookie) + { + m_itemTypeName = itemTypeName; + m_itemTypeCookie = itemTypeCookie; + } + + public unsafe virtual int SearchForString(string searchString) + { + bool[] ascendings = null; + string[] sorts = null; + if (m_owner.GetSortAttributes(out sorts, out ascendings)) + { + int result; + fixed (ushort* wszName = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(sorts[0]))) + { + try + { + uint atom = (uint)_003CModule_003E.CSchemaMap_002EGetIndex(wszName); + result = m_pQueryList.SearchForString(atom, ascendings[0], searchString); + } + catch + { + //try-fault + wszName = null; + throw; + } + } + return result; + } + return -1; + } + + public override string ToString() + { + return m_itemTypeName + " List"; + } + + public void DisableAutoRefresh() + { + if (m_autoRefresh) + { + m_pQueryList.Unadvise(this); + m_autoRefresh = false; + } + } + + public ArrayList GetUniqueIds() + { + return m_pQueryList.GetUniqueIds(); + } + + protected override object OnRequestItem(int index) + { + if (!m_fDisposed && m_pQueryList.CheckItemIndex((uint)index)) + { + LibraryDataProviderListItem libraryDataProviderListItem = new LibraryDataProviderListItem(m_owner, this, m_itemTypeCookie, m_QueryRN, index); + libraryDataProviderListItem.SetSlowDataThumbnailExtraction(base.SlowDataRequestsEnabled); + m_fItemsAdded = true; + return libraryDataProviderListItem; + } + return new UnavailableLibraryListItem(m_owner, this, m_itemTypeCookie, index); + } + + protected override void OnRequestSlowData(int index) + { + ((LibraryDataProviderListItem)this[index]).OnRequestSlowData(); + } + + protected override void InvalidateItem(int index) + { + ((LibraryDataProviderListItem)this[index]).InvalidateAllProperties(); + } + + protected override void OnPropertyChanged(string property) + { + base.OnPropertyChanged(property); + if (!IsDisposed && property == "Count") + { + LibraryDataProviderQueryResult libraryDataProviderQueryResult = (LibraryDataProviderQueryResult)m_owner.Result; + if (libraryDataProviderQueryResult != null) + { + byte isEmpty = ((Count == 0) ? ((byte)1) : ((byte)0)); + libraryDataProviderQueryResult.SetIsEmpty(isEmpty != 0); + } + } + } + + protected override void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007ELibraryVirtualList(); + } + finally + { + base.Dispose(true); + } + } + else + { + base.Dispose(false); + } + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/ListNotifyData.cs b/ZuneDBApi/MicrosoftZuneLibrary/ListNotifyData.cs new file mode 100644 index 0000000..de7978c --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/ListNotifyData.cs @@ -0,0 +1,9 @@ +namespace MicrosoftZuneLibrary +{ + internal class ListNotifyData + { + public int type; + + public int pos; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/ManagedLock.cs b/ZuneDBApi/MicrosoftZuneLibrary/ManagedLock.cs new file mode 100644 index 0000000..7a84671 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/ManagedLock.cs @@ -0,0 +1,76 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; + +namespace MicrosoftZuneLibrary +{ + internal class ManagedLock : IDisposable + { + private object m_pObject; + + private bool m_locked; + + [SpecialName] + private ManagedLock op_Assign(ManagedLock P_0) + { + return this; + } + + public ManagedLock(object pObject) + { + m_pObject = pObject; + base._002Ector(); + Monitor.Enter(m_pObject); + m_locked = true; + } + + private ManagedLock(ManagedLock P_0) + { + } + + private void _007EManagedLock() + { + if (m_locked) + { + Monitor.Exit(m_pObject); + } + } + + public void Lock() + { + if (!m_locked) + { + Monitor.Enter(m_pObject); + m_locked = true; + } + } + + public void Unlock() + { + if (m_locked) + { + Monitor.Exit(m_pObject); + m_locked = false; + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _007EManagedLock(); + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/MediatorCancelTimerCallback.cs b/ZuneDBApi/MicrosoftZuneLibrary/MediatorCancelTimerCallback.cs new file mode 100644 index 0000000..7a9ef70 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/MediatorCancelTimerCallback.cs @@ -0,0 +1,21 @@ +namespace MicrosoftZuneLibrary +{ + public class MediatorCancelTimerCallback + { + private unsafe FirmwareUpdateMediator* m_mediator; + + public unsafe MediatorCancelTimerCallback(FirmwareUpdateMediator* mediator) + { + m_mediator = mediator; + } + + public unsafe void TimerHit(object P_0) + { + FirmwareUpdateMediator* mediator = m_mediator; + if (mediator != null) + { + _003CModule_003E.MicrosoftZuneLibrary_002EFirmwareUpdateMediator_002EForceCancel(mediator); + } + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/MetadataMgrNotifications.cs b/ZuneDBApi/MicrosoftZuneLibrary/MetadataMgrNotifications.cs new file mode 100644 index 0000000..ead7e2c --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/MetadataMgrNotifications.cs @@ -0,0 +1,328 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class MetadataMgrNotifications : IDisposable + { + private bool m_disposed = false; + + private bool m_fAdvised = false; + + private ulong m_AdviseCookie; + + internal OnFileAddedHandler m_FileAddedHandler; + + internal OnFileErrorHandler m_FileErrorHandler; + + internal OnFileRemovedHandler m_FileRemovedHandler; + + internal OnBeginScanDirectoryHandler m_BeginScanDirectoryHandler; + + internal OnEndScanDirectoryHandler m_EndScanDirectoryHandler; + + internal OnBeginFileChangeHandler m_BeginFileChangeHandler; + + internal OnEndFileChangeHandler m_EndFileChangeHandler; + + internal OnScanCompletedHandler m_ScanCompletedHandler; + + internal OnMetadataUpdateHandler m_MetadataUpdateHandler; + + internal OnBeginMetadataLifecycleHandler m_BeginMetadataLifecycleHandler; + + internal OnEndMetadataLifecycleHandler m_EndMetadataLifecycleHandler; + + internal OnBeginMigrateHandler m_BeginMigrateHandler; + + internal OnEndMigrateHandler m_EndMigrateHandler; + + internal OnFileDeleteFailed m_FileDeleteFailedHandler; + + internal OnFingerprintingFile m_FingerprintingFileHandler; + + [SpecialName] + public virtual event OnFingerprintingFile FingerprintingFile + { + add + { + m_FingerprintingFileHandler = (OnFingerprintingFile)Delegate.Combine(m_FingerprintingFileHandler, value); + } + remove + { + m_FingerprintingFileHandler = (OnFingerprintingFile)Delegate.Remove(m_FingerprintingFileHandler, value); + } + } + + [SpecialName] + public virtual event OnFileDeleteFailed FileDeleteFailed + { + add + { + m_FileDeleteFailedHandler = (OnFileDeleteFailed)Delegate.Combine(m_FileDeleteFailedHandler, value); + } + remove + { + m_FileDeleteFailedHandler = (OnFileDeleteFailed)Delegate.Remove(m_FileDeleteFailedHandler, value); + } + } + + [SpecialName] + public virtual event OnEndMigrateHandler EndMigrate + { + add + { + m_EndMigrateHandler = (OnEndMigrateHandler)Delegate.Combine(m_EndMigrateHandler, value); + } + remove + { + m_EndMigrateHandler = (OnEndMigrateHandler)Delegate.Remove(m_EndMigrateHandler, value); + } + } + + [SpecialName] + public virtual event OnBeginMigrateHandler BeginMigrate + { + add + { + m_BeginMigrateHandler = (OnBeginMigrateHandler)Delegate.Combine(m_BeginMigrateHandler, value); + } + remove + { + m_BeginMigrateHandler = (OnBeginMigrateHandler)Delegate.Remove(m_BeginMigrateHandler, value); + } + } + + [SpecialName] + public virtual event OnEndMetadataLifecycleHandler EndMetadataLifecycle + { + add + { + m_EndMetadataLifecycleHandler = (OnEndMetadataLifecycleHandler)Delegate.Combine(m_EndMetadataLifecycleHandler, value); + } + remove + { + m_EndMetadataLifecycleHandler = (OnEndMetadataLifecycleHandler)Delegate.Remove(m_EndMetadataLifecycleHandler, value); + } + } + + [SpecialName] + public virtual event OnBeginMetadataLifecycleHandler BeginMetadataLifecycle + { + add + { + m_BeginMetadataLifecycleHandler = (OnBeginMetadataLifecycleHandler)Delegate.Combine(m_BeginMetadataLifecycleHandler, value); + } + remove + { + m_BeginMetadataLifecycleHandler = (OnBeginMetadataLifecycleHandler)Delegate.Remove(m_BeginMetadataLifecycleHandler, value); + } + } + + [SpecialName] + public virtual event OnMetadataUpdateHandler MetadataUpdate + { + add + { + m_MetadataUpdateHandler = (OnMetadataUpdateHandler)Delegate.Combine(m_MetadataUpdateHandler, value); + } + remove + { + m_MetadataUpdateHandler = (OnMetadataUpdateHandler)Delegate.Remove(m_MetadataUpdateHandler, value); + } + } + + [SpecialName] + public virtual event OnScanCompletedHandler ScanCompleted + { + add + { + m_ScanCompletedHandler = (OnScanCompletedHandler)Delegate.Combine(m_ScanCompletedHandler, value); + } + remove + { + m_ScanCompletedHandler = (OnScanCompletedHandler)Delegate.Remove(m_ScanCompletedHandler, value); + } + } + + [SpecialName] + public virtual event OnEndFileChangeHandler EndFileChange + { + add + { + m_EndFileChangeHandler = (OnEndFileChangeHandler)Delegate.Combine(m_EndFileChangeHandler, value); + } + remove + { + m_EndFileChangeHandler = (OnEndFileChangeHandler)Delegate.Remove(m_EndFileChangeHandler, value); + } + } + + [SpecialName] + public virtual event OnBeginFileChangeHandler BeginFileChange + { + add + { + m_BeginFileChangeHandler = (OnBeginFileChangeHandler)Delegate.Combine(m_BeginFileChangeHandler, value); + } + remove + { + m_BeginFileChangeHandler = (OnBeginFileChangeHandler)Delegate.Remove(m_BeginFileChangeHandler, value); + } + } + + [SpecialName] + public virtual event OnEndScanDirectoryHandler EndScanDirectory + { + add + { + m_EndScanDirectoryHandler = (OnEndScanDirectoryHandler)Delegate.Combine(m_EndScanDirectoryHandler, value); + } + remove + { + m_EndScanDirectoryHandler = (OnEndScanDirectoryHandler)Delegate.Remove(m_EndScanDirectoryHandler, value); + } + } + + [SpecialName] + public virtual event OnBeginScanDirectoryHandler BeginScanDirectory + { + add + { + m_BeginScanDirectoryHandler = (OnBeginScanDirectoryHandler)Delegate.Combine(m_BeginScanDirectoryHandler, value); + } + remove + { + m_BeginScanDirectoryHandler = (OnBeginScanDirectoryHandler)Delegate.Remove(m_BeginScanDirectoryHandler, value); + } + } + + [SpecialName] + public virtual event OnFileRemovedHandler FileRemoved + { + add + { + m_FileRemovedHandler = (OnFileRemovedHandler)Delegate.Combine(m_FileRemovedHandler, value); + } + remove + { + m_FileRemovedHandler = (OnFileRemovedHandler)Delegate.Remove(m_FileRemovedHandler, value); + } + } + + [SpecialName] + public virtual event OnFileErrorHandler FileError + { + add + { + m_FileErrorHandler = (OnFileErrorHandler)Delegate.Combine(m_FileErrorHandler, value); + } + remove + { + m_FileErrorHandler = (OnFileErrorHandler)Delegate.Remove(m_FileErrorHandler, value); + } + } + + [SpecialName] + public virtual event OnFileAddedHandler FileAdded + { + add + { + m_FileAddedHandler = (OnFileAddedHandler)Delegate.Combine(m_FileAddedHandler, value); + } + remove + { + m_FileAddedHandler = (OnFileAddedHandler)Delegate.Remove(m_FileAddedHandler, value); + } + } + + public unsafe MetadataMgrNotifications() + { + //IL_002d: Expected I, but got I8 + //IL_0049: Expected I, but got I8 + //IL_0071: Expected I, but got I8 + NativeMetadataNotifications* ptr = (NativeMetadataNotifications*)_003CModule_003E.@new(24uL); + NativeMetadataNotifications* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.MicrosoftZuneLibrary_002ENativeMetadataNotifications_002E_007Bctor_007D(ptr, this)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + IMetadataChangeNotify* ptr3; + if (ptr2 == null || ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(ulong*)ptr2)))((nint)ptr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._GUID_d67cdf64_5ea9_44ea_bf5c_29a422f4c23f), (void**)(&ptr3)) < 0) + { + return; + } + fixed (ulong* ptr4 = &m_AdviseCookie) + { + try + { + if (_003CModule_003E.ZuneLibraryExports_002EMetadataChangeAdvise(ptr3, ptr4) >= 0) + { + m_fAdvised = true; + } + IMetadataChangeNotify* intPtr = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + + private void _007EMetadataMgrNotifications() + { + _0021MetadataMgrNotifications(); + } + + private void _0021MetadataMgrNotifications() + { + if (!m_disposed) + { + if (m_fAdvised) + { + _003CModule_003E.ZuneLibraryExports_002EMetadataChangeUnAdvise(m_AdviseCookie); + m_fAdvised = false; + } + m_disposed = true; + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021MetadataMgrNotifications(); + return; + } + try + { + _0021MetadataMgrNotifications(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~MetadataMgrNotifications() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/NSSDeviceListChangeHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/NSSDeviceListChangeHandler.cs new file mode 100644 index 0000000..7e64969 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/NSSDeviceListChangeHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void NSSDeviceListChangeHandler(); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/NativeInteropNotifications.cs b/ZuneDBApi/MicrosoftZuneLibrary/NativeInteropNotifications.cs new file mode 100644 index 0000000..c1f3ddc --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/NativeInteropNotifications.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace MicrosoftZuneLibrary +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [NativeCppClass] + [MiscellaneousBits(64)] + [DebugInfoInPDB] + internal struct NativeInteropNotifications + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/NativeMetadataNotifications.cs b/ZuneDBApi/MicrosoftZuneLibrary/NativeMetadataNotifications.cs new file mode 100644 index 0000000..f00a363 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/NativeMetadataNotifications.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace MicrosoftZuneLibrary +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(64)] + internal struct NativeMetadataNotifications + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnBeginFileChangeHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnBeginFileChangeHandler.cs new file mode 100644 index 0000000..0f7cfc8 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnBeginFileChangeHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnBeginFileChangeHandler(); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnBeginMetadataLifecycleHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnBeginMetadataLifecycleHandler.cs new file mode 100644 index 0000000..6f4f579 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnBeginMetadataLifecycleHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnBeginMetadataLifecycleHandler(); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnBeginMigrateHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnBeginMigrateHandler.cs new file mode 100644 index 0000000..0515672 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnBeginMigrateHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnBeginMigrateHandler(); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnBeginScanDirectoryHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnBeginScanDirectoryHandler.cs new file mode 100644 index 0000000..412b493 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnBeginScanDirectoryHandler.cs @@ -0,0 +1,6 @@ +using System; + +namespace MicrosoftZuneLibrary +{ + public delegate void OnBeginScanDirectoryHandler(IntPtr sourceUrl); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnBurnStateChangeHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnBurnStateChangeHandler.cs new file mode 100644 index 0000000..3bb61bf --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnBurnStateChangeHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnBurnStateChangeHandler(EBurnState eBurnState); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnEndFileChangeHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnEndFileChangeHandler.cs new file mode 100644 index 0000000..35788b2 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnEndFileChangeHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnEndFileChangeHandler(); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnEndMetadataLifecycleHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnEndMetadataLifecycleHandler.cs new file mode 100644 index 0000000..e5fafb9 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnEndMetadataLifecycleHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnEndMetadataLifecycleHandler(); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnEndMigrateHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnEndMigrateHandler.cs new file mode 100644 index 0000000..e727ba4 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnEndMigrateHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnEndMigrateHandler(); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnEndScanDirectoryHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnEndScanDirectoryHandler.cs new file mode 100644 index 0000000..227dfba --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnEndScanDirectoryHandler.cs @@ -0,0 +1,6 @@ +using System; + +namespace MicrosoftZuneLibrary +{ + public delegate void OnEndScanDirectoryHandler(IntPtr sourceUrl); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnFileAddedHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnFileAddedHandler.cs new file mode 100644 index 0000000..7def5e5 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnFileAddedHandler.cs @@ -0,0 +1,6 @@ +using System; + +namespace MicrosoftZuneLibrary +{ + public delegate void OnFileAddedHandler(IntPtr sourceUrl, EMediaTypes MediaType); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnFileDeleteFailed.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnFileDeleteFailed.cs new file mode 100644 index 0000000..7eff537 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnFileDeleteFailed.cs @@ -0,0 +1,6 @@ +using System; + +namespace MicrosoftZuneLibrary +{ + public delegate void OnFileDeleteFailed(IntPtr sourceUrl); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnFileErrorHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnFileErrorHandler.cs new file mode 100644 index 0000000..58a8fe5 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnFileErrorHandler.cs @@ -0,0 +1,6 @@ +using System; + +namespace MicrosoftZuneLibrary +{ + public delegate void OnFileErrorHandler(IntPtr sourceUrl); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnFileRemovedHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnFileRemovedHandler.cs new file mode 100644 index 0000000..a802f49 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnFileRemovedHandler.cs @@ -0,0 +1,6 @@ +using System; + +namespace MicrosoftZuneLibrary +{ + public delegate void OnFileRemovedHandler(IntPtr sourceUrl); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnFingerprintingFile.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnFingerprintingFile.cs new file mode 100644 index 0000000..bba863a --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnFingerprintingFile.cs @@ -0,0 +1,6 @@ +using System; + +namespace MicrosoftZuneLibrary +{ + public delegate void OnFingerprintingFile(IntPtr sourceUrl); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnItemErrorHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnItemErrorHandler.cs new file mode 100644 index 0000000..b99b4b5 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnItemErrorHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnItemErrorHandler(int lMediaIndex, int hrError); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnItemProgressHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnItemProgressHandler.cs new file mode 100644 index 0000000..f8c68a6 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnItemProgressHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnItemProgressHandler(int lMediaIndex, EBurnProgressStatus eStatus, int nPercent); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnMediaChangedHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnMediaChangedHandler.cs new file mode 100644 index 0000000..632d5da --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnMediaChangedHandler.cs @@ -0,0 +1,6 @@ +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public delegate void OnMediaChangedHandler([MarshalAs(UnmanagedType.U2)] char driveLetter, [MarshalAs(UnmanagedType.U1)] bool fMediaArrived); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnMetadataUpdateHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnMetadataUpdateHandler.cs new file mode 100644 index 0000000..26486e0 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnMetadataUpdateHandler.cs @@ -0,0 +1,6 @@ +using System; + +namespace MicrosoftZuneLibrary +{ + public delegate void OnMetadataUpdateHandler(IntPtr artistName, IntPtr albumTitle); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnQueryCancelHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnQueryCancelHandler.cs new file mode 100644 index 0000000..ea0b603 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnQueryCancelHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public unsafe delegate void OnQueryCancelHandler(bool* pfCancel); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnRecordPauseHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnRecordPauseHandler.cs new file mode 100644 index 0000000..94d1e75 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnRecordPauseHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnRecordPauseHandler(string sourceUrl); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnRecordProgressHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnRecordProgressHandler.cs new file mode 100644 index 0000000..838358b --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnRecordProgressHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnRecordProgressHandler(string sourceUrl, int iTicks); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnRecordResumeHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnRecordResumeHandler.cs new file mode 100644 index 0000000..e4f9735 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnRecordResumeHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnRecordResumeHandler(string sourceUrl); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnRecordStartHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnRecordStartHandler.cs new file mode 100644 index 0000000..0fb15cf --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnRecordStartHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnRecordStartHandler(string sourceUrl); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnRecordStopHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnRecordStopHandler.cs new file mode 100644 index 0000000..a26e408 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnRecordStopHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnRecordStopHandler(string sourceUrl, int hr); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnResultsCountUpdate.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnResultsCountUpdate.cs new file mode 100644 index 0000000..ab786af --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnResultsCountUpdate.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnResultsCountUpdate(object args); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnResultsCountUpdatePack.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnResultsCountUpdatePack.cs new file mode 100644 index 0000000..174ba72 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnResultsCountUpdatePack.cs @@ -0,0 +1,9 @@ +namespace MicrosoftZuneLibrary +{ + public class OnResultsCountUpdatePack + { + public uint Count; + + public ZuneQueryList hList; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnScanCompletedHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnScanCompletedHandler.cs new file mode 100644 index 0000000..c26bb64 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnScanCompletedHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnScanCompletedHandler(); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnSessionProgressHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnSessionProgressHandler.cs new file mode 100644 index 0000000..241aace --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnSessionProgressHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnSessionProgressHandler(int lSessionTimeRemaining, int lSessionTotalTime); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnSetDriveLockedForBurningHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnSetDriveLockedForBurningHandler.cs new file mode 100644 index 0000000..4d51937 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnSetDriveLockedForBurningHandler.cs @@ -0,0 +1,6 @@ +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public delegate void OnSetDriveLockedForBurningHandler([MarshalAs(UnmanagedType.U1)] bool fLocked); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/OnShowErrorDialogHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/OnShowErrorDialogHandler.cs new file mode 100644 index 0000000..1871d2b --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/OnShowErrorDialogHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void OnShowErrorDialogHandler(int hr, uint uiStringId); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/RecordManagerCallback.cs b/ZuneDBApi/MicrosoftZuneLibrary/RecordManagerCallback.cs new file mode 100644 index 0000000..dd48f74 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/RecordManagerCallback.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace MicrosoftZuneLibrary +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(64)] + internal struct RecordManagerCallback + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/ReservedSpaceUpdatedHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/ReservedSpaceUpdatedHandler.cs new file mode 100644 index 0000000..6eb512d --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/ReservedSpaceUpdatedHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void ReservedSpaceUpdatedHandler(GasGauge gasGauge, long llNewReservedSpace, long llNewFreeSpace); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/ResultSetEventRelay.cs b/ZuneDBApi/MicrosoftZuneLibrary/ResultSetEventRelay.cs new file mode 100644 index 0000000..29b5d2d --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/ResultSetEventRelay.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace MicrosoftZuneLibrary +{ + [StructLayout(LayoutKind.Sequential, Size = 56)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(64)] + internal struct ResultSetEventRelay + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/SafeBitmap.cs b/ZuneDBApi/MicrosoftZuneLibrary/SafeBitmap.cs new file mode 100644 index 0000000..2fb5f10 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/SafeBitmap.cs @@ -0,0 +1,35 @@ +using System; +using System.Runtime.ConstrainedExecution; +using System.Runtime.InteropServices; +using System.Security.Permissions; +using Microsoft.Win32.SafeHandles; + +namespace MicrosoftZuneLibrary +{ + [SecurityPermission(SecurityAction.InheritanceDemand, UnmanagedCode = true)] + [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] + public class SafeBitmap : SafeHandleZeroOrMinusOneIsInvalid + { + public unsafe SafeBitmap(HBITMAP__* hBitmap) + : base(ownsHandle: true) + { + try + { + IntPtr intPtr = (handle = (IntPtr)hBitmap); + } + catch + { + //try-fault + base.Dispose(disposing: true); + throw; + } + } + + [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] + [return: MarshalAs(UnmanagedType.U1)] + protected unsafe override bool ReleaseHandle() + { + return (_003CModule_003E.DeleteObject((void*)handle) != 0) ? true : false; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/SafeBitmapWithData.cs b/ZuneDBApi/MicrosoftZuneLibrary/SafeBitmapWithData.cs new file mode 100644 index 0000000..e556d1d --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/SafeBitmapWithData.cs @@ -0,0 +1,160 @@ +#define DEBUG +using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.ConstrainedExecution; +using System.Runtime.InteropServices; +using System.Security.Permissions; +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] + [SecurityPermission(SecurityAction.InheritanceDemand, UnmanagedCode = true)] + public class SafeBitmapWithData : SafeBitmap + { + private unsafe void* _pImageData; + + private int _iHeight; + + private int _iWidth; + + private int DataSize => ScanLineWidth * _iHeight; + + public int Height => _iHeight; + + public int Width => _iWidth; + + public int ScanLineWidth => ((_iWidth + 1) * 3) & -4; + + internal unsafe SafeBitmapWithData(void* pData, HBITMAP__* hBitmap) + { + //Discarded unreachable code: IL_00b9 + _pImageData = pData; + base._002Ector(hBitmap); + int num; + try + { + byte condition = (byte)(((long)(nint)pData != 0) ? 1 : 0); + Debug.Assert(condition != 0); + tagBITMAP tagBITMAP; + if (_003CModule_003E.GetObjectW(hBitmap, 32, &tagBITMAP) != 0) + { + goto IL_004c; + } + uint lastError = _003CModule_003E.GetLastError(); + num = (((int)lastError > 0) ? ((int)(lastError & 0xFFFF) | -2147024896) : ((int)lastError)); + if (num >= 0) + { + goto IL_004c; + } + goto end_IL_000e; + IL_004c: + _iWidth = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagBITMAP, 4)); + _iHeight = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagBITMAP, 8)); + goto IL_00c3; + end_IL_000e:; + } + catch + { + //try-fault + base.Dispose(disposing: true); + throw; + } + try + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 10, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x4101eecd_002EWPP_SafeBitmap_cpp_Traceguids), (uint)num); + } + throw new ApplicationException(_003CModule_003E.GetErrorDescription(num)); + } + catch + { + //try-fault + base.Dispose(disposing: true); + throw; + } + IL_00c3: + try + { + } + catch + { + //try-fault + base.Dispose(disposing: true); + throw; + } + } + + internal unsafe SafeBitmapWithData(int iHeight, int iWidth, void* pData, HBITMAP__* hBitmap) + { + _pImageData = pData; + _iHeight = iHeight; + _iWidth = iWidth; + base._002Ector(hBitmap); + } + + [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] + [return: MarshalAs(UnmanagedType.U1)] + protected unsafe override bool ReleaseHandle() + { + //IL_0008: Expected I, but got I8 + _pImageData = null; + return base.ReleaseHandle(); + } + + public unsafe IntPtr GetData() + { + return (IntPtr)_pImageData; + } + + public Image CreateImage([MarshalAs(UnmanagedType.U1)] bool antialiasEdges) + { + Image result = null; + IntPtr data = GetData(); + if (Width != 0 && Height != 0 && data != IntPtr.Zero) + { + result = new Image(null, Width, Height, -ScanLineWidth, RawImageFormat.R8G8B8, data, 0, 0, flippable: false, antialiasEdges); + } + return result; + } + + public Image CreateImage() + { + return CreateImage(antialiasEdges: false); + } + + public unsafe SafeBitmapWithData Clone(int srcX, int srcY, int srcWidth, int srcHeight, int dstWidth, int dstHeight) + { + //IL_0004: Expected I, but got I8 + //IL_0007: Expected I, but got I8 + //IL_0024: Expected I, but got I8 + object result = null; + HBITMAP__* hBitmap = null; + void* pData = null; + if (_003CModule_003E.ZuneLibraryExports_002ECopyThumbnailBitmapData((HBITMAP__*)handle.ToInt64(), srcX, srcY, srcWidth, srcHeight, dstWidth, dstHeight, &hBitmap, &pData) >= 0) + { + result = new SafeBitmapWithData(dstHeight, dstWidth, pData, hBitmap); + } + return (SafeBitmapWithData)result; + } + + public unsafe static SafeBitmapWithData CreateThumbnailBitmap(string strFilename) + { + object result = null; + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strFilename))) + { + int iWidth; + int iHeight; + void* pData; + HBITMAP__* hBitmap; + if (_003CModule_003E.ZuneLibraryExports_002EGetThumbnailBitmapData(ptr, &iWidth, &iHeight, &pData, &hBitmap) >= 0) + { + result = new SafeBitmapWithData(iHeight, iWidth, pData, hBitmap); + } + return (SafeBitmapWithData)result; + } + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/SchemaMap.cs b/ZuneDBApi/MicrosoftZuneLibrary/SchemaMap.cs new file mode 100644 index 0000000..59e6976 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/SchemaMap.cs @@ -0,0 +1,461 @@ +namespace MicrosoftZuneLibrary +{ + public enum SchemaMap + { + kiIndex_SchemaMapSize = 454, + kiIndex_ZuneTag = 453, + kiIndex_ZuneMediaType = 452, + kiIndex_ZuneMediaID = 451, + kiIndex_ZuneAlbumCollectionId = 450, + kiIndex_Write = 449, + kiIndex_WMYear = 448, + kiIndex_WMWriter = 447, + kiIndex_WMWMContentID = 446, + kiIndex_WMWMCollectionID = 445, + kiIndex_WMWMCollectionGroupID = 444, + kiIndex_WMVideoWidth = 443, + kiIndex_WMVideoHeight = 442, + kiIndex_WMVideoFrameRate = 441, + kiIndex_WMVideoDefinition = 440, + kiIndex_WMUserWebURL = 439, + kiIndex_WMUniqueFileIdentifier = 438, + kiIndex_WMTrackNumber = 437, + kiIndex_WMToolVersion = 436, + kiIndex_WMToolName = 435, + kiIndex_WMText = 434, + kiIndex_WMSubTitleDescription = 433, + kiIndex_WMSubTitle = 432, + kiIndex_WMSubscriptionContentID = 431, + kiIndex_WMRadioStationOwner = 430, + kiIndex_WMRadioStationName = 429, + kiIndex_WMPublisher = 428, + kiIndex_WMProviderStyle = 427, + kiIndex_WMProviderRating = 426, + kiIndex_WMProvider = 425, + kiIndex_WMProtectionType = 424, + kiIndex_WMPromotionURL = 423, + kiIndex_WMProducer = 422, + kiIndex_WMPlaylistDelay = 421, + kiIndex_WMPicture = 420, + kiIndex_WMPeriod = 419, + kiIndex_WMPartOfSet = 418, + kiIndex_WMParentalRating = 417, + kiIndex_WMOriginalReleaseYear = 416, + kiIndex_WMOriginalLyricist = 415, + kiIndex_WMOriginalFilename = 414, + kiIndex_WMOriginalArtist = 413, + kiIndex_WMOriginalAlbumTitle = 412, + kiIndex_WMMood = 411, + kiIndex_WMMediaStationName = 410, + kiIndex_WMMediaOriginalChannel = 409, + kiIndex_WMMediaOriginalBroadcastDateTime = 408, + kiIndex_WMMediaClassSecondaryID = 407, + kiIndex_WMMediaClassPrimaryID = 406, + kiIndex_WMMCDI = 405, + kiIndex_WMLyrics_Synchronised = 404, + kiIndex_WMLyrics = 403, + kiIndex_WMLanguage = 402, + kiIndex_WMISRC = 401, + kiIndex_WMInitialKey = 400, + kiIndex_WMGenreID = 399, + kiIndex_WMGenre = 398, + kiIndex_WMEncodingTime = 397, + kiIndex_WMEncodingSettings = 396, + kiIndex_WMEncodedBy = 395, + kiIndex_WMDRM = 394, + kiIndex_WMDirector = 393, + kiIndex_WMContentGroupDescription = 392, + kiIndex_WMContentDistributor = 391, + kiIndex_WMConductor = 390, + kiIndex_WMComposer = 389, + kiIndex_WMCodec = 388, + kiIndex_WMCategory = 387, + kiIndex_WMBeatsPerMinute = 386, + kiIndex_WMAuthorURL = 385, + kiIndex_WMAudioSourceURL = 384, + kiIndex_WMAudioFileURL = 383, + kiIndex_WMAlbumTitle = 382, + kiIndex_WMAlbumCoverURL = 381, + kiIndex_WMAlbumArtist = 380, + kiIndex_WlanDeviceUuid = 379, + kiIndex_VideoFormat = 378, + kiIndex_VideoBitrate = 377, + kiIndex_Version = 376, + kiIndex_UserSkipCountReported = 375, + kiIndex_UserSkipCount = 374, + kiIndex_UserRatingReported = 373, + kiIndex_UserRating = 372, + kiIndex_UserPlayCountReported = 371, + kiIndex_UserPlayCountDeviceReported = 370, + kiIndex_UserPlayCountDevice = 369, + kiIndex_UserPlayCountClientReported = 368, + kiIndex_UserPlayCountClient = 367, + kiIndex_UserPlayCount = 366, + kiIndex_UserLastSkippedDate = 365, + kiIndex_UserLastRatedDate = 364, + kiIndex_UserLastPlayedDate = 363, + kiIndex_UserID = 362, + kiIndex_UserEditedFieldMask = 361, + kiIndex_UserDataSession = 360, + kiIndex_UserDataDateModified = 359, + kiIndex_UserDataContext = 358, + kiIndex_UserCardRefID = 357, + kiIndex_UpsellPrompt = 356, + kiIndex_UniqueID = 355, + kiIndex_TranscodingEnabled = 354, + kiIndex_TranscodeTriggerEventIndex = 353, + kiIndex_DeviceTranscodeSetting = 352, + kiIndex_DeviceTranscodeOptimization = 351, + kiIndex_TranscodedFileName = 350, + kiIndex_TrackingID = 349, + kiIndex_TotalSpace = 348, + kiIndex_TotalDuration = 347, + kiIndex_TotalCount = 346, + kiIndex_TitleYomi = 345, + kiIndex_Title = 344, + kiIndex_Temporary = 343, + kiIndex_SyncTriggerEventIndex = 342, + kiIndex_SyncToRoot = 341, + kiIndex_SyncState = 340, + kiIndex_SyncShuffle = 339, + kiIndex_SyncRulesValue = 338, + kiIndex_SyncRelationship = 337, + kiIndex_SyncPercentComplete = 336, + kiIndex_SyncOverallPercent = 335, + kiIndex_SyncOnly = 334, + kiIndex_SyncOnConnect = 333, + kiIndex_SyncListIndex = 332, + kiIndex_SyncItemCount = 331, + kiIndex_SyncInfo = 330, + kiIndex_SyncIndex = 329, + kiIndex_SupportsVideo = 328, + kiIndex_SupportsPhoto = 327, + kiIndex_SupportsAudio = 326, + kiIndex_SummaryData = 325, + kiIndex_SubType = 324, + kiIndex_SubscriptionState = 323, + kiIndex_SubscriptionProcessingState = 322, + kiIndex_Subject = 321, + kiIndex_Streams = 320, + kiIndex_Status = 319, + kiIndex_SourceURLHash = 318, + kiIndex_SourceURL = 317, + kiIndex_ShadowFileSourceFileType = 316, + kiIndex_ShadowFileSourceDRMType = 315, + kiIndex_SettingID = 314, + kiIndex_ServiceUniqueName = 313, + kiIndex_SeriesTitle = 312, + kiIndex_SeriesID = 311, + kiIndex_SeriesEpisodeCount = 310, + kiIndex_SelectedForRip = 309, + kiIndex_SeasonNumber = 308, + kiIndex_SavedFolder = 307, + kiIndex_RuleGroupHeader = 306, + kiIndex_Rule = 305, + kiIndex_RipProgress = 304, + kiIndex_Ripped = 303, + kiIndex_ReverseSyncUGC = 302, + kiIndex_ResyncVideo = 301, + kiIndex_ResyncAudio = 300, + kiIndex_RequestState = 299, + kiIndex_Relevance = 298, + kiIndex_ReleaseDateYearMonthDay = 297, + kiIndex_ReleaseDateYearMonth = 296, + kiIndex_ReleaseDateYear = 295, + kiIndex_ReleaseDateMonth = 294, + kiIndex_ReleaseDateDay = 293, + kiIndex_ReleaseDate = 292, + kiIndex_RelationshipID = 291, + kiIndex_RecordingTimeYearMonthDay = 290, + kiIndex_RecordingTimeYearMonth = 289, + kiIndex_RecordingTimeYear = 288, + kiIndex_RecordingTimeMonth = 287, + kiIndex_RecordingTimeDay = 286, + kiIndex_RecordingTime = 285, + kiIndex_RatingSystem = 284, + kiIndex_RatingOrg = 283, + kiIndex_RatingLevel = 282, + kiIndex_RadioFormat = 281, + kiIndex_RadioBand = 280, + kiIndex_QuickMixState = 279, + kiIndex_QuickMixSimUsageData = 278, + kiIndex_QuickMixSimMetadata = 277, + kiIndex_QuickMixSimDsp = 276, + kiIndex_QuickMixSimAmgStyles = 275, + kiIndex_PublishInterval = 274, + kiIndex_ProviderURL = 273, + kiIndex_Protocol = 272, + kiIndex_Progress = 271, + kiIndex_Profile = 270, + kiIndex_PrimaryArtistName = 269, + kiIndex_PrimaryArtistId = 268, + kiIndex_PreferredVideoBitrate = 267, + kiIndex_PreferredAudioBitrate = 266, + kiIndex_PlaylistType = 265, + kiIndex_PlaylistIndex = 264, + kiIndex_PlaylistID = 263, + kiIndex_PlayedStatus = 262, + kiIndex_PlaybackOutputSupport = 261, + kiIndex_PlaybackOrder = 260, + kiIndex_PixelAspectRatioY = 259, + kiIndex_PixelAspectRatioX = 258, + kiIndex_PinType = 257, + kiIndex_PinOrdinal = 0x100, + kiIndex_PhotoWidth = 0xFF, + kiIndex_PhotoHeight = 254, + kiIndex_PercentSpaceReserved = 253, + kiIndex_PerceivedType = 252, + kiIndex_PendingActions = 251, + kiIndex_PeakValue = 250, + kiIndex_PassportID = 249, + kiIndex_ParentID = 248, + kiIndex_OwnerName = 247, + kiIndex_OriginalIndexLeft = 246, + kiIndex_OnDevice = 245, + kiIndex_ObjectID = 244, + kiIndex_NewVersion = 243, + kiIndex_Network = 242, + kiIndex_NeedsTranscode = 241, + kiIndex_NeedsResync = 240, + kiIndex_MyPhoneDeviceId = 239, + kiIndex_MoreInfo = 238, + kiIndex_ModifiedBy = 237, + kiIndex_ModelID = 236, + kiIndex_MetadataState = 235, + kiIndex_MediaType = 234, + kiIndex_MediaID = 233, + kiIndex_MediaContentTypes = 232, + kiIndex_MediaAttribute = 231, + kiIndex_MaxEpisodes = 230, + kiIndex_MaxChannelSize = 229, + kiIndex_MarkedForDeletion = 228, + kiIndex_MappedErrorCode = 227, + kiIndex_Manufacturer = 226, + kiIndex_Longitude = 225, + kiIndex_Location = 224, + kiIndex_LocalURL = 223, + kiIndex_LinkedFileURL = 222, + kiIndex_LimitValue = 221, + kiIndex_LimitType = 220, + kiIndex_LicenseData = 219, + kiIndex_Latitude = 218, + kiIndex_LastSyncTime = 217, + kiIndex_LastSyncNoFitCount = 216, + kiIndex_LastSyncKey = 215, + kiIndex_LastSyncErrorCount = 214, + kiIndex_LastServerRequest = 213, + kiIndex_LastProcessedBopaVideoId = 212, + kiIndex_LastProcessedBopaVideoDate = 211, + kiIndex_LastFullSyncTime = 210, + kiIndex_LastFirmwareUpdateCheck = 209, + kiIndex_LastConnectTime = 208, + kiIndex_IsVBR = 207, + kiIndex_IsNetworkFeed = 206, + kiIndex_Is_Protected = 205, + kiIndex_InLibrary = 204, + kiIndex_InCloud = 203, + kiIndex_Icon = 202, + kiIndex_HMEWMGenre = 201, + kiIndex_HMEShareable = 200, + kiIndex_HMEIs_Protected = 199, + kiIndex_HMEDisplayArtist = 198, + kiIndex_HMEComposer = 197, + kiIndex_HMEAuthor = 196, + kiIndex_HMEAllArtists = 195, + kiIndex_HMEAlbumTitle = 194, + kiIndex_HasUnplayedItems = 193, + kiIndex_HasChildFolders = 192, + kiIndex_HasAlbumArt = 191, + kiIndex_HardwareID = 190, + kiIndex_GuestPrompt = 189, + kiIndex_FriendlyNameGenerated = 188, + kiIndex_FriendlyName = 187, + kiIndex_Frequency = 186, + kiIndex_FreeSpaceLastSync = 185, + kiIndex_FreeSpace = 184, + kiIndex_FourCC = 183, + kiIndex_FormatTag = 182, + kiIndex_FolderName = 181, + kiIndex_FolderMediaType = 180, + kiIndex_FolderID = 179, + kiIndex_FirmwareVersion = 178, + kiIndex_FileType = 177, + kiIndex_FileSize = 176, + kiIndex_FileName = 175, + kiIndex_FileId = 174, + kiIndex_FileCount = 173, + kiIndex_FeedURL = 172, + kiIndex_FamilyId = 171, + kiIndex_Explicit = 170, + kiIndex_ExistingVersion = 169, + kiIndex_EULA = 168, + kiIndex_ErrorURL = 167, + kiIndex_ErrorCondition = 166, + kiIndex_ErrorCode = 165, + kiIndex_Erase = 164, + kiIndex_EpisodesSyncCount = 163, + kiIndex_EpisodeNumber = 162, + kiIndex_EpisodeMediaType = 161, + kiIndex_EndpointTattooId = 160, + kiIndex_EndpointStatedCapacity = 159, + kiIndex_EndpointPrimaryColorId = 158, + kiIndex_EndpointId = 157, + kiIndex_EndpointColorId = 156, + kiIndex_EndpointBackgroundId = 155, + kiIndex_DVDID = 154, + kiIndex_DVDGroupTitle = 153, + kiIndex_DVDDiscIndex = 152, + kiIndex_Duration = 151, + kiIndex_DRMStateFieldMask = 150, + kiIndex_DRMState = 149, + kiIndex_DRMKeyID = 148, + kiIndex_DRMIndividualizedVersion = 147, + kiIndex_DownloadType = 146, + kiIndex_DownloadState = 145, + kiIndex_DownloadErrorCode = 144, + kiIndex_DontSyncHatedContent = 143, + kiIndex_DontCopyToDevice = 142, + kiIndex_DisplayArtistYomi = 141, + kiIndex_DisplayArtistCount = 140, + kiIndex_DisplayArtistAlbumID = 139, + kiIndex_DisplayArtist = 138, + kiIndex_DiscSpaceToUse = 137, + kiIndex_DiscsCount = 136, + kiIndex_DiscIndex = 135, + kiIndex_Disc = 134, + kiIndex_DeviceSyncSupportFlags = 133, + kiIndex_DevicePromptLink = 132, + kiIndex_DevicePromptGuest = 131, + kiIndex_DeviceMediaType = 130, + kiIndex_DeviceID = 129, + kiIndex_DeviceGenerationNumber = 0x80, + kiIndex_DeviceFileSize = 0x7F, + kiIndex_DeviceContentType = 126, + kiIndex_DeviceChallenge = 125, + kiIndex_DeviceCapabilities = 124, + kiIndex_DesiresVideo = 123, + kiIndex_DesiresPhoto = 122, + kiIndex_DesiresAudio = 121, + kiIndex_Description = 120, + kiIndex_DeleteUGCAfterSync = 119, + kiIndex_DaysInCollection = 118, + kiIndex_DateTaken = 117, + kiIndex_DateModified = 116, + kiIndex_DateCreated = 115, + kiIndex_DateAlbumAdded = 114, + kiIndex_DateAdded = 113, + kiIndex_CurrentRipTrackIndex = 112, + kiIndex_CPVideoID = 111, + kiIndex_CPTVSeriesID = 110, + kiIndex_CPTVSeasonID = 109, + kiIndex_CPTVEpisodeID = 108, + kiIndex_CPTrackPriceID = 107, + kiIndex_CPTrackPrice = 106, + kiIndex_CPTrackID = 105, + kiIndex_CPSubGenrePopularity = 104, + kiIndex_CPSubGenreID = 103, + kiIndex_CPSubgenre = 102, + kiIndex_CPRecentlyAdded = 101, + kiIndex_CPRadioSubtitle = 100, + kiIndex_CPRadioProgrammer = 99, + kiIndex_CPRadioMood = 98, + kiIndex_CPRadioIsSubscriptionOnly = 97, + kiIndex_CPRadioID = 96, + kiIndex_CPRadioGenre = 95, + kiIndex_CPPopularity = 94, + kiIndex_CPMusicVideoPriceID = 93, + kiIndex_CPMusicVideoPrice = 92, + kiIndex_CPMusicVideoCanStream = 91, + kiIndex_CPMusicVideoCanDownload = 90, + kiIndex_CPHasVideo = 89, + kiIndex_CPGenreSubGenreID = 88, + kiIndex_CPGenreSubgenre = 87, + kiIndex_CPGenrePopularity = 86, + kiIndex_CPGenreID = 85, + kiIndex_CPFeatured = 84, + kiIndex_CPDirectorID = 83, + kiIndex_CPCanStreamTrack = 82, + kiIndex_CPCanPreviewTrack = 81, + kiIndex_CPCanDownloadTrack = 80, + kiIndex_CPArtistPopularity = 79, + kiIndex_CPArtistID = 78, + kiIndex_CPArtistGenreID = 77, + kiIndex_CPArtistGenre = 76, + kiIndex_CPAlsoAppearsOnArtistID = 75, + kiIndex_CPAlbumPriceID = 74, + kiIndex_CPAlbumPrice = 73, + kiIndex_CPAlbumPopularity = 72, + kiIndex_CPAlbumID = 71, + kiIndex_CPActorID = 70, + kiIndex_Count = 69, + kiIndex_Copyright = 68, + kiIndex_ContributingConductors = 67, + kiIndex_ContributingComposers = 66, + kiIndex_ContributingArtists = 65, + kiIndex_ContributingArtistCount = 0x40, + kiIndex_ContentRevisionNumber = 0x3F, + kiIndex_ContentRatingID = 62, + kiIndex_ContentDistributorType = 61, + kiIndex_ContentDistributorDuration = 60, + kiIndex_Connected = 59, + kiIndex_ConductorID = 58, + kiIndex_ComposerID = 57, + kiIndex_Comment = 56, + kiIndex_ClassId = 55, + kiIndex_ChildList = 54, + kiIndex_Checked = 53, + kiIndex_CheckDeviceMediaSize = 52, + kiIndex_Channels = 51, + kiIndex_CDTrackEnabled = 50, + kiIndex_CategoryID = 49, + kiIndex_CanSync = 48, + kiIndex_CanonicalName = 47, + kiIndex_CanonicalFileType = 46, + kiIndex_CanBurn = 45, + kiIndex_CanBeExcluded = 44, + kiIndex_CameraRollFolder = 43, + kiIndex_CameraModel = 42, + kiIndex_CameraManufacturer = 41, + kiIndex_CallLetters = 40, + kiIndex_BuyTickets = 39, + kiIndex_BuyNow = 38, + kiIndex_BurnListSize = 37, + kiIndex_Burn = 36, + kiIndex_Bookmark = 35, + kiIndex_BlockUnrated = 34, + kiIndex_Blank = 33, + kiIndex_Bitrate = 0x20, + kiIndex_Baseline = 0x1F, + kiIndex_AverageRating = 30, + kiIndex_AverageLevel = 29, + kiIndex_AvailableTime = 28, + kiIndex_AutoSyncDefaultRules = 27, + kiIndex_AutoRefreshFreq = 26, + kiIndex_AutoRefresh = 25, + kiIndex_Author = 24, + kiIndex_AudioThresholdBitRate = 23, + kiIndex_AudioTargetBitRate = 22, + kiIndex_AudioFormat = 21, + kiIndex_AudiobookCount = 20, + kiIndex_AudiobookContentSize = 19, + kiIndex_AudioBitrate = 18, + kiIndex_ArtUrl = 17, + kiIndex_ArtistAlbumCount = 0x10, + kiIndex_ArtInFile = 0xF, + kiIndex_ArtDownloadDate = 14, + kiIndex_AlbumPUOID = 13, + kiIndex_AlbumIDAlbumArtist = 12, + kiIndex_AlbumID = 11, + kiIndex_AlbumArtistID = 10, + kiIndex_Actor = 9, + kiIndex_AcquisitionTimeYearMonthDay = 8, + kiIndex_AcquisitionTimeYearMonth = 7, + kiIndex_AcquisitionTimeYear = 6, + kiIndex_AcquisitionTimeMonth = 5, + kiIndex_AcquisitionTimeDay = 4, + kiIndex_AcquisitionTime = 3, + kiIndex_AcquisitionMode = 2, + kiIndex_AcquiredContentRetrievalTransactionID = 1, + kiIndex_Abstract = 0 + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/SetDeviceWlanProfilesCompleteHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/SetDeviceWlanProfilesCompleteHandler.cs new file mode 100644 index 0000000..70e6dd7 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/SetDeviceWlanProfilesCompleteHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void SetDeviceWlanProfilesCompleteHandler(Device device, int hr); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/SetResultsParams.cs b/ZuneDBApi/MicrosoftZuneLibrary/SetResultsParams.cs new file mode 100644 index 0000000..7a4c33f --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/SetResultsParams.cs @@ -0,0 +1,44 @@ +using System.Collections; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class SetResultsParams + { + private bool _hasFriends; + + private IList _friends; + + private IList _friendsWithFavs; + + private IList _friendsWithMostPlayedSongs; + + private IList _friendsWithMostPlayedArtists; + + public IList FriendsWithMostPlayedArtists => _friendsWithMostPlayedArtists; + + public IList FriendsWithMostPlayedSongs => _friendsWithMostPlayedSongs; + + public IList FriendsWithFavs => _friendsWithFavs; + + public IList Friends => _friends; + + public bool HasFriends + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return _hasFriends; + } + } + + public SetResultsParams([MarshalAs(UnmanagedType.U1)] bool hasFriends, IList friends, IList friendsWithFavs, IList friendsWithMostPlayedSongs, IList friendsWithMostPlayedArtists) + { + _hasFriends = hasFriends; + _friends = friends; + _friendsWithFavs = friendsWithFavs; + _friendsWithMostPlayedSongs = friendsWithMostPlayedSongs; + _friendsWithMostPlayedArtists = friendsWithMostPlayedArtists; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/StartCheckForUpdatesArgs.cs b/ZuneDBApi/MicrosoftZuneLibrary/StartCheckForUpdatesArgs.cs new file mode 100644 index 0000000..dfb3c7e --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/StartCheckForUpdatesArgs.cs @@ -0,0 +1,29 @@ +using System.Runtime.InteropServices; +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + internal class StartCheckForUpdatesArgs : HrStatusBase + { + private bool m_ForceServerRequest; + + private DeferredInvokeHandler m_CheckForUpdatesComplete; + + public DeferredInvokeHandler CheckForUpdatesComplete => m_CheckForUpdatesComplete; + + public bool ForceServerRequest + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_ForceServerRequest; + } + } + + public StartCheckForUpdatesArgs([MarshalAs(UnmanagedType.U1)] bool ForceServerRequest, DeferredInvokeHandler CheckForUpdatesComplete) + { + m_ForceServerRequest = ForceServerRequest; + m_CheckForUpdatesComplete = CheckForUpdatesComplete; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/StartFirmwareRestoreArgs.cs b/ZuneDBApi/MicrosoftZuneLibrary/StartFirmwareRestoreArgs.cs new file mode 100644 index 0000000..e46070e --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/StartFirmwareRestoreArgs.cs @@ -0,0 +1,31 @@ +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + internal class StartFirmwareRestoreArgs : HrStatusBase + { + private FirmwareRestorePoint m_RestorePoint; + + private DeferredInvokeHandler m_FirmwareUpdateBegin; + + private DeferredInvokeHandler m_FirmwareUpdateProgress; + + private DeferredInvokeHandler m_FirmwareUpdateComplete; + + public DeferredInvokeHandler FirmwareUpdateComplete => m_FirmwareUpdateComplete; + + public DeferredInvokeHandler FirmwareUpdateProgress => m_FirmwareUpdateProgress; + + public DeferredInvokeHandler FirmwareUpdateBegin => m_FirmwareUpdateBegin; + + public FirmwareRestorePoint RestorePoint => m_RestorePoint; + + public StartFirmwareRestoreArgs(FirmwareRestorePoint RestorePoint, DeferredInvokeHandler FirmwareUpdateBegin, DeferredInvokeHandler FirmwareUpdateProgress, DeferredInvokeHandler FirmwareUpdateComplete) + { + m_RestorePoint = RestorePoint; + m_FirmwareUpdateBegin = FirmwareUpdateBegin; + m_FirmwareUpdateProgress = FirmwareUpdateProgress; + m_FirmwareUpdateComplete = FirmwareUpdateComplete; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/StartFirmwareUpdateArgs.cs b/ZuneDBApi/MicrosoftZuneLibrary/StartFirmwareUpdateArgs.cs new file mode 100644 index 0000000..a736da9 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/StartFirmwareUpdateArgs.cs @@ -0,0 +1,36 @@ +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + internal class StartFirmwareUpdateArgs : HrStatusBase + { + private UpdatePackageCollection m_Updates; + + private DeferredInvokeHandler m_FirmwareUpdateBegin; + + private DeferredInvokeHandler m_FirmwareUpdateProgress; + + private DeferredInvokeHandler m_FirmwareUpdateComplete; + + private FirmwareUpdateOption m_UpdateOption; + + public FirmwareUpdateOption UpdateOption => m_UpdateOption; + + public DeferredInvokeHandler FirmwareUpdateComplete => m_FirmwareUpdateComplete; + + public DeferredInvokeHandler FirmwareUpdateProgress => m_FirmwareUpdateProgress; + + public DeferredInvokeHandler FirmwareUpdateBegin => m_FirmwareUpdateBegin; + + public UpdatePackageCollection Updates => m_Updates; + + public StartFirmwareUpdateArgs(UpdatePackageCollection Updates, DeferredInvokeHandler FirmwareUpdateBegin, DeferredInvokeHandler FirmwareUpdateProgress, DeferredInvokeHandler FirmwareUpdateComplete, FirmwareUpdateOption UpdateOption) + { + m_Updates = Updates; + m_FirmwareUpdateBegin = FirmwareUpdateBegin; + m_FirmwareUpdateProgress = FirmwareUpdateProgress; + m_FirmwareUpdateComplete = FirmwareUpdateComplete; + m_UpdateOption = UpdateOption; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/StaticLibraryDataProvider.cs b/ZuneDBApi/MicrosoftZuneLibrary/StaticLibraryDataProvider.cs new file mode 100644 index 0000000..8a0bedd --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/StaticLibraryDataProvider.cs @@ -0,0 +1,16 @@ +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + public class StaticLibraryDataProvider + { + public static void Register() + { + Application.RegisterDataProvider("StaticLibraryDataProvider", StaticLibraryDataProviderQuery.CreateInstance); + } + + private StaticLibraryDataProvider() + { + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/StaticLibraryDataProviderObject.cs b/ZuneDBApi/MicrosoftZuneLibrary/StaticLibraryDataProviderObject.cs new file mode 100644 index 0000000..53478d5 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/StaticLibraryDataProviderObject.cs @@ -0,0 +1,69 @@ +using System; +using System.Runtime.InteropServices; +using Microsoft.Iris; +using MicrosoftZuneInterop; + +namespace MicrosoftZuneLibrary +{ + public class StaticLibraryDataProviderObject : LibraryDataProviderItemBase + { + private int m_LibraryId; + + private QueryPropertyBag m_QueryContext; + + private EListType m_eListType; + + private string m_thumbnailFallbackImageUrl; + + internal StaticLibraryDataProviderObject(DataProviderQuery query, object typeCookie, EListType eListType, int libraryId, int userId, int deviceId, string thumbnailFallbackImageUrl) + : base(query, typeCookie) + { + m_LibraryId = libraryId; + m_eListType = eListType; + m_thumbnailFallbackImageUrl = thumbnailFallbackImageUrl; + (m_QueryContext = new QueryPropertyBag()).SetValue("QueryView", 0); + m_QueryContext.SetValue("UserId", userId); + m_QueryContext.SetValue("DeviceId", deviceId); + } + + protected override object GetFieldValue(Type type, uint Atom) + { + return GetFieldValue(type, Atom, null); + } + + protected override object GetFieldValue(Type type, string AtomName, object defaultValue) + { + return GetFieldValue(type, (uint)ZuneQueryList.AtomNameToAtom(AtomName), defaultValue); + } + + protected override object GetFieldValue(Type type, uint Atom, object defaultValue) + { + int[] columnIndexes = new int[1] { (int)Atom }; + object[] array = new object[1] { defaultValue }; + ZuneLibrary.GetFieldValues(m_LibraryId, m_eListType, 1, columnIndexes, array, m_QueryContext); + return array[0]; + } + + protected override int SetFieldValue(string AtomName, object Value) + { + return SetFieldValue((uint)ZuneQueryList.AtomNameToAtom(AtomName), Value); + } + + protected override int SetFieldValue(uint Atom, object Value) + { + ZuneLibrary.SetFieldValues(columnIndexes: new int[1] { (int)Atom }, fieldValues: new object[1] { Value }, iMediaId: m_LibraryId, eList: m_eListType, cValues: 1, propertyBag: m_QueryContext); + return 0; + } + + [return: MarshalAs(UnmanagedType.U1)] + protected override bool AntialiasImageEdges() + { + return true; + } + + protected override string ThumbnailFallbackImageUrl() + { + return m_thumbnailFallbackImageUrl; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/StaticLibraryDataProviderQuery.cs b/ZuneDBApi/MicrosoftZuneLibrary/StaticLibraryDataProviderQuery.cs new file mode 100644 index 0000000..a94fdac --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/StaticLibraryDataProviderQuery.cs @@ -0,0 +1,82 @@ +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + public class StaticLibraryDataProviderQuery : DataProviderQuery + { + public static DataProviderQuery CreateInstance(object queryTypeCookie) + { + return new StaticLibraryDataProviderQuery(queryTypeCookie); + } + + protected override void BeginExecute() + { + int userId = 1; + int deviceId = 1; + int libraryId = -1; + object property = GetProperty("UserId"); + if (property != null) + { + userId = (int)property; + } + object property2 = GetProperty("LibraryId"); + if (property2 != null) + { + libraryId = (int)property2; + } + object property3 = GetProperty("DeviceId"); + if (property3 != null) + { + deviceId = (int)property3; + } + string thumbnailFallbackImageUrl = (string)GetProperty("ThumbnailFallbackImageUrl"); + EListType eListType; + StaticLibraryDataProviderObject staticLibraryDataProviderObject2; + switch ((string)GetProperty("QueryType")) + { + case "Artist": + eListType = EListType.eArtistList; + goto IL_0118; + case "Album": + eListType = EListType.eAlbumList; + goto IL_0118; + case "Folder": + eListType = EListType.eFolderList; + goto IL_0118; + case "Video": + eListType = EListType.eVideoList; + goto IL_0118; + case "PodcastSeries": + eListType = EListType.ePodcastList; + goto IL_0118; + case "Playlist": + eListType = EListType.ePlaylistList; + goto IL_0118; + case "Genre": + eListType = EListType.eGenreList; + goto IL_0118; + case "Pin": + eListType = EListType.ePinList; + goto IL_0118; + case "Photo": + eListType = EListType.ePhotoList; + goto IL_0118; + default: + { + Status = DataProviderQueryStatus.Error; + break; + } + IL_0118: + staticLibraryDataProviderObject2 = (StaticLibraryDataProviderObject)(Result = new StaticLibraryDataProviderObject(this, base.ResultTypeCookie, eListType, libraryId, userId, deviceId, thumbnailFallbackImageUrl)); + Status = DataProviderQueryStatus.RequestingData; + Status = DataProviderQueryStatus.Complete; + break; + } + } + + private StaticLibraryDataProviderQuery(object queryTypeCookie) + : base(queryTypeCookie) + { + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/SyncBeganHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/SyncBeganHandler.cs new file mode 100644 index 0000000..a09a05d --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/SyncBeganHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void SyncBeganHandler(Device device); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/SyncCompletedHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/SyncCompletedHandler.cs new file mode 100644 index 0000000..f8a57a3 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/SyncCompletedHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void SyncCompletedHandler(Device device, ESyncEventReason reason); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/SyncEventArgs.cs b/ZuneDBApi/MicrosoftZuneLibrary/SyncEventArgs.cs new file mode 100644 index 0000000..037440d --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/SyncEventArgs.cs @@ -0,0 +1,9 @@ +using System; + +namespace MicrosoftZuneLibrary +{ + public class SyncEventArgs : EventArgs + { + public Device Device; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/SyncProgressedHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/SyncProgressedHandler.cs new file mode 100644 index 0000000..b69fe2a --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/SyncProgressedHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void SyncProgressedHandler(Device device, uint percentComplete, uint percentItemComplete, uint percentTranscodeComplete, string group, string title, ESyncEngineState engineState); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/SyncRuleDetails.cs b/ZuneDBApi/MicrosoftZuneLibrary/SyncRuleDetails.cs new file mode 100644 index 0000000..97a5336 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/SyncRuleDetails.cs @@ -0,0 +1,25 @@ +namespace MicrosoftZuneLibrary +{ + public class SyncRuleDetails + { + public ESyncCategory syncCategory; + + public EMediaTypes mediaType; + + public bool allMedia; + + public int mediaId; + + public bool included; + + public bool complex; + + public bool calculated; + + public bool ignore; + + public long totalItems; + + public long totalSize; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/SyncRules.cs b/ZuneDBApi/MicrosoftZuneLibrary/SyncRules.cs new file mode 100644 index 0000000..35eca23 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/SyncRules.cs @@ -0,0 +1,527 @@ +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class SyncRules : IDisposable + { + private readonly CComPtrMgd_003CIEndpointHost_003E m_spEndpointHost; + + private int m_iDeviceID; + + private ArrayList m_listAllowedToAdd; + + private ArrayList m_listAllowedToExclude; + + internal unsafe SyncRules(IEndpointHost* pEndpointHost) + { + //IL_0083: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = new CComPtrMgd_003CIEndpointHost_003E(); + try + { + m_spEndpointHost = spEndpointHost; + base._002Ector(); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 10, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids)); + } + m_spEndpointHost.op_Assign(pEndpointHost); + IEndpointHost* p = m_spEndpointHost.p; + int iDeviceID; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 136)))((nint)p, EEndpointHostProperty.eEndpointHostPropertyDatabaseEndpointId, &iDeviceID); + m_iDeviceID = iDeviceID; + (m_listAllowedToAdd = new ArrayList()).Add(EMediaTypes.eMediaTypeAudio); + m_listAllowedToAdd.Add(EMediaTypes.eMediaTypeAudioAlbum); + m_listAllowedToAdd.Add(EMediaTypes.eMediaTypePersonArtist); + m_listAllowedToAdd.Add(EMediaTypes.eMediaTypeImage); + m_listAllowedToAdd.Add(EMediaTypes.eMediaTypeVideo); + m_listAllowedToAdd.Add(EMediaTypes.eMediaTypePodcastEpisode); + m_listAllowedToAdd.Add(EMediaTypes.eMediaTypePodcastSeries); + m_listAllowedToAdd.Add(EMediaTypes.eMediaTypePlaylist); + m_listAllowedToAdd.Add(EMediaTypes.eMediaTypeFolder); + m_listAllowedToAdd.Add(EMediaTypes.eMediaTypeGenre); + m_listAllowedToAdd.Add(EMediaTypes.eMediaTypeUserCard); + m_listAllowedToAdd.Add(EMediaTypes.eMediaTypeApp); + (m_listAllowedToExclude = new ArrayList()).Add(EMediaTypes.eMediaTypeAudio); + m_listAllowedToExclude.Add(EMediaTypes.eMediaTypeAudioAlbum); + m_listAllowedToExclude.Add(EMediaTypes.eMediaTypePersonArtist); + m_listAllowedToExclude.Add(EMediaTypes.eMediaTypeImage); + m_listAllowedToExclude.Add(EMediaTypes.eMediaTypeVideo); + m_listAllowedToExclude.Add(EMediaTypes.eMediaTypePodcastEpisode); + m_listAllowedToExclude.Add(EMediaTypes.eMediaTypePodcastSeries); + m_listAllowedToExclude.Add(EMediaTypes.eMediaTypePlaylist); + m_listAllowedToExclude.Add(EMediaTypes.eMediaTypeFolder); + m_listAllowedToExclude.Add(EMediaTypes.eMediaTypeGenre); + m_listAllowedToExclude.Add(EMediaTypes.eMediaTypeUserCard); + m_listAllowedToExclude.Add(EMediaTypes.eMediaTypeApp); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 11, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids)); + } + } + catch + { + //try-fault + ((IDisposable)m_spEndpointHost).Dispose(); + throw; + } + } + + private unsafe void _007ESyncRules() + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 12, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids)); + } + m_spEndpointHost.Release(); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 13, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids)); + } + } + + public unsafe int Add(int[] rgIds, EMediaTypes mediaType) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 14, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids)); + } + int num; + if (!m_listAllowedToAdd.Contains(mediaType)) + { + num = -2147024809; + } + else + { + num = RemoveInternal(rgIds, mediaType, EDeviceSyncRuleType.eDeviceSyncRuleTypeExclude, fDeviceFolderIds: false); + if (num >= 0) + { + num = AddInternal(rgIds, mediaType, EDeviceSyncRuleType.eDeviceSyncRuleTypeIncludeAll, fAutoSelectRuleType: true); + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 15, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids), num); + } + return num; + } + + public unsafe int Add(int[] rgIds, EMediaTypes mediaType, EDeviceSyncRuleType ruleType) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 16, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids)); + } + int num; + if (EMediaTypes.eMediaTypePodcastSeries != mediaType) + { + num = -2147024809; + } + else + { + num = RemoveInternal(rgIds, EMediaTypes.eMediaTypePodcastSeries, EDeviceSyncRuleType.eDeviceSyncRuleTypeExclude, fDeviceFolderIds: false); + if (num >= 0) + { + num = Remove(rgIds, EMediaTypes.eMediaTypePodcastSeries, fDeviceFolderIds: false); + if (num >= 0) + { + num = AddInternal(rgIds, EMediaTypes.eMediaTypePodcastSeries, ruleType, fAutoSelectRuleType: false); + } + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 17, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids), num); + } + return num; + } + + public unsafe int AddDeviceSyncRuleWithValue(int[] rgIds, int value) + { + int num = 0; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 18, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids)); + } + int num2 = 0; + if (0 < (nint)rgIds.LongLength) + { + while (num >= 0) + { + num = _003CModule_003E.ZuneLibraryExports_002EAddDeviceSyncRuleWithValue(EDeviceSyncRuleType.eDeviceSyncRuleTypeSyncEpisodesCount, m_iDeviceID, EMediaTypes.eMediaTypePodcastSeries, rgIds[num2], value); + if (num < 0) + { + break; + } + num2++; + if (num2 >= (nint)rgIds.LongLength) + { + break; + } + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 19, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids), num); + } + return num; + } + + public unsafe int Remove(int[] rgIds, EMediaTypes mediaType, [MarshalAs(UnmanagedType.U1)] bool fDeviceFolderIds) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 24, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids)); + } + int num = (m_listAllowedToAdd.Contains(mediaType) ? RemoveInternal(rgIds, mediaType, EDeviceSyncRuleType.eDeviceSyncRuleTypeIncludeAll, fDeviceFolderIds) : (-2147024809)); + if (EMediaTypes.eMediaTypePodcastSeries == mediaType && num >= 0) + { + num = RemoveInternal(rgIds, EMediaTypes.eMediaTypePodcastSeries, EDeviceSyncRuleType.eDeviceSyncRuleTypeNone, fDeviceFolderIds); + if (num >= 0) + { + num = RemoveInternal(rgIds, EMediaTypes.eMediaTypePodcastSeries, EDeviceSyncRuleType.eDeviceSyncRuleTypeAllUnplayed, fDeviceFolderIds); + if (num >= 0) + { + num = RemoveInternal(rgIds, EMediaTypes.eMediaTypePodcastSeries, EDeviceSyncRuleType.eDeviceSyncRuleTypeFirstUnplayed, fDeviceFolderIds); + } + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 25, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids), num); + } + return num; + } + + public unsafe int Exclude(int[] rgIds, EMediaTypes mediaType) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 20, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids)); + } + int num; + if (!m_listAllowedToExclude.Contains(mediaType)) + { + num = -2147024809; + } + else + { + num = Remove(rgIds, mediaType, fDeviceFolderIds: false); + if (num >= 0) + { + num = AddInternal(rgIds, mediaType, EDeviceSyncRuleType.eDeviceSyncRuleTypeExclude, fAutoSelectRuleType: false); + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 21, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids), num); + } + return num; + } + + public unsafe int Unexclude(int[] rgIds, EMediaTypes mediaType) + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 26, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids)); + } + int num = (m_listAllowedToExclude.Contains(mediaType) ? RemoveInternal(rgIds, mediaType, EDeviceSyncRuleType.eDeviceSyncRuleTypeExclude, fDeviceFolderIds: false) : (-2147024809)); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 27, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids), num); + } + return num; + } + + public unsafe int GetSyncRuleForMedia(EMediaTypes mediaType, int iMediaItemId, ref EDeviceSyncRuleType ruleType) + { + EDeviceSyncRuleType eDeviceSyncRuleType; + int num = _003CModule_003E.ZuneLibraryExports_002EGetSyncRuleForMedia(m_iDeviceID, mediaType, iMediaItemId, &eDeviceSyncRuleType); + if (num >= 0) + { + ruleType = eDeviceSyncRuleType; + } + return num; + } + + public unsafe int GetSyncRuleValueForMedia(int iMediaItemId, ref int iValue) + { + int num; + int num2 = _003CModule_003E.ZuneLibraryExports_002EGetSyncRuleValueForMedia(EDeviceSyncRuleType.eDeviceSyncRuleTypeSyncEpisodesCount, m_iDeviceID, EMediaTypes.eMediaTypePodcastSeries, iMediaItemId, &num); + if (num2 >= 0) + { + iValue = num; + } + return num2; + } + + public unsafe int GetCategorySyncMode(ESyncCategory cat, ref ESyncMode mode, [MarshalAs(UnmanagedType.U1)] bool fEstablishingPartnership) + { + //IL_0058: Expected I, but got I8 + //IL_0058: Expected I, but got I8 + //IL_007d: Expected I, but got I8 + //IL_007d: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 454u); + return -2147418113; + } + CComPtrNtv_003CIMetadataManager_003E cComPtrNtv_003CIMetadataManager_003E; + *(long*)(&cComPtrNtv_003CIMetadataManager_003E) = 0L; + int num; + try + { + CComPtrNtv_003CIDeviceSyncRulesProvider_003E cComPtrNtv_003CIDeviceSyncRulesProvider_003E; + *(long*)(&cComPtrNtv_003CIDeviceSyncRulesProvider_003E) = 0L; + try + { + mode = ESyncMode.eSyncModeInvalid; + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_6dd7146d_7a19_4fbb_9235_9e6c382fcc71, (void**)(&cComPtrNtv_003CIMetadataManager_003E)); + if (num >= 0) + { + long num2 = *(long*)(&cComPtrNtv_003CIMetadataManager_003E); + __s_GUID gUID_b12dc962_cc1b_46c5_a92a_68f1f2b9bff = _003CModule_003E._GUID_b12dc962_cc1b_46c5_a92a_68f1f2b9bff3; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIMetadataManager_003E)) + 24)))((nint)num2, (_GUID)gUID_b12dc962_cc1b_46c5_a92a_68f1f2b9bff, (void**)(&cComPtrNtv_003CIDeviceSyncRulesProvider_003E)); + if (num >= 0) + { + ESyncMode eSyncMode = ESyncMode.eSyncModeInvalid; + long num3 = *(long*)(&cComPtrNtv_003CIDeviceSyncRulesProvider_003E); + int iDeviceID = m_iDeviceID; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIDeviceSyncRulesProvider_003E)) + 128)))((nint)num3, iDeviceID, cat, &eSyncMode, fEstablishingPartnership ? ((byte)1) : ((byte)0)); + if (num >= 0) + { + mode = eSyncMode; + } + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_LLd(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 30, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids), (uint)cat, (uint)mode, num); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIDeviceSyncRulesProvider_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIDeviceSyncRulesProvider_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIDeviceSyncRulesProvider_003E_002ERelease(&cComPtrNtv_003CIDeviceSyncRulesProvider_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIMetadataManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIMetadataManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIMetadataManager_003E_002ERelease(&cComPtrNtv_003CIMetadataManager_003E); + return num; + } + + public unsafe int SetCategorySyncMode(ESyncCategory cat, ESyncMode mode) + { + //IL_0055: Expected I, but got I8 + //IL_0055: Expected I, but got I8 + //IL_0076: Expected I, but got I8 + //IL_0076: Expected I, but got I8 + //IL_0099: Expected I, but got I8 + if (m_spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 504u); + return -2147418113; + } + CComPtrNtv_003CIMetadataManager_003E cComPtrNtv_003CIMetadataManager_003E; + *(long*)(&cComPtrNtv_003CIMetadataManager_003E) = 0L; + int num; + try + { + CComPtrNtv_003CIDeviceSyncRulesProvider_003E cComPtrNtv_003CIDeviceSyncRulesProvider_003E; + *(long*)(&cComPtrNtv_003CIDeviceSyncRulesProvider_003E) = 0L; + try + { + num = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_6dd7146d_7a19_4fbb_9235_9e6c382fcc71, (void**)(&cComPtrNtv_003CIMetadataManager_003E)); + if (num >= 0) + { + long num2 = *(long*)(&cComPtrNtv_003CIMetadataManager_003E); + __s_GUID gUID_b12dc962_cc1b_46c5_a92a_68f1f2b9bff = _003CModule_003E._GUID_b12dc962_cc1b_46c5_a92a_68f1f2b9bff3; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIMetadataManager_003E)) + 24)))((nint)num2, (_GUID)gUID_b12dc962_cc1b_46c5_a92a_68f1f2b9bff, (void**)(&cComPtrNtv_003CIDeviceSyncRulesProvider_003E)); + if (num >= 0) + { + long num3 = *(long*)(&cComPtrNtv_003CIDeviceSyncRulesProvider_003E); + int iDeviceID = m_iDeviceID; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIDeviceSyncRulesProvider_003E)) + 136)))((nint)num3, iDeviceID, cat, mode); + if (num >= 0) + { + IEndpointHost* p = m_spEndpointHost.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 296)))((nint)p, EEndpointHostAction.eEndpointHostActionResetGasGauge); + } + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_LLd(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 31, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids), (uint)cat, (uint)mode, num); + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIDeviceSyncRulesProvider_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIDeviceSyncRulesProvider_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIDeviceSyncRulesProvider_003E_002ERelease(&cComPtrNtv_003CIDeviceSyncRulesProvider_003E); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIMetadataManager_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIMetadataManager_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIMetadataManager_003E_002ERelease(&cComPtrNtv_003CIMetadataManager_003E); + return num; + } + + public unsafe int GetDontSyncHatedContent(ref bool fDontSyncHatedContent) + { + //IL_0040: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 554u); + return -2147418113; + } + bool flag = false; + IEndpointHost* p = spEndpointHost.p; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 248)))((nint)p, EEndpointHostSetting.eEndpointHostSettingDontSyncHatedContent, &flag); + if (num >= 0) + { + fDontSyncHatedContent = flag; + } + return num; + } + + public unsafe int SetDontSyncHatedContent([MarshalAs(UnmanagedType.U1)] bool fDontSyncHatedContent) + { + //IL_0036: Expected I, but got I8 + IEndpointHost* p = m_spEndpointHost.p; + if (p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 575u); + return -2147418113; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 280)))((nint)p, EEndpointHostSetting.eEndpointHostSettingDontSyncHatedContent, fDontSyncHatedContent ? ((byte)1) : ((byte)0)); + } + + public unsafe int GenerateSnapshot([MarshalAs(UnmanagedType.U1)] bool expandSyncAll, ref SyncRulesView syncRulesView) + { + //IL_0027: Expected I, but got I8 + //IL_0061: Expected I, but got I8 + CComPtrMgd_003CIEndpointHost_003E spEndpointHost = m_spEndpointHost; + if (spEndpointHost.p == null) + { + _003CModule_003E._ZuneShipAssert(1002u, 592u); + return -2147418113; + } + ISyncRulesView* ptr = null; + EEndpointHostProperty propId = (expandSyncAll ? EEndpointHostProperty.eEndpointHostPropertyExpandedRulesView : EEndpointHostProperty.eEndpointHostPropertyCollapsedRulesView); + int num = _003CModule_003E.GetInterfaceProperty_003Cstruct_0020IEndpointHost_002Cenum_0020EEndpointHostProperty_002Cstruct_0020ISyncRulesView_003E(spEndpointHost.p, propId, &ptr); + if (num >= 0) + { + syncRulesView = new SyncRulesView(ptr); + } + if (0L != (nint)ptr) + { + ISyncRulesView* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + } + return num; + } + + private unsafe int AddInternal(int[] rgIds, EMediaTypes mediaType, EDeviceSyncRuleType ruleType, [MarshalAs(UnmanagedType.U1)] bool fAutoSelectRuleType) + { + int num = 0; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 22, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids)); + } + int num2 = 0; + if (0 < (nint)rgIds.LongLength) + { + while (num >= 0) + { + num = _003CModule_003E.ZuneLibraryExports_002EAddDeviceSyncRule(ruleType, fAutoSelectRuleType, m_iDeviceID, mediaType, rgIds[num2]); + if (num < 0) + { + break; + } + num2++; + if (num2 >= (nint)rgIds.LongLength) + { + break; + } + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 23, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids), num); + } + return num; + } + + private unsafe int RemoveInternal(int[] rgIds, EMediaTypes mediaType, EDeviceSyncRuleType ruleType, [MarshalAs(UnmanagedType.U1)] bool fDeviceFolderIds) + { + int num = 0; + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 28, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids)); + } + if (rgIds != null) + { + fixed (int* ptr = &rgIds[0]) + { + try + { + int* ptr2 = ptr; + num = _003CModule_003E.ZuneLibraryExports_002EDeleteDeviceSyncRules(ruleType, m_iDeviceID, mediaType, ptr2, rgIds.Length, fDeviceFolderIds); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 0x200u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 5u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 29, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x09bc4a52_002EWPP_SyncRulesAPI_cpp_Traceguids), num); + } + return num; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007ESyncRules(); + } + finally + { + ((IDisposable)m_spEndpointHost).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/SyncRulesView.cs b/ZuneDBApi/MicrosoftZuneLibrary/SyncRulesView.cs new file mode 100644 index 0000000..f931ff4 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/SyncRulesView.cs @@ -0,0 +1,229 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class SyncRulesView : IDisposable + { + private readonly CComPtrMgd_003CISyncRulesView_003E m_spSyncRulesView; + + private readonly CComPtrMgd_003CSyncRulesViewMediator_003E m_spSyncRulesViewMediator; + + private SyncRulesViewItemAddedHandler m_itemAddedHandler; + + private SyncRulesViewItemUpdatedHandler m_itemUpdatedHandler; + + private GasGauge m_predictedGasGauge; + + public GasGauge PredictedGasGauge => m_predictedGasGauge; + + public unsafe int Count + { + get + { + //IL_001c: Expected I, but got I8 + ISyncRulesView* p = m_spSyncRulesView.p; + if (p != null) + { + return (int)((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p); + } + return 0; + } + } + + [SpecialName] + public virtual event SyncRulesViewItemUpdatedHandler ItemUpdatedEvent + { + add + { + m_itemUpdatedHandler = (SyncRulesViewItemUpdatedHandler)Delegate.Combine(m_itemUpdatedHandler, value); + } + remove + { + m_itemUpdatedHandler = (SyncRulesViewItemUpdatedHandler)Delegate.Remove(m_itemUpdatedHandler, value); + } + } + + [SpecialName] + public virtual event SyncRulesViewItemAddedHandler ItemAddedEvent + { + add + { + m_itemAddedHandler = (SyncRulesViewItemAddedHandler)Delegate.Combine(m_itemAddedHandler, value); + } + remove + { + m_itemAddedHandler = (SyncRulesViewItemAddedHandler)Delegate.Remove(m_itemAddedHandler, value); + } + } + + internal unsafe SyncRulesView(ISyncRulesView* pSyncRulesView) + { + //IL_002a: Expected I, but got I8 + //IL_0052: Expected I, but got I8 + //IL_0073: Expected I, but got I8 + //IL_008e: Expected I, but got I8 + CComPtrMgd_003CISyncRulesView_003E spSyncRulesView = new CComPtrMgd_003CISyncRulesView_003E(); + try + { + m_spSyncRulesView = spSyncRulesView; + CComPtrMgd_003CSyncRulesViewMediator_003E spSyncRulesViewMediator = new CComPtrMgd_003CSyncRulesViewMediator_003E(); + try + { + m_spSyncRulesViewMediator = spSyncRulesViewMediator; + base._002Ector(); + if (pSyncRulesView != null) + { + IGasGauge* ptr = null; + m_spSyncRulesView.op_Assign(pSyncRulesView); + ISyncRulesView* p = m_spSyncRulesView.p; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 64)))((nint)p, &ptr) >= 0) + { + m_predictedGasGauge = new GasGauge(ptr); + } + if (0L != (nint)ptr) + { + IGasGauge* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + } + } + SyncRulesViewMediator* ptr2 = (SyncRulesViewMediator*)_003CModule_003E.@new(32uL); + SyncRulesViewMediator* lp; + try + { + lp = ((ptr2 == null) ? null : _003CModule_003E.SyncRulesViewMediator_002E_007Bctor_007D(ptr2, this, pSyncRulesView)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr2); + throw; + } + m_spSyncRulesViewMediator.op_Assign(lp); + } + catch + { + //try-fault + ((IDisposable)m_spSyncRulesViewMediator).Dispose(); + throw; + } + } + catch + { + //try-fault + ((IDisposable)m_spSyncRulesView).Dispose(); + throw; + } + } + + private unsafe void _007ESyncRulesView() + { + //IL_0053: Expected I, but got I8 + GasGauge predictedGasGauge = m_predictedGasGauge; + if (predictedGasGauge != null) + { + ((IDisposable)predictedGasGauge).Dispose(); + m_predictedGasGauge = null; + } + SyncRulesViewMediator* p = m_spSyncRulesViewMediator.p; + if (p != null) + { + _003CModule_003E.SyncRulesViewMediator_002EShutdown(p); + m_spSyncRulesViewMediator.Release(); + } + ISyncRulesView* p2 = m_spSyncRulesView.p; + if (p2 != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p2 + 32)))((nint)p2); + m_spSyncRulesView.Release(); + } + } + + public unsafe SyncRuleDetails GetItem(int index) + { + //IL_0028: Expected I, but got I8 + SyncRuleDetails syncRuleDetails = new SyncRuleDetails(); + ISyncRulesView* p = m_spSyncRulesView.p; + SSyncRuleDetails sSyncRuleDetails; + if (p != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 48)))((nint)p, (uint)index, &sSyncRuleDetails) >= 0) + { + syncRuleDetails.syncCategory = *(ESyncCategory*)(&sSyncRuleDetails); + syncRuleDetails.mediaType = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref sSyncRuleDetails, 4)); + syncRuleDetails.allMedia = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref sSyncRuleDetails, 8)); + syncRuleDetails.mediaId = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref sSyncRuleDetails, 12)); + syncRuleDetails.included = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref sSyncRuleDetails, 20)); + syncRuleDetails.complex = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref sSyncRuleDetails, 21)); + syncRuleDetails.calculated = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref sSyncRuleDetails, 22)); + syncRuleDetails.totalItems = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref sSyncRuleDetails, 24)); + syncRuleDetails.totalSize = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref sSyncRuleDetails, 32)); + syncRuleDetails.ignore = System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref sSyncRuleDetails, 23)); + } + return syncRuleDetails; + } + + public unsafe void UpdateItem(int index, [MarshalAs(UnmanagedType.U1)] bool included) + { + //IL_001e: Expected I, but got I8 + ISyncRulesView* p = m_spSyncRulesView.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 56)))((nint)p, (uint)index, included ? ((byte)1) : ((byte)0)); + } + } + + internal void InvokeItemAdded(uint iItem) + { + if (m_itemAddedHandler != null) + { + m_itemAddedHandler(this, (int)iItem); + } + } + + internal void InvokeItemUpdated(uint iItem) + { + if (m_itemUpdatedHandler != null) + { + m_itemUpdatedHandler(this, (int)iItem); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007ESyncRulesView(); + } + finally + { + try + { + ((IDisposable)m_spSyncRulesViewMediator).Dispose(); + } + finally + { + try + { + ((IDisposable)m_spSyncRulesView).Dispose(); + } + finally + { + } + } + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/SyncRulesViewItemAddedHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/SyncRulesViewItemAddedHandler.cs new file mode 100644 index 0000000..3315ec8 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/SyncRulesViewItemAddedHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void SyncRulesViewItemAddedHandler(SyncRulesView syncRulesView, int iItem); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/SyncRulesViewItemUpdatedHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/SyncRulesViewItemUpdatedHandler.cs new file mode 100644 index 0000000..d166290 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/SyncRulesViewItemUpdatedHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void SyncRulesViewItemUpdatedHandler(SyncRulesView syncRulesView, int iItem); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/TestDeviceWlanCompleteHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/TestDeviceWlanCompleteHandler.cs new file mode 100644 index 0000000..810b7d0 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/TestDeviceWlanCompleteHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void TestDeviceWlanCompleteHandler(Device device, WlanTestResultCode Result, int hr); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/ThumbnailChangedHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/ThumbnailChangedHandler.cs new file mode 100644 index 0000000..7b4e44f --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/ThumbnailChangedHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void ThumbnailChangedHandler(object arg); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/TrackMetadata.cs b/ZuneDBApi/MicrosoftZuneLibrary/TrackMetadata.cs new file mode 100644 index 0000000..eda2a80 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/TrackMetadata.cs @@ -0,0 +1,511 @@ +using System; +using System.ComponentModel; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class TrackMetadata : INotifyPropertyChanged, IDisposable + { + private unsafe ITrackInfo* m_pTrackInfo; + + private PropertyChangedEventHandler m_PropertyChanged; + + private bool m_fDisposed; + + internal unsafe ITrackInfo* TrackInfo => m_pTrackInfo; + + public unsafe int MediaId + { + get + { + //IL_001e: Expected I, but got I8 + int result = -1; + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null) + { + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 144)))((nint)pTrackInfo, &result); + if (num < 0) + { + throw new COMException("ITrackInfo::GetDiscNumber failed", num); + } + } + return result; + } + set + { + //IL_0024: Expected I, but got I8 + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null && MediaId != value) + { + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 152)))((nint)pTrackInfo, value); + if (num < 0) + { + throw new COMException("ITrackInfo::SetMediaId failed", num); + } + FirePropertyChanged("MediaId"); + } + } + } + + public unsafe int DiscNumber + { + get + { + //IL_001b: Expected I, but got I8 + int result = -1; + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null) + { + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 120)))((nint)pTrackInfo, &result); + if (num < 0) + { + throw new COMException("ITrackInfo::GetDiscNumber failed", num); + } + } + return result; + } + set + { + //IL_0024: Expected I, but got I8 + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null && DiscNumber != value) + { + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 128)))((nint)pTrackInfo, value); + if (num < 0) + { + throw new COMException("ITrackInfo::SetDiscNumber failed", num); + } + FirePropertyChanged("DiscNumber"); + } + } + } + + public unsafe int TrackNumber + { + get + { + //IL_001b: Expected I, but got I8 + int result = -1; + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null) + { + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 104)))((nint)pTrackInfo, &result); + if (num < 0) + { + throw new COMException("ITrackInfo::GetTrackNumber failed", num); + } + } + return result; + } + set + { + //IL_0021: Expected I, but got I8 + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null && TrackNumber != value) + { + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 112)))((nint)pTrackInfo, value); + if (num < 0) + { + throw new COMException("ITrackInfo::SetTrackNumber failed", num); + } + FirePropertyChanged("TrackNumber"); + } + } + } + + public unsafe string Composer + { + get + { + //IL_000f: Expected I, but got I8 + //IL_001e: Expected I, but got I8 + string result = null; + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null) + { + ushort* ptr = null; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 24)))((nint)pTrackInfo, &ptr); + if (num < 0) + { + throw new COMException("ITrackInfo::GetComposer failed", num); + } + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + set + { + //IL_0047: Expected I, but got I8 + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null && Composer.CompareTo(value) != 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(value))) + { + try + { + ushort* ptr2 = _003CModule_003E.SysAllocString(ptr); + if (ptr2 == null) + { + throw new COMException("SysAllocString failed", -2147024882); + } + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 32)))((nint)pTrackInfo, ptr2); + _003CModule_003E.SysFreeString(ptr2); + if (num != 0) + { + throw new COMException("ITrackInfo::SetComposer failed", num); + } + FirePropertyChanged("Composer"); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + try + { + } + catch + { + //try-fault + throw; + } + } + } + + public unsafe string Conductor + { + get + { + //IL_000f: Expected I, but got I8 + //IL_001e: Expected I, but got I8 + string result = null; + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null) + { + ushort* ptr = null; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 40)))((nint)pTrackInfo, &ptr); + if (num < 0) + { + throw new COMException("ITrackInfo::GetConductor failed", num); + } + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + set + { + //IL_0047: Expected I, but got I8 + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null && Conductor.CompareTo(value) != 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(value))) + { + try + { + ushort* ptr2 = _003CModule_003E.SysAllocString(ptr); + if (ptr2 == null) + { + throw new COMException("SysAllocString failed", -2147024882); + } + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 48)))((nint)pTrackInfo, ptr2); + _003CModule_003E.SysFreeString(ptr2); + if (num != 0) + { + throw new COMException("ITrackInfo::SetConductor failed", num); + } + FirePropertyChanged("Conductor"); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + try + { + } + catch + { + //try-fault + throw; + } + } + } + + public unsafe string Genre + { + get + { + //IL_000f: Expected I, but got I8 + //IL_001e: Expected I, but got I8 + string result = null; + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null) + { + ushort* ptr = null; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 88)))((nint)pTrackInfo, &ptr); + if (num < 0) + { + throw new COMException("ITrackInfo::GetGenre failed", num); + } + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + set + { + //IL_0047: Expected I, but got I8 + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null && Genre.CompareTo(value) != 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(value))) + { + try + { + ushort* ptr2 = _003CModule_003E.SysAllocString(ptr); + if (ptr2 == null) + { + throw new COMException("SysAllocString failed", -2147024882); + } + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 96)))((nint)pTrackInfo, ptr2); + _003CModule_003E.SysFreeString(ptr2); + if (num != 0) + { + throw new COMException("ITrackInfo::SetGenre failed", num); + } + FirePropertyChanged("Genre"); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + try + { + } + catch + { + //try-fault + throw; + } + } + } + + public unsafe string TrackArtist + { + get + { + //IL_000f: Expected I, but got I8 + //IL_001e: Expected I, but got I8 + string result = null; + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null) + { + ushort* ptr = null; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 56)))((nint)pTrackInfo, &ptr); + if (num < 0) + { + throw new COMException("ITrackInfo::GetArtist failed", num); + } + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + set + { + //IL_0047: Expected I, but got I8 + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null && TrackArtist.CompareTo(value) != 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(value))) + { + try + { + ushort* ptr2 = _003CModule_003E.SysAllocString(ptr); + if (ptr2 == null) + { + throw new COMException("SysAllocString failed", -2147024882); + } + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 64)))((nint)pTrackInfo, ptr2); + _003CModule_003E.SysFreeString(ptr2); + if (num != 0) + { + throw new COMException("ITrackInfo::SetArtist failed", num); + } + FirePropertyChanged("TrackArtist"); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + try + { + } + catch + { + //try-fault + throw; + } + } + } + + public unsafe string TrackTitle + { + get + { + //IL_000f: Expected I, but got I8 + //IL_001e: Expected I, but got I8 + string result = null; + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null) + { + ushort* ptr = null; + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 72)))((nint)pTrackInfo, &ptr); + if (num < 0) + { + throw new COMException("ITrackInfo::GetTitle failed", num); + } + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + set + { + //IL_0047: Expected I, but got I8 + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null && TrackTitle.CompareTo(value) != 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(value))) + { + try + { + ushort* ptr2 = _003CModule_003E.SysAllocString(ptr); + if (ptr2 == null) + { + throw new COMException("SysAllocString failed", -2147024882); + } + int num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 80)))((nint)pTrackInfo, ptr2); + _003CModule_003E.SysFreeString(ptr2); + if (num != 0) + { + throw new COMException("ITrackInfo::SetTitle failed", num); + } + FirePropertyChanged("TrackTitle"); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + try + { + } + catch + { + //try-fault + throw; + } + } + } + + [SpecialName] + public virtual event PropertyChangedEventHandler PropertyChanged + { + add + { + m_PropertyChanged = (PropertyChangedEventHandler)Delegate.Combine(m_PropertyChanged, value); + } + remove + { + m_PropertyChanged = (PropertyChangedEventHandler)Delegate.Remove(m_PropertyChanged, value); + } + } + + public unsafe TrackMetadata(ITrackInfo* pTrackInfo) + { + //IL_001c: Expected I, but got I8 + m_pTrackInfo = pTrackInfo; + if (pTrackInfo != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 8)))((nint)pTrackInfo); + } + } + + private void _007ETrackMetadata() + { + _0021TrackMetadata(); + } + + private unsafe void _0021TrackMetadata() + { + //IL_001f: Expected I, but got I8 + //IL_0028: Expected I, but got I8 + if (!m_fDisposed) + { + ITrackInfo* pTrackInfo = m_pTrackInfo; + if (pTrackInfo != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pTrackInfo + 16)))((nint)pTrackInfo); + m_pTrackInfo = null; + } + } + } + + private void FirePropertyChanged(string propName) + { + if (m_PropertyChanged != null) + { + m_PropertyChanged(this, new PropertyChangedEventArgs(propName)); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021TrackMetadata(); + return; + } + try + { + _0021TrackMetadata(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~TrackMetadata() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/TypeDiscoveringSyncEventArgs.cs b/ZuneDBApi/MicrosoftZuneLibrary/TypeDiscoveringSyncEventArgs.cs new file mode 100644 index 0000000..a531796 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/TypeDiscoveringSyncEventArgs.cs @@ -0,0 +1,9 @@ +using System.Collections.Generic; + +namespace MicrosoftZuneLibrary +{ + public class TypeDiscoveringSyncEventArgs : SyncEventArgs + { + public List ContainedTypes; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/UnassociateWlanDeviceCompleteHandler.cs b/ZuneDBApi/MicrosoftZuneLibrary/UnassociateWlanDeviceCompleteHandler.cs new file mode 100644 index 0000000..04c37f4 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/UnassociateWlanDeviceCompleteHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZuneLibrary +{ + public delegate void UnassociateWlanDeviceCompleteHandler(Device device, int hr); +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/UnavailableLibraryListItem.cs b/ZuneDBApi/MicrosoftZuneLibrary/UnavailableLibraryListItem.cs new file mode 100644 index 0000000..6c47b8d --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/UnavailableLibraryListItem.cs @@ -0,0 +1,35 @@ +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + internal class UnavailableLibraryListItem : LibraryDataProviderListItem + { + internal UnavailableLibraryListItem(LibraryDataProviderQuery owner, LibraryVirtualList listOwner, object typeCookie, int index) + : base(owner, listOwner, typeCookie, -1, index) + { + } + + public override object GetProperty(string propertyName) + { + DataProviderMapping value = null; + if (base.Mappings.TryGetValue(propertyName, out value)) + { + return value.DefaultValue; + } + return null; + } + + public override void SetProperty(string propertyName, object value) + { + } + + public override void InvalidateAllProperties() + { + } + + protected internal override void OnRequestSlowData() + { + GetOwner().NotifySlowDataAcquireComplete(GetIndex()); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/UpdateAction.cs b/ZuneDBApi/MicrosoftZuneLibrary/UpdateAction.cs new file mode 100644 index 0000000..84477ea --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/UpdateAction.cs @@ -0,0 +1,9 @@ +namespace MicrosoftZuneLibrary +{ + public enum UpdateAction + { + Update = 1, + Rollback = 2, + None = 0 + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/UpdatePackageCollection.cs b/ZuneDBApi/MicrosoftZuneLibrary/UpdatePackageCollection.cs new file mode 100644 index 0000000..3c8304a --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/UpdatePackageCollection.cs @@ -0,0 +1,255 @@ +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class UpdatePackageCollection : IDisposable + { + private readonly CComPtrMgd_003CIFirmwareUpdateCollection_003E m_spUpdatePackageCollection; + + private List m_packages; + + private FirmwareUpdatePackage m_FirmwarePackage; + + private FirmwareUpdatePackage m_GamesPackage; + + private List Packages + { + get + { + CachePackages(); + return m_packages; + } + } + + internal unsafe IFirmwareUpdateCollection* NativeCollectionPtr => m_spUpdatePackageCollection.p; + + public FirmwareUpdatePackage GamesPackage + { + get + { + CachePackages(); + return m_GamesPackage; + } + } + + public FirmwareUpdatePackage FirmwarePackage + { + get + { + CachePackages(); + return m_FirmwarePackage; + } + } + + public FirmwareUpdatePackage this[int index] => Packages[index]; + + public unsafe bool Selected + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return Packages[index].Selected; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + //IL_001f: Expected I, but got I8 + uint num = (uint)index; + IFirmwareUpdateCollection* p = m_spUpdatePackageCollection.p; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 40)))((nint)p, 1u, &num, value ? 1 : 0); + if (num2 >= 0) + { + Packages[index].Selected = value; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 6u) + { + _003CModule_003E.WPP_SF_dld(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 10, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), index, value ? 1 : 0, num2); + } + } + } + + public unsafe int Count + { + get + { + //IL_001d: Expected I, but got I8 + uint result = 0u; + IFirmwareUpdateCollection* p = m_spUpdatePackageCollection.p; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p, &result); + return (int)result; + } + } + + internal unsafe UpdatePackageCollection(IFirmwareUpdateCollection* pCollection) + { + CComPtrMgd_003CIFirmwareUpdateCollection_003E spUpdatePackageCollection = new CComPtrMgd_003CIFirmwareUpdateCollection_003E(); + try + { + m_spUpdatePackageCollection = spUpdatePackageCollection; + base._002Ector(); + m_spUpdatePackageCollection.op_Assign(pCollection); + } + catch + { + //try-fault + ((IDisposable)m_spUpdatePackageCollection).Dispose(); + throw; + } + } + + private void _007EUpdatePackageCollection() + { + m_spUpdatePackageCollection.Release(); + m_FirmwarePackage = null; + m_GamesPackage = null; + DisposePackages(); + } + + private unsafe void CachePackages() + { + //IL_0037: Expected I, but got I8 + //IL_00ae: Expected I, but got I8 + //IL_00bb: Expected I, but got I8 + //IL_00ed: Expected I, but got I8 + //IL_0108: Expected I, but got I8 + //IL_0108: Expected I, but got I8 + if (m_packages != null) + { + return; + } + m_packages = new List(); + uint num = 0u; + IFirmwareUpdateCollection* p = m_spUpdatePackageCollection.p; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p, &num); + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 6u) + { + _003CModule_003E.WPP_SF_d(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 11, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), (int)num); + } + uint num3 = 0u; + if (num2 >= 0) + { + while (num3 < num) + { + FirmwareUpdatePackage firmwareUpdatePackage = null; + CComPtrNtv_003CIFirmwareMetadata_003E cComPtrNtv_003CIFirmwareMetadata_003E; + *(long*)(&cComPtrNtv_003CIFirmwareMetadata_003E) = 0L; + try + { + IFirmwareUpdateCollection* p2 = m_spUpdatePackageCollection.p; + uint num4 = num3; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p2 + 32)))((nint)p2, num4, (IFirmwareMetadata**)(&cComPtrNtv_003CIFirmwareMetadata_003E)); + if (num2 >= 0) + { + firmwareUpdatePackage = new FirmwareUpdatePackage((IFirmwareMetadata*)(*(ulong*)(&cComPtrNtv_003CIFirmwareMetadata_003E))); + m_packages.Add(firmwareUpdatePackage); + IFirmwareUpdateCollection* p3 = m_spUpdatePackageCollection.p; + bool selected = firmwareUpdatePackage.Selected; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p3 + 40)))((nint)p3, 1u, &num3, selected ? 1 : 0); + } + EFirmwareUpdateType eFirmwareUpdateType = (EFirmwareUpdateType)(-1); + if (num2 >= 0) + { + long num5 = *(long*)(&cComPtrNtv_003CIFirmwareMetadata_003E); + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIFirmwareMetadata_003E)) + 48)))((nint)num5, &eFirmwareUpdateType); + if (num2 >= 0) + { + if (eFirmwareUpdateType == (EFirmwareUpdateType)0) + { + m_GamesPackage = firmwareUpdatePackage; + } + else + { + m_FirmwarePackage = firmwareUpdatePackage; + } + } + } + fixed (ushort* a = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(firmwareUpdatePackage.Name))) + { + try + { + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 6u) + { + _003CModule_003E.WPP_SF_dSdl(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 12, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids), (int)num3, a, (int)eFirmwareUpdateType, firmwareUpdatePackage.Selected ? 1 : 0); + } + } + catch + { + //try-fault + a = null; + throw; + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIFirmwareMetadata_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIFirmwareMetadata_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIFirmwareMetadata_003E_002ERelease(&cComPtrNtv_003CIFirmwareMetadata_003E); + num3++; + if (num2 < 0) + { + break; + } + } + if (num2 >= 0) + { + return; + } + } + DisposePackages(); + } + + private unsafe void DisposePackages() + { + if (m_packages == null) + { + return; + } + if (_003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 60uL)) & 4u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 57uL)) >= 6u) + { + _003CModule_003E.WPP_SF_(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 48uL), 13, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0x15529884_002EWPP_FirmwareUpdateAPI_cpp_Traceguids)); + } + int num = m_packages.Count - 1; + if (num >= 0) + { + do + { + ((IDisposable)m_packages[num])?.Dispose(); + num += -1; + } + while (num >= 0); + } + m_packages = null; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EUpdatePackageCollection(); + } + finally + { + ((IDisposable)m_spUpdatePackageCollection).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/UpdateStep.cs b/ZuneDBApi/MicrosoftZuneLibrary/UpdateStep.cs new file mode 100644 index 0000000..a6c267a --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/UpdateStep.cs @@ -0,0 +1,171 @@ +using System; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class UpdateStep : IDisposable + { + private readonly CComPtrMgd_003CIFirmwareUpdateCallbackData_003E m_spUpdateStep; + + private int m_cTotalSteps; + + private int m_nStepNumber; + + public int TotalSteps + { + get + { + EnsureStepInformation(); + return m_cTotalSteps; + } + } + + public int StepNumber + { + get + { + EnsureStepInformation(); + return m_nStepNumber; + } + } + + public unsafe int Progress + { + get + { + //IL_0020: Expected I, but got I8 + uint result = 0u; + IFirmwareUpdateCallbackData* p = m_spUpdateStep.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 72)))((nint)p, &result); + } + return (int)result; + } + } + + public unsafe bool HasProgress + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_0020: Expected I, but got I8 + int num = 0; + IFirmwareUpdateCallbackData* p = m_spUpdateStep.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 64)))((nint)p, &num); + if (num != 0) + { + return true; + } + } + return false; + } + } + + public unsafe bool Cancelable + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_0020: Expected I, but got I8 + int num = 0; + IFirmwareUpdateCallbackData* p = m_spUpdateStep.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 56)))((nint)p, &num); + if (num != 0) + { + return true; + } + } + return false; + } + } + + public unsafe string Name + { + get + { + //IL_0005: Expected I, but got I8 + //IL_0023: Expected I, but got I8 + string result = null; + ushort* ptr = null; + IFirmwareUpdateCallbackData* p = m_spUpdateStep.p; + if (p != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 24)))((nint)p, &ptr) >= 0) + { + result = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return result; + } + } + + internal unsafe UpdateStep(IFirmwareUpdateCallbackData* pUpdateStep) + { + CComPtrMgd_003CIFirmwareUpdateCallbackData_003E spUpdateStep = new CComPtrMgd_003CIFirmwareUpdateCallbackData_003E(); + try + { + m_spUpdateStep = spUpdateStep; + base._002Ector(); + m_spUpdateStep.op_Assign(pUpdateStep); + } + catch + { + //try-fault + ((IDisposable)m_spUpdateStep).Dispose(); + throw; + } + } + + private void _007EUpdateStep() + { + m_spUpdateStep.Release(); + } + + private unsafe int EnsureStepInformation() + { + //IL_0033: Expected I, but got I8 + int num = 0; + if (m_nStepNumber == 0 && m_cTotalSteps == 0) + { + uint nStepNumber = 0u; + uint cTotalSteps = 0u; + IFirmwareUpdateCallbackData* p = m_spUpdateStep.p; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 48)))((nint)p, &nStepNumber, &cTotalSteps); + if (num >= 0) + { + m_nStepNumber = (int)nStepNumber; + m_cTotalSteps = (int)cTotalSteps; + } + } + return num; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EUpdateStep(); + } + finally + { + ((IDisposable)m_spUpdateStep).Dispose(); + } + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/VirtualDatabaseList.cs b/ZuneDBApi/MicrosoftZuneLibrary/VirtualDatabaseList.cs new file mode 100644 index 0000000..774285a --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/VirtualDatabaseList.cs @@ -0,0 +1,272 @@ +using System; +using System.Collections; +using System.Reflection; +using System.Runtime.InteropServices; +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + [DefaultMember("Item")] + public class VirtualDatabaseList : VirtualList, IQueryListEvents, IDisposable + { + protected int m_QueryRN; + + protected ZuneQueryList m_pQueryList; + + protected bool m_fInBulkEvents; + + protected bool m_fDisposed; + + protected ArrayList m_lNotifyData; + + protected int m_blockChangesFlags; + + protected bool m_fBlockChanges; + + protected bool m_fEndBulkArrivedDuringBlock; + + protected bool m_fItemsAdded; + + internal VirtualDatabaseList(ZuneQueryList pQueryList, [MarshalAs(UnmanagedType.U1)] bool enableSlowDataRequests) + : base(enableSlowDataRequests) + { + try + { + m_pQueryList = pQueryList; + m_lNotifyData = new ArrayList(); + m_fDisposed = false; + m_fItemsAdded = false; + } + catch + { + //try-fault + ((IDisposable)this).Dispose(); + throw; + } + } + + private void _007EVirtualDatabaseList() + { + m_fDisposed = true; + } + + public virtual void ListInsert(int index) + { + if (m_fInBulkEvents) + { + ListNotifyData listNotifyData = new ListNotifyData(); + listNotifyData.type = 0; + listNotifyData.pos = index; + m_lNotifyData.Add(listNotifyData); + } + else + { + Application.DeferredInvoke(DeferredInsert, index); + } + } + + public virtual void ListRemoveAt(int index) + { + if (m_fInBulkEvents) + { + ListNotifyData listNotifyData = new ListNotifyData(); + listNotifyData.type = 1; + listNotifyData.pos = index; + m_lNotifyData.Add(listNotifyData); + } + else + { + Application.DeferredInvoke(DeferredRemoveAt, index); + } + } + + public virtual void ListModified(int index) + { + if (m_fInBulkEvents) + { + ListNotifyData listNotifyData = new ListNotifyData(); + listNotifyData.type = 2; + listNotifyData.pos = index; + m_lNotifyData.Add(listNotifyData); + } + else + { + Application.DeferredInvoke(DeferredModified, index); + } + } + + public virtual void ListBeginBulkEvents() + { + m_fInBulkEvents = true; + } + + public virtual void ListEndBulkEvents() + { + m_fInBulkEvents = false; + m_fItemsAdded = false; + Application.DeferredInvoke(DeferredEndBulkEvents, null); + } + + public virtual void ListNotifyCount(uint count) + { + Application.DeferredInvoke(DeferredCountChange, (int)count); + } + + public void SetBlockChangesFlag(int flag, [MarshalAs(UnmanagedType.U1)] bool block) + { + if (block) + { + m_blockChangesFlags |= flag; + } + else + { + m_blockChangesFlags &= ~flag; + } + byte blockChanges = (byte)((m_blockChangesFlags != 0) ? 1 : 0); + BlockListChanges(blockChanges != 0); + } + + public int GetQueryRN() + { + return m_QueryRN; + } + + protected virtual void InvalidateItem(int index) + { + Modified(index); + } + + private unsafe void DeferredEndBulkEvents(object P_0) + { + //IL_0062: Expected I, but got I8 + //IL_00f8: Expected I, but got I8 + if (m_fDisposed) + { + m_lNotifyData.Clear(); + return; + } + if (m_fBlockChanges) + { + m_fEndBulkArrivedDuringBlock = true; + return; + } + if (m_fItemsAdded) + { + m_lNotifyData.Clear(); + m_pQueryList.EndBulkEventsComplete(fAbandon: true); + m_fItemsAdded = false; + return; + } + bool flag = false; + _003CModule_003E.PERFTRACE_COLLECTIONEVENT((_COLLECTION_EVENT)14, null); + foreach (ListNotifyData lNotifyDatum in m_lNotifyData) + { + if (!m_fDisposed) + { + switch (lNotifyDatum.type) + { + case 2: + DeferredModified(lNotifyDatum.pos); + break; + case 1: + DeferredRemoveAt(lNotifyDatum.pos); + flag = true; + break; + case 0: + DeferredInsert(lNotifyDatum.pos); + flag = true; + break; + } + continue; + } + break; + } + _003CModule_003E.PERFTRACE_COLLECTIONEVENT((_COLLECTION_EVENT)15, null); + m_lNotifyData.Clear(); + m_pQueryList.EndBulkEventsComplete(fAbandon: false); + if (flag) + { + m_QueryRN++; + } + } + + private void DeferredInsert(object args) + { + if (!m_fDisposed && Count > (int)args) + { + Insert((int)args); + } + } + + private void DeferredRemoveAt(object args) + { + if (!m_fDisposed && Count > 0 && Count > (int)args) + { + RemoveAt((int)args); + } + } + + private void DeferredModified(object args) + { + if (!m_fDisposed && Count > (int)args && IsItemAvailable((int)args)) + { + InvalidateItem((int)args); + } + } + + private void DeferredCountChange(object args) + { + int num = (int)args; + if (!m_fDisposed) + { + if (num > Count) + { + AddRange(num - Count); + } + else + { + base.Count = num; + } + } + } + + private void BlockListChanges([MarshalAs(UnmanagedType.U1)] bool blockChanges) + { + if (m_fBlockChanges != blockChanges) + { + m_fBlockChanges = blockChanges; + if (!blockChanges && m_fEndBulkArrivedDuringBlock) + { + DeferredEndBulkEvents(null); + m_fEndBulkArrivedDuringBlock = false; + } + m_pQueryList.ClientBusy(blockChanges); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EVirtualDatabaseList(); + } + finally + { + base.Dispose(); + } + } + else + { + Finalize(); + } + } + + public new void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/WMISGetAlbumForAlbumIdCallbackWrapper.cs b/ZuneDBApi/MicrosoftZuneLibrary/WMISGetAlbumForAlbumIdCallbackWrapper.cs new file mode 100644 index 0000000..06944af --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/WMISGetAlbumForAlbumIdCallbackWrapper.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace MicrosoftZuneLibrary +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [DebugInfoInPDB] + [NativeCppClass] + [MiscellaneousBits(64)] + internal struct WMISGetAlbumForAlbumIdCallbackWrapper + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/WirelessAuthenticationTypes.cs b/ZuneDBApi/MicrosoftZuneLibrary/WirelessAuthenticationTypes.cs new file mode 100644 index 0000000..97ecefe --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/WirelessAuthenticationTypes.cs @@ -0,0 +1,12 @@ +namespace MicrosoftZuneLibrary +{ + public enum WirelessAuthenticationTypes + { + WPA2PSK = 7, + WPA2 = 6, + WPAPSK = 4, + WPA = 3, + Shared = 2, + Open = 1 + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/WirelessCiphers.cs b/ZuneDBApi/MicrosoftZuneLibrary/WirelessCiphers.cs new file mode 100644 index 0000000..a1e5bcc --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/WirelessCiphers.cs @@ -0,0 +1,12 @@ +namespace MicrosoftZuneLibrary +{ + public enum WirelessCiphers + { + None = 0, + AES = 4, + TKIP = 2, + WEP104 = 5, + WEP40 = 1, + WEP = 257 + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/WlanAuthCipherPair.cs b/ZuneDBApi/MicrosoftZuneLibrary/WlanAuthCipherPair.cs new file mode 100644 index 0000000..bd3375e --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/WlanAuthCipherPair.cs @@ -0,0 +1,66 @@ +using System; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class WlanAuthCipherPair : IDisposable + { + private WirelessAuthenticationTypes m_Auth; + + private WirelessCiphers m_Cipher; + + public WirelessCiphers Cipher + { + get + { + return m_Cipher; + } + set + { + m_Cipher = value; + } + } + + public WirelessAuthenticationTypes Auth + { + get + { + return m_Auth; + } + set + { + m_Auth = value; + } + } + + public WlanAuthCipherPair(WirelessAuthenticationTypes auth, WirelessCiphers cipher) + { + m_Cipher = cipher; + m_Auth = auth; + } + + public WlanAuthCipherPair() + { + m_Auth = WirelessAuthenticationTypes.Open; + m_Cipher = WirelessCiphers.None; + } + + private void _007EWlanAuthCipherPair() + { + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (!P_0) + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/WlanAuthCipherPairList.cs b/ZuneDBApi/MicrosoftZuneLibrary/WlanAuthCipherPairList.cs new file mode 100644 index 0000000..d91d61f --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/WlanAuthCipherPairList.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; +using System.Reflection; + +namespace MicrosoftZuneLibrary +{ + [DefaultMember("Item")] + public class WlanAuthCipherPairList : List + { + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/WlanProfile.cs b/ZuneDBApi/MicrosoftZuneLibrary/WlanProfile.cs new file mode 100644 index 0000000..54e6830 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/WlanProfile.cs @@ -0,0 +1,188 @@ +using System; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class WlanProfile : IDisposable + { + private string m_strSSID; + + private WirelessAuthenticationTypes m_Auth; + + private WirelessCiphers m_Cipher; + + private bool m_fPassPhrase; + + private bool m_fEncrypted; + + private string m_strKey; + + private byte[] m_EncryptedKey; + + private uint m_uKeyIndex; + + private uint m_uKeyLength; + + private uint m_uSignalQuality; + + private bool m_fConnected; + + public bool Connected + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_fConnected; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + m_fConnected = value; + } + } + + public uint SignalQuality + { + get + { + return m_uSignalQuality; + } + set + { + m_uSignalQuality = value; + } + } + + public uint KeyIndex + { + get + { + return m_uKeyIndex; + } + set + { + m_uKeyIndex = value; + } + } + + public bool Encrypted + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_fEncrypted; + } + } + + public bool PassPhrase + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_fPassPhrase; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + m_fPassPhrase = value; + } + } + + public byte[] EncryptedKey + { + get + { + return m_EncryptedKey; + } + set + { + m_EncryptedKey = value; + m_fEncrypted = true; + m_strKey = null; + } + } + + public string Key + { + get + { + return m_strKey; + } + set + { + m_strKey = value; + m_fEncrypted = false; + m_EncryptedKey = null; + } + } + + public WirelessCiphers Cipher + { + get + { + return m_Cipher; + } + set + { + m_Cipher = value; + } + } + + public WirelessAuthenticationTypes Auth + { + get + { + return m_Auth; + } + set + { + m_Auth = value; + } + } + + public string SSID + { + get + { + return m_strSSID; + } + set + { + m_strSSID = value; + } + } + + public WlanProfile() + { + m_strSSID = null; + m_Auth = WirelessAuthenticationTypes.Open; + m_Cipher = WirelessCiphers.None; + m_strKey = null; + m_EncryptedKey = null; + m_fPassPhrase = false; + m_fEncrypted = false; + m_uKeyIndex = 0u; + m_uKeyLength = 0u; + m_uSignalQuality = 0u; + m_fConnected = false; + } + + private void _007EWlanProfile() + { + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (!P_0) + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/WlanProfileList.cs b/ZuneDBApi/MicrosoftZuneLibrary/WlanProfileList.cs new file mode 100644 index 0000000..ff32ffb --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/WlanProfileList.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; +using System.Reflection; + +namespace MicrosoftZuneLibrary +{ + [DefaultMember("Item")] + public class WlanProfileList : List + { + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/WlanTestResultCode.cs b/ZuneDBApi/MicrosoftZuneLibrary/WlanTestResultCode.cs new file mode 100644 index 0000000..11f9d87 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/WlanTestResultCode.cs @@ -0,0 +1,16 @@ +namespace MicrosoftZuneLibrary +{ + public enum WlanTestResultCode + { + wlanTestResultTCPIPConnectivityFailure = 9, + wlanTestResultUDPConnectivityFailure = 8, + wlanTestResultFailInternal = 7, + wlanTestResultCancelled = 6, + wlanTestResultTimeout = 5, + wlanTestResultFailDhcp = 4, + wlanTestResultFailAssociate = 3, + wlanTestResultFailNoConfig = 2, + wlanTestResultRunning = 1, + wlanTestResultSuccess = 0 + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/WorkerQueue.cs b/ZuneDBApi/MicrosoftZuneLibrary/WorkerQueue.cs new file mode 100644 index 0000000..c944fa1 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/WorkerQueue.cs @@ -0,0 +1,268 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Threading; + +namespace MicrosoftZuneLibrary +{ + public class WorkerQueue + { + private class WorkItem + { + public WaitCallback Callback; + + public object Context; + } + + private static object _queuesLock = new object(); + + private static List _queues = new List(1); + + private volatile bool _fShutdown; + + private volatile bool _fAbort; + + private ManualResetEvent _hCompletionEvent; + + private List _workItems; + + public static WorkerQueue CreateInstance() + { + ManagedLock managedLock = null; + ManagedLock managedLock2 = new ManagedLock(_queuesLock); + WorkerQueue result; + try + { + managedLock = managedLock2; + if (_queues == null) + { + result = null; + goto IL_0023; + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + WorkerQueue workerQueue; + try + { + workerQueue = new WorkerQueue(); + _queues.Add(workerQueue); + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + return workerQueue; + IL_0023: + ((IDisposable)managedLock).Dispose(); + return result; + } + + public static void ShutdownAll() + { + ManagedLock managedLock = null; + ManagedLock managedLock2 = new ManagedLock(_queuesLock); + try + { + managedLock = managedLock2; + if (_queues != null) + { + int num = 0; + if (0 < _queues.Count) + { + do + { + _queues[num].Shutdown(); + num++; + } + while (num < _queues.Count); + } + _queues.Clear(); + _queues = null; + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + } + + [return: MarshalAs(UnmanagedType.U1)] + public bool QueueSequentialWorkItem(WaitCallback callback, object context) + { + ManagedLock managedLock = null; + if (callback == null) + { + return false; + } + bool result = true; + ManagedLock managedLock2 = new ManagedLock(this); + try + { + managedLock = managedLock2; + if (!_fShutdown) + { + WorkItem workItem = new WorkItem(); + if (_hCompletionEvent == null) + { + _hCompletionEvent = new ManualResetEvent(initialState: true); + } + workItem.Callback = callback; + workItem.Context = context; + if (_workItems == null) + { + _workItems = new List(); + } + _workItems.Add(workItem); + if (_workItems.Count == 1 && (!_hCompletionEvent.Reset() || !ThreadPool.QueueUserWorkItem(ProcessQueue, null))) + { + result = false; + _workItems.Clear(); + _hCompletionEvent.Set(); + } + } + else + { + result = false; + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + return result; + } + + private WorkerQueue() + { + } + + private void ProcessQueue(object context) + { + ManagedLock managedLock = null; + ManagedLock managedLock2 = new ManagedLock(this); + try + { + managedLock = managedLock2; + if (_fAbort) + { + goto IL_0087; + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + while (true) + { + WorkItem workItem; + try + { + if (_workItems.Count == 0) + { + break; + } + workItem = _workItems[0]; + _workItems.RemoveAt(0); + goto IL_0052; + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + IL_0052: + ((IDisposable)managedLock).Dispose(); + workItem.Callback(workItem.Context); + managedLock2 = new ManagedLock(this); + try + { + managedLock = managedLock2; + if (!_fAbort) + { + continue; + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + break; + } + goto IL_0087; + IL_0087: + try + { + _hCompletionEvent.Set(); + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + } + + private void Shutdown() + { + ManagedLock managedLock = null; + ManagedLock managedLock2 = new ManagedLock(this); + try + { + managedLock = managedLock2; + if (!_fShutdown) + { + goto IL_002a; + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + return; + IL_002a: + try + { + _fAbort = true; + _fShutdown = true; + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + ManualResetEvent hCompletionEvent = _hCompletionEvent; + if (hCompletionEvent != null) + { + hCompletionEvent.WaitOne(); + ((IDisposable)_hCompletionEvent)?.Dispose(); + _hCompletionEvent = null; + } + _workItems?.Clear(); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibrary.cs b/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibrary.cs new file mode 100644 index 0000000..2fd7be7 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibrary.cs @@ -0,0 +1,1288 @@ +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using MicrosoftZuneInterop; +using ZuneUI; + +namespace MicrosoftZuneLibrary +{ + public class ZuneLibrary : IDisposable + { + private static object m_shutdownLock = new object(); + + private static bool s_fShutdown = false; + + private void _007EZuneLibrary() + { + ManagedLock managedLock = null; + ManagedLock managedLock2 = new ManagedLock(m_shutdownLock); + try + { + managedLock = managedLock2; + s_fShutdown = true; + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + _003CModule_003E.ZuneLibraryExports_002EStopGroveler(false); + _003CModule_003E.ZuneLibraryExports_002EShutdownZuneNativeLib(); + _003CModule_003E.WppCleanupUm(); + _003CModule_003E.ZuneEtwShutdown(); + } + + public unsafe int Initialize(string path, out bool dbRebuilt) + { + _003CModule_003E.ZuneEtwInit(); + _003CModule_003E.WPP_INIT_CONTROL_ARRAY((WPP_PROJECT_CONTROL_BLOCK*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_MAIN_CB)); + _003CModule_003E.WPP_INIT_GUID_ARRAY((_GUID**)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_REGISTRATION_GUIDS)); + _003CModule_003E.WPP_GLOBAL_Control = (WPP_PROJECT_CONTROL_BLOCK*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_MAIN_CB); + _003CModule_003E.WppInitUm((ushort*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003F_003F_C_0040_1BK_0040DJDIBCLF_0040_003F_0024AAZ_003F_0024AAu_003F_0024AAn_003F_0024AAe_003F_0024AA_003F5_003F_0024AAI_003F_0024AAn_003F_0024AAt_003F_0024AAe_003F_0024AAr_003F_0024AAo_003F_0024AAp_003F_0024AA_003F_0024AA_0040)); + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(path))) + { + int num = 0; + int result = _003CModule_003E.ZuneLibraryExports_002EStartupZuneNativeLib(ptr, &num); + bool flag = (dbRebuilt = ((num != 0) ? true : false)); + return result; + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public bool Phase2Initialization(out int hr) + { + hr = 0; + return (byte)(((hr = _003CModule_003E.ZuneLibraryExports_002EPhase2Initialization()) >= 0) ? 1u : 0u) != 0; + } + + public unsafe static string LoadStringFromResource(uint dwResourceNumber) + { + HINSTANCE__* ptr = _003CModule_003E.ZuneLibraryExports_002EGetLocResourceInstance(); + if (ptr == null) + { + return null; + } + object result = null; + IntPtr intPtr = default(IntPtr); + int len = _003CModule_003E.LoadStringW(ptr, dwResourceNumber, (ushort*)(&intPtr), 0); + if (intPtr != IntPtr.Zero) + { + result = Marshal.PtrToStringUni(intPtr, len); + } + return (string)result; + } + + public unsafe ZuneQueryList QueryDatabase(EQueryType QueryType, int LibraryView, EQuerySortType SortType, uint SortAtom, QueryPropertyBag propertyBag) + { + //IL_0003: Expected I, but got I8 + //IL_005e: Expected I, but got I8 + //IL_005e: Expected I, but got I8 + //IL_0073: Expected I, but got I8 + //IL_0073: Expected I, but got I8 + //IL_0088: Expected I, but got I8 + //IL_0088: Expected I, but got I8 + //IL_0096: Expected I, but got I8 + //IL_0096: Expected I, but got I8 + //IL_00b6: Expected I, but got I8 + IDatabaseQueryResults* ptr = null; + CComPtrNtv_003CIQueryPropertyBag_003E cComPtrNtv_003CIQueryPropertyBag_003E; + *(long*)(&cComPtrNtv_003CIQueryPropertyBag_003E) = 0L; + ZuneQueryList result; + try + { + if (propertyBag != null) + { + _003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002E_003D(&cComPtrNtv_003CIQueryPropertyBag_003E, propertyBag.GetIQueryPropertyBag()); + } + else + { + int num = _003CModule_003E.ZuneLibraryExports_002ECreatePropertyBag((IQueryPropertyBag**)(&cComPtrNtv_003CIQueryPropertyBag_003E)); + if (num < 0) + { + result = null; + goto IL_003e; + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIQueryPropertyBag_003E); + throw; + } + ZuneQueryList result2; + try + { + long num2 = *(long*)(&cComPtrNtv_003CIQueryPropertyBag_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E)) + 56)))((nint)num2, (EQueryPropertyBagProp)21, (int)SortAtom); + long num3 = *(long*)(&cComPtrNtv_003CIQueryPropertyBag_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E)) + 56)))((nint)num3, (EQueryPropertyBagProp)22, (int)SortType); + long num4 = *(long*)(&cComPtrNtv_003CIQueryPropertyBag_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E)) + 56)))((nint)num4, (EQueryPropertyBagProp)15, LibraryView); + int num = _003CModule_003E.ZuneLibraryExports_002EQueryDatabase(QueryType, (IQueryPropertyBag*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E)), &ptr, null); + if (num >= 0) + { + result2 = new ZuneQueryList(ptr, "*** Test Only ***"); + IDatabaseQueryResults* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + goto IL_00c7; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIQueryPropertyBag_003E); + throw; + } + ZuneQueryList result3; + try + { + result3 = null; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIQueryPropertyBag_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002ERelease(&cComPtrNtv_003CIQueryPropertyBag_003E); + return result3; + IL_003e: + _003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002ERelease(&cComPtrNtv_003CIQueryPropertyBag_003E); + return result; + IL_00c7: + _003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002ERelease(&cComPtrNtv_003CIQueryPropertyBag_003E); + return result2; + } + + public unsafe ZuneLibraryCDDeviceList GetCDDeviceList() + { + //IL_0003: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + IWMPCDDeviceList* ptr = null; + if (_003CModule_003E.ZuneLibraryExports_002EGetCDDeviceList(&ptr) >= 0) + { + ZuneLibraryCDDeviceList zuneLibraryCDDeviceList = new ZuneLibraryCDDeviceList(ptr); + IWMPCDDeviceList* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + zuneLibraryCDDeviceList?.AddRef(); + return zuneLibraryCDDeviceList; + } + return null; + } + + public unsafe ZuneLibraryCDRecorder GetRecorder() + { + //IL_0003: Expected I, but got I8 + //IL_0026: Expected I, but got I8 + IRecordManager* ptr = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_c1cad55a_5652_40c7_842c_39cbe209379e, (void**)(&ptr)) >= 0) + { + ZuneLibraryCDRecorder zuneLibraryCDRecorder = new ZuneLibraryCDRecorder(ptr); + IRecordManager* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + zuneLibraryCDRecorder?.AddRef(); + return zuneLibraryCDRecorder; + } + return null; + } + + public unsafe ZuneQueryList GetTracksByArtist(int LibraryView, int ArtistId, EQuerySortType SortOrder, uint SortAtom) + { + //IL_0003: Expected I, but got I8 + //IL_001e: Expected I, but got I8 + //IL_0030: Expected I, but got I8 + //IL_0041: Expected I, but got I8 + //IL_0052: Expected I, but got I8 + //IL_005f: Expected I, but got I8 + //IL_0071: Expected I, but got I8 + //IL_0075: Expected I, but got I8 + //IL_0090: Expected I, but got I8 + IDatabaseQueryResults* ptr = null; + IQueryPropertyBag* ptr2; + if (_003CModule_003E.ZuneLibraryExports_002ECreatePropertyBag(&ptr2) < 0) + { + return null; + } + IQueryPropertyBag* intPtr = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 56)))((nint)intPtr, (EQueryPropertyBagProp)3, ArtistId); + IQueryPropertyBag* intPtr2 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 56)))((nint)intPtr2, (EQueryPropertyBagProp)21, (int)SortAtom); + IQueryPropertyBag* intPtr3 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 56)))((nint)intPtr3, (EQueryPropertyBagProp)22, (int)SortOrder); + IQueryPropertyBag* intPtr4 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 56)))((nint)intPtr4, (EQueryPropertyBagProp)15, LibraryView); + int num = _003CModule_003E.ZuneLibraryExports_002EQueryDatabase(EQueryType.eQueryTypeTracksForAlbumArtistId, ptr2, &ptr, null); + if (0L != (nint)ptr2) + { + IQueryPropertyBag* intPtr5 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr5 + 16)))((nint)intPtr5); + ptr2 = null; + } + if (num >= 0) + { + ZuneQueryList result = new ZuneQueryList(ptr, "TracksByArtist"); + IDatabaseQueryResults* intPtr6 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr6 + 16)))((nint)intPtr6); + return result; + } + return null; + } + + public unsafe ZuneQueryList GetTracksByAlbum(int LibraryView, int AlbumId, EQuerySortType SortOrder, uint SortAtom) + { + //IL_0003: Expected I, but got I8 + //IL_0006: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + //IL_0033: Expected I, but got I8 + //IL_0044: Expected I, but got I8 + //IL_0055: Expected I, but got I8 + //IL_0062: Expected I, but got I8 + //IL_0074: Expected I, but got I8 + //IL_0078: Expected I, but got I8 + //IL_0093: Expected I, but got I8 + IDatabaseQueryResults* ptr = null; + IQueryPropertyBag* ptr2 = null; + if (_003CModule_003E.ZuneLibraryExports_002ECreatePropertyBag(&ptr2) < 0) + { + return null; + } + IQueryPropertyBag* intPtr = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 56)))((nint)intPtr, (EQueryPropertyBagProp)6, AlbumId); + IQueryPropertyBag* intPtr2 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 56)))((nint)intPtr2, (EQueryPropertyBagProp)21, (int)SortAtom); + IQueryPropertyBag* intPtr3 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 56)))((nint)intPtr3, (EQueryPropertyBagProp)22, (int)SortOrder); + IQueryPropertyBag* intPtr4 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 56)))((nint)intPtr4, (EQueryPropertyBagProp)15, LibraryView); + int num = _003CModule_003E.ZuneLibraryExports_002EQueryDatabase(EQueryType.eQueryTypeTracksForAlbumId, ptr2, &ptr, null); + if (0L != (nint)ptr2) + { + IQueryPropertyBag* intPtr5 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr5 + 16)))((nint)intPtr5); + ptr2 = null; + } + if (num >= 0) + { + ZuneQueryList result = new ZuneQueryList(ptr, "TracksByAlbum"); + IDatabaseQueryResults* intPtr6 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr6 + 16)))((nint)intPtr6); + return result; + } + return null; + } + + public ZuneQueryList GetTracksByArtists(IList artistIds, string sort) + { + return ExecuteQueryHelper(EQueryType.eQueryTypeTracksForAlbumArtistId, (EQueryPropertyBagProp)4, artistIds, sort); + } + + public ZuneQueryList GetTracksByGenres(IList genreIds, string sort) + { + return ExecuteQueryHelper(EQueryType.eQueryTypeTracksByGenreId, (EQueryPropertyBagProp)12, genreIds, sort); + } + + public ZuneQueryList GetTracksByAlbums(IList albumIds, string sort) + { + return ExecuteQueryHelper(EQueryType.eQueryTypeTracksForAlbumId, (EQueryPropertyBagProp)7, albumIds, sort); + } + + public unsafe ZuneQueryList GetTracksByPlaylist(int LibraryView, int PlaylistId, EQuerySortType SortOrder, uint SortAtom) + { + //IL_0003: Expected I, but got I8 + //IL_001f: Expected I, but got I8 + //IL_0031: Expected I, but got I8 + //IL_0042: Expected I, but got I8 + //IL_0053: Expected I, but got I8 + //IL_0057: Expected I, but got I8 + //IL_0063: Expected I, but got I8 + //IL_0075: Expected I, but got I8 + //IL_0079: Expected I, but got I8 + //IL_0094: Expected I, but got I8 + IQueryPropertyBag* ptr = null; + if (_003CModule_003E.ZuneLibraryExports_002ECreatePropertyBag(&ptr) < 0) + { + return null; + } + IQueryPropertyBag* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 56)))((nint)intPtr, (EQueryPropertyBagProp)10, PlaylistId); + IQueryPropertyBag* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 56)))((nint)intPtr2, (EQueryPropertyBagProp)21, (int)SortAtom); + IQueryPropertyBag* intPtr3 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 56)))((nint)intPtr3, (EQueryPropertyBagProp)22, (int)SortOrder); + IQueryPropertyBag* intPtr4 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 56)))((nint)intPtr4, (EQueryPropertyBagProp)15, LibraryView); + IDatabaseQueryResults* ptr2 = null; + int num = _003CModule_003E.ZuneLibraryExports_002EQueryDatabase(EQueryType.eQueryTypePlaylistContentByPlaylistId, ptr, &ptr2, null); + if (0L != (nint)ptr) + { + IQueryPropertyBag* intPtr5 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr5 + 16)))((nint)intPtr5); + ptr = null; + } + if (num >= 0) + { + ZuneQueryList result = new ZuneQueryList(ptr2, "TracksByPlaylist"); + IDatabaseQueryResults* intPtr6 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr6 + 16)))((nint)intPtr6); + return result; + } + return null; + } + + public ZuneQueryList GetAlbumsByArtists(IList artistIds, string sort) + { + return ExecuteQueryHelper(EQueryType.eQueryTypeAlbumsForAlbumArtistId, (EQueryPropertyBagProp)4, artistIds, sort); + } + + public ZuneQueryList GetAlbumsByGenres(IList genreIds, string sort) + { + return ExecuteQueryHelper(EQueryType.eQueryTypeAlbumsByGenreId, (EQueryPropertyBagProp)12, genreIds, sort); + } + + public unsafe AlbumMetadata GetAlbumMetadata(int iAlbumId) + { + //IL_0003: Expected I, but got I8 + //IL_002f: Expected I, but got I8 + IAlbumInfo* ptr = null; + int num = _003CModule_003E.ZuneLibraryExports_002EGetAlbumMetadata(iAlbumId, true, &ptr); + if (num != 0) + { + throw new COMException("IAlbumInfo::GetAlbumMetadata failed", num); + } + AlbumMetadata result = new AlbumMetadata(ptr); + IAlbumInfo* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + return result; + } + + public unsafe void UpdateAlbumMetadata(int iAlbumId, AlbumMetadata albumMetadata) + { + if (albumMetadata == null) + { + throw new COMException("UpdateAlbumMetadata: albumMetadata is null", -2147024809); + } + IAlbumInfo* albumInfo = albumMetadata.AlbumInfo; + int num = _003CModule_003E.ZuneLibraryExports_002EUpdateAlbumMetadata(iAlbumId, albumInfo); + if (num != 0) + { + throw new COMException("IAlbumInfo::UpdateAlbumMetadata failed", num); + } + } + + public unsafe void GetAlbumMetadataForAlbumId(long WMISAlbumId, int WMISVolume, AlbumMetadata dbAlbumMetadata, GetAlbumForAlbumIdCompleteHandler handler) + { + //IL_0024: Expected I, but got I8 + //IL_0030: Expected I, but got I8 + //IL_0051: Expected I, but got I8 + if (!(handler == null)) + { + WMISGetAlbumForAlbumIdCallbackWrapper* ptr = (WMISGetAlbumForAlbumIdCallbackWrapper*)_003CModule_003E.@new(24uL); + WMISGetAlbumForAlbumIdCallbackWrapper* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.MicrosoftZuneLibrary_002EWMISGetAlbumForAlbumIdCallbackWrapper_002E_007Bctor_007D(ptr, handler)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + IAlbumInfo* ptr3 = null; + if (dbAlbumMetadata != null) + { + ptr3 = dbAlbumMetadata.AlbumInfo; + } + _003CModule_003E.ZuneLibraryExports_002EGetAlbumMetadataForAlbumId(WMISAlbumId, WMISVolume, ptr3, (IWMISGetAlbumForAlbumIdCallback*)ptr2); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + + public static void SplitAudioTrack(int iTrackMediaId) + { + int num = _003CModule_003E.ZuneLibraryExports_002ESplitAudioTrack(iTrackMediaId); + if (num < 0) + { + throw new COMException("ZuneLibraryExports::SplitAudioTrack failed", num); + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool CanAddFromFolder(string folder) + { + ManagedLock managedLock = null; + ManagedLock managedLock2 = new ManagedLock(m_shutdownLock); + bool result; + try + { + managedLock = managedLock2; + if (!s_fShutdown) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(folder))) + { + try + { + result = _003CModule_003E.ZuneLibraryExports_002ECanAddFromFolder(ptr) == 0; + } + catch + { + //try-fault + ptr = null; + throw; + } + } + goto IL_003c; + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + return false; + IL_003c: + ((IDisposable)managedLock).Dispose(); + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool CanAddMedia(string filename, EMediaTypes mediaType) + { + ManagedLock managedLock = null; + ManagedLock managedLock2 = new ManagedLock(m_shutdownLock); + bool result; + try + { + managedLock = managedLock2; + if (!s_fShutdown) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(filename))) + { + try + { + result = (byte)((_003CModule_003E.ZuneLibraryExports_002ECanAddMedia(ptr, mediaType) != 0) ? 1u : 0u) != 0; + } + catch + { + //try-fault + ptr = null; + throw; + } + } + goto IL_0041; + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + return false; + IL_0041: + ((IDisposable)managedLock).Dispose(); + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool AddGrovelerScanDirectory(string path, EMediaTypes mediaType) + { + ManagedLock managedLock = null; + ManagedLock managedLock2 = new ManagedLock(m_shutdownLock); + bool result; + try + { + managedLock = managedLock2; + if (!s_fShutdown) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(path))) + { + try + { + result = _003CModule_003E.ZuneLibraryExports_002EAddGrovelerScanDirectory(ptr, mediaType) == 0; + } + catch + { + //try-fault + ptr = null; + throw; + } + } + goto IL_003d; + } + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + return false; + IL_003d: + ((IDisposable)managedLock).Dispose(); + return result; + } + + public unsafe int AddMedia(string filename) + { + //IL_0030: Expected I, but got I8 + //IL_003d: Expected I, but got I8 + //IL_006d: Expected I, but got I8 + //IL_007e: Expected I, but got I8 + ManagedLock managedLock = null; + int num = -1; + int num2 = 0; + ManagedLock managedLock2 = new ManagedLock(m_shutdownLock); + int result; + try + { + managedLock = managedLock2; + if (!s_fShutdown) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(filename))) + { + try + { + num2 = _003CModule_003E.ZuneLibraryExports_002EAddMedia(ptr, EMediaTypes.eMediaTypeInvalid, 0u, null, &num); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + IMetadataManager* ptr2 = null; + if (num2 >= 0) + { + if (!s_fShutdown) + { + num2 = _003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_6dd7146d_7a19_4fbb_9235_9e6c382fcc71, (void**)(&ptr2)); + } + if (num2 >= 0 && !s_fShutdown) + { + IMetadataManager* intPtr = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 32)))((nint)intPtr); + } + if (ptr2 != null) + { + IMetadataManager* intPtr2 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + } + result = num; + } + catch + { + //try-fault + ((IDisposable)managedLock).Dispose(); + throw; + } + ((IDisposable)managedLock).Dispose(); + return result; + } + + public unsafe int AddTrack(Guid guidTrackServiceMediaId, Guid guidAlbumServiceMediaId, int iTrackNumber, string strTitle, TimeSpan duration, string strAlbum, string strArtist, string strGenre) + { + //IL_0032: Expected I, but got I8 + //IL_006d: Expected I, but got I8 + int result = -1; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strTitle))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strAlbum))) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strArtist))) + { + fixed (ushort* ptr5 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strGenre))) + { + int num = (int)duration.TotalMilliseconds; + IMSMediaSchemaPropertySet* ptr = null; + _GUID gUID = _003CModule_003E.GuidToGUID(guidAlbumServiceMediaId); + if (_003CModule_003E.ZuneLibraryExports_002ECreateTrackPropSet(_003CModule_003E.GuidToGUID(guidTrackServiceMediaId), gUID, iTrackNumber, ptr2, num, ptr3, ptr4, ptr5, &ptr) >= 0) + { + _003CModule_003E.ZuneLibraryExports_002EAddMedia(ptr, EMediaTypes.eMediaTypeAudio, &result); + } + if (ptr != null) + { + IMSMediaSchemaPropertySet* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + } + return result; + } + } + } + } + } + + public unsafe int AddVideo(Guid guidVideoMediaId, string strTitle, TimeSpan duration) + { + //IL_0034: Expected I, but got I8 + int num = -1; + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strTitle))) + { + int num2 = (int)duration.TotalMilliseconds; + CComPtrNtv_003CIMSMediaSchemaPropertySet_003E cComPtrNtv_003CIMSMediaSchemaPropertySet_003E; + *(long*)(&cComPtrNtv_003CIMSMediaSchemaPropertySet_003E) = 0L; + int result; + try + { + if (_003CModule_003E.ZuneLibraryExports_002ECreateVideoPropSet(_003CModule_003E.GuidToGUID(guidVideoMediaId), ptr, num2, (IMSMediaSchemaPropertySet**)(&cComPtrNtv_003CIMSMediaSchemaPropertySet_003E)) >= 0) + { + _003CModule_003E.ZuneLibraryExports_002EAddMedia((IMSMediaSchemaPropertySet*)(*(ulong*)(&cComPtrNtv_003CIMSMediaSchemaPropertySet_003E)), EMediaTypes.eMediaTypeVideo, &num); + } + result = num; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIMSMediaSchemaPropertySet_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIMSMediaSchemaPropertySet_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIMSMediaSchemaPropertySet_003E_002ERelease(&cComPtrNtv_003CIMSMediaSchemaPropertySet_003E); + return result; + } + } + + public unsafe int AddAlbum(Guid guidServiceMediaId, string strAlbum, string strArtist) + { + //IL_0013: Expected I, but got I8 + //IL_0040: Expected I, but got I8 + int result = -1; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strAlbum))) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strArtist))) + { + IMSMediaSchemaPropertySet* ptr = null; + if (_003CModule_003E.ZuneLibraryExports_002ECreateAlbumPropSet(_003CModule_003E.GuidToGUID(guidServiceMediaId), ptr2, ptr3, &ptr) >= 0) + { + _003CModule_003E.ZuneLibraryExports_002EAddMedia(ptr, EMediaTypes.eMediaTypeAudioAlbum, &result); + } + if (ptr != null) + { + IMSMediaSchemaPropertySet* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + } + return result; + } + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool AddTransientMedia(string filename, EMediaTypes mediaType, out int libraryID, out bool fFileAlreadyExists) + { + libraryID = -1; + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(filename))) + { + fixed (int* ptr2 = &libraryID) + { + int num = _003CModule_003E.ZuneLibraryExports_002EAddTransientMedia(ptr, mediaType, ptr2); + if (num < 0) + { + _003CModule_003E.SQMAddNumbersToStream("IgnoredErrorEvent", 1u, (uint)num); + } + int num2 = ((fFileAlreadyExists = num == 1) ? 1 : 0); + return (byte)((num >= 0) ? 1u : 0u) != 0; + } + } + } + + public void CleanupTransientMedia() + { + int num = _003CModule_003E.ZuneLibraryExports_002ECleanupTransientMedia(); + if (num < 0) + { + _003CModule_003E.SQMAddNumbersToStream("IgnoredErrorEvent", 1u, (uint)num); + } + } + + public void MarkAllDRMFilesAsNeedingLicenseRefresh() + { + int num = _003CModule_003E.ZuneLibraryExports_002EMarkAllDRMFilesAsNeedingLicenseRefresh(); + if (num < 0) + { + _003CModule_003E.SQMAddNumbersToStream("IgnoredErrorEvent", 1u, (uint)num); + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool DeleteMedia(int[] mediaIds, EMediaTypes mediaType, [MarshalAs(UnmanagedType.U1)] bool fDeleteFileOnDisk) + { + if (mediaIds == null) + { + return false; + } + fixed (int* ptr = &mediaIds[0]) + { + return (byte)((_003CModule_003E.ZuneLibraryExports_002EDeleteMedia(mediaType, ptr, mediaIds.Length, fDeleteFileOnDisk ? 1 : 0, 1) >= 0) ? 1u : 0u) != 0; + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool DeleteRootFolder(string folderName, EMediaTypes mediaType) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(folderName))) + { + int num = _003CModule_003E.ZuneLibraryExports_002EDeleteRootFolder(ptr, mediaType); + if (num < 0) + { + _003CModule_003E.SQMAddNumbersToStream("IgnoredErrorEvent", 1u, (uint)num); + } + return num == 0; + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public bool DeleteFilesystemFolder(int folderId, EMediaTypes mediaType) + { + return _003CModule_003E.ZuneLibraryExports_002EDeleteFSFolder(folderId, mediaType) == 0; + } + + public static void ScanAndClearDeletedMedia() + { + int num = _003CModule_003E.ZuneLibraryExports_002EScanAndClearDeletedMedia(); + if (num < 0) + { + _003CModule_003E.SQMAddNumbersToStream("IgnoredErrorEvent", 1u, (uint)num); + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public static bool ImportSharedRatingsForUser(int iUserId, EMediaTypes mediaType) + { + return (byte)((_003CModule_003E.ZuneLibraryExports_002EImportSharedRatingsForUser(iUserId, mediaType) >= 0) ? 1u : 0u) != 0; + } + + [return: MarshalAs(UnmanagedType.U1)] + public static bool ExportUserRatings(int iUserId, EMediaTypes mediaType) + { + return (byte)((_003CModule_003E.ZuneLibraryExports_002EExportUserRatings(iUserId, mediaType) >= 0) ? 1u : 0u) != 0; + } + + public static HRESULT GetFieldValues(int iMediaId, EListType eList, int cValues, int[] columnIndexes, object[] fieldValues, QueryPropertyBag propertyBag) + { + return GetFieldValues(iMediaId, eList, cValues, columnIndexes, fieldValues, null, propertyBag); + } + + public unsafe static HRESULT GetFieldValues(int iMediaId, EListType eList, int cValues, int[] columnIndexes, object[] fieldValues, bool[] isEmptyValues, QueryPropertyBag propertyBag) + { + //IL_0074: Expected I, but got I8 + //IL_0096: Expected I, but got I8 + //IL_00d1: Expected I, but got I8 + //IL_00de: Expected I, but got I8 + //IL_00fa: Expected I, but got I8 + //IL_0111: Expected I, but got I8 + if (propertyBag == null) + { + return new HRESULT(-2147024809); + } + int num = 0; + ulong num2 = (ulong)cValues; + ulong num3 = ((num2 > 576460752303423487L) ? ulong.MaxValue : (num2 * 32)); + DBPropertyRequestStruct* ptr = (DBPropertyRequestStruct*)_003CModule_003E.new_005B_005D((num3 > 18446744073709551607uL) ? ulong.MaxValue : (num3 + 8)); + DBPropertyRequestStruct* ptr3; + try + { + if (ptr != null) + { + uint count = (uint)(*(int*)ptr = (int)num2); + DBPropertyRequestStruct* ptr2 = (DBPropertyRequestStruct*)((ulong)(nint)ptr + 8uL); + _003CModule_003E.__ehvec_ctor(ptr2, 32uL, (int)count, (delegate*)(delegate*)(&_003CModule_003E.DBPropertyRequestStruct_002E__dflt_ctor_closure), (delegate*)(delegate*)(&_003CModule_003E.DBPropertyRequestStruct_002E_007Bdtor_007D)); + ptr3 = ptr2; + } + else + { + ptr3 = null; + } + } + catch + { + //try-fault + _003CModule_003E.delete_005B_005D(ptr); + throw; + } + DBPropertyRequestStruct* ptr4 = ptr3; + CComPtrNtv_003CIQueryPropertyBag_003E cComPtrNtv_003CIQueryPropertyBag_003E; + _003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002E_007Bctor_007D(&cComPtrNtv_003CIQueryPropertyBag_003E, propertyBag.GetIQueryPropertyBag()); + HRESULT result; + try + { + try + { + for (int i = 0; i < cValues; i++) + { + *(int*)((long)i * 32L + (nint)ptr4) = columnIndexes[i]; + } + IQueryPropertyBag* ptr5 = (IQueryPropertyBag*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E)); + num = _003CModule_003E.ZuneLibraryExports_002EGetFieldValues(iMediaId, eList, cValues, ptr4, (IQueryPropertyBag*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E))); + if (num >= 0) + { + for (int j = 0; j < cValues; j++) + { + DBPropertyRequestStruct* ptr6 = (DBPropertyRequestStruct*)((long)j * 32L + (nint)ptr4); + int num4 = *(int*)((ulong)(nint)ptr6 + 4uL); + if (num4 >= 0) + { + DBPropertyRequestStruct* ptr7 = (DBPropertyRequestStruct*)((ulong)(nint)ptr6 + 8uL); + ushort num5 = *(ushort*)ptr7; + if (num5 != 1 && num5 != 0) + { + Type type = null; + if (fieldValues[j] != null) + { + type = fieldValues[j].GetType(); + } + else + { + switch (num5) + { + case 20: + type = typeof(long); + break; + case 11: + type = typeof(bool); + break; + case 8: + type = typeof(string); + break; + case 3: + type = typeof(int); + break; + } + } + fieldValues[j] = ZuneQueryList.MarshalResult(type, (tagPROPVARIANT*)ptr7, fieldValues[j]); + } + else if (isEmptyValues != null) + { + isEmptyValues[j] = true; + } + } + else + { + num = ((num >= 0) ? num4 : num); + } + } + } + } + finally + { + if (ptr4 != null) + { + _003CModule_003E.DBPropertyRequestStruct_002E__vecDelDtor(ptr4, 3u); + } + } + result = new HRESULT(num); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIQueryPropertyBag_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002ERelease(&cComPtrNtv_003CIQueryPropertyBag_003E); + return result; + } + + public unsafe static void SetFieldValues(int iMediaId, EListType eList, int cValues, int[] columnIndexes, object[] fieldValues, QueryPropertyBag propertyBag) + { + //Discarded unreachable code: IL_0197 + //IL_0066: Expected I, but got I8 + //IL_0088: Expected I, but got I8 + //IL_00ef: Expected I, but got I8 + //IL_0111: Expected I, but got I8 + //IL_0141: Expected I, but got I8 + //IL_0152: Expected I, but got I8 + //IL_0167: Expected I8, but got I + //IL_0179: Expected I, but got I8 + if (propertyBag == null) + { + return; + } + ulong num = (ulong)cValues; + ulong num2 = num; + ulong num3 = ((num2 > 1152921504606846975L) ? ulong.MaxValue : (num2 * 16)); + DBPropertySubmitStruct* ptr = (DBPropertySubmitStruct*)_003CModule_003E.new_005B_005D((num3 > 18446744073709551607uL) ? ulong.MaxValue : (num3 + 8)); + DBPropertySubmitStruct* ptr3; + try + { + if (ptr != null) + { + uint count = (uint)(*(int*)ptr = (int)num2); + DBPropertySubmitStruct* ptr2 = (DBPropertySubmitStruct*)((ulong)(nint)ptr + 8uL); + _003CModule_003E.__ehvec_ctor(ptr2, 16uL, (int)count, (delegate*)(delegate*)(&_003CModule_003E.DBPropertySubmitStruct_002E__dflt_ctor_closure), (delegate*)(delegate*)(&_003CModule_003E.DBPropertySubmitStruct_002E_007Bdtor_007D)); + ptr3 = ptr2; + } + else + { + ptr3 = null; + } + } + catch + { + //try-fault + _003CModule_003E.delete_005B_005D(ptr); + throw; + } + DBPropertySubmitStruct* ptr4 = ptr3; + ulong num4 = num; + ulong num5 = ((num4 > 768614336404564650L) ? ulong.MaxValue : (num4 * 24)); + CComPropVariant* ptr5 = (CComPropVariant*)_003CModule_003E.new_005B_005D((num5 > 18446744073709551607uL) ? ulong.MaxValue : (num5 + 8)); + CComPropVariant* ptr7; + try + { + if (ptr5 != null) + { + uint count2 = (uint)(*(int*)ptr5 = (int)num4); + CComPropVariant* ptr6 = (CComPropVariant*)((ulong)(nint)ptr5 + 8uL); + _003CModule_003E.__ehvec_ctor(ptr6, 24uL, (int)count2, (delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bctor_007D), (delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D)); + ptr7 = ptr6; + } + else + { + ptr7 = null; + } + } + catch + { + //try-fault + _003CModule_003E.delete_005B_005D(ptr5); + throw; + } + CComPropVariant* ptr8 = ptr7; + CComPtrNtv_003CIQueryPropertyBag_003E cComPtrNtv_003CIQueryPropertyBag_003E; + _003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002E_007Bctor_007D(&cComPtrNtv_003CIQueryPropertyBag_003E, propertyBag.GetIQueryPropertyBag()); + try + { + try + { + for (int i = 0; i < cValues; i++) + { + long num6 = i; + DBPropertySubmitStruct* ptr9 = (DBPropertySubmitStruct*)(num6 * 16 + (nint)ptr4); + *(int*)ptr9 = columnIndexes[i]; + CComPropVariant* ptr10 = (CComPropVariant*)(num6 * 24 + (nint)ptr8); + ZuneQueryList.ConvertTypeToPropVariant(null, fieldValues[i], (tagPROPVARIANT*)ptr10); + *(long*)((ulong)(nint)ptr9 + 8uL) = (nint)ptr10; + } + _003CModule_003E.ZuneLibraryExports_002ESetFieldValues(iMediaId, eList, cValues, ptr4, (IQueryPropertyBag*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E))); + } + finally + { + if (ptr4 != null) + { + _003CModule_003E.DBPropertySubmitStruct_002E__vecDelDtor(ptr4, 3u); + } + if (ptr8 != null) + { + _003CModule_003E.CComPropVariant_002E__vecDelDtor(ptr8, 3u); + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIQueryPropertyBag_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002ERelease(&cComPtrNtv_003CIQueryPropertyBag_003E); + } + + public unsafe int GetKnownFolders(out string[] music, out string[] videos, out string[] pictures, out string[] podcasts, out string[] applications, out string ripFolder, out string videoMediaFolder, out string photoMediaFolder, out string podcastMediaFolder, out string applicationsFolder) + { + //IL_002c: Expected I, but got I8 + //IL_002f: Expected I, but got I8 + //IL_0032: Expected I, but got I8 + //IL_0035: Expected I, but got I8 + //IL_0038: Expected I, but got I8 + DynamicArray_003Cunsigned_0020short_0020_002A_003E obj; + _003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bctor_007D(&obj); + int result; + try + { + DynamicArray_003Cunsigned_0020short_0020_002A_003E obj2; + _003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bctor_007D(&obj2); + try + { + DynamicArray_003Cunsigned_0020short_0020_002A_003E obj3; + _003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bctor_007D(&obj3); + try + { + DynamicArray_003Cunsigned_0020short_0020_002A_003E obj4; + _003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bctor_007D(&obj4); + try + { + DynamicArray_003Cunsigned_0020short_0020_002A_003E obj5; + _003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bctor_007D(&obj5); + try + { + ushort* ptr = null; + ushort* ptr2 = null; + ushort* ptr3 = null; + ushort* ptr4 = null; + ushort* ptr5 = null; + result = _003CModule_003E.ZuneLibraryExports_002EGetKnownFolders(&obj, &obj2, &obj3, &obj4, &obj5, &ptr, &ptr2, &ptr3, &ptr4, &ptr5); + music = _003CModule_003E.BstrArrayToStringArray(&obj); + videos = _003CModule_003E.BstrArrayToStringArray(&obj2); + pictures = _003CModule_003E.BstrArrayToStringArray(&obj3); + podcasts = _003CModule_003E.BstrArrayToStringArray(&obj4); + applications = _003CModule_003E.BstrArrayToStringArray(&obj5); + ripFolder = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + videoMediaFolder = new string((char*)ptr2); + _003CModule_003E.SysFreeString(ptr2); + photoMediaFolder = new string((char*)ptr3); + _003CModule_003E.SysFreeString(ptr3); + podcastMediaFolder = new string((char*)ptr4); + _003CModule_003E.SysFreeString(ptr4); + applicationsFolder = new string((char*)ptr5); + _003CModule_003E.SysFreeString(ptr5); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bdtor_007D), &obj5); + throw; + } + _003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bdtor_007D(&obj5); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bdtor_007D), &obj4); + throw; + } + _003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bdtor_007D(&obj4); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bdtor_007D), &obj3); + throw; + } + _003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bdtor_007D(&obj3); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bdtor_007D), &obj2); + throw; + } + _003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bdtor_007D(&obj2); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bdtor_007D), &obj); + throw; + } + _003CModule_003E.DynamicArray_003Cunsigned_0020short_0020_002A_003E_002E_007Bdtor_007D(&obj); + return result; + } + + public unsafe int GetLocalizedPathOfFolder([In] string physicalPath, [In][MarshalAs(UnmanagedType.U1)] bool fNetworkPathsAllowed, out string localizedPath) + { + //IL_0003: Expected I, but got I8 + ushort* ptr = null; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(physicalPath))) + { + int num = _003CModule_003E.ZuneLibraryExports_002EGetLocalizedPathOfFolder(ptr2, fNetworkPathsAllowed, &ptr); + if (num >= 0) + { + localizedPath = new string((char*)ptr); + _003CModule_003E.SysFreeString(ptr); + } + return num; + } + } + + public unsafe static int CompareWithoutArticles(string prefix, string @string) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(prefix))) + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(@string))) + { + int num = ((_003CModule_003E.ZuneLibraryExports_002ECompareWithoutArticles(ptr, ptr2, &num) != 0) ? (-1) : num); + return num; + } + } + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe static bool DoesFileExist(string path) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(path))) + { + int num = 0; + int num2 = ((_003CModule_003E.ZuneLibraryExports_002EDoesFileExist(ptr, &num) >= 0 && num != 0) ? 1 : 0); + return (byte)num2 != 0; + } + } + + private unsafe ZuneQueryList ExecuteQueryHelper(EQueryType eQueryType, EQueryPropertyBagProp idPropType, IList ids, string sort) + { + //IL_000a: Expected I, but got I8 + //IL_003e: Expected I, but got I8 + //IL_003e: Expected I, but got I8 + //IL_0074: Expected I, but got I8 + //IL_0074: Expected I, but got I8 + //IL_008e: Expected I, but got I8 + //IL_008e: Expected I, but got I8 + //IL_00a7: Expected I, but got I8 + //IL_00a7: Expected I, but got I8 + //IL_00c2: Expected I, but got I8 + //IL_00c2: Expected I, but got I8 + //IL_00e0: Expected I, but got I8 + //IL_00e0: Expected I, but got I8 + //IL_00f4: Expected I, but got I8 + //IL_00f4: Expected I, but got I8 + //IL_0108: Expected I, but got I8 + //IL_0108: Expected I, but got I8 + //IL_0135: Expected I, but got I8 + //IL_0135: Expected I, but got I8 + //IL_0146: Expected I, but got I8 + //IL_014a: Expected I, but got I8 + //IL_016d: Expected I, but got I8 + //IL_017a: Expected I, but got I8 + //IL_0192: Expected I, but got I8 + //IL_0192: Expected I, but got I8 + //IL_01a0: Expected I, but got I8 + //IL_01a0: Expected I, but got I8 + //IL_01ca: Expected I, but got I8 + bool[] ascendings = null; + string[] sorts = null; + IDatabaseQueryResults* ptr = null; + QueryPropertyBag queryPropertyBag = new QueryPropertyBag(); + CComPtrNtv_003CIQueryPropertyBag_003E cComPtrNtv_003CIQueryPropertyBag_003E; + _003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002E_007Bctor_007D(&cComPtrNtv_003CIQueryPropertyBag_003E, queryPropertyBag.GetIQueryPropertyBag()); + ZuneQueryList result; + try + { + if (ids.Count == 1) + { + long num = *(long*)(&cComPtrNtv_003CIQueryPropertyBag_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E)) + 56)))((nint)num, (EQueryPropertyBagProp)15, 0); + int num2 = (int)ids[0]; + switch (eQueryType) + { + default: + { + long num5 = *(long*)(&cComPtrNtv_003CIQueryPropertyBag_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E)) + 56)))((nint)num5, (EQueryPropertyBagProp)6, num2); + break; + } + case EQueryType.eQueryTypeTracksByGenreId: + case EQueryType.eQueryTypeAlbumsByGenreId: + { + long num4 = *(long*)(&cComPtrNtv_003CIQueryPropertyBag_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E)) + 56)))((nint)num4, (EQueryPropertyBagProp)11, num2); + break; + } + case EQueryType.eQueryTypeAlbumsForAlbumArtistId: + case EQueryType.eQueryTypeTracksForAlbumArtistId: + { + long num3 = *(long*)(&cComPtrNtv_003CIQueryPropertyBag_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E)) + 56)))((nint)num3, (EQueryPropertyBagProp)3, num2); + break; + } + } + } + else + { + long num6 = *(long*)(&cComPtrNtv_003CIQueryPropertyBag_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E)) + 56)))((nint)num6, (EQueryPropertyBagProp)15, 150994944); + long num7 = *(long*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E)) + 24; + long num8 = *(long*)(&cComPtrNtv_003CIQueryPropertyBag_003E); + IDList* intPtr = queryPropertyBag.PackIDList(ids); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num7))((nint)num8, idPropType, intPtr); + long num9 = *(long*)(&cComPtrNtv_003CIQueryPropertyBag_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E)) + 56)))((nint)num9, (EQueryPropertyBagProp)3, -1); + long num10 = *(long*)(&cComPtrNtv_003CIQueryPropertyBag_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E)) + 56)))((nint)num10, (EQueryPropertyBagProp)6, -1); + } + if (LibraryDataProvider.GetSortAttributes(sort, out sorts, out ascendings)) + { + IMultiSortAttributes* ptr2 = queryPropertyBag.PackMultiSortAttributes(sorts, ascendings); + long num11 = *(long*)(&cComPtrNtv_003CIQueryPropertyBag_003E); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E)) + 32)))((nint)num11, (EQueryPropertyBagProp)23, ptr2); + if (ptr2 != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 16)))((nint)ptr2); + } + } + IService* ptr3 = null; + if (_003CModule_003E.GetSingleton((_GUID)_003CModule_003E._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&ptr3)) >= 0) + { + IService* intPtr2 = ptr3; + _GUID gUID; + int num12; + int num13 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr3 + 384)))((nint)intPtr2, &gUID, &num12); + IService* intPtr3 = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr3 + 16)))((nint)intPtr3); + if (num13 >= 0) + { + long num14 = *(long*)(&cComPtrNtv_003CIQueryPropertyBag_003E); + int num15 = num12; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E)) + 56)))((nint)num14, (EQueryPropertyBagProp)0, num15); + } + } + int num16 = _003CModule_003E.ZuneLibraryExports_002EQueryDatabase(eQueryType, (IQueryPropertyBag*)(*(ulong*)(&cComPtrNtv_003CIQueryPropertyBag_003E)), &ptr, null); + ((IDisposable)queryPropertyBag)?.Dispose(); + if (num16 >= 0) + { + result = new ZuneQueryList(ptr, "ExecuteQueryHelper"); + IDatabaseQueryResults* intPtr4 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr4 + 16)))((nint)intPtr4); + goto IL_01db; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIQueryPropertyBag_003E); + throw; + } + ZuneQueryList result2; + try + { + result2 = null; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002E_007Bdtor_007D), &cComPtrNtv_003CIQueryPropertyBag_003E); + throw; + } + _003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002ERelease(&cComPtrNtv_003CIQueryPropertyBag_003E); + return result2; + IL_01db: + _003CModule_003E.CComPtrNtv_003CIQueryPropertyBag_003E_002ERelease(&cComPtrNtv_003CIQueryPropertyBag_003E); + return result; + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _007EZuneLibrary(); + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryCDDevice.cs b/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryCDDevice.cs new file mode 100644 index 0000000..5529c21 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryCDDevice.cs @@ -0,0 +1,832 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; +using MicrosoftZuneInterop; +using ZuneUI; + +namespace MicrosoftZuneLibrary +{ + public class ZuneLibraryCDDevice : IDisposable + { + private unsafe IWMPCDDevice* m_pDevice; + + private unsafe IBurnPublisher* m_pBurnPublisher; + + private int m_hrBurnPublisherCreate; + + private int m_fIsBurner; + + private bool _disposed; + + private uint m_dwBurnAdviseCookie; + + private OnSessionProgressHandler m_SessionProgressHandler; + + private OnItemProgressHandler m_ItemProgressHandler; + + private OnItemErrorHandler m_ItemErrorHandler; + + private OnBurnStateChangeHandler m_BurnStateChangeHandler; + + private OnSetDriveLockedForBurningHandler m_SetDriveLockedForBurningHandler; + + private OnQueryCancelHandler m_QueryCancelHandler; + + private unsafe IBurnPublisher* BurnPublisher + { + get + { + //IL_001a: Expected I, but got I8 + //IL_0039: Expected I, but got I8 + if (m_pBurnPublisher == null && m_pDevice != null) + { + fixed (int* ptr = &m_fIsBurner) + { + try + { + IBurnPublisher* pBurnPublisher = null; + long num = *(long*)m_pDevice + 192; + IWMPCDDevice* pDevice = m_pDevice; + if ((m_hrBurnPublisherCreate = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pDevice, ptr, &pBurnPublisher)) >= 0) + { + m_pBurnPublisher = pBurnPublisher; + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return m_pBurnPublisher; + } + } + + public unsafe static bool IsImapiv2Installed + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001e: Expected I, but got I8 + //IL_0037: Expected I, but got I8 + bool flag = true; + if (!_003CModule_003E.IsLonghornOrBetter()) + { + IUnknown* ptr; + flag = (byte)((_003CModule_003E.CoCreateInstance((_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.CLSID_MsftDiscMaster2), null, 23u, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._GUID_27354130_7f64_5b0f_8f00_5d77afbe261e), (void**)(&ptr)) >= 0) ? 1u : 0u) != 0; + if (flag) + { + IUnknown* intPtr = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr); + } + } + return flag; + } + } + + public unsafe EBurnState CurrentBurnState + { + get + { + //IL_001b: Expected I, but got I8 + EBurnState eBurnState = EBurnState.ebsUnknown; + IBurnPublisher* pBurnPublisher = m_pBurnPublisher; + if (pBurnPublisher != null) + { + __MIDL___MIDL_itf_wmpcd_0000_0014_0001 _MIDL___MIDL_itf_wmpcd_0000_0014_; + eBurnState = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pBurnPublisher + 120)))((nint)pBurnPublisher, &_MIDL___MIDL_itf_wmpcd_0000_0014_) >= 0) ? ((EBurnState)_MIDL___MIDL_itf_wmpcd_0000_0014_) : eBurnState); + } + return eBurnState; + } + } + + public unsafe bool IsBurner + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_0026: Expected I, but got I8 + bool flag = false; + IWMPCDDevice* pDevice = m_pDevice; + if (pDevice != null) + { + if (m_pBurnPublisher == null) + { + int num; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDevice + 200)))((nint)pDevice, &num) >= 0 && num != 0) + { + flag = true; + } + } + else + { + flag = m_fIsBurner != 0 || flag; + } + } + return flag; + } + } + + public unsafe long SpaceAvailable + { + get + { + //IL_001c: Expected I, but got I8 + long num = 0L; + IBurnPublisher* burnPublisher = BurnPublisher; + if (burnPublisher != null) + { + ulong num2; + num = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)burnPublisher + 24)))((nint)burnPublisher, &num2) >= 0) ? ((long)num2) : num); + } + return num; + } + } + + public unsafe uint TimeAvailable + { + get + { + //IL_001b: Expected I, but got I8 + uint result = 0u; + IBurnPublisher* burnPublisher = BurnPublisher; + if (burnPublisher != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)burnPublisher + 40)))((nint)burnPublisher, &result); + } + return result; + } + } + + public unsafe bool IsDoorOpen + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001b: Expected I, but got I8 + bool result = false; + IWMPCDDevice* pDevice = m_pDevice; + int num; + if (pDevice != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDevice + 88)))((nint)pDevice, &num) >= 0) + { + bool flag = ((num != 0) ? true : false); + result = flag; + } + return result; + } + } + + public unsafe bool IsDVD + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001b: Expected I, but got I8 + bool result = false; + IBurnPublisher* burnPublisher = BurnPublisher; + uint num; + if (burnPublisher != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)burnPublisher + 72)))((nint)burnPublisher, &num) >= 0) + { + bool flag = (byte)((num >> 5) & (true ? 1u : 0u)) != 0; + result = flag; + } + return result; + } + } + + public unsafe bool IsCDRW + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001b: Expected I, but got I8 + bool result = false; + IBurnPublisher* burnPublisher = BurnPublisher; + uint num; + if (burnPublisher != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)burnPublisher + 72)))((nint)burnPublisher, &num) >= 0) + { + bool flag = (byte)((num >> 4) & (true ? 1u : 0u)) != 0; + result = flag; + } + return result; + } + } + + public unsafe bool IsWriteable + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001b: Expected I, but got I8 + bool result = false; + IBurnPublisher* burnPublisher = BurnPublisher; + uint num; + if (burnPublisher != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)burnPublisher + 72)))((nint)burnPublisher, &num) >= 0) + { + bool flag = (byte)((num >> 3) & (true ? 1u : 0u)) != 0; + result = flag; + } + return result; + } + } + + public unsafe bool IsBlank + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001b: Expected I, but got I8 + bool result = false; + IBurnPublisher* burnPublisher = BurnPublisher; + uint num; + if (burnPublisher != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)burnPublisher + 72)))((nint)burnPublisher, &num) >= 0) + { + bool flag = (byte)((num >> 2) & (true ? 1u : 0u)) != 0; + result = flag; + } + return result; + } + } + + public unsafe bool IsDriveReady + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001e: Expected I, but got I8 + bool result = false; + IWMPCDDevice* pDevice = m_pDevice; + int num; + if (pDevice != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDevice + 184)))((nint)pDevice, &num) >= 0) + { + bool flag = ((num != 0) ? true : false); + result = flag; + } + return result; + } + } + + public unsafe bool IsMediaLoaded + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_001b: Expected I, but got I8 + bool result = false; + IWMPCDDevice* pDevice = m_pDevice; + int num; + if (pDevice != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDevice + 80)))((nint)pDevice, &num) >= 0) + { + bool flag = ((num != 0) ? true : false); + result = flag; + } + return result; + } + } + + public unsafe char DrivePath + { + [return: MarshalAs(UnmanagedType.U2)] + get + { + //IL_0017: Expected I, but got I8 + IWMPCDDevice* pDevice = m_pDevice; + if (pDevice != null) + { + return (char)((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDevice + 32)))((nint)pDevice); + } + return '\0'; + } + } + + public unsafe string TOC + { + get + { + //IL_0028: Expected I, but got I8 + //IL_002e: Expected I, but got I8 + //IL_003d: Expected I, but got I8 + //IL_005a: Expected I, but got I8 + string result = null; + if (m_pDevice != null && IsMediaLoaded) + { + IWMPCDDevice* pDevice = m_pDevice; + IWMPCDMediaInfo* ptr; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDevice + 112)))((nint)pDevice, &ptr) >= 0) + { + ushort* ptr2 = null; + IWMPCDMediaInfo* intPtr = ptr; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 32)))((nint)intPtr, &ptr2) >= 0) + { + result = new string((char*)ptr2); + _003CModule_003E.SysFreeString(ptr2); + } + IWMPCDMediaInfo* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + } + return result; + } + } + + [SpecialName] + public unsafe virtual event OnQueryCancelHandler QueryCancelHandler + { + add + { + m_QueryCancelHandler = (OnQueryCancelHandler)Delegate.Combine(m_QueryCancelHandler, value); + } + remove + { + m_QueryCancelHandler = (OnQueryCancelHandler)Delegate.Remove(m_QueryCancelHandler, value); + } + } + + [SpecialName] + public virtual event OnSetDriveLockedForBurningHandler SetDriveLockedForBurningHandler + { + add + { + m_SetDriveLockedForBurningHandler = (OnSetDriveLockedForBurningHandler)Delegate.Combine(m_SetDriveLockedForBurningHandler, value); + } + remove + { + m_SetDriveLockedForBurningHandler = (OnSetDriveLockedForBurningHandler)Delegate.Remove(m_SetDriveLockedForBurningHandler, value); + } + } + + [SpecialName] + public virtual event OnBurnStateChangeHandler BurnStateChangeHandler + { + add + { + m_BurnStateChangeHandler = (OnBurnStateChangeHandler)Delegate.Combine(m_BurnStateChangeHandler, value); + } + remove + { + m_BurnStateChangeHandler = (OnBurnStateChangeHandler)Delegate.Remove(m_BurnStateChangeHandler, value); + } + } + + [SpecialName] + public virtual event OnItemErrorHandler ItemErrorHandler + { + add + { + m_ItemErrorHandler = (OnItemErrorHandler)Delegate.Combine(m_ItemErrorHandler, value); + } + remove + { + m_ItemErrorHandler = (OnItemErrorHandler)Delegate.Remove(m_ItemErrorHandler, value); + } + } + + [SpecialName] + public virtual event OnItemProgressHandler ItemProgressHandler + { + add + { + m_ItemProgressHandler = (OnItemProgressHandler)Delegate.Combine(m_ItemProgressHandler, value); + } + remove + { + m_ItemProgressHandler = (OnItemProgressHandler)Delegate.Remove(m_ItemProgressHandler, value); + } + } + + [SpecialName] + public virtual event OnSessionProgressHandler SessionProgressHandler + { + add + { + m_SessionProgressHandler = (OnSessionProgressHandler)Delegate.Combine(m_SessionProgressHandler, value); + } + remove + { + m_SessionProgressHandler = (OnSessionProgressHandler)Delegate.Remove(m_SessionProgressHandler, value); + } + } + + public unsafe ZuneLibraryCDDevice(IWMPCDDevice* pDevice) + { + //IL_000f: Expected I, but got I8 + m_pDevice = pDevice; + m_pBurnPublisher = null; + m_fIsBurner = 0; + base._002Ector(); + } + + private void _007EZuneLibraryCDDevice() + { + _0021ZuneLibraryCDDevice(); + } + + private unsafe void _0021ZuneLibraryCDDevice() + { + //IL_001f: Expected I, but got I8 + //IL_0028: Expected I, but got I8 + //IL_003f: Expected I, but got I8 + //IL_0048: Expected I, but got I8 + if (!_disposed) + { + IWMPCDDevice* pDevice = m_pDevice; + if (pDevice != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDevice + 16)))((nint)pDevice); + m_pDevice = null; + } + IBurnPublisher* pBurnPublisher = m_pBurnPublisher; + if (pBurnPublisher != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pBurnPublisher + 16)))((nint)pBurnPublisher); + m_pBurnPublisher = null; + } + _disposed = true; + } + } + + public unsafe int GetTrackUrl(uint dwTrackNum, StringBuilder strBuilder) + { + //IL_0033: Expected I, but got I8 + //IL_003b: Expected I, but got I8 + //IL_004b: Expected I, but got I8 + //IL_0070: Expected I, but got I8 + int num = -2147418113; + strBuilder.Length = 0; + if (m_pDevice != null && IsMediaLoaded) + { + IWMPCDDevice* pDevice = m_pDevice; + IWMPCDMediaInfo* ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDevice + 112)))((nint)pDevice, &ptr); + if (num >= 0) + { + ushort* ptr2 = null; + IWMPCDMediaInfo* intPtr = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr + 56)))((nint)intPtr, dwTrackNum, &ptr2); + if (num >= 0) + { + strBuilder.Append(new string((char*)ptr2)); + _003CModule_003E.SysFreeString(ptr2); + } + IWMPCDMediaInfo* intPtr2 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + } + return num; + } + + public unsafe HRESULT SetBurnPlaylist(int iPlaylistId) + { + //IL_0037: Expected I, but got I8 + //IL_0048: Expected I, but got I8 + //IL_0059: Expected I, but got I8 + //IL_006e: Expected I, but got I8 + //IL_0072: Expected I, but got I8 + //IL_0075: Expected I, but got I8 + //IL_0081: Expected I, but got I8 + //IL_00a7: Expected I, but got I8 + //IL_00cb: Expected I4, but got I8 + //IL_00d3: Expected I4, but got I8 + //IL_00e9: Expected I, but got I8 + //IL_0106: Expected I, but got I8 + //IL_0172: Expected I, but got I8 + //IL_0185: Expected I, but got I8 + //IL_0189: Expected I, but got I8 + //IL_019b: Expected I, but got I8 + //IL_019f: Expected I, but got I8 + IBurnPublisher* burnPublisher = BurnPublisher; + if (burnPublisher == null) + { + return m_hrBurnPublisherCreate; + } + QueryPropertyBag queryPropertyBag = new QueryPropertyBag(); + IQueryPropertyBag* iQueryPropertyBag = queryPropertyBag.GetIQueryPropertyBag(); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)15, 0); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)10, iPlaylistId); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)22, 1); + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)iQueryPropertyBag + 56)))((nint)iQueryPropertyBag, (EQueryPropertyBagProp)21, 437); + IPlaylist* ptr = null; + IDatabaseQueryResults* ptr2 = null; + int num = _003CModule_003E.ZuneLibraryExports_002EQueryDatabase(EQueryType.eQueryTypePlaylistContentByPlaylistId, iQueryPropertyBag, &ptr2, null); + if (num >= 0) + { + num = _003CModule_003E.ZuneLibraryExports_002ECreateEmptyPlaylist(&ptr); + } + uint num2 = 0u; + if (num >= 0) + { + IDatabaseQueryResults* intPtr = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 88)))((nint)intPtr, &num2); + if (num >= 0) + { + if (num2 != 0) + { + uint num3 = 0u; + while (num3 < num2) + { + CComPropVariant cComPropVariant; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + try + { + CComPropVariant cComPropVariant2; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant2, 0, 24); + try + { + IDatabaseQueryResults* intPtr2 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 48)))((nint)intPtr2, num3, 233u, (tagPROPVARIANT*)(&cComPropVariant)); + if (num >= 0) + { + IDatabaseQueryResults* intPtr3 = ptr2; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr2 + 48)))((nint)intPtr3, num3, 234u, (tagPROPVARIANT*)(&cComPropVariant2)); + if (num >= 0) + { + num = _003CModule_003E.ZuneLibraryExports_002EAddItemToPlaylist(System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant, 8)), System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref cComPropVariant2, 8)), ptr); + } + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant2); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant2); + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + num3++; + if (num < 0) + { + break; + } + } + } + if (num >= 0) + { + if (ptr == null) + { + goto IL_0189; + } + IPlaylist* intPtr4 = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)burnPublisher + 88)))((nint)burnPublisher, intPtr4); + } + } + } + if (0L != (nint)ptr) + { + IPlaylist* intPtr5 = ptr; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr5 + 16)))((nint)intPtr5); + ptr = null; + } + goto IL_0189; + IL_0189: + if (0L != (nint)ptr2) + { + IDatabaseQueryResults* intPtr6 = ptr2; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr6 + 16)))((nint)intPtr6); + ptr2 = null; + } + ((IDisposable)queryPropertyBag)?.Dispose(); + return num; + } + + public unsafe HRESULT StartBurn() + { + //IL_0032: Expected I, but got I8 + //IL_0047: Expected I, but got I8 + IBurnPublisher* burnPublisher = BurnPublisher; + if (burnPublisher == null) + { + return m_hrBurnPublisherCreate; + } + int num = AdviseForBurnPublisherEvents(); + if (num >= 0) + { + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)burnPublisher + 144)))((nint)burnPublisher, 1); + if (num >= 0) + { + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)burnPublisher + 208)))((nint)burnPublisher); + if (num >= 0) + { + goto IL_0052; + } + } + } + UnadviseForBurnPublisherEvents(); + goto IL_0052; + IL_0052: + return num; + } + + public unsafe int StopBurn() + { + //IL_0021: Expected I, but got I8 + IBurnPublisher* burnPublisher = BurnPublisher; + if (burnPublisher == null) + { + return m_hrBurnPublisherCreate; + } + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)burnPublisher + 216)))((nint)burnPublisher); + } + + public unsafe HRESULT EraseDisc() + { + //IL_0031: Expected I, but got I8 + IBurnPublisher* burnPublisher = BurnPublisher; + if (burnPublisher == null) + { + return m_hrBurnPublisherCreate; + } + int num = AdviseForBurnPublisherEvents(); + if (num >= 0) + { + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)burnPublisher + 136)))((nint)burnPublisher); + if (num >= 0) + { + goto IL_003c; + } + } + UnadviseForBurnPublisherEvents(); + goto IL_003c; + IL_003c: + return new HRESULT(num); + } + + public unsafe int SetActive([MarshalAs(UnmanagedType.U1)] bool fActive) + { + //IL_002b: Expected I, but got I8 + IBurnPublisher* burnPublisher = BurnPublisher; + if (burnPublisher == null) + { + return m_hrBurnPublisherCreate; + } + int num = (fActive ? 1 : 0); + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)burnPublisher + 144)))((nint)burnPublisher, num); + } + + public unsafe int Eject() + { + //IL_0020: Expected I, but got I8 + int result = -2147418113; + IWMPCDDevice* pDevice = m_pDevice; + if (pDevice != null) + { + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDevice + 168)))((nint)pDevice); + } + return result; + } + + public unsafe HRESULT SetVolumeLabelW(string strVolumeLabel) + { + //IL_0053: Expected I, but got I8 + IBurnPublisher* burnPublisher = BurnPublisher; + if (burnPublisher == null) + { + return m_hrBurnPublisherCreate; + } + if (string.IsNullOrEmpty(strVolumeLabel)) + { + return -2147024809; + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(strVolumeLabel))) + { + ushort* ptr2 = _003CModule_003E.SysAllocString(ptr); + if (ptr2 == null) + { + return -2147024882; + } + HRESULT result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)burnPublisher + 64)))((nint)burnPublisher, ptr2); + _003CModule_003E.SysFreeString(ptr2); + return result; + } + } + + public unsafe int Close() + { + //IL_0020: Expected I, but got I8 + int result = -2147418113; + IWMPCDDevice* pDevice = m_pDevice; + if (pDevice != null) + { + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDevice + 176)))((nint)pDevice); + } + return result; + } + + internal void ItemProgress(int lMediaIndex, EBurnProgressStatus status, int nPercent) + { + m_ItemProgressHandler?.Invoke(lMediaIndex, status, nPercent); + } + + internal void ItemError(int lMediaIndex, int hrError) + { + m_ItemErrorHandler?.Invoke(lMediaIndex, hrError); + } + + internal void SessionProgress(int lSessonSecondsRemaining, int lTotalSessionSeconds) + { + m_SessionProgressHandler?.Invoke(lSessonSecondsRemaining, lTotalSessionSeconds); + } + + internal void BurnStateChange(EBurnState burnState) + { + m_BurnStateChangeHandler?.Invoke(burnState); + if (burnState == EBurnState.ebsStopped) + { + UnadviseForBurnPublisherEvents(); + SetActive(fActive: false); + } + } + + internal void SetDriveLockedForBurning([MarshalAs(UnmanagedType.U1)] bool fLocked) + { + m_SetDriveLockedForBurningHandler?.Invoke(fLocked); + } + + internal unsafe void QueryCancel(bool* pfCancel) + { + m_QueryCancelHandler?.Invoke(pfCancel); + } + + private unsafe int AdviseForBurnPublisherEvents() + { + //IL_0019: Expected I, but got I8 + //IL_0046: Expected I, but got I8 + CBurnPublisherCallback* ptr = (CBurnPublisherCallback*)_003CModule_003E.@new(24uL); + CBurnPublisherCallback* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.MicrosoftZuneLibrary_002ECBurnPublisherCallback_002E_007Bctor_007D(ptr, this)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + int result; + if (ptr2 == null) + { + result = -2147024882; + } + else + { + IBurnPublisher* burnPublisher = BurnPublisher; + uint dwBurnAdviseCookie; + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)burnPublisher + 192)))((nint)burnPublisher, (IBurnPublisherCallback*)ptr2, &dwBurnAdviseCookie); + m_dwBurnAdviseCookie = dwBurnAdviseCookie; + } + return result; + } + + private unsafe void UnadviseForBurnPublisherEvents() + { + //IL_0025: Expected I, but got I8 + if (m_dwBurnAdviseCookie != 0) + { + IBurnPublisher* burnPublisher = BurnPublisher; + uint dwBurnAdviseCookie = m_dwBurnAdviseCookie; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)burnPublisher + 200)))((nint)burnPublisher, dwBurnAdviseCookie); + m_dwBurnAdviseCookie = 0u; + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021ZuneLibraryCDDevice(); + return; + } + try + { + _0021ZuneLibraryCDDevice(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~ZuneLibraryCDDevice() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryCDDeviceList.cs b/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryCDDeviceList.cs new file mode 100644 index 0000000..80d4483 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryCDDeviceList.cs @@ -0,0 +1,215 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; + +namespace MicrosoftZuneLibrary +{ + public class ZuneLibraryCDDeviceList : IDisposable + { + private unsafe IWMPCDDeviceList* m_pDeviceList; + + private uint m_dwAdviseCookie; + + private bool m_fAdvised; + + private bool m_disposed; + + private OnMediaChangedHandler m_MediaChangedHandler; + + private int m_RefCount; + + public unsafe int Count + { + get + { + //IL_001b: Expected I, but got I8 + uint result = 0u; + IWMPCDDeviceList* pDeviceList = m_pDeviceList; + if (pDeviceList != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDeviceList + 24)))((nint)pDeviceList, &result); + } + return (int)result; + } + } + + [SpecialName] + public virtual event OnMediaChangedHandler MediaChangedHandler + { + add + { + m_MediaChangedHandler = (OnMediaChangedHandler)Delegate.Combine(m_MediaChangedHandler, value); + } + remove + { + m_MediaChangedHandler = (OnMediaChangedHandler)Delegate.Remove(m_MediaChangedHandler, value); + } + } + + public unsafe ZuneLibraryCDDeviceList(IWMPCDDeviceList* pDeviceList) + { + //IL_003e: Expected I, but got I8 + //IL_0058: Expected I, but got I8 + //IL_0074: Expected I, but got I8 + //IL_009b: Expected I, but got I8 + //IL_00b2: Expected I, but got I8 + m_pDeviceList = pDeviceList; + m_fAdvised = false; + m_disposed = false; + m_RefCount = 0; + base._002Ector(); + IWMPCDDeviceList* pDeviceList2 = m_pDeviceList; + if (pDeviceList2 == null) + { + return; + } + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDeviceList2 + 8)))((nint)pDeviceList2); + CDDeviceCallback* ptr = (CDDeviceCallback*)_003CModule_003E.@new(24uL); + CDDeviceCallback* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.MicrosoftZuneLibrary_002ECDDeviceCallback_002E_007Bctor_007D(ptr, this)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + IZuneCDDeviceCallback* ptr3; + if (ptr2 == null || ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(ulong*)ptr2)))((nint)ptr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.IID_IUnknown), (void**)(&ptr3)) < 0) + { + return; + } + fixed (uint* ptr4 = &m_dwAdviseCookie) + { + try + { + long num = *(long*)m_pDeviceList + 48; + IWMPCDDeviceList* pDeviceList3 = m_pDeviceList; + IZuneCDDeviceCallback* intPtr = ptr3; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pDeviceList3, intPtr, ptr4) >= 0) + { + m_fAdvised = true; + } + IZuneCDDeviceCallback* intPtr2 = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + + private void _007EZuneLibraryCDDeviceList() + { + m_MediaChangedHandler = null; + _0021ZuneLibraryCDDeviceList(); + } + + private unsafe void _0021ZuneLibraryCDDeviceList() + { + //IL_002d: Expected I, but got I8 + //IL_0049: Expected I, but got I8 + //IL_0052: Expected I, but got I8 + if (m_disposed) + { + return; + } + IWMPCDDeviceList* pDeviceList = m_pDeviceList; + if (pDeviceList != null) + { + if (m_fAdvised) + { + IWMPCDDeviceList* intPtr = pDeviceList; + uint dwAdviseCookie = m_dwAdviseCookie; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDeviceList + 56)))((nint)intPtr, dwAdviseCookie); + m_fAdvised = false; + } + pDeviceList = m_pDeviceList; + IWMPCDDeviceList* intPtr2 = pDeviceList; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + m_pDeviceList = null; + } + m_disposed = true; + } + + public uint AddRef() + { + return (uint)Interlocked.Increment(ref m_RefCount); + } + + public uint Release() + { + int num = Interlocked.Decrement(ref m_RefCount); + if (0 == num) + { + _0021ZuneLibraryCDDeviceList(); + } + return (uint)num; + } + + public unsafe ZuneLibraryCDDevice GetItem(int idx) + { + //IL_0018: Expected I, but got I8 + //IL_002f: Expected I, but got I8 + if (m_pDeviceList == null) + { + return null; + } + if (idx >= Count) + { + return null; + } + IWMPCDDevice* pDevice = null; + IWMPCDDeviceList* pDeviceList = m_pDeviceList; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pDeviceList + 32)))((nint)pDeviceList, (uint)idx, &pDevice) < 0) + { + return null; + } + return new ZuneLibraryCDDevice(pDevice); + } + + internal void OnMediaChanged(ushort driveLetter, int fMediaPresent) + { + OnMediaChangedHandler mediaChangedHandler = m_MediaChangedHandler; + if (mediaChangedHandler != null) + { + bool fMediaArrived = ((fMediaPresent != 0) ? true : false); + mediaChangedHandler((char)driveLetter, fMediaArrived); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _007EZuneLibraryCDDeviceList(); + return; + } + try + { + _0021ZuneLibraryCDDeviceList(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~ZuneLibraryCDDeviceList() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryCDRecorder.cs b/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryCDRecorder.cs new file mode 100644 index 0000000..8153c19 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryCDRecorder.cs @@ -0,0 +1,498 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading; +using Microsoft.Iris; + +namespace MicrosoftZuneLibrary +{ + public class ZuneLibraryCDRecorder : IDisposable + { + private int m_RefCount = 0; + + private bool m_disposed = false; + + private bool m_fAdvised = false; + + private uint m_dwAdviseCookie; + + private unsafe IRecordManager* m_pRecordManager; + + internal OnRecordStartHandler m_RecordStartHandler; + + internal OnRecordProgressHandler m_RecordProgressHandler; + + internal OnRecordStopHandler m_RecordStopHandler; + + internal OnRecordPauseHandler m_RecordPauseHandler; + + internal OnRecordResumeHandler m_RecordResumeHandler; + + [SpecialName] + public virtual event OnRecordResumeHandler RecordResumeHandler + { + add + { + m_RecordResumeHandler = (OnRecordResumeHandler)Delegate.Combine(m_RecordResumeHandler, value); + } + remove + { + m_RecordResumeHandler = (OnRecordResumeHandler)Delegate.Remove(m_RecordResumeHandler, value); + } + } + + [SpecialName] + public virtual event OnRecordPauseHandler RecordPauseHandler + { + add + { + m_RecordPauseHandler = (OnRecordPauseHandler)Delegate.Combine(m_RecordPauseHandler, value); + } + remove + { + m_RecordPauseHandler = (OnRecordPauseHandler)Delegate.Remove(m_RecordPauseHandler, value); + } + } + + [SpecialName] + public virtual event OnRecordStopHandler RecordStopHandler + { + add + { + m_RecordStopHandler = (OnRecordStopHandler)Delegate.Combine(m_RecordStopHandler, value); + } + remove + { + m_RecordStopHandler = (OnRecordStopHandler)Delegate.Remove(m_RecordStopHandler, value); + } + } + + [SpecialName] + public virtual event OnRecordProgressHandler RecordProgressHandler + { + add + { + m_RecordProgressHandler = (OnRecordProgressHandler)Delegate.Combine(m_RecordProgressHandler, value); + } + remove + { + m_RecordProgressHandler = (OnRecordProgressHandler)Delegate.Remove(m_RecordProgressHandler, value); + } + } + + [SpecialName] + public virtual event OnRecordStartHandler RecordStartHandler + { + add + { + m_RecordStartHandler = (OnRecordStartHandler)Delegate.Combine(m_RecordStartHandler, value); + } + remove + { + m_RecordStartHandler = (OnRecordStartHandler)Delegate.Remove(m_RecordStartHandler, value); + } + } + + internal unsafe ZuneLibraryCDRecorder(IRecordManager* pRecordManager) + { + //IL_003e: Expected I, but got I8 + //IL_0058: Expected I, but got I8 + //IL_0074: Expected I, but got I8 + //IL_009b: Expected I, but got I8 + //IL_00b2: Expected I, but got I8 + m_pRecordManager = pRecordManager; + base._002Ector(); + IRecordManager* pRecordManager2 = m_pRecordManager; + if (pRecordManager2 == null) + { + return; + } + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pRecordManager2 + 8)))((nint)pRecordManager2); + RecordManagerCallback* ptr = (RecordManagerCallback*)_003CModule_003E.@new(24uL); + RecordManagerCallback* ptr2; + try + { + ptr2 = ((ptr == null) ? null : _003CModule_003E.MicrosoftZuneLibrary_002ERecordManagerCallback_002E_007Bctor_007D(ptr, this)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + IRecordManagerCallback* ptr3; + if (ptr2 == null || ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(ulong*)ptr2)))((nint)ptr2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._GUID_dbb19183_e14e_49cc_a75a_0dbf88f7cc57), (void**)(&ptr3)) < 0) + { + return; + } + fixed (uint* ptr4 = &m_dwAdviseCookie) + { + try + { + long num = *(long*)m_pRecordManager + 72; + IRecordManager* pRecordManager3 = m_pRecordManager; + IRecordManagerCallback* intPtr = ptr3; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)pRecordManager3, intPtr, ptr4) >= 0) + { + m_fAdvised = true; + } + IRecordManagerCallback* intPtr2 = ptr3; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + } + catch + { + //try-fault + ptr4 = null; + throw; + } + } + } + + private void _007EZuneLibraryCDRecorder() + { + m_RecordStartHandler = null; + m_RecordProgressHandler = null; + m_RecordStopHandler = null; + _0021ZuneLibraryCDRecorder(); + } + + private unsafe void _0021ZuneLibraryCDRecorder() + { + //IL_002d: Expected I, but got I8 + //IL_0049: Expected I, but got I8 + //IL_0052: Expected I, but got I8 + if (m_disposed) + { + return; + } + IRecordManager* pRecordManager = m_pRecordManager; + if (pRecordManager != null) + { + if (m_fAdvised) + { + IRecordManager* intPtr = pRecordManager; + uint dwAdviseCookie = m_dwAdviseCookie; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pRecordManager + 80)))((nint)intPtr, dwAdviseCookie); + m_fAdvised = false; + } + pRecordManager = m_pRecordManager; + IRecordManager* intPtr2 = pRecordManager; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + m_pRecordManager = null; + } + m_disposed = true; + } + + public uint AddRef() + { + return (uint)Interlocked.Increment(ref m_RefCount); + } + + public uint Release() + { + int num = Interlocked.Decrement(ref m_RefCount); + if (0 == num) + { + _0021ZuneLibraryCDRecorder(); + } + return (uint)num; + } + + public unsafe int AddRecordingRequest(ZuneLibraryCDDevice device, uint dwTrackNumber) + { + //IL_004a: Expected I, but got I8 + int num = -2147418113; + if (m_pRecordManager != null && device != null) + { + StringBuilder stringBuilder = new StringBuilder(); + num = device.GetTrackUrl(dwTrackNumber, stringBuilder); + if (num >= 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(stringBuilder.ToString()))) + { + try + { + long num2 = *(long*)m_pRecordManager + 40; + IRecordManager* pRecordManager = m_pRecordManager; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pRecordManager, ptr); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + } + return num; + } + + public unsafe int RemoveRecordingRequest(ZuneLibraryCDDevice device, uint dwTrackNumber) + { + //IL_004a: Expected I, but got I8 + int num = -2147418113; + if (m_pRecordManager != null && device != null) + { + StringBuilder stringBuilder = new StringBuilder(); + num = device.GetTrackUrl(dwTrackNumber, stringBuilder); + if (num >= 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(stringBuilder.ToString()))) + { + try + { + long num2 = *(long*)m_pRecordManager + 48; + IRecordManager* pRecordManager = m_pRecordManager; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pRecordManager, ptr); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + } + return num; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool IsScheduledForRecording(ZuneLibraryCDDevice device, uint dwTrackNumber) + { + //IL_0047: Expected I, but got I8 + int num = 0; + if (m_pRecordManager != null && device != null) + { + StringBuilder stringBuilder = new StringBuilder(); + if (device.GetTrackUrl(dwTrackNumber, stringBuilder) >= 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(stringBuilder.ToString()))) + { + try + { + long num2 = *(long*)m_pRecordManager + 56; + IRecordManager* pRecordManager = m_pRecordManager; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pRecordManager, ptr, &num); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + if (num != 0) + { + return true; + } + } + return false; + } + + public unsafe int StopRecording() + { + //IL_0019: Expected I, but got I8 + int result = 1; + IRecordManager* pRecordManager = m_pRecordManager; + if (pRecordManager != null) + { + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pRecordManager + 64)))((nint)pRecordManager); + } + return result; + } + + public unsafe int AsyncAddRecordingRequest(ZuneLibraryCDDevice device, uint dwTrackNumber) + { + //IL_004a: Expected I, but got I8 + int num = -2147418113; + if (m_pRecordManager != null && device != null) + { + StringBuilder stringBuilder = new StringBuilder(); + num = device.GetTrackUrl(dwTrackNumber, stringBuilder); + if (num >= 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(stringBuilder.ToString()))) + { + try + { + long num2 = *(long*)m_pRecordManager + 24; + IRecordManager* pRecordManager = m_pRecordManager; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pRecordManager, ptr); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + } + return num; + } + + public unsafe int AsyncRemoveRecordingRequest(ZuneLibraryCDDevice device, uint dwTrackNumber) + { + //IL_004a: Expected I, but got I8 + int num = -2147418113; + if (m_pRecordManager != null && device != null) + { + StringBuilder stringBuilder = new StringBuilder(); + num = device.GetTrackUrl(dwTrackNumber, stringBuilder); + if (num >= 0) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(stringBuilder.ToString()))) + { + try + { + long num2 = *(long*)m_pRecordManager + 32; + IRecordManager* pRecordManager = m_pRecordManager; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pRecordManager, ptr); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + } + return num; + } + + internal unsafe void OnRecordStart(ushort* pwszUrl) + { + if (m_RecordStartHandler != null) + { + string text = new string((char*)pwszUrl); + Application.DeferredInvoke(args: new object[2] { this, text }, method: DeferredOnRecordStart); + } + } + + internal unsafe void OnRecordProgress(ushort* pwszUrl, int iTicks) + { + if (m_RecordProgressHandler != null) + { + string text = new string((char*)pwszUrl); + Application.DeferredInvoke(args: new object[3] { this, text, iTicks }, method: DeferredOnRecordProgress); + } + } + + internal unsafe void OnRecordStop(ushort* pwszUrl, int hr) + { + if (m_RecordStopHandler != null) + { + string text = new string((char*)pwszUrl); + Application.DeferredInvoke(args: new object[3] { this, text, hr }, method: DeferredOnRecordStop); + } + } + + internal unsafe void OnRecordPause(ushort* pwszUrl) + { + if (m_RecordPauseHandler != null) + { + string text = new string((char*)pwszUrl); + Application.DeferredInvoke(args: new object[2] { this, text }, method: DeferredOnRecordPause); + } + } + + internal unsafe void OnRecordResume(ushort* pwszUrl) + { + if (m_RecordResumeHandler != null) + { + string text = new string((char*)pwszUrl); + Application.DeferredInvoke(args: new object[2] { this, text }, method: DeferredOnRecordResume); + } + } + + internal static void DeferredOnRecordStart(object args) + { + object[] array = args as object[]; + if (array != null && (nint)array.LongLength == 2) + { + ZuneLibraryCDRecorder obj = (ZuneLibraryCDRecorder)array[0]; + string sourceUrl = (string)array[1]; + obj.m_RecordStartHandler?.Invoke(sourceUrl); + } + } + + internal static void DeferredOnRecordProgress(object args) + { + object[] array = args as object[]; + if (array != null && (nint)array.LongLength == 3) + { + ZuneLibraryCDRecorder obj = (ZuneLibraryCDRecorder)array[0]; + string sourceUrl = (string)array[1]; + int iTicks = (int)array[2]; + obj.m_RecordProgressHandler?.Invoke(sourceUrl, iTicks); + } + } + + internal static void DeferredOnRecordStop(object args) + { + object[] array = args as object[]; + if (array != null && (nint)array.LongLength == 3) + { + ZuneLibraryCDRecorder obj = (ZuneLibraryCDRecorder)array[0]; + string sourceUrl = (string)array[1]; + int hr = (int)array[2]; + obj.m_RecordStopHandler?.Invoke(sourceUrl, hr); + } + } + + internal static void DeferredOnRecordPause(object args) + { + object[] array = args as object[]; + if (array != null && (nint)array.LongLength == 2) + { + ZuneLibraryCDRecorder obj = (ZuneLibraryCDRecorder)array[0]; + string sourceUrl = (string)array[1]; + obj.m_RecordPauseHandler?.Invoke(sourceUrl); + } + } + + internal static void DeferredOnRecordResume(object args) + { + object[] array = args as object[]; + if (array != null && (nint)array.LongLength == 2) + { + ZuneLibraryCDRecorder obj = (ZuneLibraryCDRecorder)array[0]; + string sourceUrl = (string)array[1]; + obj.m_RecordResumeHandler?.Invoke(sourceUrl); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _007EZuneLibraryCDRecorder(); + return; + } + try + { + _0021ZuneLibraryCDRecorder(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~ZuneLibraryCDRecorder() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryGenreList.cs b/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryGenreList.cs new file mode 100644 index 0000000..5638cd8 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryGenreList.cs @@ -0,0 +1,15 @@ +namespace MicrosoftZuneLibrary +{ + public class ZuneLibraryGenreList : ZuneQueryList + { + public unsafe ZuneLibraryGenreList(IDatabaseQueryResults* pResults) + : base(pResults, "ZuneLibraryGenreList") + { + } + + public string GetGenre(int index) + { + return (string)GetFieldValue((uint)index, typeof(string), 399u); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryUtils.cs b/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryUtils.cs new file mode 100644 index 0000000..e671a00 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/ZuneLibraryUtils.cs @@ -0,0 +1,87 @@ +using System.Runtime.CompilerServices; + +namespace MicrosoftZuneLibrary +{ + public class ZuneLibraryUtils + { + public unsafe static int ConvertPropVariantToString(tagPROPVARIANT* pPropVariant, string* pRetString) + { + //IL_000b: Expected I4, but got I8 + //IL_001e: Expected I4, but got I8 + //IL_003d: Expected I, but got I8 + *pRetString = null; + CComPropVariant cComPropVariant; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + int num; + try + { + num = 0; + tagPROPVARIANT* ptr; + if (*(ushort*)pPropVariant == 8) + { + ptr = pPropVariant; + goto IL_0032; + } + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + num = _003CModule_003E.ZuneLibraryExports_002EZunePropVariantChangeType((tagPROPVARIANT*)(&cComPropVariant), pPropVariant, 1, 8); + if (num >= 0) + { + ptr = (tagPROPVARIANT*)(&cComPropVariant); + goto IL_0032; + } + goto end_IL_000b; + IL_0032: + *pRetString = new string((char*)(*(ulong*)((ulong)(nint)ptr + 8uL))); + end_IL_000b:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + return num; + } + + public unsafe static int ConvertPropVariantToInt(tagPROPVARIANT* pPropVariant) + { + //IL_000a: Expected I4, but got I8 + //IL_001b: Expected I4, but got I8 + int result = 0; + CComPropVariant cComPropVariant; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + try + { + tagPROPVARIANT* ptr; + if (*(ushort*)pPropVariant == 3) + { + ptr = pPropVariant; + goto IL_002d; + } + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + if (_003CModule_003E.ZuneLibraryExports_002EZunePropVariantChangeType((tagPROPVARIANT*)(&cComPropVariant), pPropVariant, 1, 3) >= 0) + { + ptr = (tagPROPVARIANT*)(&cComPropVariant); + goto IL_002d; + } + goto end_IL_000a; + IL_002d: + result = *(int*)((ulong)(nint)ptr + 8uL); + end_IL_000a:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + return result; + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/ZunePlaylist.cs b/ZuneDBApi/MicrosoftZuneLibrary/ZunePlaylist.cs new file mode 100644 index 0000000..cb6967a --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/ZunePlaylist.cs @@ -0,0 +1,62 @@ +using System; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class ZunePlaylist : IDisposable + { + private unsafe IPlaylist* m_pPlaylist; + + private bool _disposed; + + internal unsafe IPlaylist* Playlist => m_pPlaylist; + + private void _007EZunePlaylist() + { + _0021ZunePlaylist(); + } + + private unsafe void _0021ZunePlaylist() + { + //IL_001f: Expected I, but got I8 + //IL_0028: Expected I, but got I8 + if (!_disposed) + { + IPlaylist* pPlaylist = m_pPlaylist; + if (pPlaylist != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pPlaylist + 16)))((nint)pPlaylist); + m_pPlaylist = null; + } + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _0021ZunePlaylist(); + return; + } + try + { + _0021ZunePlaylist(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~ZunePlaylist() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/ZuneQueryItem.cs b/ZuneDBApi/MicrosoftZuneLibrary/ZuneQueryItem.cs new file mode 100644 index 0000000..979bd34 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/ZuneQueryItem.cs @@ -0,0 +1,65 @@ +using System; +using System.Runtime.InteropServices; + +namespace MicrosoftZuneLibrary +{ + public class ZuneQueryItem : IDisposable + { + protected ZuneQueryList m_pList; + + protected uint m_index; + + protected bool m_disposed = false; + + public int ID => (int)GetFieldValue(typeof(int), 355u); + + public ZuneQueryItem(ZuneQueryList pList, int index) + { + m_index = (uint)index; + m_pList = pList; + pList?.AddRef(); + } + + private void _007EZuneQueryItem() + { + if (!m_disposed) + { + m_disposed = true; + ZuneQueryList pList = m_pList; + if (pList != null) + { + pList.Release(); + m_pList = null; + } + } + } + + public object GetFieldValue(Type type, uint Atom) + { + return m_pList.GetFieldValue(m_index, type, Atom); + } + + public void SetFieldValue(uint Atom, object Value) + { + m_pList.SetFieldValue(m_index, Atom, Value); + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _007EZuneQueryItem(); + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZuneLibrary/ZuneQueryList.cs b/ZuneDBApi/MicrosoftZuneLibrary/ZuneQueryList.cs new file mode 100644 index 0000000..66fcaf0 --- /dev/null +++ b/ZuneDBApi/MicrosoftZuneLibrary/ZuneQueryList.cs @@ -0,0 +1,813 @@ +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using _003CCppImplementationDetails_003E; + +namespace MicrosoftZuneLibrary +{ + public class ZuneQueryList : IDisposable + { + protected unsafe IDatabaseQueryResults* m_pResults; + + protected unsafe ResultSetEventRelay* m_pRelay; + + private unsafe ushort* m_bstrQueryName = null; + + private int m_RefCount = 0; + + private bool m_disposed = false; + + public bool IsDisposed + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return m_disposed; + } + } + + public unsafe bool IsEmpty + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + //IL_0017: Expected I, but got I8 + IDatabaseQueryResults* pResults = m_pResults; + if (pResults != null) + { + return ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pResults + 96)))((nint)pResults) == 1; + } + return true; + } + } + + public unsafe int Count + { + get + { + //IL_001b: Expected I, but got I8 + int result = 0; + IDatabaseQueryResults* pResults = m_pResults; + if (pResults != null && ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pResults + 88)))((nint)pResults, (uint*)(&result)) >= 0) + { + return result; + } + return result; + } + } + + public unsafe ZuneQueryList(IDatabaseQueryResults* pResults, string queryName) + { + //IL_0008: Expected I, but got I8 + //IL_004c: Expected I, but got I8 + //IL_0065: Expected I, but got I8 + m_pResults = pResults; + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(queryName))) + { + m_bstrQueryName = _003CModule_003E.SysAllocString(ptr); + IDatabaseQueryResults* pResults2 = m_pResults; + if (pResults2 != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pResults2 + 8)))((nint)pResults2); + ResultSetEventRelay* ptr2 = (ResultSetEventRelay*)_003CModule_003E.@new(56uL); + ResultSetEventRelay* pRelay; + try + { + pRelay = ((ptr2 == null) ? null : _003CModule_003E.MicrosoftZuneLibrary_002EResultSetEventRelay_002E_007Bctor_007D(ptr2)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr2); + throw; + } + m_pRelay = pRelay; + } + } + } + + private unsafe void _007EZuneQueryList() + { + //IL_0021: Expected I, but got I8 + //IL_003a: Expected I, but got I8 + //IL_0043: Expected I, but got I8 + //IL_005f: Expected I, but got I8 + //IL_0079: Expected I, but got I8 + m_disposed = true; + IDatabaseQueryResults* pResults = m_pResults; + if (pResults != null) + { + IDatabaseQueryResults* intPtr = pResults; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr + 160)))((nint)intPtr); + pResults = m_pResults; + if (0L != (nint)pResults) + { + IDatabaseQueryResults* intPtr2 = pResults; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)intPtr2 + 16)))((nint)intPtr2); + m_pResults = null; + } + } + ResultSetEventRelay* pRelay = m_pRelay; + if (0L != (nint)pRelay) + { + _003CModule_003E.MicrosoftZuneLibrary_002EResultSetEventRelay_002E__delDtor(pRelay, 1u); + m_pRelay = null; + } + ushort* bstrQueryName = m_bstrQueryName; + if (0L != (nint)bstrQueryName) + { + _003CModule_003E.SysFreeString(bstrQueryName); + m_bstrQueryName = null; + } + } + + private unsafe void _0021ZuneQueryList() + { + //IL_0033: Expected I, but got I8 + //IL_004c: Expected I, but got I8 + //IL_0055: Expected I, but got I8 + //IL_006f: Expected I, but got I8 + _ = string.Empty; + ushort* bstrQueryName = m_bstrQueryName; + if (bstrQueryName != null) + { + new string((char*)bstrQueryName); + } + ResultSetEventRelay* pRelay = m_pRelay; + if (0L != (nint)pRelay) + { + _003CModule_003E.MicrosoftZuneLibrary_002EResultSetEventRelay_002E__delDtor(pRelay, 1u); + m_pRelay = null; + } + IDatabaseQueryResults* pResults = m_pResults; + if (0L != (nint)pResults) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pResults + 16)))((nint)pResults); + m_pResults = null; + } + ushort* bstrQueryName2 = m_bstrQueryName; + if (0L != (nint)bstrQueryName2) + { + _003CModule_003E.SysFreeString(bstrQueryName2); + m_bstrQueryName = null; + } + } + + public uint AddRef() + { + return (uint)Interlocked.Increment(ref m_RefCount); + } + + public uint Release() + { + int num = Interlocked.Decrement(ref m_RefCount); + if (0 == num) + { + ((IDisposable)this).Dispose(); + } + return (uint)num; + } + + [return: MarshalAs(UnmanagedType.U1)] + public unsafe bool CheckItemIndex(uint index) + { + //IL_0015: Expected I, but got I8 + IDatabaseQueryResults* pResults = m_pResults; + return (byte)((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pResults + 24)))((nint)pResults, index) >= 0) ? 1u : 0u) != 0; + } + + public unsafe void Advise(IQueryListEvents listener) + { + _003CModule_003E.MicrosoftZuneLibrary_002EResultSetEventRelay_002EAdvise(m_pRelay, listener, m_pResults); + } + + public unsafe void Unadvise(IQueryListEvents listener) + { + _003CModule_003E.MicrosoftZuneLibrary_002EResultSetEventRelay_002EUnAdvise(m_pRelay, listener, m_pResults); + } + + public unsafe void EndBulkEventsComplete([MarshalAs(UnmanagedType.U1)] bool fAbandon) + { + //IL_0021: Expected I, but got I8 + int num = (fAbandon ? 1 : 0); + IDatabaseQueryResults* pResults = m_pResults; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pResults + 128)))((nint)pResults, num); + } + + public object GetFieldValue(uint index, Type type, string AtomName, object defaultValue) + { + int num = AtomNameToAtom(AtomName); + if (num == -1) + { + return defaultValue; + } + return GetFieldValue(index, type, (uint)num, defaultValue); + } + + public object GetFieldValue(uint index, Type type, string AtomName) + { + return GetFieldValue(index, type, AtomName, null); + } + + public unsafe object GetFieldValue(uint index, Type type, uint Atom, object defaultValue) + { + //IL_008d: Expected I, but got I8 + //IL_00a5: Expected I, but got I8 + //IL_00b7: Expected I4, but got I8 + //IL_00cf: Expected I, but got I8 + if (m_disposed) + { + if (Atom != 340 && Atom != 140 && _003CModule_003E.WPP_GLOBAL_Control != System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.WPP_GLOBAL_Control) && ((uint)(*(int*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 28uL)) & 2u) != 0 && (uint)(*(byte*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 25uL)) >= 5u) + { + _003CModule_003E.WPP_SF_D(*(ulong*)((ulong)(nint)_003CModule_003E.WPP_GLOBAL_Control + 16uL), 10, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._003FA0xfab9896e_002EWPP_ZuneDBList_cpp_Traceguids), Atom); + } + return defaultValue; + } + CComPropVariant cComPropVariant; + object result; + if (m_pResults != null) + { + if (type == typeof(string)) + { + WMT_ATTR_DATATYPE wMT_ATTR_DATATYPE = *(WMT_ATTR_DATATYPE*)((long)(int)Atom * 32L + (ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _003CModule_003E._003Fs_rgSchemaMapEntry_0040CSchemaMap_0040_00400QBU_SCHEMAMAPENTRY_00401_0040B, 16))); + if (wMT_ATTR_DATATYPE == (WMT_ATTR_DATATYPE)1) + { + ushort* value = null; + IDatabaseQueryResults* pResults = m_pResults; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pResults + 32)))((nint)pResults, index, Atom, &value) >= 0) + { + return new string((char*)value); + } + } + } + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + try + { + IDatabaseQueryResults* pResults2 = m_pResults; + if (((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pResults2 + 48)))((nint)pResults2, index, Atom, (tagPROPVARIANT*)(&cComPropVariant)) >= 0) + { + result = MarshalResult(type, (tagPROPVARIANT*)(&cComPropVariant), defaultValue); + goto IL_00ef; + } + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + } + return defaultValue; + IL_00ef: + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + return result; + } + + public object GetFieldValue(uint index, Type type, uint Atom) + { + return GetFieldValue(index, type, Atom, null); + } + + public int SetFieldValue(uint index, string AtomName, object Value) + { + int num = AtomNameToAtom(AtomName); + if (num == -1) + { + return -2147024809; + } + return SetFieldValue(index, (uint)num, Value); + } + + public unsafe int SetFieldValue(uint index, uint Atom, object Value) + { + //IL_0016: Expected I4, but got I8 + //IL_0046: Expected I, but got I8 + int num = -2147024809; + if (m_pResults != null) + { + CComPropVariant cComPropVariant; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlock(ref cComPropVariant, 0, 24); + try + { + if (Value == null) + { + goto IL_002e; + } + num = ConvertTypeToPropVariant(Value.GetType(), Value, (tagPROPVARIANT*)(&cComPropVariant)); + if (num >= 0) + { + goto IL_002e; + } + goto end_IL_0016; + IL_002e: + IDatabaseQueryResults* pResults = m_pResults; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pResults + 64)))((nint)pResults, index, Atom, (tagPROPVARIANT*)(&cComPropVariant)); + end_IL_0016:; + } + catch + { + //try-fault + _003CModule_003E.___CxxCallUnwindDtor((delegate*)(delegate*)(&_003CModule_003E.CComPropVariant_002E_007Bdtor_007D), &cComPropVariant); + throw; + } + _003CModule_003E.CComPropVariant_002EClear(&cComPropVariant); + } + return num; + } + + public unsafe uint GetIndexForLibraryId(int indexHint, int LibraryId) + { + //IL_0029: Expected I, but got I8 + uint num = uint.MaxValue; + fixed (uint* ptr = &System.Runtime.CompilerServices.Unsafe.AsRef(&num)) + { + IDatabaseQueryResults* pResults = m_pResults; + if (pResults != null) + { + long num2 = *(long*)pResults + 144; + IDatabaseQueryResults* pResults2 = m_pResults; + num = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pResults2, (uint)indexHint, LibraryId, ptr) != 0) ? uint.MaxValue : num); + } + return num; + } + } + + public unsafe ArrayList GetUniqueIds() + { + //IL_001e: Expected I, but got I8 + //IL_001e: Expected I, but got I8 + //IL_0079: Expected I, but got I8 + //IL_00bf: Expected I, but got I8 + ArrayList arrayList = null; + IDatabaseQueryResults* pResults = m_pResults; + int num; + int num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pResults + 152)))((nint)pResults, null, &num); + if (num2 >= 0) + { + ulong num3 = (ulong)num; + int* ptr = (int*)_003CModule_003E.new_005B_005D((num3 > 4611686018427387903L) ? ulong.MaxValue : (num3 * 4)); + num2 = (((long)(nint)ptr == 0) ? (-2147024882) : num2); + if (num2 >= 0) + { + pResults = m_pResults; + num2 = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pResults + 152)))((nint)pResults, ptr, &num); + if (num2 >= 0) + { + arrayList = new ArrayList(num); + num2 = ((arrayList == null) ? (-2147024882) : num2); + if (num2 >= 0) + { + int num4 = 0; + if (0 < num) + { + int* ptr2 = ptr; + do + { + arrayList.Add(*ptr2); + num4++; + ptr2 = (int*)((ulong)(nint)ptr2 + 4uL); + } + while (num4 < num); + } + } + } + } + if (ptr != null) + { + _003CModule_003E.delete(ptr); + } + } + return arrayList; + } + + public unsafe int SearchForString(uint Atom, [MarshalAs(UnmanagedType.U1)] bool ascending, string SearchString) + { + //IL_002f: Expected I, but got I8 + int num = -1; + if (m_pResults != null) + { + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(SearchString))) + { + try + { + long num2 = *(long*)m_pResults + 72; + IDatabaseQueryResults* pResults = m_pResults; + uint num3; + num = ((((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)pResults, Atom, ascending ? 1 : 0, ptr, &num3) >= 0) ? ((int)num3) : num); + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + return num; + } + + public unsafe int ClientBusy([MarshalAs(UnmanagedType.U1)] bool fBusy) + { + //IL_001a: Expected I, but got I8 + int result = 0; + IDatabaseQueryResults* pResults = m_pResults; + if (pResults != null) + { + result = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)pResults + 120)))((nint)pResults, fBusy ? 1 : 0); + } + return result; + } + + public unsafe static object MarshalResult(Type type, tagPROPVARIANT* propVariant, object defaultValue) + { + //IL_0104: Expected I, but got I8 + //IL_01d2: Expected I, but got I8 + //IL_0205: Expected I, but got I8 + //IL_0267: Expected I, but got I8 + //IL_02b0: Expected I, but got I8 + if (type == typeof(int)) + { + switch (*(ushort*)propVariant) + { + case 3: + return *(int*)((ulong)(nint)propVariant + 8uL); + case 11: + return (*(short*)((ulong)(nint)propVariant + 8uL) == -1) ? 1 : 0; + } + } + else if (type == typeof(uint)) + { + ushort num = *(ushort*)propVariant; + if (num == 3 || num == 19) + { + return *(uint*)((ulong)(nint)propVariant + 8uL); + } + } + else if (type == typeof(long)) + { + switch (*(ushort*)propVariant) + { + case 20: + return *(long*)((ulong)(nint)propVariant + 8uL); + case 3: + return (long)(*(int*)((ulong)(nint)propVariant + 8uL)); + case 19: + return (long)(uint)(*(int*)((ulong)(nint)propVariant + 8uL)); + } + } + else if (type == typeof(ulong)) + { + ushort num2 = *(ushort*)propVariant; + if (num2 == 20 || num2 == 21) + { + return *(ulong*)((ulong)(nint)propVariant + 8uL); + } + } + else if (type == typeof(string)) + { + if (*(ushort*)propVariant == 72) + { + _003CModule_003E.ZuneLibraryExports_002EZunePropVariantChangeType(propVariant, propVariant, 0, 8); + } + if (*(ushort*)propVariant == 8) + { + return new string((char*)(*(ulong*)((ulong)(nint)propVariant + 8uL))); + } + } + else if (type == typeof(DateTime)) + { + if (*(ushort*)propVariant == 7) + { + return DateTime.FromOADate(*(double*)((ulong)(nint)propVariant + 8uL)); + } + } + else if (type == typeof(TimeSpan)) + { + switch (*(ushort*)propVariant) + { + case 3: + return TimeSpan.FromMilliseconds(*(int*)((ulong)(nint)propVariant + 8uL)); + case 20: + case 21: + return TimeSpan.FromMilliseconds(*(ulong*)((ulong)(nint)propVariant + 8uL)); + } + } + else if (type == typeof(bool)) + { + if (*(ushort*)propVariant == 11) + { + return (byte)((*(short*)((ulong)(nint)propVariant + 8uL) != 0) ? 1u : 0u) != 0; + } + } + else if (type == typeof(Guid)) + { + if (*(ushort*)propVariant == 8) + { + ValueType valueType = default(Guid); + (Guid)valueType = new Guid(new string((char*)(*(ulong*)((ulong)(nint)propVariant + 8uL)))); + return valueType; + } + } + else if (typeof(IList).IsAssignableFrom(type)) + { + switch (*(ushort*)propVariant) + { + case 8200: + { + tagSAFEARRAY* ptr2 = (tagSAFEARRAY*)(*(ulong*)((ulong)(nint)propVariant + 8uL)); + if (_003CModule_003E.SafeArrayGetDim(ptr2) != 1) + { + return defaultValue; + } + ArrayList arrayList2 = new ArrayList(); + if (arrayList2 != null) + { + int num5 = 0; + int num6 = 0; + ushort** ptr3; + if (_003CModule_003E.SafeArrayGetLBound(ptr2, 1u, &num5) < 0 || _003CModule_003E.SafeArrayGetUBound(ptr2, 1u, &num6) < 0 || _003CModule_003E.SafeArrayAccessData(ptr2, (void**)(&ptr3)) < 0) + { + return defaultValue; + } + uint num7 = (uint)(num6 - num5 + 1); + if (0 < num7) + { + long num8 = 0L; + uint num9 = num7; + do + { + arrayList2.Add(new string((char*)(*(ulong*)(num8 + (nint)ptr3)))); + num8 += 8; + num9 += uint.MaxValue; + } + while (num9 != 0); + } + _003CModule_003E.SafeArrayUnaccessData(ptr2); + } + return arrayList2; + } + case 4099: + { + ArrayList arrayList = new ArrayList(); + if (arrayList != null) + { + uint num3 = 0u; + if (0u < (uint)(*(int*)((ulong)(nint)propVariant + 8uL))) + { + tagPROPVARIANT* ptr = (tagPROPVARIANT*)((ulong)(nint)propVariant + 16uL); + long num4 = 0L; + do + { + arrayList.Add(*(int*)(num4 + *(long*)ptr)); + num3++; + num4 += 4; + } + while (num3 < (uint)(*(int*)((ulong)(nint)propVariant + 8uL))); + } + } + return arrayList; + } + } + } + else if (type.IsEnum) + { + ushort num10 = *(ushort*)propVariant; + if (num10 == 3 || num10 == 19) + { + return Enum.ToObject(type, *(int*)((ulong)(nint)propVariant + 8uL)); + } + } + return defaultValue; + } + + public unsafe static int ConvertTypeToPropVariant(Type type, object value, tagPROPVARIANT* propVariant) + { + //IL_003a: Expected I8, but got I + //IL_020e: Expected I4, but got I8 + //IL_0297: Expected I8, but got I + //The blocks IL_02a0 are reachable both inside and outside the pinned region starting at IL_002c. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + //The blocks IL_0217, IL_0225, IL_0270, IL_0278, IL_0299, IL_02a0 are reachable both inside and outside the pinned region starting at IL_0244. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + int result = -2147467259; + if (type == null) + { + type = value.GetType(); + } + if (type == typeof(string)) + { + *(short*)propVariant = 8; + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars((string)value))) + { + *(long*)((ulong)(nint)propVariant + 8uL) = (nint)_003CModule_003E.SysAllocString(ptr); + return 0; + } + } + if (type == typeof(int)) + { + *(short*)propVariant = 3; + *(int*)((ulong)(nint)propVariant + 8uL) = (int)value; + result = 0; + } + else if (type == typeof(uint)) + { + *(short*)propVariant = 19; + *(uint*)((ulong)(nint)propVariant + 8uL) = (uint)value; + result = 0; + } + else if (type == typeof(long)) + { + *(short*)propVariant = 20; + *(long*)((ulong)(nint)propVariant + 8uL) = (long)value; + result = 0; + } + else if (type == typeof(ulong)) + { + *(short*)propVariant = 20; + *(long*)((ulong)(nint)propVariant + 8uL) = (long)value; + result = 0; + } + else if (type == typeof(DateTime)) + { + DateTime dateTime = (DateTime)value; + if (dateTime != DateTime.MinValue) + { + if (dateTime.Year >= 0 && dateTime.Year < 100) + { + dateTime = ((dateTime.Year >= 30) ? dateTime.AddYears(1900) : dateTime.AddYears(2000)); + } + *(short*)propVariant = 7; + *(double*)((ulong)(nint)propVariant + 8uL) = dateTime.ToOADate(); + } + result = 0; + } + else if (type == typeof(TimeSpan)) + { + *(short*)propVariant = 3; + *(int*)((ulong)(nint)propVariant + 8uL) = (int)((TimeSpan)(TimeSpan)value).TotalMilliseconds; + result = 0; + } + else if (type == typeof(bool)) + { + *(short*)propVariant = 11; + int num = -1; + if (!(bool)value) + { + num = ~num; + } + short num2 = (short)num; + *(short*)((ulong)(nint)propVariant + 8uL) = num2; + result = 0; + } + else if (typeof(IList).IsAssignableFrom(type)) + { + IList list = (IList)value; + if (list != null) + { + int count = list.Count; + if (count == 0) + { + _003CModule_003E.PropVariantClear(propVariant); + } + else + { + _0024ArrayType_0024_0024_0024BY00UtagSAFEARRAYBOUND_0040_0040 _0024ArrayType_0024_0024_0024BY00UtagSAFEARRAYBOUND_0040_0040; + System.Runtime.CompilerServices.Unsafe.As<_0024ArrayType_0024_0024_0024BY00UtagSAFEARRAYBOUND_0040_0040, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY00UtagSAFEARRAYBOUND_0040_0040, 4)) = 0; + *(int*)(&_0024ArrayType_0024_0024_0024BY00UtagSAFEARRAYBOUND_0040_0040) = count; + tagSAFEARRAY* ptr2 = _003CModule_003E.SafeArrayCreate(8, 1u, (tagSAFEARRAYBOUND*)(&_0024ArrayType_0024_0024_0024BY00UtagSAFEARRAYBOUND_0040_0040)); + if (ptr2 == null) + { + return -2147024882; + } + _0024ArrayType_0024_0024_0024BY01J _0024ArrayType_0024_0024_0024BY01J; + *(int*)(&_0024ArrayType_0024_0024_0024BY01J) = 0; + // IL initblk instruction + System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref _0024ArrayType_0024_0024_0024BY01J, 4), 0, 4); + int index = 0; + if (0 < count) + { + object obj = list[index]; + if (obj != null) + { + if (obj.GetType() == typeof(string)) + { + while (true) + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars((string)obj))) + { + IL_0217: + obj = list[index]; + if (obj != null) + { + if (obj.GetType() != typeof(string)) + { + result = -2147467259; + goto IL_0299; + } + continue; + } + result = -2147467259; + goto IL_0299; + IL_0299: + _003CModule_003E.SafeArrayDestroy(ptr2); + goto IL_02a0; + IL_024d: + ushort* ptr4 = _003CModule_003E.SysAllocString(ptr3); + if (ptr4 == null) + { + goto IL_0280; + } + goto IL_0253; + IL_0253: + *(int*)(&_0024ArrayType_0024_0024_0024BY01J) = index; + result = _003CModule_003E.SafeArrayPutElement(ptr2, (int*)(&_0024ArrayType_0024_0024_0024BY01J), ptr4); + if (result < 0) + { + goto IL_0299; + } + goto IL_0266; + IL_0266: + index++; + if (index < count) + { + goto IL_0217; + } + goto IL_0286; + IL_0280: + result = -2147024882; + goto IL_0286; + IL_0286: + if (result < 0) + { + goto IL_0299; + } + goto IL_028a; + IL_028a: + *(short*)propVariant = 8200; + *(long*)((ulong)(nint)propVariant + 8uL) = (nint)ptr2; + goto IL_02a0; + IL_02a0: + return result; + } + } + } + result = -2147467259; + } + else + { + result = -2147467259; + } + } + _003CModule_003E.SafeArrayDestroy(ptr2); + } + } + } + return result; + } + + public unsafe static int AtomNameToAtom(string AtomName) + { + fixed (ushort* wszName = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(AtomName))) + { + return _003CModule_003E.CSchemaMap_002EGetIndex(wszName); + } + } + + public unsafe static string AtomToAtomName(int atom) + { + //IL_0012: Expected I, but got I8 + return new string((char*)(*(ulong*)((long)atom * 32L + (ref _003CModule_003E._003Fs_rgSchemaMapEntry_0040CSchemaMap_0040_00400QBU_SCHEMAMAPENTRY_00401_0040B)))); + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _007EZuneQueryList(); + return; + } + try + { + _0021ZuneQueryList(); + } + finally + { + base.Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~ZuneQueryList() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/Announcement.cs b/ZuneDBApi/MicrosoftZunePlayback/Announcement.cs new file mode 100644 index 0000000..1f8b21f --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/Announcement.cs @@ -0,0 +1,15 @@ +namespace MicrosoftZunePlayback +{ + public class Announcement + { + public string Id; + + public int HResult; + + public string SourceFile; + + public uint SourceLine; + + public int PlaybackID; + } +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/AnnouncementHandler.cs b/ZuneDBApi/MicrosoftZunePlayback/AnnouncementHandler.cs new file mode 100644 index 0000000..a0e5a0b --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/AnnouncementHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZunePlayback +{ + public delegate void AnnouncementHandler(Announcement); +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/BandwidthTestErrorArgs.cs b/ZuneDBApi/MicrosoftZunePlayback/BandwidthTestErrorArgs.cs new file mode 100644 index 0000000..9b634a2 --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/BandwidthTestErrorArgs.cs @@ -0,0 +1,17 @@ +using System; + +namespace MicrosoftZunePlayback +{ + public class BandwidthTestErrorArgs : EventArgs + { + private int _errorCode; + + public int ErrorCode => _errorCode; + + public BandwidthTestErrorArgs(int errorCode) + { + _errorCode = errorCode; + base._002Ector(); + } + } +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/BandwidthTestErrorEventHandler.cs b/ZuneDBApi/MicrosoftZunePlayback/BandwidthTestErrorEventHandler.cs new file mode 100644 index 0000000..40c26ae --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/BandwidthTestErrorEventHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZunePlayback +{ + public delegate void BandwidthTestErrorEventHandler(object sender, BandwidthTestErrorArgs args); +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/BandwidthTestInterop.cs b/ZuneDBApi/MicrosoftZunePlayback/BandwidthTestInterop.cs new file mode 100644 index 0000000..f555ce5 --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/BandwidthTestInterop.cs @@ -0,0 +1,273 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace MicrosoftZunePlayback +{ + public class BandwidthTestInterop : IDisposable + { + private BandwidthTestUpdateEventHandler _003Cbacking_store_003EBandwidthTestUpdate; + + private BandwidthTestErrorEventHandler _003Cbacking_store_003EBandwidthTestError; + + private readonly CComPtrMgd_003CIZuneMBRBandwidthTest_003E m_spMBRBandwidthTest; + + private readonly CComPtrMgd_003CMicrosoftZunePlayback_003A_003ACMBRBandwidthTestEventSink_003E m_spMBRBTestSink; + + private bool _ignore; + + private bool _async; + + [SpecialName] + public virtual event BandwidthTestErrorEventHandler BandwidthTestError + { + [MethodImpl(MethodImplOptions.Synchronized)] + add + { + _003Cbacking_store_003EBandwidthTestError = (BandwidthTestErrorEventHandler)Delegate.Combine(_003Cbacking_store_003EBandwidthTestError, value); + } + [MethodImpl(MethodImplOptions.Synchronized)] + remove + { + _003Cbacking_store_003EBandwidthTestError = (BandwidthTestErrorEventHandler)Delegate.Remove(_003Cbacking_store_003EBandwidthTestError, value); + } + } + + [SpecialName] + public virtual event BandwidthTestUpdateEventHandler BandwidthTestUpdate + { + [MethodImpl(MethodImplOptions.Synchronized)] + add + { + _003Cbacking_store_003EBandwidthTestUpdate = (BandwidthTestUpdateEventHandler)Delegate.Combine(_003Cbacking_store_003EBandwidthTestUpdate, value); + } + [MethodImpl(MethodImplOptions.Synchronized)] + remove + { + _003Cbacking_store_003EBandwidthTestUpdate = (BandwidthTestUpdateEventHandler)Delegate.Remove(_003Cbacking_store_003EBandwidthTestUpdate, value); + } + } + + public BandwidthTestInterop() + { + CComPtrMgd_003CIZuneMBRBandwidthTest_003E spMBRBandwidthTest = new CComPtrMgd_003CIZuneMBRBandwidthTest_003E(); + try + { + m_spMBRBandwidthTest = spMBRBandwidthTest; + CComPtrMgd_003CMicrosoftZunePlayback_003A_003ACMBRBandwidthTestEventSink_003E spMBRBTestSink = new CComPtrMgd_003CMicrosoftZunePlayback_003A_003ACMBRBandwidthTestEventSink_003E(); + try + { + m_spMBRBTestSink = spMBRBTestSink; + _ignore = true; + _async = true; + base._002Ector(); + } + catch + { + //try-fault + ((IDisposable)m_spMBRBTestSink).Dispose(); + throw; + } + } + catch + { + //try-fault + ((IDisposable)m_spMBRBandwidthTest).Dispose(); + throw; + } + } + + private void _007EBandwidthTestInterop() + { + Cancel(); + } + + private void _0021BandwidthTestInterop() + { + Cancel(); + } + + [SpecialName] + protected virtual void raise_BandwidthTestUpdate(object value0, BandwidthUpdateArgs value1) + { + _003Cbacking_store_003EBandwidthTestUpdate?.Invoke(value0, value1); + } + + [SpecialName] + protected virtual void raise_BandwidthTestError(object value0, BandwidthTestErrorArgs value1) + { + _003Cbacking_store_003EBandwidthTestError?.Invoke(value0, value1); + } + + public unsafe void Start(string Uri, int length) + { + //IL_000b: Expected I, but got I8 + //IL_0056: Expected I, but got I8 + //IL_00b6: Expected I, but got I8 + _ignore = false; + IZuneMBRBandwidthTest* p = null; + int num = _003CModule_003E.MBRBandwidthTest_CreateInstance(&p); + m_spMBRBandwidthTest.Attach(p); + if (m_spMBRBandwidthTest.p != null && num >= 0) + { + CMBRBandwidthTestEventSink* ptr = (CMBRBandwidthTestEventSink*)_003CModule_003E.@new(24uL); + CMBRBandwidthTestEventSink* lp; + try + { + if (ptr != null) + { + lp = _003CModule_003E.MicrosoftZunePlayback_002ECMBRBandwidthTestEventSink_002E_007Bctor_007D(ptr, this, _async); + } + else + { + lp = null; + } + } + catch + { + //try-fault + _003CModule_003E.delete(ptr); + throw; + } + m_spMBRBTestSink.op_Assign(lp); + if (m_spMBRBTestSink.p == null) + { + throw new OutOfMemoryException(); + } + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(Uri))) + { + IZuneMBRBandwidthTest* p2 = m_spMBRBandwidthTest.p; + CMBRBandwidthTestEventSink* p3 = m_spMBRBTestSink.p; + long num2 = *(long*)p2 + 24; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)p2, ptr2, (IZuneMBRBandwidthTestEventSink*)p3, (uint)length); + if (num < 0) + { + throw new COMException("BandwidthTestInterop call to IZuneMBRBandwidthTest start failed.", num); + } + } + return; + } + throw new COMException("BandwidthTestInterop failed to get IZuneMBRBandwidthTest instance.", num); + } + + public void TestStartSync(string Uri, int length) + { + _async = false; + Start(Uri, length); + } + + public unsafe void Cancel() + { + //IL_0023: Expected I, but got I8 + //IL_003c: Expected I, but got I8 + //IL_005f: Expected I, but got I8 + _ignore = true; + IZuneMBRBandwidthTest* p = m_spMBRBandwidthTest.p; + if (p != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)p + 32)))((nint)p); + m_spMBRBandwidthTest.Release(); + m_spMBRBandwidthTest.op_Assign(null); + } + CComPtrMgd_003CMicrosoftZunePlayback_003A_003ACMBRBandwidthTestEventSink_003E spMBRBTestSink = m_spMBRBTestSink; + if (spMBRBTestSink.p != null) + { + spMBRBTestSink.Release(); + m_spMBRBTestSink.op_Assign(null); + } + } + + public static void DeferredOnUpdate(object args) + { + object[] array = args as object[]; + if (array != null && (nint)array.LongLength == 2) + { + BandwidthTestInterop obj = (BandwidthTestInterop)array[0]; + BandwidthUpdateArgs update = (BandwidthUpdateArgs)array[1]; + obj.OnUpdate(update); + } + } + + public static void DeferredOnError(object args) + { + object[] array = args as object[]; + if (array != null && (nint)array.LongLength == 2) + { + BandwidthTestInterop obj = (BandwidthTestInterop)array[0]; + BandwidthTestErrorArgs error = (BandwidthTestErrorArgs)array[1]; + obj.OnError(error); + } + } + + public void OnUpdate(BandwidthUpdateArgs update) + { + if (!_ignore) + { + raise_BandwidthTestUpdate(this, update); + if (update.currentState == MBRHeuristicState.Test_Completed) + { + Cancel(); + } + } + } + + public void OnError(BandwidthTestErrorArgs error) + { + if (!_ignore) + { + raise_BandwidthTestError(this, error); + Cancel(); + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + try + { + _007EBandwidthTestInterop(); + } + finally + { + try + { + ((IDisposable)m_spMBRBTestSink).Dispose(); + } + finally + { + try + { + ((IDisposable)m_spMBRBandwidthTest).Dispose(); + } + finally + { + } + } + } + } + else + { + try + { + _0021BandwidthTestInterop(); + } + finally + { + base.Finalize(); + } + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~BandwidthTestInterop() + { + Dispose(false); + } + } +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/BandwidthTestUpdateEventHandler.cs b/ZuneDBApi/MicrosoftZunePlayback/BandwidthTestUpdateEventHandler.cs new file mode 100644 index 0000000..0d49fe4 --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/BandwidthTestUpdateEventHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZunePlayback +{ + public delegate void BandwidthTestUpdateEventHandler(object sender, BandwidthUpdateArgs args); +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/BandwidthUpdateArgs.cs b/ZuneDBApi/MicrosoftZunePlayback/BandwidthUpdateArgs.cs new file mode 100644 index 0000000..4d9bb95 --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/BandwidthUpdateArgs.cs @@ -0,0 +1,82 @@ +using System; + +namespace MicrosoftZunePlayback +{ + public class BandwidthUpdateArgs : EventArgs + { + private long _buffering; + + private float _quality; + + private int _id; + + private int _latestBandwidth; + + private int _recentAverageBandwidth; + + private int _totalAverageBandwidth; + + private int _bitrate; + + private int _droppedFrames; + + private int _testLength; + + private int _testPosition; + + private MBRHeuristicState _currentState; + + private int _percentComplete; + + public int PercentComplete => _percentComplete; + + public MBRHeuristicState currentState => _currentState; + + public int TestPosition => _testPosition; + + public int TestLength => _testLength; + + public int DroppedFrames => _droppedFrames; + + public int Bitrate => _bitrate; + + public int TotalAverageBandwidth => _totalAverageBandwidth; + + public int RecentAverageBandwidth => _recentAverageBandwidth; + + public int LatestBandwidth => _latestBandwidth; + + public int Id => _id; + + public float Quality => _quality; + + public long Buffering => _buffering; + + public BandwidthUpdateArgs(long buffering, float quality, int Id, int latestBandwidth, int recentAverageBandwidth, int totalAverageBandwidth, int bitrate, int droppedFrames, int testLength, int testPosition, MBRHeuristicState currentState) + { + _buffering = buffering; + _quality = quality; + _id = Id; + _latestBandwidth = latestBandwidth; + _recentAverageBandwidth = recentAverageBandwidth; + _totalAverageBandwidth = totalAverageBandwidth; + _bitrate = bitrate; + _droppedFrames = droppedFrames; + _testLength = testLength; + _testPosition = testPosition; + _currentState = currentState; + base._002Ector(); + int testPosition2 = _testPosition; + if (testPosition2 != 0) + { + int testLength2 = _testLength; + if (testLength2 != 0 && currentState != MBRHeuristicState.Playback) + { + _percentComplete = (int)(double)((testPosition2 >= testLength2) ? 100f : ((float)((double)(float)testPosition2 / (double)(float)testLength2 * 100.0))); + return; + } + } + _percentComplete = 0; + } + } +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/CMBRBandwidthTestEventSink.cs b/ZuneDBApi/MicrosoftZunePlayback/CMBRBandwidthTestEventSink.cs new file mode 100644 index 0000000..087d216 --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/CMBRBandwidthTestEventSink.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace MicrosoftZunePlayback +{ + [StructLayout(LayoutKind.Sequential, Size = 24)] + [DebugInfoInPDB] + [MiscellaneousBits(64)] + [NativeCppClass] + internal struct CMBRBandwidthTestEventSink + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/CPlayerInteropEventSink.cs b/ZuneDBApi/MicrosoftZunePlayback/CPlayerInteropEventSink.cs new file mode 100644 index 0000000..bc1b196 --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/CPlayerInteropEventSink.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +namespace MicrosoftZunePlayback +{ + [StructLayout(LayoutKind.Sequential, Size = 48)] + [MiscellaneousBits(64)] + [NativeCppClass] + [DebugInfoInPDB] + internal struct CPlayerInteropEventSink + { + private long _003Calignment_0020member_003E; + } +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/MBRHeuristicState.cs b/ZuneDBApi/MicrosoftZunePlayback/MBRHeuristicState.cs new file mode 100644 index 0000000..62042ec --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/MBRHeuristicState.cs @@ -0,0 +1,10 @@ +namespace MicrosoftZunePlayback +{ + public enum MBRHeuristicState + { + Playback = 3, + Test_Completed = 2, + Test_Inprogress = 1, + Test_Start = 0 + } +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/MCPlayerState.cs b/ZuneDBApi/MicrosoftZunePlayback/MCPlayerState.cs new file mode 100644 index 0000000..5c4009e --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/MCPlayerState.cs @@ -0,0 +1,12 @@ +namespace MicrosoftZunePlayback +{ + public enum MCPlayerState + { + Dead = 5, + Inactive = 4, + Built = 3, + Closed = 1, + Uninitialized = 0, + Open = 2 + } +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/MCTransportState.cs b/ZuneDBApi/MicrosoftZunePlayback/MCTransportState.cs new file mode 100644 index 0000000..3af3b2f --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/MCTransportState.cs @@ -0,0 +1,11 @@ +namespace MicrosoftZunePlayback +{ + public enum MCTransportState + { + Paused = 3, + Playing = 2, + Stopped = 1, + Invalid = 0, + Buffering = 4 + } +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/PlayerBandwithUpdateEventHandler.cs b/ZuneDBApi/MicrosoftZunePlayback/PlayerBandwithUpdateEventHandler.cs new file mode 100644 index 0000000..1ee8a70 --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/PlayerBandwithUpdateEventHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZunePlayback +{ + public delegate void PlayerBandwithUpdateEventHandler(object sender, BandwidthUpdateArgs args); +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/PlayerInterop.cs b/ZuneDBApi/MicrosoftZunePlayback/PlayerInterop.cs new file mode 100644 index 0000000..04c27f9 --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/PlayerInterop.cs @@ -0,0 +1,1299 @@ +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.Zune.Util; + +namespace MicrosoftZunePlayback +{ + public class PlayerInterop : IDisposable + { + private unsafe IMCPlayer* _uPlayer = null; + + private unsafe IMCTransport* _uTransport = null; + + private unsafe IMCPlayerSetUri* _uSetUri = null; + + private unsafe IMCDynamicImage* _uDynamicImage = null; + + private unsafe IMCVolumeControl* _uVolumeControl; + + private unsafe IZuneSpectrumMgr* _uZuneSpectrumMgr = null; + + private unsafe CPlayerInteropEventSink* _uEventSink; + + private MCPlayerState _state = MCPlayerState.Uninitialized; + + private long _duration = 0L; + + private bool _isReady = false; + + private Announcement _firstDenial; + + private string _currentUri; + + private int _currentUriID; + + private Dictionary _properties; + + private MCTransportState _transportState = MCTransportState.Invalid; + + private float _rate = 1f; + + private bool _endOfMedia = false; + + private long _position = 0L; + + private long _minSeekPosition = 0L; + + private long _maxSeekPosition = 0L; + + private bool _resetOnStop = false; + + private TimeSpan _positionEventInterval = TimeSpan.FromMilliseconds(100.0); + + private int _nDynamicImage = 0; + + private int _volume; + + private bool _mute; + + private bool _canChangeVideoRate = false; + + private bool _canSeek = true; + + private IntPtr _windowHandle; + + private VideoWindow _windowHost; + + private static PlayerInterop _singletonInstance = null; + + private unsafe void* _gotStateCloseEvent; + + private unsafe void* _gotStateUninitializeEvent; + + private volatile bool _fShuttingDown; + + private PlayerPropertyChangedEventHandler _003Cbacking_store_003EPlayerPropertyChanged; + + private PlayerBandwithUpdateEventHandler _003Cbacking_store_003EPlayerBandwithUpdate; + + private EventHandler _003Cbacking_store_003EStatusChanged; + + private AnnouncementHandler _003Cbacking_store_003EAlertSent; + + private EventHandler _003Cbacking_store_003ETransportStatusChanged; + + private EventHandler _003Cbacking_store_003ETransportPositionChanged; + + private EventHandler _003Cbacking_store_003EUriSet; + + public int CurrentUriID => _currentUriID; + + public string CurrentUri => _currentUri; + + public unsafe TimeSpan PositionEventInterval + { + get + { + return _positionEventInterval; + } + set + { + //IL_0030: Expected I, but got I8 + if (_uTransport != null) + { + _positionEventInterval = value; + long num = *(long*)_uTransport + 96; + IMCTransport* uTransport = _uTransport; + double totalMilliseconds = value.TotalMilliseconds; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)uTransport, (uint)totalMilliseconds); + } + } + } + + public unsafe bool ResetOnStop + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return _resetOnStop; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + //IL_001f: Expected I, but got I8 + IMCTransport* uTransport = _uTransport; + if (uTransport != null) + { + _resetOnStop = value; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uTransport + 88)))((nint)uTransport, value ? ((byte)1) : ((byte)0)); + } + } + } + + public long MaxSeekPosition => _maxSeekPosition; + + public long MinSeekPosition => _minSeekPosition; + + public long Position => _position; + + public bool EndOfMedia + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return _endOfMedia; + } + } + + public unsafe float Rate + { + get + { + return _rate; + } + set + { + //IL_0018: Expected I, but got I8 + IMCTransport* uTransport = _uTransport; + if (uTransport != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uTransport + 80)))((nint)uTransport, value); + } + } + } + + public MCTransportState TransportState => _transportState; + + public unsafe bool ShowGDIVideo + { + [param: MarshalAs(UnmanagedType.U1)] + set + { + //IL_0018: Expected I, but got I8 + IMCDynamicImage* uDynamicImage = _uDynamicImage; + if (uDynamicImage != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uDynamicImage + 40)))((nint)uDynamicImage, value ? ((byte)1) : ((byte)0)); + } + } + } + + public unsafe VideoWindow VideoPosition + { + set + { + //IL_004a: Expected I, but got I8 + _windowHost = value; + tagRECT tagRECT; + *(int*)(&tagRECT) = value.Left; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagRECT, 4)) = value.Top; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagRECT, 8)) = value.Right; + System.Runtime.CompilerServices.Unsafe.As(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref tagRECT, 12)) = value.Bottom; + IMCDynamicImage* uDynamicImage = _uDynamicImage; + if (uDynamicImage != null) + { + tagRECT tagRECT2 = tagRECT; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uDynamicImage + 32)))((nint)uDynamicImage, tagRECT2); + } + } + } + + public IntPtr WindowHandle + { + get + { + return _windowHandle; + } + set + { + _windowHandle = value; + } + } + + public bool CanSeek + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return _canSeek; + } + } + + public bool CanChangeVideoRate + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return _canChangeVideoRate; + } + } + + public unsafe bool Mute + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return _mute; + } + [param: MarshalAs(UnmanagedType.U1)] + set + { + //IL_001f: Expected I, but got I8 + _mute = value; + IMCVolumeControl* uVolumeControl = _uVolumeControl; + if (uVolumeControl != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uVolumeControl + 32)))((nint)uVolumeControl, value ? ((byte)1) : ((byte)0)); + } + } + } + + public unsafe int Volume + { + get + { + return _volume; + } + set + { + //IL_0027: Expected I, but got I8 + _volume = value; + if (!_mute) + { + IMCVolumeControl* uVolumeControl = _uVolumeControl; + if (uVolumeControl != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uVolumeControl + 24)))((nint)uVolumeControl, value); + } + } + } + } + + public int DynamicImage + { + get + { + return _nDynamicImage; + } + set + { + _nDynamicImage = value; + } + } + + public Announcement FirstDenial => _firstDenial; + + public bool IsReady + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return _isReady; + } + } + + public long Duration => _duration; + + public MCPlayerState State => _state; + + public static PlayerInterop Instance + { + get + { + if (_singletonInstance == null) + { + _singletonInstance = new PlayerInterop(); + } + return _singletonInstance; + } + } + + [SpecialName] + public event EventHandler UriSet + { + [MethodImpl(MethodImplOptions.Synchronized)] + add + { + _003Cbacking_store_003EUriSet = (EventHandler)Delegate.Combine(_003Cbacking_store_003EUriSet, value); + } + [MethodImpl(MethodImplOptions.Synchronized)] + remove + { + _003Cbacking_store_003EUriSet = (EventHandler)Delegate.Remove(_003Cbacking_store_003EUriSet, value); + } + } + + [SpecialName] + public event EventHandler TransportPositionChanged + { + [MethodImpl(MethodImplOptions.Synchronized)] + add + { + _003Cbacking_store_003ETransportPositionChanged = (EventHandler)Delegate.Combine(_003Cbacking_store_003ETransportPositionChanged, value); + } + [MethodImpl(MethodImplOptions.Synchronized)] + remove + { + _003Cbacking_store_003ETransportPositionChanged = (EventHandler)Delegate.Remove(_003Cbacking_store_003ETransportPositionChanged, value); + } + } + + [SpecialName] + public event EventHandler TransportStatusChanged + { + [MethodImpl(MethodImplOptions.Synchronized)] + add + { + _003Cbacking_store_003ETransportStatusChanged = (EventHandler)Delegate.Combine(_003Cbacking_store_003ETransportStatusChanged, value); + } + [MethodImpl(MethodImplOptions.Synchronized)] + remove + { + _003Cbacking_store_003ETransportStatusChanged = (EventHandler)Delegate.Remove(_003Cbacking_store_003ETransportStatusChanged, value); + } + } + + [SpecialName] + public event AnnouncementHandler AlertSent + { + [MethodImpl(MethodImplOptions.Synchronized)] + add + { + _003Cbacking_store_003EAlertSent = (AnnouncementHandler)Delegate.Combine(_003Cbacking_store_003EAlertSent, value); + } + [MethodImpl(MethodImplOptions.Synchronized)] + remove + { + _003Cbacking_store_003EAlertSent = (AnnouncementHandler)Delegate.Remove(_003Cbacking_store_003EAlertSent, value); + } + } + + [SpecialName] + public event EventHandler StatusChanged + { + [MethodImpl(MethodImplOptions.Synchronized)] + add + { + _003Cbacking_store_003EStatusChanged = (EventHandler)Delegate.Combine(_003Cbacking_store_003EStatusChanged, value); + } + [MethodImpl(MethodImplOptions.Synchronized)] + remove + { + _003Cbacking_store_003EStatusChanged = (EventHandler)Delegate.Remove(_003Cbacking_store_003EStatusChanged, value); + } + } + + [SpecialName] + public virtual event PlayerBandwithUpdateEventHandler PlayerBandwithUpdate + { + [MethodImpl(MethodImplOptions.Synchronized)] + add + { + _003Cbacking_store_003EPlayerBandwithUpdate = (PlayerBandwithUpdateEventHandler)Delegate.Combine(_003Cbacking_store_003EPlayerBandwithUpdate, value); + } + [MethodImpl(MethodImplOptions.Synchronized)] + remove + { + _003Cbacking_store_003EPlayerBandwithUpdate = (PlayerBandwithUpdateEventHandler)Delegate.Remove(_003Cbacking_store_003EPlayerBandwithUpdate, value); + } + } + + [SpecialName] + public virtual event PlayerPropertyChangedEventHandler PlayerPropertyChanged + { + [MethodImpl(MethodImplOptions.Synchronized)] + add + { + _003Cbacking_store_003EPlayerPropertyChanged = (PlayerPropertyChangedEventHandler)Delegate.Combine(_003Cbacking_store_003EPlayerPropertyChanged, value); + } + [MethodImpl(MethodImplOptions.Synchronized)] + remove + { + _003Cbacking_store_003EPlayerPropertyChanged = (PlayerPropertyChangedEventHandler)Delegate.Remove(_003Cbacking_store_003EPlayerPropertyChanged, value); + } + } + + [return: MarshalAs(UnmanagedType.U1)] + private unsafe static bool HResultDenialsEqual(MCHResultAnnouncement* a, Announcement b) + { + //The blocks IL_0000, IL_0069, IL_006e, IL_0071, IL_0095, IL_009f, IL_00b1, IL_00b5, IL_00b8, IL_00c9, IL_00d7, IL_00dc, IL_00df are reachable both inside and outside the pinned region starting at IL_004f. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + //The blocks IL_00b1, IL_00b5, IL_00b8, IL_00d7, IL_00dc, IL_00df are reachable both inside and outside the pinned region starting at IL_0097. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + //The blocks IL_00dc, IL_00df are reachable both inside and outside the pinned region starting at IL_00c2. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + //The blocks IL_00dc, IL_00df are reachable both inside and outside the pinned region starting at IL_007d. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + //The blocks IL_00b1, IL_00b5, IL_00b8, IL_00d7, IL_00dc, IL_00df are reachable both inside and outside the pinned region starting at IL_0097. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + //The blocks IL_00dc, IL_00df are reachable both inside and outside the pinned region starting at IL_00c2. ILSpy has duplicated these blocks in order to place them both within and outside the `fixed` statement. + if (a == null) + { + if (b == null) + { + return true; + } + } + else if (b != null) + { + bool result; + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(b.Id))) + { + try + { + fixed (ushort* ptr3 = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(b.SourceFile))) + { + try + { + int num7; + if (*(int*)((ulong)(nint)a + 12uL) == b.HResult && *(int*)((ulong)(nint)a + 32uL) == (int)b.SourceLine) + { + short num2; + short num3; + ref ushort reference; + long num; + ref ushort reference2; + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.AsRef(ptr)) + { + num = *(long*)a; + num2 = System.Runtime.CompilerServices.Unsafe.ReadUnaligned((void*)num); + num3 = System.Runtime.CompilerServices.Unsafe.ReadUnaligned(ptr2); + if (num2 >= num3 && num2 <= num3) + { + if (num2 == 0) + { + long num4; + short num5; + short num6; + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.AsRef(ptr3)) + { + num4 = *(long*)((ulong)(nint)a + 24uL); + num5 = System.Runtime.CompilerServices.Unsafe.ReadUnaligned((void*)num4); + num6 = System.Runtime.CompilerServices.Unsafe.ReadUnaligned(ptr4); + if (num5 < num6 || num5 > num6) + { + num7 = 0; + goto IL_00df; + } + if (num5 == 0) + { + num7 = 1; + goto IL_00df; + } + num4 += 2; + reference = ref *ptr4; + goto end_IL_009f; + IL_00df: + result = (byte)num7 != 0; + goto end_IL_001e; + end_IL_009f:; + } + while (true) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.Add(ref reference, 1)) + { + IL_00b1: + if (num5 > num6) + { + goto IL_00dc; + } + if (num5 != 0) + { + num4 += 2; + reference = ref *ptr4; + continue; + } + num7 = 1; + goto IL_00df_2; + IL_00df_2: + result = (byte)num7 != 0; + goto end_IL_001e; + IL_00dc: + num7 = 0; + goto IL_00df_2; + IL_00c9: + num5 = System.Runtime.CompilerServices.Unsafe.ReadUnaligned((void*)num4); + num6 = System.Runtime.CompilerServices.Unsafe.ReadUnaligned(ptr4); + if (num5 >= num6) + { + goto IL_00b1; + } + goto IL_00dc; + } + } + } + num += 2; + reference2 = ref *ptr2; + goto end_IL_0053; + } + num7 = 0; + result = (byte)num7 != 0; + goto end_IL_001e; + end_IL_0053:; + } + while (true) + { + fixed (ushort* ptr2 = &System.Runtime.CompilerServices.Unsafe.Add(ref reference2, 1)) + { + if (num2 <= num3) + { + if (num2 != 0) + { + num += 2; + reference2 = ref *ptr2; + continue; + } + long num4; + short num5; + short num6; + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.AsRef(ptr3)) + { + num4 = *(long*)((ulong)(nint)a + 24uL); + num5 = System.Runtime.CompilerServices.Unsafe.ReadUnaligned((void*)num4); + num6 = System.Runtime.CompilerServices.Unsafe.ReadUnaligned(ptr4); + if (num5 < num6 || num5 > num6) + { + num7 = 0; + goto IL_00df_3; + } + if (num5 == 0) + { + num7 = 1; + goto IL_00df_3; + } + num4 += 2; + reference = ref *ptr4; + goto end_IL_009f_2; + IL_00df_3: + result = (byte)num7 != 0; + goto end_IL_001e; + end_IL_009f_2:; + } + while (true) + { + fixed (ushort* ptr4 = &System.Runtime.CompilerServices.Unsafe.Add(ref reference, 1)) + { + IL_00b1_2: + if (num5 > num6) + { + goto IL_00dc_2; + } + if (num5 != 0) + { + num4 += 2; + reference = ref *ptr4; + continue; + } + num7 = 1; + goto IL_00df_4; + IL_00df_4: + result = (byte)num7 != 0; + goto end_IL_001e; + IL_00dc_2: + num7 = 0; + goto IL_00df_4; + IL_00c9_2: + num5 = System.Runtime.CompilerServices.Unsafe.ReadUnaligned((void*)num4); + num6 = System.Runtime.CompilerServices.Unsafe.ReadUnaligned(ptr4); + if (num5 >= num6) + { + goto IL_00b1_2; + } + goto IL_00dc_2; + } + } + } + num7 = 0; + result = (byte)num7 != 0; + goto end_IL_001e; + } + } + } + num7 = 0; + result = (byte)num7 != 0; + } + catch + { + //try-fault + ptr3 = null; + throw; + } + } + end_IL_001e:; + } + catch + { + //try-fault + ptr = null; + throw; + } + } + return result; + } + return false; + } + + private unsafe static Announcement MarshalAlert(MCHResultAnnouncement* hrAlert) + { + //IL_000f: Expected I, but got I8 + //IL_0034: Expected I, but got I8 + Announcement announcement = new Announcement(); + IntPtr ptr = new IntPtr((void*)(*(ulong*)hrAlert)); + announcement.Id = Marshal.PtrToStringUni(ptr); + announcement.HResult = *(int*)((ulong)(nint)hrAlert + 12uL); + IntPtr ptr2 = new IntPtr((void*)(*(ulong*)((ulong)(nint)hrAlert + 24uL))); + announcement.SourceFile = Marshal.PtrToStringUni(ptr2); + announcement.SourceLine = *(uint*)((ulong)(nint)hrAlert + 32uL); + announcement.PlaybackID = *(int*)((ulong)(nint)hrAlert + 16uL); + return announcement; + } + + private unsafe PlayerInterop() + { + //IL_0008: Expected I, but got I8 + //IL_0010: Expected I, but got I8 + //IL_0018: Expected I, but got I8 + //IL_0020: Expected I, but got I8 + //IL_0028: Expected I, but got I8 + //IL_00ae: Expected I, but got I8 + //IL_00bd: Expected I, but got I8 + //IL_00c5: Expected I, but got I8 + ref IntPtr windowHandle = ref _windowHandle; + windowHandle = new IntPtr(null); + _windowHost = null; + _gotStateCloseEvent = null; + _gotStateUninitializeEvent = null; + _fShuttingDown = false; + base._002Ector(); + } + + internal unsafe void OnAlertOccurred(MCHResultAnnouncement* pAlert) + { + raise_AlertSent(MarshalAlert(pAlert)); + } + + internal unsafe void OnStatusChanged(MCPlayerStatus* pStatus) + { + //IL_008d: Expected I, but got I8 + //IL_009a: Expected I, but got I8 + bool flag = false; + long num = *(long*)((ulong)(nint)pStatus + 8uL); + if (_duration != num) + { + _duration = num; + flag = true; + } + int num2 = *(int*)pStatus; + if (_state != (MCPlayerState)num2) + { + _state = (MCPlayerState)num2; + flag = true; + } + byte b = *(byte*)((ulong)(nint)pStatus + 16uL); + int num3 = ((b != 0) ? 1 : 0); + if ((_isReady ? 1 : 0) != num3) + { + int num4 = ((_isReady = ((b != 0) ? true : false)) ? 1 : 0); + flag = true; + } + ulong num5 = *(ulong*)((ulong)(nint)pStatus + 24uL); + if (num5 == 0L) + { + if (_firstDenial != null) + { + _firstDenial = null; + flag = true; + } + } + else if (!HResultDenialsEqual((MCHResultAnnouncement*)num5, _firstDenial)) + { + raise_AlertSent(_firstDenial = MarshalAlert((MCHResultAnnouncement*)(*(ulong*)((ulong)(nint)pStatus + 24uL)))); + } + if (!_fShuttingDown && flag) + { + raise_StatusChanged(this, EventArgs.Empty); + } + if (_fShuttingDown) + { + switch (_state) + { + case MCPlayerState.Closed: + _003CModule_003E.SetEvent(_gotStateCloseEvent); + break; + case MCPlayerState.Uninitialized: + _003CModule_003E.SetEvent(_gotStateUninitializeEvent); + break; + } + } + } + + internal unsafe void OnPropertyChanged(ushort* wzKey, byte* pData, uint dataLength) + { + object value = null; + IntPtr ptr = new IntPtr(wzKey); + string text = Marshal.PtrToStringUni(ptr); + if (pData != null) + { + if (string.Compare(text, "presentationinfo", StringComparison.Ordinal) == 0) + { + byte needOverscan = (byte)((*(bool*)((ulong)(nint)pData + 16uL)) ? 1 : 0); + value = new PresentationInfo((int)(double)(*(float*)pData), (int)(double)(*(float*)((ulong)(nint)pData + 4uL)), *(int*)((ulong)(nint)pData + 8uL), *(int*)((ulong)(nint)pData + 12uL), needOverscan != 0); + } + else if (string.Compare(text, "volumeinfo", StringComparison.Ordinal) == 0) + { + _volume = *(int*)pData; + int num = ((_mute = ((*(int*)((ulong)(nint)pData + 4uL) != 0) ? true : false)) ? 1 : 0); + } + else if (string.Compare(text, "canchangevideorate", StringComparison.Ordinal) == 0) + { + value = (_canChangeVideoRate = *pData != 0); + } + else if (string.Compare(text, "mbrheuristicsdata", StringComparison.Ordinal) == 0) + { + _MBRHEURISTICDATA mBRHEURISTICDATA; + // IL cpblk instruction + System.Runtime.CompilerServices.Unsafe.CopyBlock(ref mBRHEURISTICDATA, pData, 48); + BandwidthUpdateArgs value2 = new BandwidthUpdateArgs(*(long*)(&mBRHEURISTICDATA), System.Runtime.CompilerServices.Unsafe.As<_MBRHEURISTICDATA, float>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref mBRHEURISTICDATA, 8)), System.Runtime.CompilerServices.Unsafe.As<_MBRHEURISTICDATA, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref mBRHEURISTICDATA, 12)), System.Runtime.CompilerServices.Unsafe.As<_MBRHEURISTICDATA, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref mBRHEURISTICDATA, 16)), System.Runtime.CompilerServices.Unsafe.As<_MBRHEURISTICDATA, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref mBRHEURISTICDATA, 20)), System.Runtime.CompilerServices.Unsafe.As<_MBRHEURISTICDATA, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref mBRHEURISTICDATA, 24)), System.Runtime.CompilerServices.Unsafe.As<_MBRHEURISTICDATA, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref mBRHEURISTICDATA, 28)), System.Runtime.CompilerServices.Unsafe.As<_MBRHEURISTICDATA, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref mBRHEURISTICDATA, 32)), System.Runtime.CompilerServices.Unsafe.As<_MBRHEURISTICDATA, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref mBRHEURISTICDATA, 36)), System.Runtime.CompilerServices.Unsafe.As<_MBRHEURISTICDATA, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref mBRHEURISTICDATA, 40)), System.Runtime.CompilerServices.Unsafe.As<_MBRHEURISTICDATA, MBRHeuristicState>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref mBRHEURISTICDATA, 44))); + raise_PlayerBandwithUpdate(this, value2); + } + } + _properties[text] = value; + PlayerPropertyChangedEventArgs value3 = new PlayerPropertyChangedEventArgs(text, value); + raise_PlayerPropertyChanged(this, value3); + } + + internal unsafe void OnTransportStatusChanged(MCTransportStatus* pTransportStatus) + { + _transportState = *(MCTransportState*)pTransportStatus; + _rate = *(float*)((ulong)(nint)pTransportStatus + 4uL); + int num = ((_endOfMedia = ((*(bool*)((ulong)(nint)pTransportStatus + 8uL)) ? true : false)) ? 1 : 0); + int num2 = ((_canSeek = ((*(bool*)((ulong)(nint)pTransportStatus + 9uL)) ? true : false)) ? 1 : 0); + raise_TransportStatusChanged(this, EventArgs.Empty); + } + + internal void OnTransportPositionChanged(long position, long minSeekPosition, long maxSeekPosition) + { + _position = position; + _minSeekPosition = minSeekPosition; + _maxSeekPosition = maxSeekPosition; + raise_TransportPositionChanged(this, EventArgs.Empty); + } + + internal unsafe void OnUriSet(ushort* wzUri, uint dwParam) + { + _currentUriID = (int)dwParam; + _currentUri = new string((char*)wzUri); + raise_UriSet(this, EventArgs.Empty); + } + + [SpecialName] + protected virtual void raise_PlayerPropertyChanged(object value0, PlayerPropertyChangedEventArgs value1) + { + _003Cbacking_store_003EPlayerPropertyChanged?.Invoke(value0, value1); + } + + [SpecialName] + protected virtual void raise_PlayerBandwithUpdate(object value0, BandwidthUpdateArgs value1) + { + _003Cbacking_store_003EPlayerBandwithUpdate?.Invoke(value0, value1); + } + + private void _007EPlayerInterop() + { + _firstDenial = null; + Uninitialize(); + } + + public unsafe void Initialize() + { + //IL_0003: Expected I, but got I8 + //IL_0007: Expected I, but got I8 + //IL_000b: Expected I, but got I8 + //IL_000e: Expected I, but got I8 + //IL_0012: Expected I, but got I8 + //IL_0016: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + //IL_0021: Expected I, but got I8 + //IL_0046: Expected I, but got I8 + //IL_0046: Expected I, but got I8 + //IL_00a2: Expected I, but got I8 + //IL_00d3: Expected I, but got I8 + //IL_0104: Expected I, but got I8 + //IL_012c: Expected I, but got I8 + //IL_0157: Expected I, but got I8 + //IL_0188: Expected I, but got I8 + //IL_01bb: Expected I, but got I8 + //IL_01fd: Expected I, but got I8 + //IL_0221: Expected I, but got I8 + //IL_0227: Expected I, but got I8 + //IL_0240: Expected I, but got I8 + //IL_0265: Expected I, but got I8 + //IL_026b: Expected I, but got I8 + //IL_0284: Expected I, but got I8 + //IL_02bc: Expected I, but got I8 + IMCPlayer* ptr = null; + IMCTransport* ptr2 = null; + IMCPlayerSetUri* ptr3 = null; + IMCDynamicImage* ptr4 = null; + IMCVolumeControl* ptr5 = null; + IZuneSpectrumMgr* ptr6 = null; + if ((_gotStateCloseEvent = _003CModule_003E.CreateEventW(null, 0, 0, null)) == null) + { + throw new COMException("PlayerInterop failed to CreateEvent for close", 0); + } + if ((_gotStateUninitializeEvent = _003CModule_003E.CreateEventW(null, 0, 0, null)) == null) + { + throw new COMException("PlayerInterop failed to CreateEvent for uninit", 0); + } + int num = _003CModule_003E.WmpCoreInitialize(); + if (num < 0) + { + throw new COMException("Playback core initialization failed.", num); + } + num = _003CModule_003E.CWmpPlayer_GetInstance(&ptr); + if (num >= 0 && ptr != null) + { + _uPlayer = ptr; + IMCPlayer* intPtr = ptr; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(ulong*)ptr)))((nint)intPtr, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._GUID_2f33a725_95cb_4080_adef_93a067a707ba), (void**)(&ptr2)); + if (num >= 0 && ptr2 != null) + { + _uTransport = ptr2; + IMCPlayer* uPlayer = _uPlayer; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(ulong*)uPlayer)))((nint)uPlayer, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._GUID_58864c93_45f9_4c6d_aa3f_80f6caa08281), (void**)(&ptr3)); + if (num >= 0 && ptr3 != null) + { + _uSetUri = ptr3; + IMCPlayer* uPlayer2 = _uPlayer; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(ulong*)uPlayer2)))((nint)uPlayer2, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._GUID_102e281e_28ad_4688_aaff_f560f8053d90), (void**)(&ptr4)); + if (num >= 0 && ptr4 != null) + { + _uDynamicImage = ptr4; + IMCDynamicImage* intPtr2 = ptr4; + int nDynamicImage = _nDynamicImage; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)ptr4 + 24)))((nint)intPtr2, nDynamicImage); + if (num < 0) + { + throw new COMException("PlayerInterop failed to initialize IMCDynamicImage", num); + } + IMCPlayer* uPlayer3 = _uPlayer; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(ulong*)uPlayer3)))((nint)uPlayer3, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._GUID_f6ba930c_78c3_488c_924d_2d3fc1e8fb70), (void**)(&ptr5)); + if (num >= 0 && ptr5 != null) + { + _uVolumeControl = ptr5; + IMCPlayer* uPlayer4 = _uPlayer; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(ulong*)uPlayer4)))((nint)uPlayer4, (_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E._GUID_aff1732d_13f3_45e5_a52f_a854729e8730), (void**)(&ptr6)); + if (num >= 0 && ptr6 != null) + { + _uZuneSpectrumMgr = ptr6; + CPlayerInteropEventSink* ptr7 = (CPlayerInteropEventSink*)_003CModule_003E.@new(48uL); + CPlayerInteropEventSink* ptr8; + try + { + ptr8 = ((ptr7 == null) ? null : _003CModule_003E.MicrosoftZunePlayback_002ECPlayerInteropEventSink_002E_007Bctor_007D(ptr7, this)); + } + catch + { + //try-fault + _003CModule_003E.delete(ptr7); + throw; + } + _uEventSink = ptr8; + if (ptr8 == null) + { + throw new OutOfMemoryException(); + } + long num2 = *(long*)_uPlayer + 24; + IMCPlayer* uPlayer5 = _uPlayer; + void* intPtr3 = _windowHandle.ToPointer(); + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num2))((nint)uPlayer5, (HWND__*)intPtr3, 0u, (IMCPlayerEvents*)ptr8); + if (num < 0) + { + throw new COMException("PlayerInterop failed to initialize IMCPlayer", num); + } + CPlayerInteropEventSink* uEventSink = _uEventSink; + CPlayerInteropEventSink* ptr9 = (CPlayerInteropEventSink*)((uEventSink == null) ? 0 : ((ulong)(nint)uEventSink + 8uL)); + IMCTransport* uTransport = _uTransport; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uTransport + 24)))((nint)uTransport, (IMCTransportEvents*)ptr9); + if (num < 0) + { + throw new COMException("PlayerInterop failed to initialize IMCTransport", num); + } + CPlayerInteropEventSink* uEventSink2 = _uEventSink; + CPlayerInteropEventSink* ptr10 = (CPlayerInteropEventSink*)((uEventSink2 == null) ? 0 : ((ulong)(nint)uEventSink2 + 16uL)); + IMCPlayerSetUri* uSetUri = _uSetUri; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uSetUri + 24)))((nint)uSetUri, (IMCPlayerSetUriEvents*)ptr10); + if (num < 0) + { + throw new COMException("PlayerInterop failed to initialize IMCPlayerSetUri", num); + } + long num3 = *(long*)_uTransport + 96; + IMCTransport* uTransport2 = _uTransport; + double totalMilliseconds = _positionEventInterval.TotalMilliseconds; + num = ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num3))((nint)uTransport2, (uint)totalMilliseconds); + if (num < 0 && num != -2147467263) + { + throw new COMException("Attempt to set initial position event firing interval failed.", num); + } + _properties = new Dictionary(); + return; + } + throw new COMException("PlayerInterop failed to get IZuneSpectrumMgr instance.", num); + } + throw new COMException("PlayerInterop failed to get IMCVolumeControl instance.", num); + } + throw new COMException("PlayerInterop failed to get IMCDynamicImage instance.", num); + } + throw new COMException("PlayerInterop failed to get IMCTransport instance.", num); + } + throw new COMException("PlayerInterop failed to get IMCTransport instance.", num); + } + throw new COMException("PlayerInterop failed to get IMCPlayer instance.", num); + } + + public unsafe void Uninitialize() + { + //IL_0028: Expected I, but got I8 + //IL_004c: Expected I, but got I8 + //IL_009c: Expected I, but got I8 + //IL_00b1: Expected I, but got I8 + //IL_00c5: Expected I, but got I8 + //IL_00e7: Expected I, but got I8 + //IL_00f0: Expected I, but got I8 + //IL_010c: Expected I, but got I8 + //IL_0115: Expected I, but got I8 + //IL_0131: Expected I, but got I8 + //IL_013a: Expected I, but got I8 + //IL_0156: Expected I, but got I8 + //IL_015f: Expected I, but got I8 + //IL_0178: Expected I, but got I8 + //IL_0181: Expected I, but got I8 + //IL_019a: Expected I, but got I8 + //IL_01a3: Expected I, but got I8 + //IL_01bc: Expected I, but got I8 + //IL_01c5: Expected I, but got I8 + bool flag = false; + if (_uPlayer != null) + { + _fShuttingDown = true; + IMCPlayer* uPlayer = _uPlayer; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uPlayer + 40)))((nint)uPlayer); + _003CModule_003E.WaitForSingleObject(_gotStateCloseEvent, 5000u); + IMCPlayer* uPlayer2 = _uPlayer; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uPlayer2 + 32)))((nint)uPlayer2); + byte condition = (byte)((_003CModule_003E.WaitForSingleObject(_gotStateUninitializeEvent, 5000u) == 0 && _state == MCPlayerState.Uninitialized) ? 1 : 0); + ShipAssert.AssertId(condition != 0, 80000u, 0u); + flag = _state != 0 || flag; + IMCPlayer* uPlayer3 = _uPlayer; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uPlayer3 + 64)))((nint)uPlayer3); + } + _003CModule_003E.CloseHandle(_gotStateCloseEvent); + _gotStateCloseEvent = null; + _003CModule_003E.CloseHandle(_gotStateUninitializeEvent); + _gotStateUninitializeEvent = null; + if (!flag) + { + CPlayerInteropEventSink* uEventSink = _uEventSink; + if (0L != (nint)uEventSink) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uEventSink + 16)))((nint)uEventSink); + _uEventSink = null; + } + IMCPlayer* uPlayer4 = _uPlayer; + if (0L != (nint)uPlayer4) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uPlayer4 + 16)))((nint)uPlayer4); + _uPlayer = null; + } + IMCTransport* uTransport = _uTransport; + if (0L != (nint)uTransport) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uTransport + 16)))((nint)uTransport); + _uTransport = null; + } + IMCPlayerSetUri* uSetUri = _uSetUri; + if (0L != (nint)uSetUri) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uSetUri + 16)))((nint)uSetUri); + _uSetUri = null; + } + IMCDynamicImage* uDynamicImage = _uDynamicImage; + if (0L != (nint)uDynamicImage) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uDynamicImage + 16)))((nint)uDynamicImage); + _uDynamicImage = null; + } + IMCVolumeControl* uVolumeControl = _uVolumeControl; + if (0L != (nint)uVolumeControl) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uVolumeControl + 16)))((nint)uVolumeControl); + _uVolumeControl = null; + } + IZuneSpectrumMgr* uZuneSpectrumMgr = _uZuneSpectrumMgr; + if (0L != (nint)uZuneSpectrumMgr) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uZuneSpectrumMgr + 16)))((nint)uZuneSpectrumMgr); + _uZuneSpectrumMgr = null; + } + _003CModule_003E.WmpCoreDeinitialize(); + } + } + + public unsafe void Close() + { + //IL_0017: Expected I, but got I8 + IMCPlayer* uPlayer = _uPlayer; + if (uPlayer != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uPlayer + 40)))((nint)uPlayer); + } + } + + [SpecialName] + protected void raise_StatusChanged(object value0, EventArgs value1) + { + _003Cbacking_store_003EStatusChanged?.Invoke(value0, value1); + } + + [SpecialName] + protected void raise_AlertSent(Announcement value0) + { + _003Cbacking_store_003EAlertSent?.Invoke(value0); + } + + public unsafe void Play() + { + //IL_002a: Expected I, but got I8 + //IL_0040: Expected I, but got I8 + //IL_0053: Expected I, but got I8 + IMCVolumeControl* uVolumeControl = _uVolumeControl; + if (uVolumeControl != null && _uTransport != null) + { + bool mute = _mute; + if (mute) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uVolumeControl + 32)))((nint)uVolumeControl, mute ? ((byte)1) : ((byte)0)); + } + else + { + int volume = _volume; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uVolumeControl + 24)))((nint)uVolumeControl, volume); + } + IMCTransport* uTransport = _uTransport; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uTransport + 40)))((nint)uTransport); + } + } + + public unsafe void Pause() + { + //IL_0017: Expected I, but got I8 + IMCTransport* uTransport = _uTransport; + if (uTransport != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uTransport + 32)))((nint)uTransport); + } + } + + public unsafe void Stop() + { + //IL_0017: Expected I, but got I8 + IMCTransport* uTransport = _uTransport; + if (uTransport != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uTransport + 48)))((nint)uTransport); + } + } + + public unsafe void SeekToRelativePosition(long offsetIn100nsUnits) + { + //IL_0018: Expected I, but got I8 + IMCTransport* uTransport = _uTransport; + if (uTransport != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uTransport + 56)))((nint)uTransport, offsetIn100nsUnits); + } + } + + public unsafe void SeekToAbsolutePosition(long offsetIn100nsUnits) + { + //IL_0018: Expected I, but got I8 + IMCTransport* uTransport = _uTransport; + if (uTransport != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uTransport + 64)))((nint)uTransport, offsetIn100nsUnits); + } + } + + public unsafe void SeekToRelativeFrame(long offsetInFrames) + { + //IL_0018: Expected I, but got I8 + IMCTransport* uTransport = _uTransport; + if (uTransport != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uTransport + 72)))((nint)uTransport, offsetInFrames); + } + } + + [SpecialName] + protected void raise_TransportStatusChanged(object value0, EventArgs value1) + { + _003Cbacking_store_003ETransportStatusChanged?.Invoke(value0, value1); + } + + [SpecialName] + protected void raise_TransportPositionChanged(object value0, EventArgs value1) + { + _003Cbacking_store_003ETransportPositionChanged?.Invoke(value0, value1); + } + + public unsafe void SetUri(string uri, long startPositionIn100nsUnits, int UriID) + { + //IL_0033: Expected I, but got I8 + if (!(uri != (string)null)) + { + return; + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(uri))) + { + try + { + IMCPlayerSetUri* uSetUri = _uSetUri; + if (uSetUri != null) + { + long num = *(long*)uSetUri + 32; + IMCPlayerSetUri* uSetUri2 = _uSetUri; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)uSetUri2, ptr, startPositionIn100nsUnits, (uint)UriID); + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + + public unsafe void SetNextUri(string uri, long startPositionIn100nsUnits, int UriID) + { + //IL_0033: Expected I, but got I8 + if (!(uri != (string)null)) + { + return; + } + fixed (ushort* ptr = &System.Runtime.CompilerServices.Unsafe.As(ref _003CModule_003E.PtrToStringChars(uri))) + { + try + { + IMCPlayerSetUri* uSetUri = _uSetUri; + if (uSetUri != null) + { + long num = *(long*)uSetUri + 40; + IMCPlayerSetUri* uSetUri2 = _uSetUri; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)num))((nint)uSetUri2, ptr, startPositionIn100nsUnits, (uint)UriID); + } + } + catch + { + //try-fault + ptr = null; + throw; + } + } + } + + public unsafe void CancelNext() + { + //IL_0017: Expected I, but got I8 + IMCPlayerSetUri* uSetUri = _uSetUri; + if (uSetUri != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uSetUri + 48)))((nint)uSetUri); + } + } + + [SpecialName] + protected void raise_UriSet(object value0, EventArgs value1) + { + _003Cbacking_store_003EUriSet?.Invoke(value0, value1); + } + + public unsafe void ConnectAnimationsToSpectrumAnalyzer(uint uixAnimationsId, uint bandCount, [MarshalAs(UnmanagedType.U1)] bool outputFrequencyData, [MarshalAs(UnmanagedType.U1)] bool outputWaveformData, [MarshalAs(UnmanagedType.U1)] bool enableStereoOutput) + { + //IL_001e: Expected I, but got I8 + IZuneSpectrumMgr* uZuneSpectrumMgr = _uZuneSpectrumMgr; + if (uZuneSpectrumMgr != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uZuneSpectrumMgr + 24)))((nint)uZuneSpectrumMgr, uixAnimationsId, bandCount, outputFrequencyData ? ((byte)1) : ((byte)0), outputWaveformData ? ((byte)1) : ((byte)0), enableStereoOutput ? ((byte)1) : ((byte)0)); + } + } + + public unsafe void DisconnectAnimationsFromSpectrumAnalyzer(uint uixAnimationsId) + { + //IL_0018: Expected I, but got I8 + IZuneSpectrumMgr* uZuneSpectrumMgr = _uZuneSpectrumMgr; + if (uZuneSpectrumMgr != null) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uZuneSpectrumMgr + 32)))((nint)uZuneSpectrumMgr, uixAnimationsId); + } + } + + public unsafe void ProgressivePlaybackReleaseFile() + { + //IL_0032: Expected I, but got I8 + //IL_0032: Expected I, but got I8 + //IL_0033: Expected I8, but got I + //IL_005e: Expected I, but got I8 + //IL_0074: Expected I, but got I8 + if (_uTransport == null) + { + return; + } + CPlayerInteropEventSink* uEventSink = _uEventSink; + if (uEventSink != null && *(long*)((ulong)(nint)uEventSink + 40uL) == 0L) + { + *(long*)((ulong)(nint)_uEventSink + 40uL) = (nint)_003CModule_003E.CreateEventW(null, 0, 0, null); + if (*(long*)((ulong)(nint)_uEventSink + 40uL) == 0L) + { + throw new COMException("PlayerInterop failed to CreateEvent for ProgressivePlaybackReleaseFile", 0); + } + IMCTransport* uTransport = _uTransport; + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uTransport + 104)))((nint)uTransport); + byte condition = ((_003CModule_003E.WaitForSingleObject((void*)(*(ulong*)((ulong)(nint)_uEventSink + 40uL)), 30000u) == 0) ? ((byte)1) : ((byte)0)); + ShipAssert.AssertId(condition != 0, 80001u, 0u); + } + } + + public unsafe void ProgressivePlaybackReopenFile() + { + //IL_0029: Expected I, but got I8 + //IL_003a: Expected I, but got I8 + IMCTransport* uTransport = _uTransport; + if (uTransport != null) + { + CPlayerInteropEventSink* uEventSink = _uEventSink; + if (uEventSink != null && *(long*)((ulong)(nint)uEventSink + 40uL) != 0L) + { + ((delegate* unmanaged[Cdecl, Cdecl])(*(ulong*)(*(long*)uTransport + 112)))((nint)uTransport); + _003CModule_003E.CloseHandle((void*)(*(ulong*)((ulong)(nint)_uEventSink + 40uL))); + *(long*)((ulong)(nint)_uEventSink + 40uL) = 0L; + } + } + } + + protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0) + { + if (P_0) + { + _007EPlayerInterop(); + } + else + { + Finalize(); + } + } + + public sealed override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/PlayerPropertyChangedEventArgs.cs b/ZuneDBApi/MicrosoftZunePlayback/PlayerPropertyChangedEventArgs.cs new file mode 100644 index 0000000..ea19cc3 --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/PlayerPropertyChangedEventArgs.cs @@ -0,0 +1,21 @@ +using System; + +namespace MicrosoftZunePlayback +{ + public class PlayerPropertyChangedEventArgs : EventArgs + { + private string _key; + + private object _value; + + public object Value => _value; + + public string Key => _key; + + public PlayerPropertyChangedEventArgs(string key, object value) + { + _key = key; + _value = value; + } + } +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/PlayerPropertyChangedEventHandler.cs b/ZuneDBApi/MicrosoftZunePlayback/PlayerPropertyChangedEventHandler.cs new file mode 100644 index 0000000..5308049 --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/PlayerPropertyChangedEventHandler.cs @@ -0,0 +1,4 @@ +namespace MicrosoftZunePlayback +{ + public delegate void PlayerPropertyChangedEventHandler(object sender, PlayerPropertyChangedEventArgs args); +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/PresentationInfo.cs b/ZuneDBApi/MicrosoftZunePlayback/PresentationInfo.cs new file mode 100644 index 0000000..e312a4e --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/PresentationInfo.cs @@ -0,0 +1,43 @@ +using System.Runtime.InteropServices; + +namespace MicrosoftZunePlayback +{ + public class PresentationInfo + { + private int _AspectRatioX; + + private int _AspectRatioY; + + private int _NativeX; + + private int _NativeY; + + private bool _NeedOverscan; + + public bool NeedOverscan + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return _NeedOverscan; + } + } + + public int ContentHeight => _NativeY; + + public int ContentWidth => _NativeX; + + public int ContentAspectHeight => _AspectRatioY; + + public int ContentAspectWidth => _AspectRatioX; + + public PresentationInfo(int aspectRatioX, int aspectRatioY, int nativeX, int nativeY, [MarshalAs(UnmanagedType.U1)] bool needOverscan) + { + _AspectRatioX = aspectRatioX; + _AspectRatioY = aspectRatioY; + _NativeX = nativeX; + _NativeY = nativeY; + _NeedOverscan = needOverscan; + } + } +} diff --git a/ZuneDBApi/MicrosoftZunePlayback/VideoWindow.cs b/ZuneDBApi/MicrosoftZunePlayback/VideoWindow.cs new file mode 100644 index 0000000..e7bc5b6 --- /dev/null +++ b/ZuneDBApi/MicrosoftZunePlayback/VideoWindow.cs @@ -0,0 +1,39 @@ +using System.Runtime.InteropServices; + +namespace MicrosoftZunePlayback +{ + public class VideoWindow + { + private int _left; + + private int _top; + + private int _right; + + private int _bottom; + + public int Bottom => _bottom; + + public int Right => _right; + + public int Top => _top; + + public int Left => _left; + + public VideoWindow(int left, int top, int right, int bottom) + { + _left = left; + _top = top; + _right = right; + _bottom = bottom; + base._002Ector(); + } + + [return: MarshalAs(UnmanagedType.U1)] + public bool IsDifferent(VideoWindow challenger) + { + int num = ((_left != challenger._left && _top != challenger._top && _right != challenger._right && _bottom != challenger._bottom) ? 1 : 0); + return (byte)num != 0; + } + } +} diff --git a/ZuneDBApi/MusicAlbumMetadata.cs b/ZuneDBApi/MusicAlbumMetadata.cs new file mode 100644 index 0000000..3ce69d1 --- /dev/null +++ b/ZuneDBApi/MusicAlbumMetadata.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 112)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[UnsafeValueType] +[NativeCppClass] +internal struct MusicAlbumMetadata +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/MusicTrackMetadata.cs b/ZuneDBApi/MusicTrackMetadata.cs new file mode 100644 index 0000000..5a5387b --- /dev/null +++ b/ZuneDBApi/MusicTrackMetadata.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 160)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +[UnsafeValueType] +internal struct MusicTrackMetadata +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/NSSMediator.cs b/ZuneDBApi/NSSMediator.cs new file mode 100644 index 0000000..c6552be --- /dev/null +++ b/ZuneDBApi/NSSMediator.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 40)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal struct NSSMediator +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/NewsletterOptions.cs b/ZuneDBApi/NewsletterOptions.cs new file mode 100644 index 0000000..1122bf8 --- /dev/null +++ b/ZuneDBApi/NewsletterOptions.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 12)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct NewsletterOptions +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/POWER_INFORMATION_LEVEL.cs b/ZuneDBApi/POWER_INFORMATION_LEVEL.cs new file mode 100644 index 0000000..e6b7115 --- /dev/null +++ b/ZuneDBApi/POWER_INFORMATION_LEVEL.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal enum POWER_INFORMATION_LEVEL +{ + +} diff --git a/ZuneDBApi/Properties/AssemblyInfo.cs b/ZuneDBApi/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e2d33ed --- /dev/null +++ b/ZuneDBApi/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +using System.Reflection; +using System.Runtime.InteropServices; +using System.Security.Permissions; + +[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation. All rights reserved.")] +[assembly: AssemblyProduct("Microsoft (R) Windows (R) Operating System")] +[assembly: ComVisible(false)] +[assembly: AssemblyCompany("Microsoft Corporation")] +[assembly: AssemblyDelaySign(true)] +[assembly: AssemblyKeyFile("e:\\temp\\471135\\public.amd64fre\\internal\\strongnamekeys\\fake\\36MSApp1024.snk")] +[assembly: AssemblyVersion("4.7.0.0")] diff --git a/ZuneDBApi/QUICK_MIX_MEDIA_INFO.cs b/ZuneDBApi/QUICK_MIX_MEDIA_INFO.cs new file mode 100644 index 0000000..b8672b6 --- /dev/null +++ b/ZuneDBApi/QUICK_MIX_MEDIA_INFO.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 136)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[UnsafeValueType] +[NativeCppClass] +internal struct QUICK_MIX_MEDIA_INFO +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/QUICK_MIX_STATUS_INFO.cs b/ZuneDBApi/QUICK_MIX_STATUS_INFO.cs new file mode 100644 index 0000000..bef1c6b --- /dev/null +++ b/ZuneDBApi/QUICK_MIX_STATUS_INFO.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 16)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct QUICK_MIX_STATUS_INFO +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/SSyncRuleDetails.cs b/ZuneDBApi/SSyncRuleDetails.cs new file mode 100644 index 0000000..fe7bb19 --- /dev/null +++ b/ZuneDBApi/SSyncRuleDetails.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 40)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct SSyncRuleDetails +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/SYSTEM_BATTERY_STATE.cs b/ZuneDBApi/SYSTEM_BATTERY_STATE.cs new file mode 100644 index 0000000..476856e --- /dev/null +++ b/ZuneDBApi/SYSTEM_BATTERY_STATE.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 32)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[UnsafeValueType] +[NativeCppClass] +internal struct SYSTEM_BATTERY_STATE +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/SyncRulesViewMediator.cs b/ZuneDBApi/SyncRulesViewMediator.cs new file mode 100644 index 0000000..e191165 --- /dev/null +++ b/ZuneDBApi/SyncRulesViewMediator.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 32)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal struct SyncRulesViewMediator +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/ThumbBarButtonIcons.cs b/ZuneDBApi/ThumbBarButtonIcons.cs new file mode 100644 index 0000000..ec0476c --- /dev/null +++ b/ZuneDBApi/ThumbBarButtonIcons.cs @@ -0,0 +1,14 @@ +public enum ThumbBarButtonIcons +{ + eLastThumbBarButtonIcon = 10, + eThumbBarButtonIconUnrated = 9, + eThumbBarButtonIconHateIt = 8, + eThumbBarButtonIconLoveIt = 7, + eThumbBarButtonIconNextDisabled = 6, + eThumbBarButtonIconNext = 5, + eThumbBarButtonIconPreviousDisabled = 4, + eThumbBarButtonIconPrevious = 3, + eThumbBarButtonIconPause = 2, + eThumbBarButtonIconPlayDisabled = 1, + eThumbBarButtonIconPlay = 0 +} diff --git a/ZuneDBApi/TunerInfo.cs b/ZuneDBApi/TunerInfo.cs new file mode 100644 index 0000000..e39326c --- /dev/null +++ b/ZuneDBApi/TunerInfo.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 48)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct TunerInfo +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/VideoMetadata.cs b/ZuneDBApi/VideoMetadata.cs new file mode 100644 index 0000000..9a766fc --- /dev/null +++ b/ZuneDBApi/VideoMetadata.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 200)] +[UnsafeValueType] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct VideoMetadata +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/WBSTRString.cs b/ZuneDBApi/WBSTRString.cs new file mode 100644 index 0000000..42deacf --- /dev/null +++ b/ZuneDBApi/WBSTRString.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 16)] +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct WBSTRString +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/WMIDPREQUESTCODE.cs b/ZuneDBApi/WMIDPREQUESTCODE.cs new file mode 100644 index 0000000..85cd200 --- /dev/null +++ b/ZuneDBApi/WMIDPREQUESTCODE.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal enum WMIDPREQUESTCODE +{ + +} diff --git a/ZuneDBApi/WMT_ATTR_DATATYPE.cs b/ZuneDBApi/WMT_ATTR_DATATYPE.cs new file mode 100644 index 0000000..1ad31bb --- /dev/null +++ b/ZuneDBApi/WMT_ATTR_DATATYPE.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[NativeCppClass] +[DebugInfoInPDB] +internal enum WMT_ATTR_DATATYPE +{ + +} diff --git a/ZuneDBApi/WPP_PROJECT_CONTROL_BLOCK.cs b/ZuneDBApi/WPP_PROJECT_CONTROL_BLOCK.cs new file mode 100644 index 0000000..ab47cd5 --- /dev/null +++ b/ZuneDBApi/WPP_PROJECT_CONTROL_BLOCK.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Explicit, Size = 32)] +[MiscellaneousBits(66)] +[NativeCppClass] +[UnsafeValueType] +[DebugInfoInPDB] +internal struct WPP_PROJECT_CONTROL_BLOCK +{ +} diff --git a/ZuneDBApi/WString.cs b/ZuneDBApi/WString.cs new file mode 100644 index 0000000..b71220f --- /dev/null +++ b/ZuneDBApi/WString.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 16)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(64)] +internal struct WString +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/WindowPositionKeys.cs b/ZuneDBApi/WindowPositionKeys.cs new file mode 100644 index 0000000..0ac00bb --- /dev/null +++ b/ZuneDBApi/WindowPositionKeys.cs @@ -0,0 +1,10 @@ +public enum WindowPositionKeys +{ + eWindowPositionKeyDown = 3, + eWindowPositionKeyUp = 2, + eWindowPositionKeyRight = 1, + eWindowPositionKeyLeft = 0, + eLastWindowPositionKey = 6, + eWindowPositionKeyShiftRight = 5, + eWindowPositionKeyShiftLeft = 4 +} diff --git a/ZuneDBApi/ZuneDBApi.csproj b/ZuneDBApi/ZuneDBApi.csproj new file mode 100644 index 0000000..c7907bf --- /dev/null +++ b/ZuneDBApi/ZuneDBApi.csproj @@ -0,0 +1,23 @@ + + + ZuneDBApi + False + net20 + x64 + + + Preview + True + + + app.manifest + + + + + + + C:\Program Files\Zune\UIX.dll + + + \ No newline at end of file diff --git a/ZuneDBApi/ZuneUI/DescriptionAttribute.cs b/ZuneDBApi/ZuneUI/DescriptionAttribute.cs new file mode 100644 index 0000000..b6ddec8 --- /dev/null +++ b/ZuneDBApi/ZuneUI/DescriptionAttribute.cs @@ -0,0 +1,16 @@ +using System; + +namespace ZuneUI +{ + public class DescriptionAttribute : Attribute + { + private uint m_stringId; + + public uint StringId => m_stringId; + + public DescriptionAttribute(uint stringId) + { + m_stringId = stringId; + } + } +} diff --git a/ZuneDBApi/ZuneUI/HRESULT.cs b/ZuneDBApi/ZuneUI/HRESULT.cs new file mode 100644 index 0000000..80b5aa6 --- /dev/null +++ b/ZuneDBApi/ZuneUI/HRESULT.cs @@ -0,0 +1,625 @@ +using System.Runtime.InteropServices; + +namespace ZuneUI +{ + public struct HRESULT + { + public int hr; + + public static HRESULT _S_OK; + + public static HRESULT _S_FALSE; + + public static HRESULT _E_ABORT; + + public static HRESULT _E_PENDING; + + public static HRESULT _E_FAIL; + + public static HRESULT _E_UNEXPECTED; + + public static HRESULT _E_ACCESSDENIED; + + public static HRESULT _ERROR_SERVICE_DISABLED; + + public static HRESULT _NS_E_WMP_UNKNOWN_ERROR; + + public static HRESULT _NS_E_WMP_PLAYLIST_IMPORT_ERROR; + + public static HRESULT _NS_E_CD_BUSY; + + public static HRESULT _E_ALREADY_EXISTS; + + public static HRESULT _DB_E_NOTFOUND; + + public static HRESULT _DB_E_RESOURCEEXISTS; + + public static HRESULT _DB_E_BADPARAMETERNAME; + + public static HRESULT _ZUNE_E_NO_AVAILABLE_RESTORE_POINT; + + public static HRESULT _NS_E_MTPZ_WLAN_TEST_UNKNOWN; + + public static HRESULT _NS_E_MTPZ_WLAN_TEST_RUNNING; + + public static HRESULT _NS_E_MTPZ_WLAN_TEST_FAIL_NO_CONFIG; + + public static HRESULT _NS_E_MTPZ_WLAN_TEST_FAIL_ASSOCIATE; + + public static HRESULT _NS_E_MTPZ_WLAN_TEST_FAIL_DHCP; + + public static HRESULT _NS_E_MTPZ_WLAN_TEST_FAIL_TIMEOUT; + + public static HRESULT _NS_E_MTPZ_WLAN_TEST_FAIL_CANCELLED; + + public static HRESULT _NS_E_MTPZ_WLAN_TEST_FAIL_INTERNAL; + + public static HRESULT _ZEST_E_TOO_MANY_DEREGISTRATIONS_WITHIN_MONTH; + + public static HRESULT _NS_E_MEDIA_DOWNLOAD_MAXIMUM_EXCEEDED; + + public static HRESULT _ZUNE_E_NO_SUBSCRIPTION_DOWNLOAD_RIGHTS; + + public static HRESULT _NS_E_MEDIA_NOT_PURCHASED; + + public static HRESULT _NS_E_MESSAGING_CLIENT_ERROR; + + public static HRESULT _NS_E_MESSAGING_RECIPIENT_ERROR; + + public static HRESULT _NS_E_MESSAGING_PARENTAL_CONTROL_ERROR; + + public static HRESULT _NS_E_CART_FULL; + + public static HRESULT _NS_E_CART_TOO_MANY_NEW_ITEMS; + + public static HRESULT _NS_E_CART_MORE_ITEMS_AVAILABLE; + + public static HRESULT _NS_E_SIGNIN_TERMS_OF_SERVICE; + + public static HRESULT _NS_E_SERVER_ACCESSDENIED; + + public static HRESULT _NS_E_PASSPORT_LOGIN_FAILED; + + public static HRESULT _NS_E_SUBSCRIPTIONSERVICE_LOGIN_FAILED; + + public static HRESULT _NS_E_INVALID_USERNAME_AND_PASSWORD; + + public static HRESULT _NS_E_SIGNIN_ACCOUNTS_INVALID_USER; + + public static HRESULT _NS_E_SIGNIN_ACCOUNTS_NOT_XENON_USER; + + public static HRESULT _NS_E_SIGNIN_WCMUSIC_ACCOUNT_NOT_ELIGIBLE; + + public static HRESULT _ZUNE_E_SIGNIN_TERMS_OF_SERVICE_CHILD; + + public static HRESULT _NS_E_SIGNIN_INVALID_REGION; + + public static HRESULT _ZEST_E_UNAUTHENTICATED; + + public static HRESULT _NS_E_SIGNIN_HTTP_GONE; + + public static HRESULT _NS_E_BILLING_LIGHTWEIGHT_ACCOUNT; + + public static HRESULT _NS_E_FIRMWARE_UPDATE_DISK_FULL; + + public static HRESULT _NS_E_WINLIVE_SIGNIN_NAME_TOO_SHORT; + + public static HRESULT _NS_E_WINLIVE_SIGNIN_NAME_TOO_LONG; + + public static HRESULT _NS_E_WINLIVE_SIGNIN_NAME_INVALID; + + public static HRESULT _NS_E_WINLIVE_EMAIL_INVALID; + + public static HRESULT _NS_E_WINLIVE_NAME_INVALID; + + public static HRESULT _NS_E_WINLIVE_BIRTH_YEAR_INVALID; + + public static HRESULT _NS_E_WINLIVE_BIRTH_DAY_INVALID; + + public static HRESULT _NS_E_WINLIVE_BIRTH_MONTH_INVALID; + + public static HRESULT _NS_E_WINLIVE_BIRTH_DATE_FUTURE; + + public static HRESULT _NS_E_WINLIVE_HIP_SOLUTION_INVALID; + + public static HRESULT _NS_E_WINLIVE_PASSWORD_TOO_LONG; + + public static HRESULT _NS_E_WINLIVE_PASSWORD_TOO_SHORT; + + public static HRESULT _NS_E_WINLIVE_PASSWORD_INVALID; + + public static HRESULT _NS_E_WINLIVE_MEMBER_EXISTS; + + public static HRESULT _NS_E_WINLIVE_DOMAIN_IS_MANAGED; + + public static HRESULT _NS_E_WINLIVE_SECRET_QUESTION_TOO_SHORT; + + public static HRESULT _NS_E_WINLIVE_SECRET_QUESTION_TOO_LONG; + + public static HRESULT _NS_E_WINLIVE_SECRET_ANSWER_TOO_SHORT; + + public static HRESULT _NS_E_WINLIVE_SECRET_ANSWER_TOO_LONG; + + public static HRESULT _NS_E_WINLIVE_SECRET_QUESTION_CONTAINS_ANSWER; + + public static HRESULT _NS_E_WINLIVE_SECRET_ANSWER_CONTAINS_MEMBER_NAME; + + public static HRESULT _NS_E_WINLIVE_SECRET_ANSWER_CONTAINS_PASSWORD; + + public static HRESULT _NS_E_WINLIVE_SECRET_QUESTION_CONTAINS_PASSWORD; + + public static HRESULT _ZUNE_E_WINLIVE_UNAUTHORIZED_DOMAIN; + + public static HRESULT _ZEST_E_ACCOUNT_ZUNETAG_OCCUPIED; + + public static HRESULT _ZUNE_E_SIGNUP_INVALID_PARENT_EMAIL; + + public static HRESULT _ZUNE_E_SIGNUP_INVALID_PARENT_AGE; + + public static HRESULT _ZUNE_E_SIGNUP_PASSWORDS_DONT_MATCH; + + public static HRESULT _ZUNE_E_UPDATE_ACCOUNT_INFO_FAILED; + + public static HRESULT _ZEST_E_INVALID_POSTALCODE; + + public static HRESULT _ZEST_E_LIVEACCOUNT_INVALIDPHONE; + + public static HRESULT _ZEST_E_LIVEACCOUNT_ADDRESS_INVALID; + + public static HRESULT _ZEST_E_LIVEACCOUNT_PAYMENT_INSTRUMENT_INVALID; + + public static HRESULT _ZEST_E_CREDITCARD_ADDRESS_INVALID; + + public static HRESULT _ZEST_E_CREDITCARD_ADDRESS_STREET1_INVALID; + + public static HRESULT _ZEST_E_CREDITCARD_ADDRESS_CITY_INVALID; + + public static HRESULT _ZEST_E_CREDITCARD_ADDRESS_STATE_INVALID; + + public static HRESULT _ZEST_E_CREDITCARD_ADDRESS_POSTALCODE_INVALID; + + public static HRESULT _ZEST_E_CREDITCARD_PARENTPHONE_INVALID; + + public static HRESULT _ZEST_E_CREDITCARD_INVALID; + + public static HRESULT _ZEST_E_CREDITCARD_VALIDATE_FAILED; + + public static HRESULT _ZEST_E_CREDITCARD_ADD_FAILED; + + public static HRESULT _ZEST_E_INVALID_ARG_ZUNETAG; + + public static HRESULT _ZEST_E_INVALID_ARG_PARENT_PHONE_INVALID; + + public static HRESULT _ZEST_E_INVALID_ARG_CONTACT_INFO; + + public static HRESULT _ZEST_E_INVALID_ARG_LANGUAGE; + + public static HRESULT _ZEST_E_ZUNETAG_OFFENSIVE; + + public static HRESULT _ZUNE_E_PURCHASE_REQUIRES_AUTHORIZATION; + + public static HRESULT _ZEST_E_PARTNER_SERVICE_UNKNOWN_ERROR; + + public static HRESULT _NS_E_DRM_RENTAL_LICENSE_EXPIRED; + + public static HRESULT _NS_E_DRM_LICENSE_ALREADY_ACQUIRED; + + public static HRESULT _NS_E_DRM_DEVICE_RENTAL_LICENSE; + + public static HRESULT _ZUNE_E_CONTENT_NOT_SUPPORTED_ON_TUNER; + + public static HRESULT _ZUNE_E_QUICKMIX_MEDIA_NOT_FOUND; + + public static HRESULT _ZUNE_E_QUICKMIX_SESSION_IN_USE; + + public static HRESULT _ZUNE_E_UNKNOWN_REGION_OR_LANGUAGE; + + public static HRESULT _NS_E_CURL_INVALIDCHAR; + + public static HRESULT _NS_E_CURL_INVALIDPATH; + + public static HRESULT _ZUNE_E_ADD_REVIEW_FAILED; + + public static HRESULT _ZEST_E_MAX_CONCURRENTSTREAMING_EXCEEDED; + + public static HRESULT _ZEST_E_MULTITUNER_CONCURRENTSTREAMING_DETECTED; + + public static HRESULT _ZEST_E_MEDIAINSTANCE_STREAMING_OCCUPIED; + + public int Int => hr; + + public bool IsSuccess + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return (byte)((hr >= 0) ? 1u : 0u) != 0; + } + } + + public bool IsError + { + [return: MarshalAs(UnmanagedType.U1)] + get + { + return hr < 0; + } + } + + public HRESULT(int hr) + { + this.hr = hr; + } + + [return: MarshalAs(UnmanagedType.U1)] + public static bool operator ==(HRESULT hrA, HRESULT hrB) + { + return hrA.hr == hrB.hr; + } + + [return: MarshalAs(UnmanagedType.U1)] + public static bool operator !=(HRESULT hrA, HRESULT hrB) + { + return (byte)((hrA.hr != hrB.hr) ? 1u : 0u) != 0; + } + + public static implicit operator HRESULT(int hr) + { + HRESULT result; + result.hr = hr; + return result; + } + + [return: MarshalAs(UnmanagedType.U1)] + public override bool Equals(object oCompare) + { + int num = ((oCompare is HRESULT && hr == ((HRESULT)(HRESULT)oCompare).hr) ? 1 : 0); + return (byte)num != 0; + } + + public override int GetHashCode() + { + return hr; + } + + public override string ToString() + { + int num = hr; + return "hr:" + num.ToString("X"); + } + + static HRESULT() + { + HRESULT s_OK; + s_OK.hr = 0; + _S_OK = s_OK; + HRESULT s_FALSE; + s_FALSE.hr = 1; + _S_FALSE = s_FALSE; + HRESULT e_ABORT; + e_ABORT.hr = -2147467260; + _E_ABORT = e_ABORT; + HRESULT e_PENDING; + e_PENDING.hr = -2147483638; + _E_PENDING = e_PENDING; + HRESULT e_FAIL; + e_FAIL.hr = -2147467259; + _E_FAIL = e_FAIL; + HRESULT e_UNEXPECTED; + e_UNEXPECTED.hr = -2147418113; + _E_UNEXPECTED = e_UNEXPECTED; + HRESULT e_ACCESSDENIED; + e_ACCESSDENIED.hr = -2147024891; + _E_ACCESSDENIED = e_ACCESSDENIED; + HRESULT eRROR_SERVICE_DISABLED; + eRROR_SERVICE_DISABLED.hr = 1058; + _ERROR_SERVICE_DISABLED = eRROR_SERVICE_DISABLED; + HRESULT nS_E_WMP_UNKNOWN_ERROR; + nS_E_WMP_UNKNOWN_ERROR.hr = -1072885299; + _NS_E_WMP_UNKNOWN_ERROR = nS_E_WMP_UNKNOWN_ERROR; + HRESULT nS_E_WMP_PLAYLIST_IMPORT_ERROR; + nS_E_WMP_PLAYLIST_IMPORT_ERROR.hr = -1072885765; + _NS_E_WMP_PLAYLIST_IMPORT_ERROR = nS_E_WMP_PLAYLIST_IMPORT_ERROR; + HRESULT nS_E_CD_BUSY; + nS_E_CD_BUSY.hr = -1072885764; + _NS_E_CD_BUSY = nS_E_CD_BUSY; + HRESULT e_ALREADY_EXISTS; + e_ALREADY_EXISTS.hr = -2147024713; + _E_ALREADY_EXISTS = e_ALREADY_EXISTS; + HRESULT dB_E_NOTFOUND; + dB_E_NOTFOUND.hr = -2147217895; + _DB_E_NOTFOUND = dB_E_NOTFOUND; + HRESULT dB_E_RESOURCEEXISTS; + dB_E_RESOURCEEXISTS.hr = -2147217768; + _DB_E_RESOURCEEXISTS = dB_E_RESOURCEEXISTS; + HRESULT dB_E_BADPARAMETERNAME; + dB_E_BADPARAMETERNAME.hr = -2147217827; + _DB_E_BADPARAMETERNAME = dB_E_BADPARAMETERNAME; + HRESULT zUNE_E_NO_AVAILABLE_RESTORE_POINT; + zUNE_E_NO_AVAILABLE_RESTORE_POINT.hr = -1056899026; + _ZUNE_E_NO_AVAILABLE_RESTORE_POINT = zUNE_E_NO_AVAILABLE_RESTORE_POINT; + HRESULT nS_E_MTPZ_WLAN_TEST_UNKNOWN; + nS_E_MTPZ_WLAN_TEST_UNKNOWN.hr = -1072887866; + _NS_E_MTPZ_WLAN_TEST_UNKNOWN = nS_E_MTPZ_WLAN_TEST_UNKNOWN; + HRESULT nS_E_MTPZ_WLAN_TEST_RUNNING; + nS_E_MTPZ_WLAN_TEST_RUNNING.hr = -1072887865; + _NS_E_MTPZ_WLAN_TEST_RUNNING = nS_E_MTPZ_WLAN_TEST_RUNNING; + HRESULT nS_E_MTPZ_WLAN_TEST_FAIL_NO_CONFIG; + nS_E_MTPZ_WLAN_TEST_FAIL_NO_CONFIG.hr = -1072887864; + _NS_E_MTPZ_WLAN_TEST_FAIL_NO_CONFIG = nS_E_MTPZ_WLAN_TEST_FAIL_NO_CONFIG; + HRESULT nS_E_MTPZ_WLAN_TEST_FAIL_ASSOCIATE; + nS_E_MTPZ_WLAN_TEST_FAIL_ASSOCIATE.hr = -1072887863; + _NS_E_MTPZ_WLAN_TEST_FAIL_ASSOCIATE = nS_E_MTPZ_WLAN_TEST_FAIL_ASSOCIATE; + HRESULT nS_E_MTPZ_WLAN_TEST_FAIL_DHCP; + nS_E_MTPZ_WLAN_TEST_FAIL_DHCP.hr = -1072887862; + _NS_E_MTPZ_WLAN_TEST_FAIL_DHCP = nS_E_MTPZ_WLAN_TEST_FAIL_DHCP; + HRESULT nS_E_MTPZ_WLAN_TEST_FAIL_TIMEOUT; + nS_E_MTPZ_WLAN_TEST_FAIL_TIMEOUT.hr = -1072887861; + _NS_E_MTPZ_WLAN_TEST_FAIL_TIMEOUT = nS_E_MTPZ_WLAN_TEST_FAIL_TIMEOUT; + HRESULT nS_E_MTPZ_WLAN_TEST_FAIL_CANCELLED; + nS_E_MTPZ_WLAN_TEST_FAIL_CANCELLED.hr = -1072887860; + _NS_E_MTPZ_WLAN_TEST_FAIL_CANCELLED = nS_E_MTPZ_WLAN_TEST_FAIL_CANCELLED; + HRESULT nS_E_MTPZ_WLAN_TEST_FAIL_INTERNAL; + nS_E_MTPZ_WLAN_TEST_FAIL_INTERNAL.hr = -1072887859; + _NS_E_MTPZ_WLAN_TEST_FAIL_INTERNAL = nS_E_MTPZ_WLAN_TEST_FAIL_INTERNAL; + HRESULT zEST_E_TOO_MANY_DEREGISTRATIONS_WITHIN_MONTH; + zEST_E_TOO_MANY_DEREGISTRATIONS_WITHIN_MONTH.hr = -1056857072; + _ZEST_E_TOO_MANY_DEREGISTRATIONS_WITHIN_MONTH = zEST_E_TOO_MANY_DEREGISTRATIONS_WITHIN_MONTH; + HRESULT nS_E_MEDIA_DOWNLOAD_MAXIMUM_EXCEEDED; + nS_E_MEDIA_DOWNLOAD_MAXIMUM_EXCEEDED.hr = -1072884900; + _NS_E_MEDIA_DOWNLOAD_MAXIMUM_EXCEEDED = nS_E_MEDIA_DOWNLOAD_MAXIMUM_EXCEEDED; + HRESULT zUNE_E_NO_SUBSCRIPTION_DOWNLOAD_RIGHTS; + zUNE_E_NO_SUBSCRIPTION_DOWNLOAD_RIGHTS.hr = -1056899031; + _ZUNE_E_NO_SUBSCRIPTION_DOWNLOAD_RIGHTS = zUNE_E_NO_SUBSCRIPTION_DOWNLOAD_RIGHTS; + HRESULT nS_E_MEDIA_NOT_PURCHASED; + nS_E_MEDIA_NOT_PURCHASED.hr = -1072884891; + _NS_E_MEDIA_NOT_PURCHASED = nS_E_MEDIA_NOT_PURCHASED; + HRESULT nS_E_MESSAGING_CLIENT_ERROR; + nS_E_MESSAGING_CLIENT_ERROR.hr = -1072885517; + _NS_E_MESSAGING_CLIENT_ERROR = nS_E_MESSAGING_CLIENT_ERROR; + HRESULT nS_E_MESSAGING_RECIPIENT_ERROR; + nS_E_MESSAGING_RECIPIENT_ERROR.hr = -1072885515; + _NS_E_MESSAGING_RECIPIENT_ERROR = nS_E_MESSAGING_RECIPIENT_ERROR; + HRESULT nS_E_MESSAGING_PARENTAL_CONTROL_ERROR; + nS_E_MESSAGING_PARENTAL_CONTROL_ERROR.hr = -1072885513; + _NS_E_MESSAGING_PARENTAL_CONTROL_ERROR = nS_E_MESSAGING_PARENTAL_CONTROL_ERROR; + HRESULT nS_E_CART_FULL; + nS_E_CART_FULL.hr = -1072885493; + _NS_E_CART_FULL = nS_E_CART_FULL; + HRESULT nS_E_CART_TOO_MANY_NEW_ITEMS; + nS_E_CART_TOO_MANY_NEW_ITEMS.hr = -1072885492; + _NS_E_CART_TOO_MANY_NEW_ITEMS = nS_E_CART_TOO_MANY_NEW_ITEMS; + HRESULT nS_E_CART_MORE_ITEMS_AVAILABLE; + nS_E_CART_MORE_ITEMS_AVAILABLE.hr = -2146627315; + _NS_E_CART_MORE_ITEMS_AVAILABLE = nS_E_CART_MORE_ITEMS_AVAILABLE; + HRESULT nS_E_SIGNIN_TERMS_OF_SERVICE; + nS_E_SIGNIN_TERMS_OF_SERVICE.hr = -1072884874; + _NS_E_SIGNIN_TERMS_OF_SERVICE = nS_E_SIGNIN_TERMS_OF_SERVICE; + HRESULT nS_E_SERVER_ACCESSDENIED; + nS_E_SERVER_ACCESSDENIED.hr = -1072877829; + _NS_E_SERVER_ACCESSDENIED = nS_E_SERVER_ACCESSDENIED; + HRESULT nS_E_PASSPORT_LOGIN_FAILED; + nS_E_PASSPORT_LOGIN_FAILED.hr = -1072884892; + _NS_E_PASSPORT_LOGIN_FAILED = nS_E_PASSPORT_LOGIN_FAILED; + HRESULT nS_E_SUBSCRIPTIONSERVICE_LOGIN_FAILED; + nS_E_SUBSCRIPTIONSERVICE_LOGIN_FAILED.hr = -1072884897; + _NS_E_SUBSCRIPTIONSERVICE_LOGIN_FAILED = nS_E_SUBSCRIPTIONSERVICE_LOGIN_FAILED; + HRESULT nS_E_INVALID_USERNAME_AND_PASSWORD; + nS_E_INVALID_USERNAME_AND_PASSWORD.hr = -1072884910; + _NS_E_INVALID_USERNAME_AND_PASSWORD = nS_E_INVALID_USERNAME_AND_PASSWORD; + HRESULT nS_E_SIGNIN_ACCOUNTS_INVALID_USER; + nS_E_SIGNIN_ACCOUNTS_INVALID_USER.hr = -1072884884; + _NS_E_SIGNIN_ACCOUNTS_INVALID_USER = nS_E_SIGNIN_ACCOUNTS_INVALID_USER; + HRESULT nS_E_SIGNIN_ACCOUNTS_NOT_XENON_USER; + nS_E_SIGNIN_ACCOUNTS_NOT_XENON_USER.hr = -1072884882; + _NS_E_SIGNIN_ACCOUNTS_NOT_XENON_USER = nS_E_SIGNIN_ACCOUNTS_NOT_XENON_USER; + HRESULT nS_E_SIGNIN_WCMUSIC_ACCOUNT_NOT_ELIGIBLE; + nS_E_SIGNIN_WCMUSIC_ACCOUNT_NOT_ELIGIBLE.hr = -1072884883; + _NS_E_SIGNIN_WCMUSIC_ACCOUNT_NOT_ELIGIBLE = nS_E_SIGNIN_WCMUSIC_ACCOUNT_NOT_ELIGIBLE; + HRESULT zUNE_E_SIGNIN_TERMS_OF_SERVICE_CHILD; + zUNE_E_SIGNIN_TERMS_OF_SERVICE_CHILD.hr = -1056899049; + _ZUNE_E_SIGNIN_TERMS_OF_SERVICE_CHILD = zUNE_E_SIGNIN_TERMS_OF_SERVICE_CHILD; + HRESULT nS_E_SIGNIN_INVALID_REGION; + nS_E_SIGNIN_INVALID_REGION.hr = -1072884909; + _NS_E_SIGNIN_INVALID_REGION = nS_E_SIGNIN_INVALID_REGION; + HRESULT zEST_E_UNAUTHENTICATED; + zEST_E_UNAUTHENTICATED.hr = -1056858108; + _ZEST_E_UNAUTHENTICATED = zEST_E_UNAUTHENTICATED; + HRESULT nS_E_SIGNIN_HTTP_GONE; + nS_E_SIGNIN_HTTP_GONE.hr = -1072885082; + _NS_E_SIGNIN_HTTP_GONE = nS_E_SIGNIN_HTTP_GONE; + HRESULT nS_E_BILLING_LIGHTWEIGHT_ACCOUNT; + nS_E_BILLING_LIGHTWEIGHT_ACCOUNT.hr = -1072885473; + _NS_E_BILLING_LIGHTWEIGHT_ACCOUNT = nS_E_BILLING_LIGHTWEIGHT_ACCOUNT; + HRESULT nS_E_FIRMWARE_UPDATE_DISK_FULL; + nS_E_FIRMWARE_UPDATE_DISK_FULL.hr = -1072885167; + _NS_E_FIRMWARE_UPDATE_DISK_FULL = nS_E_FIRMWARE_UPDATE_DISK_FULL; + HRESULT nS_E_WINLIVE_SIGNIN_NAME_TOO_SHORT; + nS_E_WINLIVE_SIGNIN_NAME_TOO_SHORT.hr = -1072875780; + _NS_E_WINLIVE_SIGNIN_NAME_TOO_SHORT = nS_E_WINLIVE_SIGNIN_NAME_TOO_SHORT; + HRESULT nS_E_WINLIVE_SIGNIN_NAME_TOO_LONG; + nS_E_WINLIVE_SIGNIN_NAME_TOO_LONG.hr = -1072875804; + _NS_E_WINLIVE_SIGNIN_NAME_TOO_LONG = nS_E_WINLIVE_SIGNIN_NAME_TOO_LONG; + HRESULT nS_E_WINLIVE_SIGNIN_NAME_INVALID; + nS_E_WINLIVE_SIGNIN_NAME_INVALID.hr = -1072875803; + _NS_E_WINLIVE_SIGNIN_NAME_INVALID = nS_E_WINLIVE_SIGNIN_NAME_INVALID; + HRESULT nS_E_WINLIVE_EMAIL_INVALID; + nS_E_WINLIVE_EMAIL_INVALID.hr = -1072875802; + _NS_E_WINLIVE_EMAIL_INVALID = nS_E_WINLIVE_EMAIL_INVALID; + HRESULT nS_E_WINLIVE_NAME_INVALID; + nS_E_WINLIVE_NAME_INVALID.hr = -1072875801; + _NS_E_WINLIVE_NAME_INVALID = nS_E_WINLIVE_NAME_INVALID; + HRESULT nS_E_WINLIVE_BIRTH_YEAR_INVALID; + nS_E_WINLIVE_BIRTH_YEAR_INVALID.hr = -1072875800; + _NS_E_WINLIVE_BIRTH_YEAR_INVALID = nS_E_WINLIVE_BIRTH_YEAR_INVALID; + HRESULT nS_E_WINLIVE_BIRTH_DAY_INVALID; + nS_E_WINLIVE_BIRTH_DAY_INVALID.hr = -1072875799; + _NS_E_WINLIVE_BIRTH_DAY_INVALID = nS_E_WINLIVE_BIRTH_DAY_INVALID; + HRESULT nS_E_WINLIVE_BIRTH_MONTH_INVALID; + nS_E_WINLIVE_BIRTH_MONTH_INVALID.hr = -1072875798; + _NS_E_WINLIVE_BIRTH_MONTH_INVALID = nS_E_WINLIVE_BIRTH_MONTH_INVALID; + HRESULT nS_E_WINLIVE_BIRTH_DATE_FUTURE; + nS_E_WINLIVE_BIRTH_DATE_FUTURE.hr = -1072875797; + _NS_E_WINLIVE_BIRTH_DATE_FUTURE = nS_E_WINLIVE_BIRTH_DATE_FUTURE; + HRESULT nS_E_WINLIVE_HIP_SOLUTION_INVALID; + nS_E_WINLIVE_HIP_SOLUTION_INVALID.hr = -1072875796; + _NS_E_WINLIVE_HIP_SOLUTION_INVALID = nS_E_WINLIVE_HIP_SOLUTION_INVALID; + HRESULT nS_E_WINLIVE_PASSWORD_TOO_LONG; + nS_E_WINLIVE_PASSWORD_TOO_LONG.hr = -1072875795; + _NS_E_WINLIVE_PASSWORD_TOO_LONG = nS_E_WINLIVE_PASSWORD_TOO_LONG; + HRESULT nS_E_WINLIVE_PASSWORD_TOO_SHORT; + nS_E_WINLIVE_PASSWORD_TOO_SHORT.hr = -1072875794; + _NS_E_WINLIVE_PASSWORD_TOO_SHORT = nS_E_WINLIVE_PASSWORD_TOO_SHORT; + HRESULT nS_E_WINLIVE_PASSWORD_INVALID; + nS_E_WINLIVE_PASSWORD_INVALID.hr = -1072875793; + _NS_E_WINLIVE_PASSWORD_INVALID = nS_E_WINLIVE_PASSWORD_INVALID; + HRESULT nS_E_WINLIVE_MEMBER_EXISTS; + nS_E_WINLIVE_MEMBER_EXISTS.hr = -1072875792; + _NS_E_WINLIVE_MEMBER_EXISTS = nS_E_WINLIVE_MEMBER_EXISTS; + HRESULT nS_E_WINLIVE_DOMAIN_IS_MANAGED; + nS_E_WINLIVE_DOMAIN_IS_MANAGED.hr = -1072875791; + _NS_E_WINLIVE_DOMAIN_IS_MANAGED = nS_E_WINLIVE_DOMAIN_IS_MANAGED; + HRESULT nS_E_WINLIVE_SECRET_QUESTION_TOO_SHORT; + nS_E_WINLIVE_SECRET_QUESTION_TOO_SHORT.hr = -1072875790; + _NS_E_WINLIVE_SECRET_QUESTION_TOO_SHORT = nS_E_WINLIVE_SECRET_QUESTION_TOO_SHORT; + HRESULT nS_E_WINLIVE_SECRET_QUESTION_TOO_LONG; + nS_E_WINLIVE_SECRET_QUESTION_TOO_LONG.hr = -1072875789; + _NS_E_WINLIVE_SECRET_QUESTION_TOO_LONG = nS_E_WINLIVE_SECRET_QUESTION_TOO_LONG; + HRESULT nS_E_WINLIVE_SECRET_ANSWER_TOO_SHORT; + nS_E_WINLIVE_SECRET_ANSWER_TOO_SHORT.hr = -1072875788; + _NS_E_WINLIVE_SECRET_ANSWER_TOO_SHORT = nS_E_WINLIVE_SECRET_ANSWER_TOO_SHORT; + HRESULT nS_E_WINLIVE_SECRET_ANSWER_TOO_LONG; + nS_E_WINLIVE_SECRET_ANSWER_TOO_LONG.hr = -1072875787; + _NS_E_WINLIVE_SECRET_ANSWER_TOO_LONG = nS_E_WINLIVE_SECRET_ANSWER_TOO_LONG; + HRESULT nS_E_WINLIVE_SECRET_QUESTION_CONTAINS_ANSWER; + nS_E_WINLIVE_SECRET_QUESTION_CONTAINS_ANSWER.hr = -1072875786; + _NS_E_WINLIVE_SECRET_QUESTION_CONTAINS_ANSWER = nS_E_WINLIVE_SECRET_QUESTION_CONTAINS_ANSWER; + HRESULT nS_E_WINLIVE_SECRET_ANSWER_CONTAINS_MEMBER_NAME; + nS_E_WINLIVE_SECRET_ANSWER_CONTAINS_MEMBER_NAME.hr = -1072875785; + _NS_E_WINLIVE_SECRET_ANSWER_CONTAINS_MEMBER_NAME = nS_E_WINLIVE_SECRET_ANSWER_CONTAINS_MEMBER_NAME; + HRESULT nS_E_WINLIVE_SECRET_ANSWER_CONTAINS_PASSWORD; + nS_E_WINLIVE_SECRET_ANSWER_CONTAINS_PASSWORD.hr = -1072875784; + _NS_E_WINLIVE_SECRET_ANSWER_CONTAINS_PASSWORD = nS_E_WINLIVE_SECRET_ANSWER_CONTAINS_PASSWORD; + HRESULT nS_E_WINLIVE_SECRET_QUESTION_CONTAINS_PASSWORD; + nS_E_WINLIVE_SECRET_QUESTION_CONTAINS_PASSWORD.hr = -1072875783; + _NS_E_WINLIVE_SECRET_QUESTION_CONTAINS_PASSWORD = nS_E_WINLIVE_SECRET_QUESTION_CONTAINS_PASSWORD; + HRESULT zUNE_E_WINLIVE_UNAUTHORIZED_DOMAIN; + zUNE_E_WINLIVE_UNAUTHORIZED_DOMAIN.hr = -1056899039; + _ZUNE_E_WINLIVE_UNAUTHORIZED_DOMAIN = zUNE_E_WINLIVE_UNAUTHORIZED_DOMAIN; + HRESULT zEST_E_ACCOUNT_ZUNETAG_OCCUPIED; + zEST_E_ACCOUNT_ZUNETAG_OCCUPIED.hr = -1056857549; + _ZEST_E_ACCOUNT_ZUNETAG_OCCUPIED = zEST_E_ACCOUNT_ZUNETAG_OCCUPIED; + HRESULT zUNE_E_SIGNUP_INVALID_PARENT_EMAIL; + zUNE_E_SIGNUP_INVALID_PARENT_EMAIL.hr = -1056899047; + _ZUNE_E_SIGNUP_INVALID_PARENT_EMAIL = zUNE_E_SIGNUP_INVALID_PARENT_EMAIL; + HRESULT zUNE_E_SIGNUP_INVALID_PARENT_AGE; + zUNE_E_SIGNUP_INVALID_PARENT_AGE.hr = -1056899046; + _ZUNE_E_SIGNUP_INVALID_PARENT_AGE = zUNE_E_SIGNUP_INVALID_PARENT_AGE; + HRESULT zUNE_E_SIGNUP_PASSWORDS_DONT_MATCH; + zUNE_E_SIGNUP_PASSWORDS_DONT_MATCH.hr = -1056899045; + _ZUNE_E_SIGNUP_PASSWORDS_DONT_MATCH = zUNE_E_SIGNUP_PASSWORDS_DONT_MATCH; + HRESULT zUNE_E_UPDATE_ACCOUNT_INFO_FAILED; + zUNE_E_UPDATE_ACCOUNT_INFO_FAILED.hr = -1056899040; + _ZUNE_E_UPDATE_ACCOUNT_INFO_FAILED = zUNE_E_UPDATE_ACCOUNT_INFO_FAILED; + HRESULT zEST_E_INVALID_POSTALCODE; + zEST_E_INVALID_POSTALCODE.hr = -1056857603; + _ZEST_E_INVALID_POSTALCODE = zEST_E_INVALID_POSTALCODE; + HRESULT zEST_E_LIVEACCOUNT_INVALIDPHONE; + zEST_E_LIVEACCOUNT_INVALIDPHONE.hr = -1056857601; + _ZEST_E_LIVEACCOUNT_INVALIDPHONE = zEST_E_LIVEACCOUNT_INVALIDPHONE; + HRESULT zEST_E_LIVEACCOUNT_ADDRESS_INVALID; + zEST_E_LIVEACCOUNT_ADDRESS_INVALID.hr = -1056857537; + _ZEST_E_LIVEACCOUNT_ADDRESS_INVALID = zEST_E_LIVEACCOUNT_ADDRESS_INVALID; + HRESULT zEST_E_LIVEACCOUNT_PAYMENT_INSTRUMENT_INVALID; + zEST_E_LIVEACCOUNT_PAYMENT_INSTRUMENT_INVALID.hr = -1056857540; + _ZEST_E_LIVEACCOUNT_PAYMENT_INSTRUMENT_INVALID = zEST_E_LIVEACCOUNT_PAYMENT_INSTRUMENT_INVALID; + HRESULT zEST_E_CREDITCARD_ADDRESS_INVALID; + zEST_E_CREDITCARD_ADDRESS_INVALID.hr = -1056857570; + _ZEST_E_CREDITCARD_ADDRESS_INVALID = zEST_E_CREDITCARD_ADDRESS_INVALID; + HRESULT zEST_E_CREDITCARD_ADDRESS_STREET1_INVALID; + zEST_E_CREDITCARD_ADDRESS_STREET1_INVALID.hr = -1056857568; + _ZEST_E_CREDITCARD_ADDRESS_STREET1_INVALID = zEST_E_CREDITCARD_ADDRESS_STREET1_INVALID; + HRESULT zEST_E_CREDITCARD_ADDRESS_CITY_INVALID; + zEST_E_CREDITCARD_ADDRESS_CITY_INVALID.hr = -1056857567; + _ZEST_E_CREDITCARD_ADDRESS_CITY_INVALID = zEST_E_CREDITCARD_ADDRESS_CITY_INVALID; + HRESULT zEST_E_CREDITCARD_ADDRESS_STATE_INVALID; + zEST_E_CREDITCARD_ADDRESS_STATE_INVALID.hr = -1056857566; + _ZEST_E_CREDITCARD_ADDRESS_STATE_INVALID = zEST_E_CREDITCARD_ADDRESS_STATE_INVALID; + HRESULT zEST_E_CREDITCARD_ADDRESS_POSTALCODE_INVALID; + zEST_E_CREDITCARD_ADDRESS_POSTALCODE_INVALID.hr = -1056857565; + _ZEST_E_CREDITCARD_ADDRESS_POSTALCODE_INVALID = zEST_E_CREDITCARD_ADDRESS_POSTALCODE_INVALID; + HRESULT zEST_E_CREDITCARD_PARENTPHONE_INVALID; + zEST_E_CREDITCARD_PARENTPHONE_INVALID.hr = -1056857564; + _ZEST_E_CREDITCARD_PARENTPHONE_INVALID = zEST_E_CREDITCARD_PARENTPHONE_INVALID; + HRESULT zEST_E_CREDITCARD_INVALID; + zEST_E_CREDITCARD_INVALID.hr = -1056857563; + _ZEST_E_CREDITCARD_INVALID = zEST_E_CREDITCARD_INVALID; + HRESULT zEST_E_CREDITCARD_VALIDATE_FAILED; + zEST_E_CREDITCARD_VALIDATE_FAILED.hr = -1056857562; + _ZEST_E_CREDITCARD_VALIDATE_FAILED = zEST_E_CREDITCARD_VALIDATE_FAILED; + HRESULT zEST_E_CREDITCARD_ADD_FAILED; + zEST_E_CREDITCARD_ADD_FAILED.hr = -1056857561; + _ZEST_E_CREDITCARD_ADD_FAILED = zEST_E_CREDITCARD_ADD_FAILED; + HRESULT zEST_E_INVALID_ARG_ZUNETAG; + zEST_E_INVALID_ARG_ZUNETAG.hr = -1056858064; + _ZEST_E_INVALID_ARG_ZUNETAG = zEST_E_INVALID_ARG_ZUNETAG; + HRESULT zEST_E_INVALID_ARG_PARENT_PHONE_INVALID; + zEST_E_INVALID_ARG_PARENT_PHONE_INVALID.hr = -1056858078; + _ZEST_E_INVALID_ARG_PARENT_PHONE_INVALID = zEST_E_INVALID_ARG_PARENT_PHONE_INVALID; + HRESULT zEST_E_INVALID_ARG_CONTACT_INFO; + zEST_E_INVALID_ARG_CONTACT_INFO.hr = -1056858076; + _ZEST_E_INVALID_ARG_CONTACT_INFO = zEST_E_INVALID_ARG_CONTACT_INFO; + HRESULT zEST_E_INVALID_ARG_LANGUAGE; + zEST_E_INVALID_ARG_LANGUAGE.hr = -1056858057; + _ZEST_E_INVALID_ARG_LANGUAGE = zEST_E_INVALID_ARG_LANGUAGE; + HRESULT zEST_E_ZUNETAG_OFFENSIVE; + zEST_E_ZUNETAG_OFFENSIVE.hr = -1056857522; + _ZEST_E_ZUNETAG_OFFENSIVE = zEST_E_ZUNETAG_OFFENSIVE; + HRESULT zUNE_E_PURCHASE_REQUIRES_AUTHORIZATION; + zUNE_E_PURCHASE_REQUIRES_AUTHORIZATION.hr = -1056899019; + _ZUNE_E_PURCHASE_REQUIRES_AUTHORIZATION = zUNE_E_PURCHASE_REQUIRES_AUTHORIZATION; + HRESULT zEST_E_PARTNER_SERVICE_UNKNOWN_ERROR; + zEST_E_PARTNER_SERVICE_UNKNOWN_ERROR.hr = -1056848896; + _ZEST_E_PARTNER_SERVICE_UNKNOWN_ERROR = zEST_E_PARTNER_SERVICE_UNKNOWN_ERROR; + HRESULT nS_E_DRM_RENTAL_LICENSE_EXPIRED; + nS_E_DRM_RENTAL_LICENSE_EXPIRED.hr = -1072879537; + _NS_E_DRM_RENTAL_LICENSE_EXPIRED = nS_E_DRM_RENTAL_LICENSE_EXPIRED; + HRESULT nS_E_DRM_LICENSE_ALREADY_ACQUIRED; + nS_E_DRM_LICENSE_ALREADY_ACQUIRED.hr = -1072879536; + _NS_E_DRM_LICENSE_ALREADY_ACQUIRED = nS_E_DRM_LICENSE_ALREADY_ACQUIRED; + HRESULT nS_E_DRM_DEVICE_RENTAL_LICENSE; + nS_E_DRM_DEVICE_RENTAL_LICENSE.hr = -1072879535; + _NS_E_DRM_DEVICE_RENTAL_LICENSE = nS_E_DRM_DEVICE_RENTAL_LICENSE; + HRESULT zUNE_E_CONTENT_NOT_SUPPORTED_ON_TUNER; + zUNE_E_CONTENT_NOT_SUPPORTED_ON_TUNER.hr = -1056899034; + _ZUNE_E_CONTENT_NOT_SUPPORTED_ON_TUNER = zUNE_E_CONTENT_NOT_SUPPORTED_ON_TUNER; + HRESULT zUNE_E_QUICKMIX_MEDIA_NOT_FOUND; + zUNE_E_QUICKMIX_MEDIA_NOT_FOUND.hr = -1056898969; + _ZUNE_E_QUICKMIX_MEDIA_NOT_FOUND = zUNE_E_QUICKMIX_MEDIA_NOT_FOUND; + HRESULT zUNE_E_QUICKMIX_SESSION_IN_USE; + zUNE_E_QUICKMIX_SESSION_IN_USE.hr = -1056898964; + _ZUNE_E_QUICKMIX_SESSION_IN_USE = zUNE_E_QUICKMIX_SESSION_IN_USE; + HRESULT zUNE_E_UNKNOWN_REGION_OR_LANGUAGE; + zUNE_E_UNKNOWN_REGION_OR_LANGUAGE.hr = -1056899029; + _ZUNE_E_UNKNOWN_REGION_OR_LANGUAGE = zUNE_E_UNKNOWN_REGION_OR_LANGUAGE; + HRESULT nS_E_CURL_INVALIDCHAR; + nS_E_CURL_INVALIDCHAR.hr = -1072884955; + _NS_E_CURL_INVALIDCHAR = nS_E_CURL_INVALIDCHAR; + HRESULT nS_E_CURL_INVALIDPATH; + nS_E_CURL_INVALIDPATH.hr = -1072884953; + _NS_E_CURL_INVALIDPATH = nS_E_CURL_INVALIDPATH; + HRESULT zUNE_E_ADD_REVIEW_FAILED; + zUNE_E_ADD_REVIEW_FAILED.hr = -1056898960; + _ZUNE_E_ADD_REVIEW_FAILED = zUNE_E_ADD_REVIEW_FAILED; + HRESULT zEST_E_MAX_CONCURRENTSTREAMING_EXCEEDED; + zEST_E_MAX_CONCURRENTSTREAMING_EXCEEDED.hr = -1056856102; + _ZEST_E_MAX_CONCURRENTSTREAMING_EXCEEDED = zEST_E_MAX_CONCURRENTSTREAMING_EXCEEDED; + HRESULT zEST_E_MULTITUNER_CONCURRENTSTREAMING_DETECTED; + zEST_E_MULTITUNER_CONCURRENTSTREAMING_DETECTED.hr = -1056856104; + _ZEST_E_MULTITUNER_CONCURRENTSTREAMING_DETECTED = zEST_E_MULTITUNER_CONCURRENTSTREAMING_DETECTED; + HRESULT zEST_E_MEDIAINSTANCE_STREAMING_OCCUPIED; + zEST_E_MEDIAINSTANCE_STREAMING_OCCUPIED.hr = -1056856095; + _ZEST_E_MEDIAINSTANCE_STREAMING_OCCUPIED = zEST_E_MEDIAINSTANCE_STREAMING_OCCUPIED; + } + } +} diff --git a/ZuneDBApi/_COLLECTION_EVENT.cs b/ZuneDBApi/_COLLECTION_EVENT.cs new file mode 100644 index 0000000..fcb8861 --- /dev/null +++ b/ZuneDBApi/_COLLECTION_EVENT.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal enum _COLLECTION_EVENT +{ + +} diff --git a/ZuneDBApi/_DOT11_AUTH_ALGORITHM.cs b/ZuneDBApi/_DOT11_AUTH_ALGORITHM.cs new file mode 100644 index 0000000..4bb948c --- /dev/null +++ b/ZuneDBApi/_DOT11_AUTH_ALGORITHM.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal enum _DOT11_AUTH_ALGORITHM +{ + +} diff --git a/ZuneDBApi/_DOT11_CIPHER_ALGORITHM.cs b/ZuneDBApi/_DOT11_CIPHER_ALGORITHM.cs new file mode 100644 index 0000000..1515995 --- /dev/null +++ b/ZuneDBApi/_DOT11_CIPHER_ALGORITHM.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[MiscellaneousBits(64)] +[DebugInfoInPDB] +[NativeCppClass] +internal enum _DOT11_CIPHER_ALGORITHM +{ + +} diff --git a/ZuneDBApi/_EVENT_TRACE_HEADER.cs b/ZuneDBApi/_EVENT_TRACE_HEADER.cs new file mode 100644 index 0000000..fef1c5d --- /dev/null +++ b/ZuneDBApi/_EVENT_TRACE_HEADER.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 48)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct _EVENT_TRACE_HEADER +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/_EXCEPTION_POINTERS.cs b/ZuneDBApi/_EXCEPTION_POINTERS.cs new file mode 100644 index 0000000..a859832 --- /dev/null +++ b/ZuneDBApi/_EXCEPTION_POINTERS.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 16)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct _EXCEPTION_POINTERS +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/_FILETIME.cs b/ZuneDBApi/_FILETIME.cs new file mode 100644 index 0000000..2276894 --- /dev/null +++ b/ZuneDBApi/_FILETIME.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct _FILETIME +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/_GUID.cs b/ZuneDBApi/_GUID.cs new file mode 100644 index 0000000..9cb1414 --- /dev/null +++ b/ZuneDBApi/_GUID.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 16)] +[NativeCppClass] +[UnsafeValueType] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct _GUID +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/_MBRHEURISTICDATA.cs b/ZuneDBApi/_MBRHEURISTICDATA.cs new file mode 100644 index 0000000..07c6bb8 --- /dev/null +++ b/ZuneDBApi/_MBRHEURISTICDATA.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 48)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct _MBRHEURISTICDATA +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/_OSVERSIONINFOW.cs b/ZuneDBApi/_OSVERSIONINFOW.cs new file mode 100644 index 0000000..ec7db86 --- /dev/null +++ b/ZuneDBApi/_OSVERSIONINFOW.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 276)] +[UnsafeValueType] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct _OSVERSIONINFOW +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/_PERFTRACE_COLLECTIONEVENT_RECORD.cs b/ZuneDBApi/_PERFTRACE_COLLECTIONEVENT_RECORD.cs new file mode 100644 index 0000000..ce8a891 --- /dev/null +++ b/ZuneDBApi/_PERFTRACE_COLLECTIONEVENT_RECORD.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 64)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct _PERFTRACE_COLLECTIONEVENT_RECORD +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/_RTL_CRITICAL_SECTION.cs b/ZuneDBApi/_RTL_CRITICAL_SECTION.cs new file mode 100644 index 0000000..ad6d456 --- /dev/null +++ b/ZuneDBApi/_RTL_CRITICAL_SECTION.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 40)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct _RTL_CRITICAL_SECTION +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/_SECURITY_ATTRIBUTES.cs b/ZuneDBApi/_SECURITY_ATTRIBUTES.cs new file mode 100644 index 0000000..94af6ff --- /dev/null +++ b/ZuneDBApi/_SECURITY_ATTRIBUTES.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 24)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct _SECURITY_ATTRIBUTES +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/_SYSTEMTIME.cs b/ZuneDBApi/_SYSTEMTIME.cs new file mode 100644 index 0000000..6e02b6a --- /dev/null +++ b/ZuneDBApi/_SYSTEMTIME.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 16)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct _SYSTEMTIME +{ + private short _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/_TRACE_GUID_REGISTRATION.cs b/ZuneDBApi/_TRACE_GUID_REGISTRATION.cs new file mode 100644 index 0000000..ffdd68e --- /dev/null +++ b/ZuneDBApi/_TRACE_GUID_REGISTRATION.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 16)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct _TRACE_GUID_REGISTRATION +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/_WPP_TRACE_CONTROL_BLOCK.cs b/ZuneDBApi/_WPP_TRACE_CONTROL_BLOCK.cs new file mode 100644 index 0000000..e845b00 --- /dev/null +++ b/ZuneDBApi/_WPP_TRACE_CONTROL_BLOCK.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 32)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct _WPP_TRACE_CONTROL_BLOCK +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/__MIDL___MIDL_itf_wmpcd_0000_0014_0001.cs b/ZuneDBApi/__MIDL___MIDL_itf_wmpcd_0000_0014_0001.cs new file mode 100644 index 0000000..9e80994 --- /dev/null +++ b/ZuneDBApi/__MIDL___MIDL_itf_wmpcd_0000_0014_0001.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[DebugInfoInPDB] +[MiscellaneousBits(64)] +[NativeCppClass] +internal enum __MIDL___MIDL_itf_wmpcd_0000_0014_0001 +{ + +} diff --git a/ZuneDBApi/__MIDL___MIDL_itf_wmpcd_0000_0014_0002.cs b/ZuneDBApi/__MIDL___MIDL_itf_wmpcd_0000_0014_0002.cs new file mode 100644 index 0000000..b17257f --- /dev/null +++ b/ZuneDBApi/__MIDL___MIDL_itf_wmpcd_0000_0014_0002.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(64)] +internal enum __MIDL___MIDL_itf_wmpcd_0000_0014_0002 +{ + +} diff --git a/ZuneDBApi/__enative_startup_state.cs b/ZuneDBApi/__enative_startup_state.cs new file mode 100644 index 0000000..2a63925 --- /dev/null +++ b/ZuneDBApi/__enative_startup_state.cs @@ -0,0 +1,10 @@ +using System.Runtime.CompilerServices; +using Microsoft.VisualC; + +[NativeCppClass] +[MiscellaneousBits(64)] +[DebugInfoInPDB] +internal enum __enative_startup_state +{ + +} diff --git a/ZuneDBApi/__s_GUID.cs b/ZuneDBApi/__s_GUID.cs new file mode 100644 index 0000000..b19624e --- /dev/null +++ b/ZuneDBApi/__s_GUID.cs @@ -0,0 +1,13 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 16)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +[UnsafeValueType] +internal struct __s_GUID +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/_s__RTTIBaseClassDescriptor2.cs b/ZuneDBApi/_s__RTTIBaseClassDescriptor2.cs new file mode 100644 index 0000000..23af2bc --- /dev/null +++ b/ZuneDBApi/_s__RTTIBaseClassDescriptor2.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 36)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct _s__RTTIBaseClassDescriptor2 +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/_s__RTTIClassHierarchyDescriptor.cs b/ZuneDBApi/_s__RTTIClassHierarchyDescriptor.cs new file mode 100644 index 0000000..b5c1c3c --- /dev/null +++ b/ZuneDBApi/_s__RTTIClassHierarchyDescriptor.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 20)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct _s__RTTIClassHierarchyDescriptor +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/_s__RTTICompleteObjectLocator2.cs b/ZuneDBApi/_s__RTTICompleteObjectLocator2.cs new file mode 100644 index 0000000..7817372 --- /dev/null +++ b/ZuneDBApi/_s__RTTICompleteObjectLocator2.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 36)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct _s__RTTICompleteObjectLocator2 +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/app.manifest b/ZuneDBApi/app.manifest new file mode 100644 index 0000000..1400a07 --- /dev/null +++ b/ZuneDBApi/app.manifest @@ -0,0 +1,11 @@ + + + + + Microsoft Zune + + + + + + diff --git a/ZuneDBApi/eErrorCondition.cs b/ZuneDBApi/eErrorCondition.cs new file mode 100644 index 0000000..7a1df48 --- /dev/null +++ b/ZuneDBApi/eErrorCondition.cs @@ -0,0 +1,11 @@ +public enum eErrorCondition +{ + eEC_Last = 7, + eEC_Cart = 6, + eEC_FWUpdater = 5, + eEC_WinLive = 4, + eEC_Download = 3, + eEC_Purchase = 2, + eEC_SignIn = 1, + eEC_None = 0 +} diff --git a/ZuneDBApi/ePlaylistFileState.cs b/ZuneDBApi/ePlaylistFileState.cs new file mode 100644 index 0000000..dfd8955 --- /dev/null +++ b/ZuneDBApi/ePlaylistFileState.cs @@ -0,0 +1,7 @@ +public enum ePlaylistFileState +{ + ePlaylistFileStateDirty = 3, + ePlaylistFileStateWriting = 2, + ePlaylistFileStateReading = 1, + ePlaylistFileStateInSync = 0 +} diff --git a/ZuneDBApi/gcroot-Microsoft.cs b/ZuneDBApi/gcroot-Microsoft.cs new file mode 100644 index 0000000..3010ffc --- /dev/null +++ b/ZuneDBApi/gcroot-Microsoft.cs @@ -0,0 +1,348 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003AGetAccountCompleteCallback_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003AAccountManagementErrorCallback_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003AAsyncCompleteHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AConfiguration_003A_003ANativeConfigurationChangeEventHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003ADownloadProgressHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003ADownloadManagerUpdateHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003AFeaturesChangedHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoft_003A_003AIris_003A_003ADeferredInvokeHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003AAsyncRequestComplete_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AMessaging_003A_003AMessagingCallback_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AMessaging_003A_003ACommentCallback_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AMessaging_003A_003AMessagingNotifier_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003APlaylist_003A_003APlaylistAsyncOperationCompleted_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AQuickMix_003A_003ASimilarMediaBatchHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AQuickMix_003A_003ABatchEndHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AQuickMix_003A_003AQuickMixProgressHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003ARadioStationProgressHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AConfiguration_003A_003ATunerInfoHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003AGetBalancesCompleteCallback_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003AGetBalancesErrorCallback_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003AGetOffersCompleteCallback_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003AGetOffersErrorCallback_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003AGetOfferDetailsCompleteCallback_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003AGetOfferDetailsErrorCallback_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003AGetBillingOffersCompleteCallback_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003AGetBillingOffersErrorCallback_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003AGetPaymentInstrumentsCompleteCallback_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003AGetPaymentInstrumentsErrorCallback_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003AAddPaymentInstrumentCompleteCallback_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003AAddPaymentInstrumentErrorCallback_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003APaymentInstrument_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003APurchaseOffersCompleteHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003ADownloadEventHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AService_003A_003ADownloadEventProgressHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003ASubscription_003A_003AVirtualSubscriptionEpisodeList_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003ASubscription_003A_003ASubscriptionSeriesInfo_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003ASubscription_003A_003ASubscriptionEventHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003ASubscription_003A_003ASubscriptionCredentialHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003ATaskbarPlayer_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003AUpdateProgressHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AUserCredential_003A_003AUserCredentialHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003AWin7ShellManager_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003AZuneWebHost_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/gcroot-MicrosoftZuneLibrary.cs b/ZuneDBApi/gcroot-MicrosoftZuneLibrary.cs new file mode 100644 index 0000000..9250eb2 --- /dev/null +++ b/ZuneDBApi/gcroot-MicrosoftZuneLibrary.cs @@ -0,0 +1,108 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoftZuneLibrary_003A_003AZuneLibraryCDDevice_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoftZuneLibrary_003A_003ACallbackOnUIThreadBimodalManaged_DONOTUSE_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoftZuneLibrary_003A_003AZuneLibraryCDDeviceList_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoftZuneLibrary_003A_003ADeviceList_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoftZuneLibrary_003A_003ADevice_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct gcroot_003CMicrosoftZuneLibrary_003A_003AFirmwareUpdater_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoftZuneLibrary_003A_003AGasGauge_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoftZuneLibrary_003A_003AInteropNotifications_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoftZuneLibrary_003A_003AGetAlbumForAlbumIdCompleteHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoftZuneLibrary_003A_003AMetadataMgrNotifications_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoftZuneLibrary_003A_003AHMESettings_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoftZuneLibrary_003A_003AZuneLibraryCDRecorder_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct gcroot_003CMicrosoftZuneLibrary_003A_003ASyncRulesView_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/gcroot-MicrosoftZunePlayback.cs b/ZuneDBApi/gcroot-MicrosoftZunePlayback.cs new file mode 100644 index 0000000..23fc3da --- /dev/null +++ b/ZuneDBApi/gcroot-MicrosoftZunePlayback.cs @@ -0,0 +1,20 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoftZunePlayback_003A_003ABandwidthTestInterop_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct gcroot_003CMicrosoftZunePlayback_003A_003APlayerInterop_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/gcroot-System.cs b/ZuneDBApi/gcroot-System.cs new file mode 100644 index 0000000..7a15aa4 --- /dev/null +++ b/ZuneDBApi/gcroot-System.cs @@ -0,0 +1,60 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct gcroot_003CSystem_003A_003AString_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct gcroot_003CSystem_003A_003AObject_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct gcroot_003CSystem_003A_003AThreading_003A_003ATimer_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct gcroot_003CSystem_003A_003AUri_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct gcroot_003CSystem_003A_003ACollections_003A_003AIDictionary_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct gcroot_003CSystem_003A_003AEventHandler_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct gcroot_003CSystem_003A_003ACollections_003A_003AGeneric_003A_003AList_003CMicrosoftZuneLibrary_003A_003AIQueryListEvents_0020_005E_003E_0020_005E_003E +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/tagBITMAP.cs b/ZuneDBApi/tagBITMAP.cs new file mode 100644 index 0000000..af54ba7 --- /dev/null +++ b/ZuneDBApi/tagBITMAP.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 32)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct tagBITMAP +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/tagCOPYDATASTRUCT.cs b/ZuneDBApi/tagCOPYDATASTRUCT.cs new file mode 100644 index 0000000..7dc81b5 --- /dev/null +++ b/ZuneDBApi/tagCOPYDATASTRUCT.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 24)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct tagCOPYDATASTRUCT +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/tagINPUT.cs b/ZuneDBApi/tagINPUT.cs new file mode 100644 index 0000000..39bc9fd --- /dev/null +++ b/ZuneDBApi/tagINPUT.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 40)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct tagINPUT +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/tagMONITORINFO.cs b/ZuneDBApi/tagMONITORINFO.cs new file mode 100644 index 0000000..43e11f0 --- /dev/null +++ b/ZuneDBApi/tagMONITORINFO.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 40)] +[NativeCppClass] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +internal struct tagMONITORINFO +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/tagPOINT.cs b/ZuneDBApi/tagPOINT.cs new file mode 100644 index 0000000..526915a --- /dev/null +++ b/ZuneDBApi/tagPOINT.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +[NativeCppClass] +internal struct tagPOINT +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/tagPROPVARIANT.cs b/ZuneDBApi/tagPROPVARIANT.cs new file mode 100644 index 0000000..724cc67 --- /dev/null +++ b/ZuneDBApi/tagPROPVARIANT.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 24)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct tagPROPVARIANT +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/tagRECT.cs b/ZuneDBApi/tagRECT.cs new file mode 100644 index 0000000..968690b --- /dev/null +++ b/ZuneDBApi/tagRECT.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 16)] +[MiscellaneousBits(65)] +[NativeCppClass] +[DebugInfoInPDB] +internal struct tagRECT +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/tagSAFEARRAY.cs b/ZuneDBApi/tagSAFEARRAY.cs new file mode 100644 index 0000000..846fb2b --- /dev/null +++ b/ZuneDBApi/tagSAFEARRAY.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 32)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct tagSAFEARRAY +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/tagSAFEARRAYBOUND.cs b/ZuneDBApi/tagSAFEARRAYBOUND.cs new file mode 100644 index 0000000..184e4e0 --- /dev/null +++ b/ZuneDBApi/tagSAFEARRAYBOUND.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 8)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct tagSAFEARRAYBOUND +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/tagVARIANT.cs b/ZuneDBApi/tagVARIANT.cs new file mode 100644 index 0000000..7af2a23 --- /dev/null +++ b/ZuneDBApi/tagVARIANT.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 24)] +[DebugInfoInPDB] +[NativeCppClass] +[MiscellaneousBits(65)] +internal struct tagVARIANT +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/tagWINDOWPLACEMENT.cs b/ZuneDBApi/tagWINDOWPLACEMENT.cs new file mode 100644 index 0000000..e2d0016 --- /dev/null +++ b/ZuneDBApi/tagWINDOWPLACEMENT.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 44)] +[MiscellaneousBits(65)] +[DebugInfoInPDB] +[NativeCppClass] +internal struct tagWINDOWPLACEMENT +{ + private int _003Calignment_0020member_003E; +} diff --git a/ZuneDBApi/tagWNDCLASSW.cs b/ZuneDBApi/tagWNDCLASSW.cs new file mode 100644 index 0000000..0e2b67b --- /dev/null +++ b/ZuneDBApi/tagWNDCLASSW.cs @@ -0,0 +1,12 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.VisualC; + +[StructLayout(LayoutKind.Sequential, Size = 72)] +[NativeCppClass] +[DebugInfoInPDB] +[MiscellaneousBits(65)] +internal struct tagWNDCLASSW +{ + private long _003Calignment_0020member_003E; +} diff --git a/ZuneShell.sln b/ZuneShell.sln index cfc45ed..39fd207 100644 --- a/ZuneShell.sln +++ b/ZuneShell.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30907.101 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZuneShell", "ZuneShell\ZuneShell.csproj", "{E93CFFA3-1EEB-4E71-9E83-7377C1422119}" EndProject @@ -10,6 +10,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UIXControls", "UIXControls\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UIXSign", "UIXSign\UIXSign.csproj", "{F0323473-F9B6-4875-93B2-DF657C3F7197}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZuneDBApi", "ZuneDBApi\ZuneDBApi.csproj", "{3040F871-DA7F-4286-AF17-7667525F25ED}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -50,6 +52,14 @@ Global {F0323473-F9B6-4875-93B2-DF657C3F7197}.Release|Any CPU.Build.0 = Release|x64 {F0323473-F9B6-4875-93B2-DF657C3F7197}.Release|x64.ActiveCfg = Release|x64 {F0323473-F9B6-4875-93B2-DF657C3F7197}.Release|x64.Build.0 = Release|x64 + {3040F871-DA7F-4286-AF17-7667525F25ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3040F871-DA7F-4286-AF17-7667525F25ED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3040F871-DA7F-4286-AF17-7667525F25ED}.Debug|x64.ActiveCfg = Debug|Any CPU + {3040F871-DA7F-4286-AF17-7667525F25ED}.Debug|x64.Build.0 = Debug|Any CPU + {3040F871-DA7F-4286-AF17-7667525F25ED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3040F871-DA7F-4286-AF17-7667525F25ED}.Release|Any CPU.Build.0 = Release|Any CPU + {3040F871-DA7F-4286-AF17-7667525F25ED}.Release|x64.ActiveCfg = Release|Any CPU + {3040F871-DA7F-4286-AF17-7667525F25ED}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE