Fax Software

Community Forums

This topic contains 1 reply, has 0 voices, and was last updated by  Cheeso 7 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2684

    levam
    Member

    I am using the PDK to enumerate my WinFax contacts, including the groups. below is a modified version of what I’m trying to do. When I get the group Id, I try to enumerate the mebers and the GetUserGroupFirst always fails. I’m unable to find any examples of how to do this.

    strId = WinFax.GetUserGroupFirst(0,strId);
    while (!strId.IsEmpty())
    {

    if (WinFax.GetType(strId) == EVENTTYPE_GROUP)
    {

    strUserId = WinFax.GetUserGroupFirst(0,strId);
    while (!strUserId.IsEmpty())
    {
    // do some stuff
    strUserId = WinFax.GetUserGroupNext();
    }

    }

    strId = WinFax.GetUserGroupNext();
    }

    any ideas?

    #4554

    Cheeso
    Member

    Here’s how I do it (not from a group, just retrieving users from the WinFax.SDKPhoneBook ):

    In Javascript.


    var comObject = new ActiveXObject("WinFax.SDKPhoneBook");
    var zero = 0;
    var id = comObject.GetUserGroupFirst(zero, folderId);
    var list = [];
    if (id != "") {
    do {
    list.push(new User(id));
    id = comObject.GetUserGroupNext();
    } while (id != "");
    }
    return list;

    You need to obtain the folderId from a prior call to comObject.GetFolderListFirst() or comObject.GetFolderListNext();

    Another thing I discovered –

    The WinFax.SDKPhoneBook ProgId provides an IDispatch interface only. That COM object does not expose a dual interface. The methods on that class can be called from late-bound languages like vb6, vbscript, javascript, and probably perl, python and others, but not from C# or VB.NET unless the .NET app explicitly uses the IDispatch interface.

    or, maybe, unless the app uses the .NET 4.0 COM integration. I don’t know anything about COM in .NET 4.0, beyond the soundbite that there is new COM magic in .NET 4.0, which is why I said “maybe”.

    The fact that the methods on WinFax.SDKPhoneBook are accessible only via IDispatch is a bit of a surprise because in the WinFax SDK or install there is a typelib – wfxctl32.tlb – that defines all the methods for the phonebook, and also there is a dual interface for the WinFax.SDKSend ProgId.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.