Example #1
0
 internal static int MsiGetActiveDatabase(int hInstall)
 {
     if (!RemotingEnabled || !RemotableNativeMethods.IsRemoteHandle(hInstall))
     {
         return(NativeMethods.MsiGetActiveDatabase(hInstall));
     }
     else
     {
         int hDatabase = (int)RemotableNativeMethods.MsiFunc_III(
             RemoteMsiFunctionId.MsiGetActiveDatabase,
             RemotableNativeMethods.GetRemoteHandle(hInstall),
             0,
             0);
         return(RemotableNativeMethods.MakeRemoteHandle(hDatabase));
     }
 }
Example #2
0
 internal static int MsiGetLastErrorRecord(int hAny)
 {
     // When remoting is enabled, we might need to create either a local or
     // remote record, depending on the handle it is to have an affinity with.
     // If no affinity handle is specified, create a remote record (the 99% case).
     if (!RemotingEnabled ||
         (hAny != 0 && !RemotableNativeMethods.IsRemoteHandle(hAny)))
     {
         return(NativeMethods.MsiGetLastErrorRecord());
     }
     else
     {
         int hRecord = unchecked ((int)RemotableNativeMethods.MsiFunc_III(
                                      RemoteMsiFunctionId.MsiGetLastErrorRecord, 0, 0, 0));
         return(RemotableNativeMethods.MakeRemoteHandle(hRecord));
     }
 }