Results 1 to 4 of 4

Thread: kWab.dll

  1. #1

    Thread Starter
    Frenzied Member arpan_de's Avatar
    Join Date
    Oct 2005
    Location
    Mumbai, India
    Posts
    1,394

    Question kWab.dll

    I am using a DLL named kWab.dll to import the address book of Outlook Express (not Microsoft Outlook). When I tried to register the DLL after copying the file in C:\WINDOWS\system32 using regsvr32, the following message was generated:

    kwab.dll was loaded, but the DllRegisterServer entry point was not found.

    The file cannot be registered.


    But I could still manage to import the address book of Outlook Express & populate the addresses in a ListView. The app makes use of the following module:

    Code:
    Option Explicit
    
    Public Type tWab
       AddrBook  As Long
       WabObject As Long
       InstWab   As Long
    End Type
    
    Public Type SBinary
       cb  As Long
       lpb As Long
    End Type
    
    Public Declare Function kWabAddNewGUI Lib "kwab.dll" (ByRef kw As tWab, ByVal hWnd As Long) As Boolean
    Public Declare Function kWabOpen Lib "kwab.dll" (ByRef kw As tWab) As Long
    Public Declare Sub kWabClose Lib "kwab.dll" (ByRef kw As tWab)
    Public Declare Function kWabGetNumEntries Lib "kwab.dll" (ByRef kw As tWab) As Long
    Public Declare Function kWabGetEntries Lib "kwab.dll" (ByRef kw As tWab, ByRef FirstElementOfEntriesArray As SBinary, ByVal nBuf As Long) As Long
    Public Declare Sub kWabFreeEntries Lib "kwab.dll" (ByRef kw As tWab, ByRef FirstElementOfEntriesArray As SBinary, ByVal nBuf As Long)
    Public Declare Function kWabGetProp_String Lib "kwab.dll" (ByRef kw As tWab, ByRef Entry As SBinary, ByVal PropTag As Long, ByVal str As String, ByVal LnStr As Long, ByVal UseUnicode As Boolean) As Boolean
    Public Declare Function kWabDetails Lib "kwab.dll" (ByRef kw As tWab, ByRef Entry As SBinary, ByVal hWnd As Long) As Boolean
    Public Declare Function kWabGetNumProps Lib "kwab.dll" (ByRef kw As tWab, ByRef Entry As SBinary) As Long
    Public Declare Function kWabGetPropTag Lib "kwab.dll" (ByRef kw As tWab, ByRef Entry As SBinary, ByVal PropertyIndex As Long, ByVal UseUnicode As Boolean) As Long
    Since the app that uses kWab.dll has to be deployed on other machines which most probably won't have kWab.dll, I tried to add kWab.dll as a reference to this project (by navigating to the Project--->References menu in the VB IDE & then clicking the Browse button) but VB generated the following error:

    Can't add a reference to the specified file

    Now how do I add kWab.dll as a reference to this project so that when the app is installed in other machines, the app can import the address book from Outlook Express?

    I am using Inno to create the package. Can I include kWab.dll in the Inno script so that when the app is installed on other machines, kWab.dll can be saved in the <Windows Folder>\system32 folder & then be registered using regsvr32?


    ARPAN

    IF YOU HAVE AN APPLE & I HAVE AN APPLE AND WE EXCHANGE THE APPLES, THEN YOU & I WILL STILL HAVE ONE APPLE BUT IF YOU HAVE AN IDEA & I HAVE AN IDEA AND WE EXCHANGE OUR IDEAS, THEN EACH OF US WILL HAVE TWO IDEAS!

    NOTHING IS IMPOSSIBLE IN THIS WORLD.....EVEN THE WORD IMPOSSIBLE SAYS I'M POSSIBLE!

    PRACTICE MAKES A MAN PERFECT BUT NOBODY IS PERFECT; SO WHY PRACTICE?

  2. #2
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: kWab.dll

    I'd try it and see what happens.

  3. #3
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: kWab.dll

    when you create the install package at some point you can add dependency files, at that point just browse to your dll

    as the file can not be registered you should either put it in the same folder as your application or give the full path to the file in your declares
    Code:
    Public Declare Sub kWabClose Lib "C:\somefolder\kwab.dll" (ByRef kw As tWab)
    as you don't know the correct path to the system32 folder on a users machine i am not sure about how to set to that folder
    i would probably choose to put in the app folder
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: kWab.dll

    Where did you get this DLL and what is it written in?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width