COM problem C++ wrappers missing some interfaces in version 2.0

Overall you did a good job.

I was using the pevious versions of PDFCreator only with the Autosave option and handling the output file afterwards

Now I have installed version 2.0 and wanted to try the COM implementation from one of my C++ projects. So I have imported the type library you offer like 

#import

using namespace PdfCreator;

and I got, as expected, the .tlh file containing the smart pointer types for the interfaces in the COM server

but only IPDFCreator and IQueue interfaces have methods exposed. The rest of them (for example PrintJob which I need) are empty as you can see below. So, your effort is great but...useless unless I am missing something

By the way, beside JavaScript, some examples in other programming languages will be nice from you

// Created by Microsoft (R) C/C++ Compiler Version 11.00.60610.1 (55ed0fb5).
//
// c:\\work2015\\pdfcreator.tlh
//
// C++ source equivalent of Win32 type library PDFCreator.tlb
// compiler-generated file created 02/04/15 at 21:06:01 - DO NOT EDIT!

#pragma once
#pragma pack(push, 8)

#include

namespace PdfCreator {

//
// Forward references and typedefs
//

struct __declspec(uuid("8b8d2928-eaaf-492d-8da5-e06b358d8826"))
/* LIBID */ __PdfCreator;
struct /* coclass */ PrintJob;
struct /* coclass */ OutputFiles;
struct __declspec(uuid("a1f6647e-8c19-4a3e-89df-7fdfad2a0c30"))
/* dual interface */ IPDFCreator;
struct /* coclass */ PdfCreator;
struct /* coclass */ Printers;
struct __declspec(uuid("3803f46c-f5aa-4b86-8b9c-6effac9cdcfa"))
/* dual interface */ IQueue;
struct /* coclass */ Queue;
struct __declspec(uuid("6dcd251a-eb53-3171-80cb-858ddea1ce98"))
/* dual interface */ _PrintJob;
struct __declspec(uuid("014260ae-9833-34cb-bc9c-b251a094b864"))
/* dual interface */ _OutputFiles;
struct __declspec(uuid("fb0d0a13-9b9f-3def-bb84-8563905e0d98"))
/* dual interface */ _PdfCreator;
struct __declspec(uuid("b731f12e-8262-36eb-9628-f3390db3c52c"))
/* dual interface */ _Printers;
struct __declspec(uuid("54381a03-bbb7-3a5d-b5e2-6e5e097d2343"))
/* dual interface */ _Queue;

//
// Smart pointer typedef declarations
//

_COM_SMARTPTR_TYPEDEF(_PrintJob, __uuidof(_PrintJob));
_COM_SMARTPTR_TYPEDEF(IQueue, __uuidof(IQueue));
_COM_SMARTPTR_TYPEDEF(_OutputFiles, __uuidof(_OutputFiles));
_COM_SMARTPTR_TYPEDEF(_PdfCreator, __uuidof(_PdfCreator));
_COM_SMARTPTR_TYPEDEF(_Printers, __uuidof(_Printers));
_COM_SMARTPTR_TYPEDEF(IPDFCreator, __uuidof(IPDFCreator));
_COM_SMARTPTR_TYPEDEF(_Queue, __uuidof(_Queue));


//
// Type library items
//

struct __declspec(uuid("2e4e997d-ef92-31ab-8b50-c2d2d879fc91"))
PrintJob;
    // [ default ] interface _PrintJob
    // interface _Object

struct __declspec(uuid("9250ce09-b0f5-356b-816f-51d28a6264ea"))
OutputFiles;
    // [ default ] interface _OutputFiles
    // interface _Object

struct __declspec(uuid("69189c58-70c4-4df2-b94d-5d786e9ad513"))
PdfCreator;
    // [ default ] interface _PdfCreator
    // interface _Object
    // interface IPDFCreator

struct __declspec(uuid("7cef8fe3-8607-37be-8988-3fe300d038b7"))
Printers;
    // [ default ] interface _Printers
    // interface _Object

struct __declspec(uuid("66a9cab1-404a-4918-8de2-29c26b9b271e"))
Queue;
    // [ default ] interface _Queue
    // interface _Object
    // interface IQueue

struct __declspec(uuid("6dcd251a-eb53-3171-80cb-858ddea1ce98"))
_PrintJob : IDispatch
{};

struct __declspec(uuid("3803f46c-f5aa-4b86-8b9c-6effac9cdcfa"))
IQueue : IDispatch
{
    //
    // Property data
    //

    __declspec(property(get=GetCount))
    long Count;
    __declspec(property(get=GetNextJob))
    _PrintJobPtr NextJob;

    //
    // Wrapper methods for error-handling
    //

    HRESULT Initialize ( );
    VARIANT_BOOL WaitForJob (
        long timeOut );
    VARIANT_BOOL WaitForJobs (
        long jobCount,
        long timeOut );
    long GetCount ( );
    _PrintJobPtr GetNextJob ( );
    _PrintJobPtr GetJobByIndex (
        long jobIndex );
    HRESULT MergeJobs (
        struct _PrintJob * job1,
        struct _PrintJob * job2 );
    HRESULT MergeAllJobs ( );
    HRESULT ReleaseCom ( );

    //
    // Raw methods provided by interface
    //

      virtual HRESULT __stdcall raw_Initialize ( ) = 0;
      virtual HRESULT __stdcall raw_WaitForJob (
        /*[in]*/ long timeOut,
        /*[out,retval]*/ VARIANT_BOOL * pRetVal ) = 0;
      virtual HRESULT __stdcall raw_WaitForJobs (
        /*[in]*/ long jobCount,
        /*[in]*/ long timeOut,
        /*[out,retval]*/ VARIANT_BOOL * pRetVal ) = 0;
      virtual HRESULT __stdcall get_Count (
        /*[out,retval]*/ long * pRetVal ) = 0;
      virtual HRESULT __stdcall get_NextJob (
        /*[out,retval]*/ struct _PrintJob * * pRetVal ) = 0;
      virtual HRESULT __stdcall raw_GetJobByIndex (
        /*[in]*/ long jobIndex,
        /*[out,retval]*/ struct _PrintJob * * pRetVal ) = 0;
      virtual HRESULT __stdcall raw_MergeJobs (
        /*[in]*/ struct _PrintJob * job1,
        /*[in]*/ struct _PrintJob * job2 ) = 0;
      virtual HRESULT __stdcall raw_MergeAllJobs ( ) = 0;
      virtual HRESULT __stdcall raw_ReleaseCom ( ) = 0;
};

Hi Robin

No answer from the programmers to my problem yet ?

At least to know if is a known issue, or am I missing something

Hey,


this problem should be fixed with the new version of PDFCreator (v2.1).

I used one of the COM interfaces in Ruby, which still works in version 1.7.3.  The call to the interface is in the following ruby snippet.  This still does not work in 2.1.1 .


7pdfcreator = WIN32OLE.new(PDFCreator.clsPDFCreator)
</div>

Hi alyman,


the COM interface was completely rewritten after version 1.7.3 , please have a look at http://docs.pdfforge.org/pdfcreator/2.1/en/com-interface/ , clsPDFCreator doesn’t exist anymore. Additional documentation explaining the different workflows for the old and new COM interface will soon be available.

best regards,


You’ve got further than I have with the new version. Would you be willing to post your initial startup code as a C++ example of interfacing with the V2.1 COM interface?

I’m totally lost…

Hi,


C++ examples will be included in the next release.

best regards,