mirror of
https://github.com/reactos/reactos.git
synced 2024-09-29 22:16:01 +00:00
[SCRRUN]
* Import from Wine 1.7.1. svn path=/trunk/; revision=60033
This commit is contained in:
parent
c6cea14cef
commit
cd1307c71a
|
@ -165,6 +165,7 @@ add_subdirectory(samlib)
|
|||
add_subdirectory(samsrv)
|
||||
add_subdirectory(sccbase)
|
||||
add_subdirectory(schannel)
|
||||
add_subdirectory(scrrun)
|
||||
add_subdirectory(secur32)
|
||||
add_subdirectory(security)
|
||||
add_subdirectory(sensapi)
|
||||
|
|
27
reactos/dll/win32/scrrun/CMakeLists.txt
Normal file
27
reactos/dll/win32/scrrun/CMakeLists.txt
Normal file
|
@ -0,0 +1,27 @@
|
|||
|
||||
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
|
||||
add_definitions(-D__WINESRC__)
|
||||
spec2def(scrrun.dll scrrun.spec)
|
||||
|
||||
add_idl_headers(scrrun_idlheader scrrun.idl)
|
||||
add_typelib(scrrun.idl)
|
||||
|
||||
list(APPEND SOURCE
|
||||
dictionary.c
|
||||
filesystem.c
|
||||
scrrun.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/scrrun_stubs.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/scrrun.def)
|
||||
|
||||
list(APPEND scrrun_rc_deps
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/scrrun.rgs
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/scrrun_tlb.rgs
|
||||
${CMAKE_CURRENT_BINARY_DIR}/scrrun.tlb)
|
||||
|
||||
set_source_files_properties(scrrun.rc PROPERTIES OBJECT_DEPENDS "${scrrun_rc_deps}")
|
||||
add_library(scrrun SHARED ${SOURCE} scrrun.rc)
|
||||
add_dependencies(scrrun scrrun_idlheader stdole2)
|
||||
set_module_type(scrrun win32dll)
|
||||
target_link_libraries(scrrun uuid wine)
|
||||
add_importlibs(scrrun oleaut32 version advapi32 msvcrt kernel32 ntdll)
|
||||
add_cd_file(TARGET scrrun DESTINATION reactos/system32 FOR all)
|
343
reactos/dll/win32/scrrun/dictionary.c
Normal file
343
reactos/dll/win32/scrrun/dictionary.c
Normal file
|
@ -0,0 +1,343 @@
|
|||
/*
|
||||
* Copyright (C) 2012 Alistair Leslie-Hughes
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
#define COBJMACROS
|
||||
|
||||
#include "config.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "ole2.h"
|
||||
#include "dispex.h"
|
||||
#include "scrrun.h"
|
||||
#include "scrrun_private.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(scrrun);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
IDictionary IDictionary_iface;
|
||||
|
||||
LONG ref;
|
||||
} dictionary;
|
||||
|
||||
static inline dictionary *impl_from_IDictionary(IDictionary *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, dictionary, IDictionary_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_QueryInterface(IDictionary *iface, REFIID riid, void **obj)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), obj);
|
||||
|
||||
*obj = NULL;
|
||||
|
||||
if(IsEqualIID(riid, &IID_IUnknown) ||
|
||||
IsEqualIID(riid, &IID_IDispatch) ||
|
||||
IsEqualIID(riid, &IID_IDictionary))
|
||||
{
|
||||
*obj = &This->IDictionary_iface;
|
||||
}
|
||||
else if ( IsEqualGUID( riid, &IID_IDispatchEx ))
|
||||
{
|
||||
TRACE("Interface IDispatchEx not supported - returning NULL\n");
|
||||
*obj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
else if ( IsEqualGUID( riid, &IID_IObjectWithSite ))
|
||||
{
|
||||
TRACE("Interface IObjectWithSite not supported - returning NULL\n");
|
||||
*obj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
else
|
||||
{
|
||||
WARN("interface %s not implemented\n", debugstr_guid(riid));
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
IDictionary_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI dictionary_AddRef(IDictionary *iface)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
return InterlockedIncrement(&This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI dictionary_Release(IDictionary *iface)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
LONG ref;
|
||||
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
ref = InterlockedDecrement(&This->ref);
|
||||
if(ref == 0)
|
||||
heap_free(This);
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_GetTypeInfoCount(IDictionary *iface, UINT *pctinfo)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
TRACE("(%p)->()\n", This);
|
||||
|
||||
*pctinfo = 1;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_GetTypeInfo(IDictionary *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
|
||||
return get_typeinfo(IDictionary_tid, ppTInfo);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_GetIDsOfNames(IDictionary *iface, REFIID riid, LPOLESTR *rgszNames,
|
||||
UINT cNames, LCID lcid, DISPID *rgDispId)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
ITypeInfo *typeinfo;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
|
||||
|
||||
hr = get_typeinfo(IDictionary_tid, &typeinfo);
|
||||
if(SUCCEEDED(hr))
|
||||
{
|
||||
hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
|
||||
ITypeInfo_Release(typeinfo);
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_Invoke(IDictionary *iface, DISPID dispIdMember, REFIID riid,
|
||||
LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult,
|
||||
EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
ITypeInfo *typeinfo;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
|
||||
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||
|
||||
hr = get_typeinfo(IDictionary_tid, &typeinfo);
|
||||
if(SUCCEEDED(hr))
|
||||
{
|
||||
hr = ITypeInfo_Invoke(typeinfo, &This->IDictionary_iface, dispIdMember, wFlags,
|
||||
pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||
ITypeInfo_Release(typeinfo);
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_putref_Item(IDictionary *iface, VARIANT *Key, VARIANT *pRetItem)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
FIXME("(%p)->(%p %p)\n", This, Key, pRetItem);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_put_Item(IDictionary *iface, VARIANT *Key, VARIANT *pRetItem)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
FIXME("(%p)->(%p %p)\n", This, Key, pRetItem);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_get_Item(IDictionary *iface, VARIANT *Key, VARIANT *pRetItem)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
FIXME("(%p)->(%p %p)\n", This, Key, pRetItem );
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_Add(IDictionary *iface, VARIANT *Key, VARIANT *Item)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
FIXME("(%p)->(%p %p)\n", This, Key, Item);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_get_Count(IDictionary *iface, LONG *pCount)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
FIXME("(%p)->(%p)\n", This, pCount);
|
||||
|
||||
*pCount = 0;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_Exists(IDictionary *iface, VARIANT *Key, VARIANT_BOOL *pExists)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
FIXME("(%p)->(%p %p)\n", This, Key, pExists);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_Items(IDictionary *iface, VARIANT *pItemsArray)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
FIXME("(%p)->(%p)\n", This, pItemsArray);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_put_Key(IDictionary *iface, VARIANT *Key, VARIANT *rhs)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
FIXME("(%p)->(%p %p)\n", This, Key, rhs);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_Keys(IDictionary *iface, VARIANT *pKeysArray)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
FIXME("(%p)->(%p)\n", This, pKeysArray);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_Remove(IDictionary *iface, VARIANT *Key)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
FIXME("(%p)->(%p)\n", This, Key);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_RemoveAll(IDictionary *iface)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
FIXME("(%p)->()\n", This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_put_CompareMode(IDictionary *iface, CompareMethod pcomp)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
FIXME("(%p)->()\n", This);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_get_CompareMode(IDictionary *iface, CompareMethod *pcomp)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
FIXME("(%p)->(%p)\n", This, pcomp);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary__NewEnum(IDictionary *iface, IUnknown **ppunk)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
FIXME("(%p)->(%p)\n", This, ppunk);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_get_HashVal(IDictionary *iface, VARIANT *Key, VARIANT *HashVal)
|
||||
{
|
||||
dictionary *This = impl_from_IDictionary(iface);
|
||||
|
||||
FIXME("(%p)->(%p %p)\n", This, Key, HashVal);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
static const struct IDictionaryVtbl dictionary_vtbl =
|
||||
{
|
||||
dictionary_QueryInterface,
|
||||
dictionary_AddRef,
|
||||
dictionary_Release,
|
||||
dictionary_GetTypeInfoCount,
|
||||
dictionary_GetTypeInfo,
|
||||
dictionary_GetIDsOfNames,
|
||||
dictionary_Invoke,
|
||||
dictionary_putref_Item,
|
||||
dictionary_put_Item,
|
||||
dictionary_get_Item,
|
||||
dictionary_Add,
|
||||
dictionary_get_Count,
|
||||
dictionary_Exists,
|
||||
dictionary_Items,
|
||||
dictionary_put_Key,
|
||||
dictionary_Keys,
|
||||
dictionary_Remove,
|
||||
dictionary_RemoveAll,
|
||||
dictionary_put_CompareMode,
|
||||
dictionary_get_CompareMode,
|
||||
dictionary__NewEnum,
|
||||
dictionary_get_HashVal
|
||||
};
|
||||
|
||||
HRESULT WINAPI Dictionary_CreateInstance(IClassFactory *factory,IUnknown *outer,REFIID riid, void **obj)
|
||||
{
|
||||
dictionary *This;
|
||||
|
||||
TRACE("(%p)\n", obj);
|
||||
|
||||
*obj = NULL;
|
||||
|
||||
This = heap_alloc(sizeof(*This));
|
||||
if(!This) return E_OUTOFMEMORY;
|
||||
|
||||
This->IDictionary_iface.lpVtbl = &dictionary_vtbl;
|
||||
This->ref = 1;
|
||||
|
||||
*obj = &This->IDictionary_iface;
|
||||
|
||||
return S_OK;
|
||||
}
|
1866
reactos/dll/win32/scrrun/filesystem.c
Normal file
1866
reactos/dll/win32/scrrun/filesystem.c
Normal file
File diff suppressed because it is too large
Load diff
230
reactos/dll/win32/scrrun/scrrun.c
Normal file
230
reactos/dll/win32/scrrun/scrrun.c
Normal file
|
@ -0,0 +1,230 @@
|
|||
/*
|
||||
* Copyright 2011 Hans Leidekker for CodeWeavers
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
#define COBJMACROS
|
||||
|
||||
#include "config.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "ole2.h"
|
||||
#include "rpcproxy.h"
|
||||
|
||||
#include <initguid.h>
|
||||
#include "scrrun.h"
|
||||
#include "scrrun_private.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(scrrun);
|
||||
|
||||
static HINSTANCE scrrun_instance;
|
||||
|
||||
typedef HRESULT (*fnCreateInstance)(LPVOID *ppObj);
|
||||
|
||||
static HRESULT WINAPI scrruncf_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *ppv )
|
||||
{
|
||||
*ppv = NULL;
|
||||
|
||||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv);
|
||||
*ppv = iface;
|
||||
}else if(IsEqualGUID(&IID_IClassFactory, riid)) {
|
||||
TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv);
|
||||
*ppv = iface;
|
||||
}
|
||||
|
||||
if(*ppv) {
|
||||
IUnknown_AddRef((IUnknown*)*ppv);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI scrruncf_AddRef(IClassFactory *iface )
|
||||
{
|
||||
TRACE("(%p)\n", iface);
|
||||
return 2;
|
||||
}
|
||||
|
||||
static ULONG WINAPI scrruncf_Release(IClassFactory *iface )
|
||||
{
|
||||
TRACE("(%p)\n", iface);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI scrruncf_LockServer(IClassFactory *iface, BOOL fLock)
|
||||
{
|
||||
TRACE("(%p)->(%x)\n", iface, fLock);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const struct IClassFactoryVtbl scrruncf_vtbl =
|
||||
{
|
||||
scrruncf_QueryInterface,
|
||||
scrruncf_AddRef,
|
||||
scrruncf_Release,
|
||||
FileSystem_CreateInstance,
|
||||
scrruncf_LockServer
|
||||
};
|
||||
|
||||
static const struct IClassFactoryVtbl dictcf_vtbl =
|
||||
{
|
||||
scrruncf_QueryInterface,
|
||||
scrruncf_AddRef,
|
||||
scrruncf_Release,
|
||||
Dictionary_CreateInstance,
|
||||
scrruncf_LockServer
|
||||
};
|
||||
|
||||
static IClassFactory FileSystemFactory = { &scrruncf_vtbl };
|
||||
static IClassFactory DictionaryFactory = { &dictcf_vtbl };
|
||||
|
||||
static ITypeLib *typelib;
|
||||
static ITypeInfo *typeinfos[LAST_tid];
|
||||
|
||||
static REFIID tid_ids[] = {
|
||||
&IID_NULL,
|
||||
&IID_IDictionary,
|
||||
&IID_IFileSystem3,
|
||||
&IID_IFolder,
|
||||
&IID_IFile
|
||||
};
|
||||
|
||||
static HRESULT load_typelib(void)
|
||||
{
|
||||
HRESULT hres;
|
||||
ITypeLib *tl;
|
||||
|
||||
hres = LoadRegTypeLib(&LIBID_Scripting, 1, 0, LOCALE_SYSTEM_DEFAULT, &tl);
|
||||
if(FAILED(hres)) {
|
||||
ERR("LoadRegTypeLib failed: %08x\n", hres);
|
||||
return hres;
|
||||
}
|
||||
|
||||
if(InterlockedCompareExchangePointer((void**)&typelib, tl, NULL))
|
||||
ITypeLib_Release(tl);
|
||||
return hres;
|
||||
}
|
||||
|
||||
HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo)
|
||||
{
|
||||
HRESULT hres;
|
||||
|
||||
if (!typelib)
|
||||
hres = load_typelib();
|
||||
if (!typelib)
|
||||
return hres;
|
||||
|
||||
if(!typeinfos[tid]) {
|
||||
ITypeInfo *ti;
|
||||
|
||||
hres = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &ti);
|
||||
if(FAILED(hres)) {
|
||||
ERR("GetTypeInfoOfGuid(%s) failed: %08x\n", debugstr_guid(tid_ids[tid]), hres);
|
||||
return hres;
|
||||
}
|
||||
|
||||
if(InterlockedCompareExchangePointer((void**)(typeinfos+tid), ti, NULL))
|
||||
ITypeInfo_Release(ti);
|
||||
}
|
||||
|
||||
*typeinfo = typeinfos[tid];
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static void release_typelib(void)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
if(!typelib)
|
||||
return;
|
||||
|
||||
for(i=0; i < sizeof(typeinfos)/sizeof(*typeinfos); i++)
|
||||
if(typeinfos[i])
|
||||
ITypeInfo_Release(typeinfos[i]);
|
||||
|
||||
ITypeLib_Release(typelib);
|
||||
}
|
||||
|
||||
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||
{
|
||||
TRACE("%p, %u, %p\n", hinst, reason, reserved);
|
||||
|
||||
switch (reason)
|
||||
{
|
||||
case DLL_WINE_PREATTACH:
|
||||
return FALSE; /* prefer native version */
|
||||
case DLL_PROCESS_ATTACH:
|
||||
DisableThreadLibraryCalls( hinst );
|
||||
scrrun_instance = hinst;
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
if (reserved) break;
|
||||
release_typelib();
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllRegisterServer (scrrun.@)
|
||||
*/
|
||||
HRESULT WINAPI DllRegisterServer(void)
|
||||
{
|
||||
TRACE("()\n");
|
||||
return __wine_register_resources(scrrun_instance);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllUnregisterServer (scrrun.@)
|
||||
*/
|
||||
HRESULT WINAPI DllUnregisterServer(void)
|
||||
{
|
||||
TRACE("()\n");
|
||||
return __wine_unregister_resources(scrrun_instance);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject (scrrun.@)
|
||||
*/
|
||||
|
||||
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
|
||||
{
|
||||
if(IsEqualGUID(&CLSID_FileSystemObject, rclsid)) {
|
||||
TRACE("(CLSID_WshShell %s %p)\n", debugstr_guid(riid), ppv);
|
||||
return IClassFactory_QueryInterface(&FileSystemFactory, riid, ppv);
|
||||
}
|
||||
else if(IsEqualGUID(&CLSID_Dictionary, rclsid)) {
|
||||
TRACE("(CLSID_WshShell %s %p)\n", debugstr_guid(riid), ppv);
|
||||
return IClassFactory_QueryInterface(&DictionaryFactory, riid, ppv);
|
||||
}
|
||||
|
||||
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllCanUnloadNow (scrrun.@)
|
||||
*/
|
||||
HRESULT WINAPI DllCanUnloadNow(void)
|
||||
{
|
||||
return S_FALSE;
|
||||
}
|
692
reactos/dll/win32/scrrun/scrrun.idl
Normal file
692
reactos/dll/win32/scrrun/scrrun.idl
Normal file
|
@ -0,0 +1,692 @@
|
|||
/*
|
||||
* Copyright (C) 2012 Alistair Leslie-Hughes
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
import "unknwn.idl";
|
||||
import "objidl.idl";
|
||||
import "oaidl.idl";
|
||||
|
||||
cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
|
||||
cpp_quote("#undef CopyFile")
|
||||
cpp_quote("#undef DeleteFile")
|
||||
cpp_quote("#undef MoveFile")
|
||||
cpp_quote("#endif")
|
||||
|
||||
[
|
||||
uuid(420B2830-E718-11CF-893D-00A0C9054228),
|
||||
version(1.0)
|
||||
]
|
||||
library Scripting
|
||||
{
|
||||
importlib("stdole2.tlb");
|
||||
|
||||
interface IDictionary;
|
||||
interface IDrive;
|
||||
interface IDriveCollection;
|
||||
interface IFile;
|
||||
interface IFileCollection;
|
||||
interface IFileSystem;
|
||||
interface IFileSystem3;
|
||||
interface IFolder;
|
||||
interface IFolderCollection;
|
||||
interface IScriptEncoder;
|
||||
interface ITextStream;
|
||||
|
||||
typedef enum CompareMethod
|
||||
{
|
||||
BinaryCompare = 0,
|
||||
TextCompare = 1,
|
||||
DatabaseCompare = 2
|
||||
} CompareMethod;
|
||||
|
||||
typedef enum IOMode
|
||||
{
|
||||
ForReading = 1,
|
||||
ForWriting = 2,
|
||||
ForAppending = 8
|
||||
} IOMode;
|
||||
|
||||
typedef enum Tristate
|
||||
{
|
||||
TristateTrue = 0xffffffff,
|
||||
TristateFalse = 0,
|
||||
TristateUseDefault = 0xfffffffe,
|
||||
TristateMixed = 0xfffffffe
|
||||
} Tristate;
|
||||
|
||||
typedef enum FileAttribute
|
||||
{
|
||||
Normal = 0,
|
||||
ReadOnly = 1,
|
||||
Hidden = 2,
|
||||
System = 4,
|
||||
Volume = 8,
|
||||
Directory = 16,
|
||||
Archive = 32,
|
||||
Alias = 1024,
|
||||
Compressed = 2048
|
||||
} FileAttribute;
|
||||
|
||||
typedef enum SpecialFolderConst
|
||||
{
|
||||
WindowsFolder = 0,
|
||||
SystemFolder = 1,
|
||||
TemporaryFolder = 2
|
||||
} SpecialFolderConst;
|
||||
|
||||
typedef enum DriveTypeConst
|
||||
{
|
||||
UnknownType = 0,
|
||||
Removable = 1,
|
||||
Fixed = 2,
|
||||
Remote = 3,
|
||||
CDRom = 4,
|
||||
RamDisk = 5
|
||||
} DriveTypeConst;
|
||||
|
||||
typedef enum StandardStreamTypes
|
||||
{
|
||||
StdIn = 0,
|
||||
StdOut = 1,
|
||||
StdErr = 2
|
||||
} StandardStreamTypes;
|
||||
|
||||
[
|
||||
odl,
|
||||
uuid(42C642C1-97E1-11CF-978F-00A02463E06F),
|
||||
hidden,
|
||||
dual,
|
||||
oleautomation
|
||||
]
|
||||
interface IDictionary : IDispatch
|
||||
{
|
||||
[id(00000000), propputref]
|
||||
HRESULT Item([in] VARIANT* Key, [in] VARIANT* pRetItem);
|
||||
|
||||
[id(00000000), propput]
|
||||
HRESULT Item([in] VARIANT* Key, [in] VARIANT* pRetItem);
|
||||
|
||||
[id(00000000), propget]
|
||||
HRESULT Item([in] VARIANT* Key, [out, retval] VARIANT* pRetItem);
|
||||
|
||||
[id(0x00000001)]
|
||||
HRESULT Add([in] VARIANT* Key, [in] VARIANT* Item);
|
||||
|
||||
[id(0x00000002), propget]
|
||||
HRESULT Count([out, retval] long* pCount);
|
||||
|
||||
[id(0x00000003)]
|
||||
HRESULT Exists([in] VARIANT* Key, [out, retval] VARIANT_BOOL* pExists);
|
||||
|
||||
[id(0x00000004)]
|
||||
HRESULT Items([out, retval] VARIANT* pItemsArray);
|
||||
|
||||
[id(0x00000005), propput]
|
||||
HRESULT Key([in] VARIANT* Key, [in] VARIANT* rhs);
|
||||
|
||||
[id(0x00000006)]
|
||||
HRESULT Keys([out, retval] VARIANT* pKeysArray);
|
||||
|
||||
[id(0x00000007)]
|
||||
HRESULT Remove([in] VARIANT* Key);
|
||||
|
||||
[id(0x00000008)]
|
||||
HRESULT RemoveAll();
|
||||
|
||||
[id(0x00000009), propput]
|
||||
HRESULT CompareMode([in] CompareMethod pcomp);
|
||||
|
||||
[id(0x00000009), propget]
|
||||
HRESULT CompareMode([out, retval] CompareMethod* pcomp);
|
||||
|
||||
[id(DISPID_NEWENUM), restricted]
|
||||
HRESULT _NewEnum([out, retval] IUnknown** ppunk);
|
||||
|
||||
[id(0x0000000a), propget, hidden]
|
||||
HRESULT HashVal([in] VARIANT* Key, [out, retval] VARIANT* HashVal);
|
||||
}
|
||||
|
||||
[
|
||||
odl,
|
||||
uuid(0AB5A3D0-E5B6-11D0-ABF5-00A0C90FFFC0),
|
||||
hidden,
|
||||
dual,
|
||||
nonextensible,
|
||||
oleautomation
|
||||
]
|
||||
interface IFileSystem : IDispatch
|
||||
{
|
||||
[id(0x0000271a), propget]
|
||||
HRESULT Drives([out, retval] IDriveCollection** ppdrives);
|
||||
|
||||
[id(0x00002710)]
|
||||
HRESULT BuildPath([in] BSTR Path, [in] BSTR Name, [out, retval] BSTR* pbstrResult);
|
||||
|
||||
[id(0x00002714)]
|
||||
HRESULT GetDriveName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
|
||||
|
||||
[id(0x00002715)]
|
||||
HRESULT GetParentFolderName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
|
||||
|
||||
[id(0x00002716)]
|
||||
HRESULT GetFileName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
|
||||
|
||||
[id(0x00002717)]
|
||||
HRESULT GetBaseName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
|
||||
|
||||
[id(0x00002718)]
|
||||
HRESULT GetExtensionName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
|
||||
|
||||
[id(0x00002712)]
|
||||
HRESULT GetAbsolutePathName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
|
||||
|
||||
[id(0x00002713)]
|
||||
HRESULT GetTempName([out, retval] BSTR* pbstrResult);
|
||||
|
||||
[id(0x0000271f)]
|
||||
HRESULT DriveExists([in] BSTR DriveSpec, [out, retval] VARIANT_BOOL* pfExists);
|
||||
|
||||
[id(0x00002720)]
|
||||
HRESULT FileExists([in] BSTR FileSpec, [out, retval] VARIANT_BOOL* pfExists);
|
||||
|
||||
[id(0x00002721)]
|
||||
HRESULT FolderExists([in] BSTR FolderSpec, [out, retval] VARIANT_BOOL* pfExists);
|
||||
|
||||
[id(0x0000271b)]
|
||||
HRESULT GetDrive([in] BSTR DriveSpec, [out, retval] IDrive** ppdrive);
|
||||
|
||||
[id(0x0000271c)]
|
||||
HRESULT GetFile([in] BSTR FilePath, [out, retval] IFile** ppfile);
|
||||
|
||||
[id(0x0000271d)]
|
||||
HRESULT GetFolder([in] BSTR FolderPath, [out, retval] IFolder** ppfolder);
|
||||
|
||||
[id(0x0000271e)]
|
||||
HRESULT GetSpecialFolder([in] SpecialFolderConst SpecialFolder, [out, retval] IFolder** ppfolder);
|
||||
|
||||
[id(0x000004b0)]
|
||||
HRESULT DeleteFile([in] BSTR FileSpec, [in, optional, defaultvalue(0)] VARIANT_BOOL Force);
|
||||
|
||||
[id(0x000004b1)]
|
||||
HRESULT DeleteFolder([in] BSTR FolderSpec, [in, optional, defaultvalue(0)] VARIANT_BOOL Force);
|
||||
|
||||
[id(0x000004b4), helpstring("Move a file"), helpcontext(0x00214bab)]
|
||||
HRESULT MoveFile([in] BSTR Source, [in] BSTR Destination);
|
||||
|
||||
[id(0x000004b5)]
|
||||
HRESULT MoveFolder([in] BSTR Source, [in] BSTR Destination);
|
||||
|
||||
[id(0x000004b2)]
|
||||
HRESULT CopyFile([in] BSTR Source, [in] BSTR Destination,
|
||||
[in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
|
||||
|
||||
[id(0x000004b3)]
|
||||
HRESULT CopyFolder([in] BSTR Source, [in] BSTR Destination,
|
||||
[in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
|
||||
|
||||
[id(0x00000460)]
|
||||
HRESULT CreateFolder([in] BSTR Path, [out, retval] IFolder** ppfolder);
|
||||
|
||||
[id(0x0000044d)]
|
||||
HRESULT CreateTextFile([in] BSTR FileName, [in, optional, defaultvalue(-1)] VARIANT_BOOL Overwrite,
|
||||
[in, optional, defaultvalue(0)] VARIANT_BOOL Unicode, [out, retval] ITextStream** ppts);
|
||||
|
||||
[id(0x0000044c)]
|
||||
HRESULT OpenTextFile([in] BSTR FileName, [in, optional, defaultvalue(1)] IOMode IOMode,
|
||||
[in, optional, defaultvalue(0)] VARIANT_BOOL Create,
|
||||
[in, optional, defaultvalue(0)] Tristate Format,
|
||||
[out, retval] ITextStream** ppts);
|
||||
}
|
||||
|
||||
[
|
||||
odl,
|
||||
uuid(C7C3F5A1-88A3-11D0-ABCB-00A0C90FFFC0),
|
||||
hidden,
|
||||
dual,
|
||||
nonextensible,
|
||||
oleautomation
|
||||
]
|
||||
interface IDriveCollection : IDispatch {
|
||||
[id(00000000)]
|
||||
HRESULT Item([in] VARIANT Key, [out, retval] IDrive** ppdrive);
|
||||
|
||||
[id(DISPID_NEWENUM), propget, restricted, hidden]
|
||||
HRESULT _NewEnum([out, retval] IUnknown** ppenum);
|
||||
|
||||
[id(0x00000001), propget]
|
||||
HRESULT Count([out, retval] long* plCount);
|
||||
}
|
||||
|
||||
[
|
||||
odl,
|
||||
uuid(C7C3F5A0-88A3-11D0-ABCB-00A0C90FFFC0),
|
||||
hidden,
|
||||
dual,
|
||||
nonextensible,
|
||||
oleautomation
|
||||
]
|
||||
interface IDrive : IDispatch
|
||||
{
|
||||
[id(00000000), propget]
|
||||
HRESULT Path([out, retval] BSTR* pbstrPath);
|
||||
|
||||
[id(0x00002710), propget]
|
||||
HRESULT DriveLetter([out, retval] BSTR* pbstrLetter)
|
||||
;
|
||||
[id(0x00002711), propget]
|
||||
HRESULT ShareName([out, retval] BSTR* pbstrShareName);
|
||||
|
||||
[id(0x00002712), propget]
|
||||
HRESULT DriveType([out, retval] DriveTypeConst* pdt);
|
||||
|
||||
[id(0x00002713), propget]
|
||||
HRESULT RootFolder([out, retval] IFolder** ppfolder);
|
||||
|
||||
[id(0x00002715), propget]
|
||||
HRESULT AvailableSpace([out, retval] VARIANT* pvarAvail);
|
||||
|
||||
[id(0x00002714), propget]
|
||||
HRESULT FreeSpace([out, retval] VARIANT* pvarFree);
|
||||
|
||||
[id(0x00002716), propget]
|
||||
HRESULT TotalSize([out, retval] VARIANT* pvarTotal);
|
||||
|
||||
[id(0x00002717), propget]
|
||||
HRESULT VolumeName([out, retval] BSTR* pbstrName);
|
||||
|
||||
[id(0x00002717), propput]
|
||||
HRESULT VolumeName([in] BSTR pbstrName);
|
||||
|
||||
[id(0x00002718), propget]
|
||||
HRESULT FileSystem([out, retval] BSTR* pbstrFileSystem);
|
||||
|
||||
[id(0x00002719), propget]
|
||||
HRESULT SerialNumber([out, retval] long* pulSerialNumber);
|
||||
|
||||
[id(0x0000271a), propget]
|
||||
HRESULT IsReady([out, retval] VARIANT_BOOL* pfReady);
|
||||
}
|
||||
|
||||
[
|
||||
odl,
|
||||
uuid(C7C3F5A2-88A3-11D0-ABCB-00A0C90FFFC0),
|
||||
hidden,
|
||||
dual,
|
||||
nonextensible,
|
||||
oleautomation
|
||||
]
|
||||
interface IFolder : IDispatch
|
||||
{
|
||||
[id(00000000), propget]
|
||||
HRESULT Path([out, retval] BSTR* pbstrPath);
|
||||
|
||||
[id(0x000003e8), propget]
|
||||
HRESULT Name([out, retval] BSTR* pbstrName);
|
||||
|
||||
[id(0x000003e8), propput]
|
||||
HRESULT Name([in] BSTR pbstrName);
|
||||
|
||||
[id(0x000003ea), propget]
|
||||
HRESULT ShortPath([out, retval] BSTR* pbstrPath);
|
||||
|
||||
[id(0x000003e9), propget]
|
||||
HRESULT ShortName([out, retval] BSTR* pbstrName);
|
||||
|
||||
[id(0x000003ec), propget]
|
||||
HRESULT Drive([out, retval] IDrive** ppdrive);
|
||||
|
||||
[id(0x000003ed), propget]
|
||||
HRESULT ParentFolder([out, retval] IFolder** ppfolder);
|
||||
|
||||
[id(0x000003eb), propget]
|
||||
HRESULT Attributes([out, retval] FileAttribute* pfa);
|
||||
|
||||
[id(0x000003eb), propput]
|
||||
HRESULT Attributes([in] FileAttribute pfa);
|
||||
|
||||
[id(0x000003ee), propget]
|
||||
HRESULT DateCreated([out, retval] DATE* pdate);
|
||||
|
||||
[id(0x000003ef), propget]
|
||||
HRESULT DateLastModified([out, retval] DATE* pdate);
|
||||
|
||||
[id(0x000003f0), propget]
|
||||
HRESULT DateLastAccessed([out, retval] DATE* pdate);
|
||||
|
||||
[id(0x000003f2), propget]
|
||||
HRESULT Type([out, retval] BSTR* pbstrType);
|
||||
|
||||
[id(0x000004b1)]
|
||||
HRESULT Delete([in, optional, defaultvalue(0)] VARIANT_BOOL Force);
|
||||
|
||||
[id(0x000004b3)]
|
||||
HRESULT Copy([in] BSTR Destination, [in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
|
||||
|
||||
[id(0x000004b5)]
|
||||
HRESULT Move([in] BSTR Destination);
|
||||
|
||||
[id(0x00002710), propget]
|
||||
HRESULT IsRootFolder([out, retval] VARIANT_BOOL* pfRootFolder);
|
||||
|
||||
[id(0x000003f1), propget]
|
||||
HRESULT Size([out, retval] VARIANT* pvarSize);
|
||||
|
||||
[id(0x00002711), propget]
|
||||
HRESULT SubFolders([out, retval] IFolderCollection** ppfolders);
|
||||
|
||||
[id(0x00002712), propget]
|
||||
HRESULT Files([out, retval] IFileCollection** ppfiles);
|
||||
|
||||
[id(0x0000044d)]
|
||||
HRESULT CreateTextFile([in] BSTR FileName, [in, optional, defaultvalue(-1)] VARIANT_BOOL Overwrite,
|
||||
[in, optional, defaultvalue(0)] VARIANT_BOOL Unicode, [out, retval] ITextStream** ppts);
|
||||
}
|
||||
|
||||
[
|
||||
odl,
|
||||
uuid(C7C3F5A3-88A3-11D0-ABCB-00A0C90FFFC0),
|
||||
hidden,
|
||||
dual,
|
||||
nonextensible,
|
||||
oleautomation
|
||||
]
|
||||
interface IFolderCollection : IDispatch
|
||||
{
|
||||
[id(0x00000002)]
|
||||
HRESULT Add([in] BSTR Name, [out, retval] IFolder** ppfolder);
|
||||
|
||||
[id(00000000), propget]
|
||||
HRESULT Item([in] VARIANT Key, [out, retval] IFolder** ppfolder);
|
||||
|
||||
[id(DISPID_NEWENUM), propget, restricted, hidden]
|
||||
HRESULT _NewEnum([out, retval] IUnknown** ppenum);
|
||||
|
||||
[id(0x00000001), propget]
|
||||
HRESULT Count([out, retval] long* plCount);
|
||||
}
|
||||
|
||||
[
|
||||
odl,
|
||||
uuid(C7C3F5A5-88A3-11D0-ABCB-00A0C90FFFC0),
|
||||
hidden,
|
||||
dual,
|
||||
nonextensible,
|
||||
oleautomation
|
||||
]
|
||||
interface IFileCollection : IDispatch
|
||||
{
|
||||
[id(00000000), propget]
|
||||
HRESULT Item([in] VARIANT Key, [out, retval] IFile** ppfile);
|
||||
|
||||
[id(DISPID_NEWENUM), propget, restricted, hidden]
|
||||
HRESULT _NewEnum([out, retval] IUnknown** ppenum);
|
||||
|
||||
[id(0x00000001), propget]
|
||||
HRESULT Count([out, retval] long* plCount);
|
||||
}
|
||||
|
||||
[
|
||||
odl,
|
||||
uuid(C7C3F5A4-88A3-11D0-ABCB-00A0C90FFFC0),
|
||||
hidden,
|
||||
dual,
|
||||
nonextensible,
|
||||
oleautomation
|
||||
]
|
||||
interface IFile : IDispatch
|
||||
{
|
||||
[id(00000000), propget]
|
||||
HRESULT Path([out, retval] BSTR* pbstrPath);
|
||||
|
||||
[id(0x000003e8), propget]
|
||||
HRESULT Name([out, retval] BSTR* pbstrName);
|
||||
|
||||
[id(0x000003e8), propput]
|
||||
HRESULT Name([in] BSTR pbstrName);
|
||||
|
||||
[id(0x000003ea), propget]
|
||||
HRESULT ShortPath([out, retval] BSTR* pbstrPath);
|
||||
|
||||
[id(0x000003e9), propget]
|
||||
HRESULT ShortName([out, retval] BSTR* pbstrName);
|
||||
|
||||
[id(0x000003ec), propget]
|
||||
HRESULT Drive([out, retval] IDrive** ppdrive);
|
||||
|
||||
[id(0x000003ed), propget]
|
||||
HRESULT ParentFolder([out, retval] IFolder** ppfolder);
|
||||
|
||||
[id(0x000003eb), propget]
|
||||
HRESULT Attributes([out, retval] FileAttribute* pfa);
|
||||
|
||||
[id(0x000003eb), propput]
|
||||
HRESULT Attributes([in] FileAttribute pfa);
|
||||
|
||||
[id(0x000003ee), propget]
|
||||
HRESULT DateCreated([out, retval] DATE* pdate);
|
||||
|
||||
[id(0x000003ef), propget]
|
||||
HRESULT DateLastModified([out, retval] DATE* pdate);
|
||||
|
||||
[id(0x000003f0), propget]
|
||||
HRESULT DateLastAccessed([out, retval] DATE* pdate);
|
||||
|
||||
[id(0x000003f1), propget]
|
||||
HRESULT Size([out, retval] VARIANT* pvarSize);
|
||||
|
||||
[id(0x000003f2), propget]
|
||||
HRESULT Type([out, retval] BSTR* pbstrType);
|
||||
|
||||
[id(0x000004b0)]
|
||||
HRESULT Delete([in, optional, defaultvalue(0)] VARIANT_BOOL Force);
|
||||
|
||||
[id(0x000004b2)]
|
||||
HRESULT Copy([in] BSTR Destination, [in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
|
||||
|
||||
[id(0x000004b4)]
|
||||
HRESULT Move([in] BSTR Destination);
|
||||
|
||||
[id(0x0000044c)]
|
||||
HRESULT OpenAsTextStream([in, optional, defaultvalue(1)] IOMode IOMode,
|
||||
[in, optional, defaultvalue(0)] Tristate Format, [out, retval] ITextStream** ppts);
|
||||
}
|
||||
|
||||
[
|
||||
odl,
|
||||
uuid(53BAD8C1-E718-11CF-893D-00A0C9054228),
|
||||
hidden,
|
||||
dual,
|
||||
nonextensible,
|
||||
oleautomation
|
||||
]
|
||||
interface ITextStream : IDispatch
|
||||
{
|
||||
[id(0x00002710), propget]
|
||||
HRESULT Line([out, retval] long* Line);
|
||||
|
||||
[id(0xfffffdef), propget]
|
||||
HRESULT Column([out, retval] long* Column);
|
||||
|
||||
[id(0x00002712), propget]
|
||||
HRESULT AtEndOfStream([out, retval] VARIANT_BOOL* EOS);
|
||||
|
||||
[id(0x00002713), propget]
|
||||
HRESULT AtEndOfLine([out, retval] VARIANT_BOOL* EOL);
|
||||
|
||||
[id(0x00002714)]
|
||||
HRESULT Read([in] long Characters, [out, retval] BSTR* Text);
|
||||
|
||||
[id(0x00002715)]
|
||||
HRESULT ReadLine([out, retval] BSTR* Text);
|
||||
|
||||
[id(0x00002716)]
|
||||
HRESULT ReadAll([out, retval] BSTR* Text);
|
||||
|
||||
[id(0x00002717)]
|
||||
HRESULT Write([in] BSTR Text);
|
||||
|
||||
[id(0x00002718)]
|
||||
HRESULT WriteLine([in, optional, defaultvalue("")] BSTR Text);
|
||||
|
||||
[id(0x00002719)]
|
||||
HRESULT WriteBlankLines([in] long Lines);
|
||||
|
||||
[id(0x0000271a)]
|
||||
HRESULT Skip([in] long Characters);
|
||||
|
||||
[id(0x0000271b)]
|
||||
HRESULT SkipLine();
|
||||
|
||||
[id(0x0000271c)]
|
||||
HRESULT Close();
|
||||
}
|
||||
|
||||
[
|
||||
odl,
|
||||
uuid(2A0B9D10-4B87-11D3-A97A-00104B365C9F),
|
||||
dual,
|
||||
nonextensible,
|
||||
oleautomation
|
||||
]
|
||||
interface IFileSystem3 : IFileSystem
|
||||
{
|
||||
[id(0x00004e20)]
|
||||
HRESULT GetStandardStream([in] StandardStreamTypes StandardStreamType,
|
||||
[in, optional, defaultvalue(0)] VARIANT_BOOL Unicode, [out, retval] ITextStream** ppts);
|
||||
|
||||
[id(0x00004e2a)]
|
||||
HRESULT GetFileVersion([in] BSTR FileName, [out, retval] BSTR* FileVersion);
|
||||
}
|
||||
|
||||
[
|
||||
odl,
|
||||
uuid(AADC65F6-CFF1-11D1-B747-00C04FC2B085),
|
||||
dual,
|
||||
oleautomation
|
||||
]
|
||||
interface IScriptEncoder : IDispatch
|
||||
{
|
||||
[id(00000000)]
|
||||
HRESULT EncodeScriptFile([in] BSTR szExt, [in] BSTR bstrStreamIn, [in] long cFlags,
|
||||
[in] BSTR bstrDefaultLang, [out, retval] BSTR* pbstrStreamOut);
|
||||
}
|
||||
|
||||
[
|
||||
uuid(EE09B103-97E0-11CF-978F-00A02463E06F),
|
||||
version(1.0),
|
||||
helpstring("Scripting.Dictionary"),
|
||||
threading(apartment),
|
||||
progid("Scripting.Dictionary")
|
||||
]
|
||||
coclass Dictionary
|
||||
{
|
||||
[default] interface IDictionary;
|
||||
}
|
||||
|
||||
[
|
||||
uuid(0D43FE01-F093-11CF-8940-00A0C9054228),
|
||||
version(1.0),
|
||||
helpstring("FileSystem Object"),
|
||||
threading(both),
|
||||
progid("Scripting.FileSystemObject")
|
||||
]
|
||||
coclass FileSystemObject
|
||||
{
|
||||
[default] interface IFileSystem3;
|
||||
}
|
||||
|
||||
[
|
||||
uuid(C7C3F5B1-88A3-11D0-ABCB-00A0C90FFFC0),
|
||||
noncreatable,
|
||||
version(1.0)
|
||||
]
|
||||
coclass Drive
|
||||
{
|
||||
[default] interface IDrive;
|
||||
}
|
||||
|
||||
[
|
||||
uuid(C7C3F5B2-88A3-11D0-ABCB-00A0C90FFFC0),
|
||||
noncreatable,
|
||||
version(1.0)
|
||||
]
|
||||
coclass Drives
|
||||
{
|
||||
[default] interface IDriveCollection;
|
||||
}
|
||||
|
||||
[
|
||||
uuid(C7C3F5B3-88A3-11D0-ABCB-00A0C90FFFC0),
|
||||
noncreatable,
|
||||
version(1.0)
|
||||
]
|
||||
coclass Folder
|
||||
{
|
||||
[default] interface IFolder;
|
||||
}
|
||||
|
||||
[
|
||||
uuid(C7C3F5B4-88A3-11D0-ABCB-00A0C90FFFC0),
|
||||
noncreatable,
|
||||
version(1.0)
|
||||
]
|
||||
coclass Folders
|
||||
{
|
||||
[default] interface IFolderCollection;
|
||||
}
|
||||
|
||||
[
|
||||
uuid(C7C3F5B5-88A3-11D0-ABCB-00A0C90FFFC0),
|
||||
noncreatable,
|
||||
version(1.0)
|
||||
]
|
||||
coclass File
|
||||
{
|
||||
[default] interface IFile;
|
||||
}
|
||||
|
||||
[
|
||||
uuid(C7C3F5B6-88A3-11D0-ABCB-00A0C90FFFC0),
|
||||
noncreatable,
|
||||
version(1.0)
|
||||
]
|
||||
coclass Files
|
||||
{
|
||||
[default] interface IFileCollection;
|
||||
}
|
||||
|
||||
[
|
||||
uuid(0BB02EC0-EF49-11CF-8940-00A0C9054228),
|
||||
noncreatable,
|
||||
version(1.0)
|
||||
]
|
||||
coclass TextStream
|
||||
{
|
||||
[default] interface ITextStream;
|
||||
}
|
||||
|
||||
[
|
||||
uuid(32DA2B15-CFED-11D1-B747-00C04FC2B085),
|
||||
version(1.0),
|
||||
helpstring("Script Encoder Object"),
|
||||
threading(apartment),
|
||||
progid("Scripting.Encoder")
|
||||
]
|
||||
coclass Encoder
|
||||
{
|
||||
[default] interface IScriptEncoder;
|
||||
}
|
||||
}
|
32
reactos/dll/win32/scrrun/scrrun.rc
Normal file
32
reactos/dll/win32/scrrun/scrrun.rc
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright 2011 Hans Leidekker for CodeWeavers
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/* @makedep: scrrun.rgs */
|
||||
1 WINE_REGISTRY scrrun.rgs
|
||||
2 WINE_REGISTRY scrrun_tlb.rgs
|
||||
|
||||
1 TYPELIB scrrun.tlb
|
||||
|
||||
#define WINE_FILEDESCRIPTION_STR "Wine ScrRun dll"
|
||||
#define WINE_FILENAME_STR "scrrun.dll"
|
||||
#define WINE_FILEVERSION 5,8,7600,16385
|
||||
#define WINE_FILEVERSION_STR "5.8.7600.16385"
|
||||
#define WINE_PRODUCTVERSION 5,8,7600,16385
|
||||
#define WINE_PRODUCTVERSION_STR "5.8.7600.16385"
|
||||
|
||||
#include "wine/wine_common_ver.rc"
|
5
reactos/dll/win32/scrrun/scrrun.rgs
Normal file
5
reactos/dll/win32/scrrun/scrrun.rgs
Normal file
|
@ -0,0 +1,5 @@
|
|||
HKCR
|
||||
{
|
||||
ForceRemove '.js' = s 'JSFile'
|
||||
ForceRemove '.vbs' = s 'VBSFile'
|
||||
}
|
6
reactos/dll/win32/scrrun/scrrun.spec
Normal file
6
reactos/dll/win32/scrrun/scrrun.spec
Normal file
|
@ -0,0 +1,6 @@
|
|||
@ stub DLLGetDocumentation
|
||||
@ stdcall -private DllCanUnloadNow()
|
||||
@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
||||
@ stdcall -private DllRegisterServer()
|
||||
@ stdcall -private DllUnregisterServer()
|
||||
@ stub DoOpenPipeStream
|
47
reactos/dll/win32/scrrun/scrrun_private.h
Normal file
47
reactos/dll/win32/scrrun/scrrun_private.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright 2012 Alistair Leslie-Hughes
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
#ifndef _SCRRUN_PRIVATE_H_
|
||||
#define _SCRRUN_PRIVATE_H
|
||||
|
||||
extern HRESULT WINAPI FileSystem_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
|
||||
extern HRESULT WINAPI Dictionary_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
|
||||
|
||||
typedef enum tid_t
|
||||
{
|
||||
NULL_tid,
|
||||
IDictionary_tid,
|
||||
IFileSystem3_tid,
|
||||
IFolder_tid,
|
||||
ITextStream_tid,
|
||||
IFile_tid,
|
||||
LAST_tid
|
||||
} tid_t;
|
||||
|
||||
HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo) DECLSPEC_HIDDEN;
|
||||
|
||||
static inline void *heap_alloc(size_t len)
|
||||
{
|
||||
return HeapAlloc(GetProcessHeap(), 0, len);
|
||||
}
|
||||
|
||||
static inline BOOL heap_free(void *mem)
|
||||
{
|
||||
return HeapFree(GetProcessHeap(), 0, mem);
|
||||
}
|
||||
|
||||
#endif
|
119
reactos/dll/win32/scrrun/scrrun_tlb.rgs
Normal file
119
reactos/dll/win32/scrrun/scrrun_tlb.rgs
Normal file
|
@ -0,0 +1,119 @@
|
|||
HKCR
|
||||
{
|
||||
NoRemove Typelib
|
||||
{
|
||||
NoRemove '{420B2830-E718-11CF-893D-00A0C9054228}'
|
||||
{
|
||||
'1.0' = s 'Scripting'
|
||||
{
|
||||
'0' { win32 = s '%MODULE%' }
|
||||
FLAGS = s '0'
|
||||
}
|
||||
}
|
||||
}
|
||||
NoRemove Interface
|
||||
{
|
||||
'{42C642C1-97E1-11CF-978F-00A02463E06F}' = s 'IDictionary'
|
||||
{
|
||||
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
|
||||
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
|
||||
TypeLib = s '{420B2830-E718-11CF-893D-00A0C9054228}' { val Version = s '1.0' }
|
||||
}
|
||||
'{0AB5A3D0-E5B6-11D0-ABF5-00A0C90FFFC0}' = s 'IFileSystem'
|
||||
{
|
||||
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
|
||||
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
|
||||
TypeLib = s '{420B2830-E718-11CF-893D-00A0C9054228}' { val Version = s '1.0' }
|
||||
}
|
||||
'{C7C3F5A1-88A3-11D0-ABCB-00A0C90FFFC0}' = s 'IDriveCollection'
|
||||
{
|
||||
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
|
||||
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
|
||||
TypeLib = s '{420B2830-E718-11CF-893D-00A0C9054228}' { val Version = s '1.0' }
|
||||
}
|
||||
'{C7C3F5A0-88A3-11D0-ABCB-00A0C90FFFC0}' = s 'IDrive'
|
||||
{
|
||||
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
|
||||
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
|
||||
TypeLib = s '{420B2830-E718-11CF-893D-00A0C9054228}' { val Version = s '1.0' }
|
||||
}
|
||||
'{C7C3F5A2-88A3-11D0-ABCB-00A0C90FFFC0}' = s 'IFolder'
|
||||
{
|
||||
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
|
||||
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
|
||||
TypeLib = s '{420B2830-E718-11CF-893D-00A0C9054228}' { val Version = s '1.0' }
|
||||
}
|
||||
'{C7C3F5A3-88A3-11D0-ABCB-00A0C90FFFC0}' = s 'IFolderCollection'
|
||||
{
|
||||
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
|
||||
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
|
||||
TypeLib = s '{420B2830-E718-11CF-893D-00A0C9054228}' { val Version = s '1.0' }
|
||||
}
|
||||
'{C7C3F5A5-88A3-11D0-ABCB-00A0C90FFFC0}' = s 'IFileCollection'
|
||||
{
|
||||
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
|
||||
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
|
||||
TypeLib = s '{420B2830-E718-11CF-893D-00A0C9054228}' { val Version = s '1.0' }
|
||||
}
|
||||
'{C7C3F5A4-88A3-11D0-ABCB-00A0C90FFFC0}' = s 'IFile'
|
||||
{
|
||||
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
|
||||
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
|
||||
TypeLib = s '{420B2830-E718-11CF-893D-00A0C9054228}' { val Version = s '1.0' }
|
||||
}
|
||||
'{53BAD8C1-E718-11CF-893D-00A0C9054228}' = s 'ITextStream'
|
||||
{
|
||||
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
|
||||
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
|
||||
TypeLib = s '{420B2830-E718-11CF-893D-00A0C9054228}' { val Version = s '1.0' }
|
||||
}
|
||||
'{2A0B9D10-4B87-11D3-A97A-00104B365C9F}' = s 'IFileSystem3'
|
||||
{
|
||||
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
|
||||
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
|
||||
TypeLib = s '{420B2830-E718-11CF-893D-00A0C9054228}' { val Version = s '1.0' }
|
||||
}
|
||||
'{AADC65F6-CFF1-11D1-B747-00C04FC2B085}' = s 'IScriptEncoder'
|
||||
{
|
||||
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
|
||||
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
|
||||
TypeLib = s '{420B2830-E718-11CF-893D-00A0C9054228}' { val Version = s '1.0' }
|
||||
}
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
'{EE09B103-97E0-11CF-978F-00A02463E06F}' = s 'Scripting.Dictionary'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||
ProgId = s 'Scripting.Dictionary'
|
||||
TypeLib = s '{420B2830-E718-11CF-893D-00A0C9054228}'
|
||||
Version = s '1.0'
|
||||
}
|
||||
'{0D43FE01-F093-11CF-8940-00A0C9054228}' = s 'FileSystem Object'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
|
||||
ProgId = s 'Scripting.FileSystemObject'
|
||||
TypeLib = s '{420B2830-E718-11CF-893D-00A0C9054228}'
|
||||
Version = s '1.0'
|
||||
}
|
||||
'{32DA2B15-CFED-11D1-B747-00C04FC2B085}' = s 'Script Encoder Object'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||
ProgId = s 'Scripting.Encoder'
|
||||
TypeLib = s '{420B2830-E718-11CF-893D-00A0C9054228}'
|
||||
Version = s '1.0'
|
||||
}
|
||||
}
|
||||
'Scripting.Dictionary' = s 'Scripting.Dictionary'
|
||||
{
|
||||
CLSID = s '{EE09B103-97E0-11CF-978F-00A02463E06F}'
|
||||
}
|
||||
'Scripting.FileSystemObject' = s 'FileSystem Object'
|
||||
{
|
||||
CLSID = s '{0D43FE01-F093-11CF-8940-00A0C9054228}'
|
||||
}
|
||||
'Scripting.Encoder' = s 'Script Encoder Object'
|
||||
{
|
||||
CLSID = s '{32DA2B15-CFED-11D1-B747-00C04FC2B085}'
|
||||
}
|
||||
}
|
|
@ -159,6 +159,7 @@ reactos/dll/win32/rsabase # Autosync
|
|||
reactos/dll/win32/rsaenh # Synced to Wine-1.5.4
|
||||
reactos/dll/win32/sccbase # Synced to Wine-1.5.19
|
||||
reactos/dll/win32/schannel # Synced to Wine-1.5.19
|
||||
reactos/dll/win32/scrrun # Synced to Wine-1.7.1
|
||||
reactos/dll/win32/secur32 # Forked
|
||||
reactos/dll/win32/security # Forked (different .spec)
|
||||
reactos/dll/win32/sensapi # Synced to Wine-1.5.4
|
||||
|
|
|
@ -87,6 +87,7 @@ AddReg=Classes
|
|||
11,,rpcrt4.dll,1
|
||||
11,,rsabase.dll,1
|
||||
11,,rsaenh.dll,1
|
||||
11,,scrrun.dll,1
|
||||
11,,shdocvw.dll,3
|
||||
11,,shell32.dll,3
|
||||
11,,softpub.dll,1
|
||||
|
|
Loading…
Reference in a new issue