PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)
Moderators:TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Der RPC-Server ist nicht verfügbar. (Ausnahme von HRESULT: 0x800706BA)
----- details below -----
ErrorCode = -2147023174
Message = Der RPC-Server ist nicht verfügbar. (Ausnahme von HRESULT: 0x800706BA)
Data = System.Collections.ListDictionaryInternal
InnerException = null
TargetSite = Void GetDocumentsCount(Int32 ByRef)
StackTrace = bei PDFXCviewAxLib.IPDFXCview2.GetDocumentsCount(Int32& Count)
When catching that exception I would like to create a new instance of the PDFControl within the parent WindowsFormsHost like:
I guess the using CreateControl() - is wrong way in case with ActiveX Controls that have own and required UI.
In our SDK-examples (C#), when we looking to Form1.Designer.cs - we can see next:
1. instatiating ActiveX object-wrapper:
this.axCoPDFXCview1 = new AxPDFXCviewAxLib.AxCoPDFXCview();
2. start initialization of control:
((System.ComponentModel.ISupportInitialize)(this.axCoPDFXCview1)).BeginInit();
3. intializing control attributes incliding position on the parent-form:
this.axCoPDFXCview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.axCoPDFXCview1.Enabled = true;
this.axCoPDFXCview1.Location = new System.Drawing.Point(409, 3);
this.axCoPDFXCview1.Name = "axCoPDFXCview1";
this.axCoPDFXCview1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axCoPDFXCview1.OcxState")));
this.axCoPDFXCview1.Size = new System.Drawing.Size(533, 737);
this.axCoPDFXCview1.TabIndex = 3;
this.axCoPDFXCview1.OnEvent += new AxPDFXCviewAxLib._IPDFXCviewEvents_OnEventEventHandler(this.axCoPDFXCview1_OnEvent);
3. adding to controls list:
this.Controls.Add(this.axCoPDFXCview1);
4. finalizing of ActiveX control creation:
((System.ComponentModel.ISupportInitialize)(this.axCoPDFXCview1)).EndInit();
- after that control will be ready to use.