As far as I known, WAB file can be accessed by loading the wab32.dll library and get the address to WAB open.Code4Food has given us such method : http://www.codeproject.com/cpp/wabapi.asp
But how to export thunderbird's address book datas into a txt file, including contracts and maillists?
Since address book is not provided as part of Gecko,how could I deal with it?
The List is:
#include <nsCOMPtr.h>
#include <nsIServiceManager.h>
#include <nsIComponentManager.h>
#include <nsICookieManager.h>
#include <nsXPCOM.h>
#include <nsIAddressBook.h>
int main()
{
nsCOMPtr<nsIComponentManager> compMgr;
nsresult rv;
rv = NS_GetComponentManager(getter_AddRefs(compMgr));
if (NS_FAILED(rv))
return rv;
nsCOMPtr<nsIAddressBook> abMgr;
rv = compMgr->CreateInstanceByContractID("@mozilla.org/addressbook;1", nsnull,NS_GET_IID(nsIAddressBook),(void**)&abMgr);
if (NS_FAILED(rv))
return rv;// Here Fails!!!
// It sames the "nsIAddressBook" can't be queried.
}
I am looking forword your any prompts. Thanks... _______________________________________________ Mozilla-xpcom mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-xpcom
