Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Volume Shadow Copy (https://www.delphipraxis.net/179076-volume-shadow-copy.html)

Allan 13. Feb 2014 04:32

Volume Shadow Copy
 
I am trying out the Volume Shadow Copy example but getting the following error.

(Delphi Xe2 on Win 7)

In procedure GetBackupComponentsAndInitialize...

at line CreateVssBackupComponents(BackupComps);

I get "..... raised too many consecutive exceptions:
'Access violation at 0x00000000: read of address 0x00000000' Process Stopped..."


I have compiled the programs with following two changes.

For Xe2 I have only changed
Delphi-Quellcode:
If (Not CopyFile(PAnsiChar(Path),PAnsiChar(DestPath),True)) Then
to
Delphi-Quellcode:
If (Not CopyFile(PWideChar(Path),PWideChar(DestPath),True)) Then
and

unmarked from VssApi

Delphi-Quellcode:
Function CreateVssBackupComponents(
  Var ppBackup : IVssBackupComponents) : HRESULT; StdCall;
  External VSS_API_DLL name 'CreateVssBackupComponentsInternal'; { for Windows Server 2003 }

Procedure VssFreeSnapshotProperties(pProp : PVSS_SNAPSHOT_PROP); StdCall;
  External VSS_API_DLL;
Regards
Allan

Furtbichler 13. Feb 2014 07:52

AW: Volume Shadow Copy
 
What type of path information does 'CopyFile' expect? You cannot just change the type of parameter and expect the function to behave correctly. Remember: All that 'CopyFile' gets are two pointers to some stuff. It expects this stuff to be an array of 8-bit characters (I supose) but you now pass a list of 16-bit characters.

Allan 14. Feb 2014 04:00

AW: Volume Shadow Copy
 
Point noted. That is not my problem though as I was just mentioning changes from the original praxis code.
My error is at procedure GetBackupComponentsAndInitialize...

at line CreateVssBackupComponents(BackupComps);

I get "..... raised too many consecutive exceptions:
'Access violation at 0x00000000: read of address 0x00000000' Process Stopped..."


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:37 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz