NKTWAB, OEAPI and Comet

9 views
Skip to first unread message

Jean Beaucour

unread,
Oct 26, 2007, 11:02:25 PM10/26/07
to Nektra-NKTWAB
Hello,
We gave a look to your NKTWAB and OEAPI com libraries.

It appears to us that the the Comet Library is needed in order to
write a client application. Is that right ?
We don't know this library at all.
You provide good examples with the OEAPI object, but we face some
difficulties with the NKTWAB object.
We don't understand how to initialize a NKTWAB instance. Even by using
the #import directive, we could not see any function that would allow
us to get a pointer or a variable of a NKTWAB instance.

Your support would be very appreciated.

We think that what we need to start using your NKTWAB Lib is a sample
client code.
Can you send us a simple project in Visual C++ to show us ?
Or maybe something like a simple app written for console that just
displays the number of contacts stored in the main address-book folder
would be fine.

Maybe something very simple like this:

#include <stdio.h>
#import "c:\nktwab.dll" no_namespace
using namespace std;

void main() {

int mainforderContactsCount;

CoInitialize(NULL);

??????
??????
??????
??????

printf("%d\n", mainforderContactsCount);

NKT->Release();

CoUninitialize();

}

>From that we think we could do the rest.
Thanks

Regards,
Jean Beaucour

Federico Zaina

unread,
Oct 29, 2007, 11:51:34 AM10/29/07
to Nektra...@googlegroups.com
Hi Jean:

When our tools began developed, the best option was Comet, but to use COM objects on C++ you can use either Comet or ATL as well.
If you want to use Comet, click here to see the Comet setup instructions.

Here goes an ATL sample code:

//
// myheader.h
//
#pragma once

#include <stdio.h>
#include <tchar.h>

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#include <atlbase.h>
#include <atlstr.h>

#define NKTWAB_PATH "C:\Program Files\NKTWab\Bin\nktwab.dll"
#import NKTWAB_PATH named_guids



//
// main.cpp
//
#include "myheader.h"

int _tmain(int argc, _TCHAR* argv[])
{
  CComPtr<NKTWABLib::INKTWAB> nktwab;

  CoInitialize(NULL);
  nktwab.CoCreateInstance(NKTWABLib::CLSID_NKTWAB);

  if(nktwab == NULL)
    throw -2001;

  NKTWABLib::IFolderPtr folder = nktwab->GetRootFolder();
    
  if(folder == NULL)
    throw -2001;

  int c = folder->GetContacts()->Count;

  return 0;
}


We hope this helps.

Thank you for contacting Nektra's NKTWAB Support.


Regards,

Federico
-- 
Nektra Advanced Computing
http://www.nektra.com
Reply all
Reply to author
Forward
0 new messages