In our programs, we are taking a different solution for the encryption of database: we use the windows encryption from a administrator user that we only know the password because we access the DBF-encrypted from FiveWin and .NET and we can't use FW or xHarbour function to encrypt/decrypt.
When a user needs to use our program launch execute a launcher that execute the program as the administrator user (like "run as administrator..." in windows) in order to have rights to the database.
This is the code for run an application as other user, I'm study how create a windows user and crypt files directly from an application.
#pragma BEGINDUMP
  #define WINVER 0x0500
  #define _WIN32_WINNT 0x0500
  #define _WIN32_IE 0x0501
  #include <hbapi.h>
  #include <Windows.h>
  #include <CommCtrl.h>
  #include <userenv.h>
  HB_FUNC( RUNAS )
  {
   STARTUPINFOW     sInfo;
   PROCESS_INFORMATION  pInfo;
   LPWSTR  szUser     = AnsiToWide(hb_parc(1));  /// User
   LPWSTR  szDomain    = AnsiToWide(hb_parc(2));  /// Domain (or blank)
   LPWSTR  szPassword   = AnsiToWide(hb_parc(3));  /// Password
   LPWSTR  szCommandLine = AnsiToWide(hb_parc(4));  /// Commandline
   LPWSTR  szCurDir    = AnsiToWide(hb_parc(5));  /// Directory
   // Initialize the STARTUPINFO structure.
   memset(&sInfo, 0, sizeof(sInfo));
   sInfo.cb = sizeof( sInfo );
   /// WINADVAPI BOOL WINAPI CreateProcessWithLogonW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPCWSTR,LPWSTR,DWORD,LPVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION);
   if (!CreateProcessWithLogonW(szUser, szDomain, szPassword, LOGON_WITH_PROFILE, NULL, szCommandLine, 0, NULL, szCurDir, &sInfo, &pInfo))
   {
     hb_retnl( GetLastError() );
     return;
   }
   CloseHandle(pInfo.hProcess);
   CloseHandle(pInfo.hThread);
   hb_retnl( 0 );
  }
#pragma ENDDUMP