[AxPlugin] Clubphoto Control throws NS_ERROR_XPC_COM_ERROR exception

RESOLVED DUPLICATE of bug 199122

Status

Core Graveyard
Embedding: ActiveX Wrapper
RESOLVED DUPLICATE of bug 199122
15 years ago
6 years ago

People

(Reporter: Ashish Bhatt, Assigned: David Bradley)

Tracking

Trunk
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
Tested on mozilla trunk 2003-03-27

ClubPhoto trows NS_ERROR_XPC_COM_ERROR exception when some of the methods
related to file are called on the control.

Photos can be uploaded in 2 ways by this control. 
1. Drag and drop pictuers on this control
2. Click on the control, it brings up file picker where you can select files.

After selecting or dropping, calling object.file_path(i) returns the physical
path of the file. file_path is the collection of the files selected or dropped.
(Reporter)

Comment 1

15 years ago
Created attachment 118737 [details]
Testcase

Comment 2

15 years ago
IDL for ClubPhoto control confirms file_path(0) should correspond to the
parameterized property below.

// Generated .IDL file (by the OLE/COM Object Viewer)
// 
// typelib filename: atl_uploader.dll

[
  uuid(F05AF208-273C-11D4-B0BE-005004AD3039),
  version(1.0),
  helpstring("ATLUploader 1.0 Type Library"),
  custom(DE77BA64-517C-11D1-A2DA-0000F8773CE9, 83951780),
  custom(DE77BA63-517C-11D1-A2DA-0000F8773CE9, 968978919)

]
library ATLUPLOADERLib
{
    // TLib :     // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046}
    importlib("stdole2.tlb");

    // Forward declare all types defined in this typelib
    dispinterface _IUploaderCtrlEvents;
    interface IUploaderCtrl;

    [
      uuid(F05AF218-273C-11D4-B0BE-005004AD3039),
      helpstring("_IUploaderCtrlEvents Interface")
    ]
    dispinterface _IUploaderCtrlEvents {
        properties:
        methods:
            [id(0x00000001), helpstring("method OnUploadOneFile")]
            HRESULT OnUploadOneFile();
            [id(0x00000002), helpstring("method OnUploadFinished")]
            HRESULT OnUploadFinished();
            [id(0x00000003), helpstring("method OnFileDrop")]
            HRESULT OnFileDrop();
    };

    [
      uuid(03177121-226B-11D4-B0BE-005004AD3039),
      helpstring("UploaderCtrl Class")
    ]
    coclass UploaderCtrl {
        [default] interface IUploaderCtrl;
        [default, source] dispinterface _IUploaderCtrlEvents;
    };

    [
      odl,
      uuid(F05AF217-273C-11D4-B0BE-005004AD3039),
      helpstring("IUploaderCtrl Interface"),
      dual,
      oleautomation
    ]
    interface IUploaderCtrl : IDispatch {
        [id(0x00000001), propget, helpstring("property folder")]
        HRESULT folder([out, retval] BSTR* pVal);
        [id(0x00000001), propput, helpstring("property folder")]
        HRESULT folder([in] BSTR pVal);
        [id(0x00000002), propget, helpstring("property max_files")]
        HRESULT max_files([out, retval] long* pVal);
        [id(0x00000002), propput, helpstring("property max_files")]
        HRESULT max_files([in] long pVal);
        [id(0x00000004), propget, helpstring("property num_files")]
        HRESULT num_files([out, retval] long* pVal);
        [id(0x00000005), propget, helpstring("property file_path")]
        HRESULT file_path(
                        long idx, 
                        [out, retval] BSTR* pVal);
        [id(0x00000006), propget, helpstring("property captions")]
        HRESULT captions(
                        long idx, 
                        [out, retval] BSTR* pVal);
        [id(0x00000006), propput, helpstring("property captions")]
        HRESULT captions(
                        long idx, 
                        [in] BSTR pVal);
        [id(0x00000007), propget, helpstring("property descriptions")]
        HRESULT descriptions(
                        long idx, 
                        [out, retval] BSTR* pVal);
        [id(0x00000007), propput, helpstring("property descriptions")]
        HRESULT descriptions(
                        long idx, 
                        [in] BSTR pVal);
        [id(0x00000008), helpstring("method StartUpload")]
        HRESULT StartUpload();
        [id(0x00000009), propget, helpstring("property prefix")]
        HRESULT prefix([out, retval] BSTR* pVal);
        [id(0x00000009), propput, helpstring("property prefix")]
        HRESULT prefix([in] BSTR pVal);
        [id(0x0000000a), propget, helpstring("property file_size")]
        HRESULT file_size(
                        long idx, 
                        [out, retval] long* pVal);
        [id(0x0000000b), propget, helpstring("property to_upload")]
        HRESULT to_upload(
                        long idx, 
                        [out, retval] long* pVal);
        [id(0x0000000b), propput, helpstring("property to_upload")]
        HRESULT to_upload(
                        long idx, 
                        [in] long pVal);
        [id(0x0000000c), propget, helpstring("property album_name")]
        HRESULT album_new([out, retval] BSTR* pVal);
        [id(0x0000000c), propput, helpstring("property album_name")]
        HRESULT album_new([in] BSTR pVal);
        [id(0x0000000d), propget, helpstring("property onerr")]
        HRESULT onerr([out, retval] long* pVal);
        [id(0x0000000d), propput, helpstring("property onerr")]
        HRESULT onerr([in] long pVal);
    };
};

Comment 3

15 years ago
This looks like more fallout from the issue of reading getter/setter attributes.
In this case, file_path is a read-only parameterized property (i.e. no setter).
The absence of a setter causes XPCDispInterface::InspectIDispatch to go down the
route normally reserved for setter and so the getter FUNCDESC doesn't get filled in.

This hoses the call later when it doesn't match the form expected. This should
probably be duped against 199122 and the work being done, but I'll let you
decide David.
(Assignee)

Comment 4

15 years ago
Duping against bug 199122, I'll make sure I add this test case to the patch I'm
working on.

*** This bug has been marked as a duplicate of 199122 ***
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE
Component: Embedding: ActiveX Wrapper → Embedding: ActiveX Wrapper
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.