Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++ 2005
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Visual C++ 2005 For discussion of Visual C++ 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old March 23rd, 2006, 09:13 PM
Registered User
Join Date: Mar 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default a problem in use vc++.net to import WAB file!

It's my first vc++.net program,i want it to import another WAB book from d:/pxall.wab into

my default outlook express WAB book. Under vs2005 i debug it done ok,but double click .exe

file it can't work(my OS is xp)!!when i copy .exe and msvcr80d.dll to win2000 and double

click .exe it done ok!!i copy .exe file and msvcr80d.dll to other xp os it can't work!why??

Can any one help me! thanks!

/ updateOutlookExpress.cppˇŁ

#include "stdafx.h"
#include "wab.h"
#include "Wabapi.h"
#include "updateOutlookExpress.h"

int APIENTRY _tWinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR lpCmdLine,
                     int nCmdShow)
    LPWABOPEN lpfnWABOpen = NULL; // Defined in Wabapi.h.
        HINSTANCE hinstWAB = NULL;
    LPADRBOOK lppAdrBook;
    HRESULT hr = E_FAIL;

        DWORD dwType = 0;
        ULONG cbData = sizeof(szWABDllPath);
        HKEY hKey = NULL;

        *szWABDllPath = '\0';

        // First we look under the default WAB DLL path location in the
        // Registry.
        // WAB_DLL_PATH_KEY is defined in wabapi.h

            RegQueryValueEx( hKey, L"", NULL, &dwType, (LPBYTE) szWABDllPath, &cbData);

        if(hKey) RegCloseKey(hKey);

        // if the Registry came up blank, we do a loadlibrary on the wab32.dll
        // WAB_DLL_NAME is defined in wabapi.h
        hinstWAB = LoadLibrary( (lstrlen(szWABDllPath)) ? szWABDllPath : WAB_DLL_NAME );

    if (hinstWAB)
            lpfnWABOpen = (LPWABOPEN) GetProcAddress(hinstWAB, "WABOpen");
            if (lpfnWABOpen)
                hr = lpfnWABOpen (&lppAdrBook, &lppWABObject,NULL, 0);
                if (hr != S_OK) {
                    MessageBox(NULL,L"Outlook Express WAB Book Update





                HRESULT res=lppWABObject->Import((LPSTR)lpWABParam);
                    MessageBox(NULL,L"Outlook Express WAB Book Update


    MessageBox(NULL,L"Outlook Express Wab Book Updated!",L"Update",MB_OK);
    return 1;


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
import Excel File to C#.net DataGridView therese C# 11 March 5th, 2010 04:28 AM
Import text file to MS Access, ASP.net rykie Access ASP 0 August 31st, 2007 03:07 AM
VC++ .NET 2003 Windows Forms Designer Problem alphatrak General .NET 0 February 15th, 2006 07:44 PM
ComplexType Import Flat File Problem pn609 Biztalk 0 January 20th, 2005 09:10 AM
How to import Excel file to vc++ editor lokanadham Beginning VB 6 0 September 15th, 2004 05:35 AM

All times are GMT -4. The time now is 05:44 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.