* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- *
- * TODO:
- * - IRunningObjectTable should work interprocess, but currently doesn't.
- * Native (on Win2k at least) uses an undocumented RPC interface, IROT, to
- * communicate with RPCSS which contains the table of marshalled data.
*/
+#include "config.h"
+#include "wine/port.h"
+
#include <stdarg.h>
#include <string.h>
static LONG WINAPI rpc_filter(EXCEPTION_POINTERS *eptr)
{
- switch (eptr->ExceptionRecord->ExceptionCode)
- {
- case EXCEPTION_ACCESS_VIOLATION:
- case EXCEPTION_ILLEGAL_INSTRUCTION:
- return EXCEPTION_CONTINUE_SEARCH;
- default:
- return EXCEPTION_EXECUTE_HANDLER;
- }
+ return I_RpcExceptionFilter(eptr->ExceptionRecord->ExceptionCode);
}
/* define the structure of the running object table elements */
const void *pv = GlobalLock(hglobal);
rot_entry->object = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(MInterfacePointer, abData[size]));
rot_entry->object->ulCntData = size;
- memcpy(&rot_entry->object->abData, pv, size);
+ memcpy(rot_entry->object->abData, pv, size);
GlobalUnlock(hglobal);
}
}
const void *pv = GlobalLock(hglobal);
moniker = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(InterfaceData, abData[size]));
moniker->ulCntData = size;
- memcpy(&moniker->abData, pv, size);
+ memcpy(moniker->abData, pv, size);
GlobalUnlock(hglobal);
}
}
LIST_FOR_EACH_ENTRY(rot_entry, &This->rot, const struct rot_entry, entry)
{
if ((rot_entry->moniker_data->ulCntData == moniker_data->ulCntData) &&
- !memcmp(&moniker_data->abData, &rot_entry->moniker_data->abData, moniker_data->ulCntData))
+ !memcmp(moniker_data->abData, rot_entry->moniker_data->abData, moniker_data->ulCntData))
{
hr = S_OK;
break;
LIST_FOR_EACH_ENTRY(rot_entry, &This->rot, struct rot_entry, entry)
{
if ((rot_entry->moniker_data->ulCntData == moniker_data->ulCntData) &&
- !memcmp(&moniker_data->abData, &rot_entry->moniker_data->abData, moniker_data->ulCntData))
+ !memcmp(moniker_data->abData, rot_entry->moniker_data->abData, moniker_data->ulCntData))
{
IStream *pStream;
hr = create_stream_on_mip_ro(rot_entry->object, &pStream);
LIST_FOR_EACH_ENTRY(rot_entry, &This->rot, const struct rot_entry, entry)
{
if ((rot_entry->moniker_data->ulCntData == moniker_data->ulCntData) &&
- !memcmp(&moniker_data->abData, &rot_entry->moniker_data->abData, moniker_data->ulCntData))
+ !memcmp(moniker_data->abData, rot_entry->moniker_data->abData, moniker_data->ulCntData))
{
*pfiletime = rot_entry->last_modified;
hr = S_OK;
/* initialize the virtual table function */
runningObjectTableInstance->lpVtbl = &VT_RunningObjectTableImpl;
- /* the initial reference is set to "1" ! because if set to "0" it will be not practis when */
- /* the ROT referred many times not in the same time (all the objects in the ROT will */
- /* be removed every time the ROT is removed ) */
+ /* the initial reference is set to "1" so that it isn't destroyed after its
+ * first use until the process is destroyed, as the running object table is
+ * a process-wide cache of a global table */
runningObjectTableInstance->ref = 1;
list_init(&runningObjectTableInstance->rot);
return res;
}
- /* if the file is not a storage object then attemps to match various bits in the file against a
- pattern in the registry. this case is not frequently used ! so I present only the psodocode for
- this case
+ /* If the file is not a storage object then attempt to match various bits in the file against a
+ pattern in the registry. This case is not frequently used, so I present only the pseudocode for
+ this case.
for(i=0;i<nFileTypes;i++)
nbElm=FileMonikerImpl_DecomposePath(filePathName,&pathDec);
absFile=pathDec[nbElm-1];
- /* failed if the path represente a directory and not an absolute file name*/
+ /* failed if the path represents a directory and not an absolute file name*/
if (!lstrcmpW(absFile, bkslashW))
return MK_E_INVALIDEXTENSION;