Using Win32 functions in Visual FoxPro Image Gallery
Kernel Transaction Manager
CommitTransaction
CreateTransaction
RollbackTransaction
Code examples:
Copying files as a transacted operation (Vista)
CreateTransaction
..msdn    Add comment     W32 Constants      Translate this page
Creates a new file system transaction object.
Code examples:
Copying files as a transacted operation (Vista)
Declaration:
HANDLE WINAPI CreateTransaction(
  __in_opt  LPSECURITY_ATTRIBUTES lpTransactionAttributes,
  __in_opt  LPGUID UOW,
  __in_opt  DWORD CreateOptions,
  __in_opt  DWORD IsolationLevel,
  __in_opt  DWORD IsolationFlags,
  __in_opt  DWORD Timeout,
  __in_opt  LPWSTR Description
);

FoxPro declaration:
DECLARE INTEGER CreateTransaction IN KtmW32;
    INTEGER lpTransactionAttributes,;
    INTEGER UOW,;
    INTEGER CreateOptions,;
    INTEGER IsolationLevel,;
    INTEGER IsolationFlags,;
    INTEGER Timeout,;
    STRING @Description
Parameters:
lpTransactionAttributes
A pointer to a SECURITY_ATTRIBUTES structure that determines whether the returned handle can be inherited by child processes.

UOW
Reserved. Must be zero (0).

CreateOptions
Any optional transaction instructions.

IsolationLevel
Reserved; specify zero (0).

IsolationFlags
Reserved; specify zero (0).

Timeout
The time, in milliseconds, when the transaction will be aborted if it has not already reached the prepared state.

Description
A user-readable description of the transaction.
Return value:
If fails returns INVALID_HANDLE_VALUE (-1). Otherwise retrurns a handle to the transaction.
Usage:
LOCAL hTrans

hTrans = CreateTransaction(0, 0, 0, 0, 0, 1000, NULL)

IF hTrans = INVALID_HANDLE_VALUE
    ? "CreateTransaction call failed:", GetLastError()
    RETURN
ENDIF

* . . .

= CloseHandle(hTrans)

My comment:
Requires Windows Vista. Allows conducting various file operations protected by transactions: creating, copying, moving, deleting and more.

See also: CommitTransaction, RollbackTransaction
Word Index links for the CreateTransaction :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2008-12-04 15:41:23
Modified: 2008-12-04 15:56:32
Visited in last 7 days: 21
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.167.250.64)
8 sec.Function: 'GdipResetWorldTransform'
17 sec.Function: 'GdipSaveImageToFile'
25 sec.Function: 'midiOutReset'
34 sec.Function: 'SetThreadPriority'
46 sec.Function: 'CreateStreamOnHGlobal'
59 sec.
Function group: 'National Language Support'
1.22 min.Function: 'GetInterfaceInfo'
1.38 min.Function: 'EnumProcessModules'
1.58 min.Function: 'GetProfileString'
1.8 min.Function: 'LocalAlloc'
Google
Advertise here!