Exemplo n.º 1
0
        static IntPtr StgCreateStorageEx_Hooked([MarshalAs(UnmanagedType.LPWStr)][In]  string pwcsName, [In] STGM grfMode,
                                                [In] STGFMT stgfmt, [In] FileFlagsAndAttributes grfAttrs, [In] IntPtr pStgOptions, [In] IntPtr pSecurityDescriptor, [In][MarshalAs(UnmanagedType.LPStruct)] Guid riid,
                                                [Out][MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 6)] out object ppObjectOpen)
        {
            try
            {
                Main This = (Main)HookRuntimeInfo.Callback;

                lock (This.Queue)
                {
                    This.Interface.OnCreateFile(RemoteHooking.GetCurrentThreadId(), new[] { pwcsName });

                    /*This.Queue.Push("[" + RemoteHooking.GetCurrentProcessId() + ":" +
                     *  RemoteHooking.GetCurrentThreadId() + "]: \"" + InFileName + "\"");
                     * InFileName = InFileName.Replace("C", "D");*/
                }
            }
            catch
            {
            }

            return(StgCreateStorageEx(
                       pwcsName, grfMode, stgfmt, grfAttrs,
                       pStgOptions, pSecurityDescriptor,
                       riid,
                       out ppObjectOpen));
        }
Exemplo n.º 2
0
 private static extern int StgCreateStorageEx(
     [MarshalAs(UnmanagedType.LPWStr)] string name,
     STGM accessMode,
     STGFMT storageFileFormat,
     int fileBuffering,
     IntPtr options,
     IntPtr reserved,
     [In, MarshalAs(UnmanagedType.LPStruct)] System.Guid riid,
     [In, Out, MarshalAs(UnmanagedType.Interface)] ref myIStorage propertySetStorage);
Exemplo n.º 3
0
 public static extern int StgOpenStorageEx(
     [MarshalAs(UnmanagedType.LPTStr)] string pwcsName,
     STGM grfMode,
     STGFMT stgfmt,
     uint grfAttrs,
     ref STGOPTIONS pStgOptions,
     IntPtr reserved2,             // must be zero
     ref Guid riid,
     out IStorage ppObjectOpen
     );
Exemplo n.º 4
0
 private static extern uint StgOpenStorageEx([In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName, STGM grfMode, STGFMT stgfmt, int grfAttrs, IntPtr pStgOptions, IntPtr reserved2, ref Guid riid, out IPropertySetStorage ppObjectOpen);
Exemplo n.º 5
0
 public static extern int StgOpenStorageEx([MarshalAs(UnmanagedType.LPWStr)] string A_0, STGM A_1, STGFMT A_2, uint A_3, IntPtr A_4, IntPtr A_5, ref Guid A_6, out Interface40 A_7);
Exemplo n.º 6
0
 internal static extern int StgCreateStorageEx([MarshalAs(UnmanagedType.LPWStr)] string A_0, STGM A_1, STGFMT A_2, int A_3, IntPtr A_4, IntPtr A_5, [In] ref Guid A_6, out Interface40 A_7);
Exemplo n.º 7
0
 public static extern HRESULT StgOpenStorageEx([MarshalAs(UnmanagedType.LPWStr)] string pwcsName, STGM grfMode, STGFMT stgfmt,
                                               FileFlagsAndAttributes grfAttrs, ref STGOPTIONS pStgOptions, IntPtr reserved2, [MarshalAs(UnmanagedType.LPStruct)] Guid riid,
                                               [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 6)] out object ppObjectOpen);
Exemplo n.º 8
0
 public static extern HRESULT StgCreateStorageEx([MarshalAs(UnmanagedType.LPWStr)] string pwcsName, STGM grfMode,
                                                 STGFMT stgfmt, FileFlagsAndAttributes grfAttrs, [In] IntPtr pStgOptions, IntPtr pSecurityDescriptor, [MarshalAs(UnmanagedType.LPStruct)] Guid riid,
                                                 [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 6)] out object ppObjectOpen);
Exemplo n.º 9
0
 public static extern int StgOpenStorageEx(
     [MarshalAs(UnmanagedType.LPTStr)] string pwcsName,
     STGM grfMode,
     STGFMT stgfmt,
     uint grfAttrs,
     ref STGOPTIONS pStgOptions,
     IntPtr reserved2, // must be zero
     ref Guid riid,
     out IStorage ppObjectOpen
     );
Exemplo n.º 10
0
 public static extern int StgOpenStorageEx([MarshalAs(UnmanagedType.LPWStr)] string pwcsName, int grfMode, STGFMT stgfmt, int grfAttrs, int pStgOptions, int reserved2, ref Guid riid, [MarshalAs(UnmanagedType.Interface)] ref IPropertySetStorage ppObjectOpen);