Re: Using the Exchange Backup API
- From: "Scot T Brennecke" <ScotB@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Jul 2005 00:52:04 -0500
You have presented us with some assumptions you have made, but not justified:
* Just because the LoadLibrary succeeded, how can you assume that the function call should succeed?
* You called GetProcAddress, but made no attempt to confirm that it actually succeeded in getting a
pointer to that function.
* Even if the function pointer is valid, how can we assume that it isn't the function which you are
calling that causes the "crash"?
* You refer to a "crash", but you don't explain how that is manifested. Error message? Exception?
Program Termination?
"Viraj" <Viraj@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:565C6614-35F1-406E-9FEB-D651653C64E6@xxxxxxxxxxxxxxxx
> Hello All,
>
> I am trying to write an application to backup Exchange server. Below is the
> function I have written for it. I am using VC++ 6.0 and M.S. Exchange server
> 2003. My application crashes when I invoke the function
> HrESEBackupRestoreGetNodes.
>
> BOOL BackupExchangeServer(HINSTANCE g_hESEDll)
> {
> BACKUP_NODE_TREE *pMNUBackupNodeTree;
> typedef HRESULT (* HrESEBackupRestoreGetNodes) (IN WCHAR*
> wszComputerName,OUT BACKUP_NODE_TREE* pBackupNodeTree);
> HrESEBackupRestoreGetNodes fnMNUBackupRestoreGetNodes = NULL;
> fnMNUBackupRestoreGetNodes = (HrESEBackupRestoreGetNodes) GetProcAddress
> (g_hESEDll,"HrESEBackupRestoreGetNodes");
> //my program crashes in the next line.
> HRESULT hr = (fnMNUBackupRestoreGetNodes) (NULL, pMNUBackupNodeTree);
> if(hr == S_OK)
> return MNU_EXCHANGE_BKP_SUCCESS;
> else
> return MNU_EXCHANGE_BKP_FAILURE;
> }
>
> The Lod Library successfully loads the dll "esebcli2.dll". Hence the
> function HrESEBackupRestoreGetNodes should return success, but it fails.
>
> Can anyone please point the mistake in my code or give me sample code for
> Backup Functions.
>
> Thanks,
> Viraj
> a.viraj@xxxxxxxxxxxx
> http://www.mobiliti.com
>
>
.
- Follow-Ups:
- Re: Using the Exchange Backup API
- From: Viraj
- Re: Using the Exchange Backup API
- References:
- Using the Exchange Backup API
- From: Viraj
- Using the Exchange Backup API
- Prev by Date: need to convert bin file to source
- Next by Date: Re: How do I access a function in a namespace from the main MFC app file?
- Previous by thread: Using the Exchange Backup API
- Next by thread: Re: Using the Exchange Backup API
- Index(es):