diff --git a/reactos/lib/urlmon/Makefile.in b/reactos/lib/urlmon/Makefile.in index d5aa7c7031c..c32d818c365 100644 --- a/reactos/lib/urlmon/Makefile.in +++ b/reactos/lib/urlmon/Makefile.in @@ -14,6 +14,8 @@ C_SRCS = \ umstream.c \ urlmon_main.c +RC_SRCS = rsrc.rc + SUBDIRS = tests @MAKE_DLL_RULES@ diff --git a/reactos/lib/urlmon/regsvr.c b/reactos/lib/urlmon/regsvr.c index bacd892c13f..af5333a2fc2 100644 --- a/reactos/lib/urlmon/regsvr.c +++ b/reactos/lib/urlmon/regsvr.c @@ -20,6 +20,7 @@ #define COM_NO_WINDOWS_H #include +#include #include #include "windef.h" @@ -28,6 +29,7 @@ #include "wingdi.h" #include "winreg.h" #include "winerror.h" +#include "advpub.h" #include "objbase.h" @@ -35,6 +37,9 @@ #include "wine/debug.h" +#include "initguid.h" +#include "urlmon_main.h" + WINE_DEFAULT_DEBUG_CHANNEL(urlmon); /* @@ -511,6 +516,48 @@ static struct regsvr_coclass const coclass_list[] = { "urlmon.dll", "Apartment" }, + { &CLSID_CdlProtocol, + "CDL: Asynchronous Pluggable Protocol Handler", + NULL, + "urlmon.dll", + "Apartment" + }, + { &CLSID_FileProtocol, + "file:, local: Asynchronous Pluggable Protocol Handler", + NULL, + "urlmon.dll", + "Apartment" + }, + { &CLSID_FtpProtocol, + "ftp: Asynchronous Pluggable Protocol Handler", + NULL, + "urlmon.dll", + "Apartment" + }, + { &CLSID_GopherProtocol, + "gopher: Asynchronous Pluggable Protocol Handler", + NULL, + "urlmon.dll", + "Apartment" + }, + { &CLSID_HttpProtocol, + "http: Asynchronous Pluggable Protocol Handler", + NULL, + "urlmon.dll", + "Apartment" + }, + { &CLSID_HttpsProtocol, + "https: Asynchronous Pluggable Protocol Handler", + NULL, + "urlmon.dll", + "Apartment" + }, + { &CLSID_MkProtocol, + "mk: Asynchronous Pluggable Protocol Handler", + NULL, + "urlmon.dll", + "Apartment" + }, { NULL } /* list terminator */ }; @@ -522,6 +569,58 @@ static struct regsvr_interface const interface_list[] = { { NULL } /* list terminator */ }; +/*********************************************************************** + * register_inf + */ + +#define INF_SET_CLSID(clsid) \ + pse[i].pszName = "CLSID_" #clsid; \ + clsids[i++] = &CLSID_ ## clsid; + +static HRESULT register_inf(BOOL doregister) +{ + HRESULT hres; + HMODULE hAdvpack; + typeof(RegInstall) *pRegInstall; + STRTABLE strtable; + STRENTRY pse[7]; + static CLSID const *clsids[34]; + int i = 0; + + static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0}; + + INF_SET_CLSID(CdlProtocol); + INF_SET_CLSID(FileProtocol); + INF_SET_CLSID(FtpProtocol); + INF_SET_CLSID(GopherProtocol); + INF_SET_CLSID(HttpProtocol); + INF_SET_CLSID(HttpsProtocol); + INF_SET_CLSID(MkProtocol); + + for(i = 0; i < sizeof(pse)/sizeof(pse[0]); i++) { + pse[i].pszValue = HeapAlloc(GetProcessHeap(), 0, 39); + sprintf(pse[i].pszValue, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", + clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0], + clsids[i]->Data4[1], clsids[i]->Data4[2], clsids[i]->Data4[3], clsids[i]->Data4[4], + clsids[i]->Data4[5], clsids[i]->Data4[6], clsids[i]->Data4[7]); + } + + strtable.cEntries = sizeof(pse)/sizeof(pse[0]); + strtable.pse = pse; + + hAdvpack = LoadLibraryW(wszAdvpack); + pRegInstall = (typeof(RegInstall)*)GetProcAddress(hAdvpack, "RegInstall"); + + hres = pRegInstall(URLMON_hInstance, doregister ? "RegisterDll" : "UnregisterDll", &strtable); + + for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++) + HeapFree(GetProcessHeap(), 0, pse[i].pszValue); + + return hres; +} + +#undef INF_SET_CLSID + /*********************************************************************** * DllRegisterServer (URLMON.@) */ @@ -534,7 +633,9 @@ HRESULT WINAPI URLMON_DllRegisterServer(void) hr = register_coclasses(coclass_list); if (SUCCEEDED(hr)) hr = register_interfaces(interface_list); - return hr; + if(FAILED(hr)) + return hr; + return register_inf(TRUE); } /*********************************************************************** @@ -549,5 +650,7 @@ HRESULT WINAPI URLMON_DllUnregisterServer(void) hr = unregister_coclasses(coclass_list); if (SUCCEEDED(hr)) hr = unregister_interfaces(interface_list); - return hr; + if(FAILED(hr)) + return hr; + return register_inf(FALSE); } diff --git a/reactos/lib/urlmon/rsrc.rc b/reactos/lib/urlmon/rsrc.rc new file mode 100644 index 00000000000..3217540f833 --- /dev/null +++ b/reactos/lib/urlmon/rsrc.rc @@ -0,0 +1,19 @@ +/* + * Copyright 2005 Jacek Caban + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +REGINST REGINST urlmon.inf diff --git a/reactos/lib/urlmon/sec_mgr.c b/reactos/lib/urlmon/sec_mgr.c index 215d74cf5ff..4017891820a 100644 --- a/reactos/lib/urlmon/sec_mgr.c +++ b/reactos/lib/urlmon/sec_mgr.c @@ -43,7 +43,7 @@ typedef struct SecManagerImpl{ const IInternetSecurityManagerVtbl* lpvtbl1; /* VTable relative to the IInternetSecurityManager interface.*/ - ULONG ref; /* reference counter for this object */ + LONG ref; /* reference counter for this object */ } SecManagerImpl; @@ -82,8 +82,6 @@ static ULONG WINAPI SecManagerImpl_AddRef(IInternetSecurityManager* iface) TRACE("(%p)->(ref before=%lu)\n",This, refCount - 1); - URLMON_LockModule(); - return refCount; } @@ -97,10 +95,9 @@ static ULONG WINAPI SecManagerImpl_Release(IInternetSecurityManager* iface) /* destroy the object if there's no more reference on it */ if (!refCount){ HeapFree(GetProcessHeap(),0,This); + URLMON_UnlockModule(); } - URLMON_UnlockModule(); - return refCount; } @@ -201,6 +198,9 @@ HRESULT SecManagerImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) This->ref = 1; *ppobj = This; + + URLMON_LockModule(); + return S_OK; } @@ -210,7 +210,7 @@ HRESULT SecManagerImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) */ typedef struct { const IInternetZoneManagerVtbl* lpVtbl; - ULONG ref; + LONG ref; } ZoneMgrImpl; /******************************************************************** @@ -247,8 +247,6 @@ static ULONG WINAPI ZoneMgrImpl_AddRef(IInternetZoneManager* iface) TRACE("(%p)->(ref before=%lu)\n",This, refCount - 1); - URLMON_LockModule(); - return refCount; } @@ -262,10 +260,10 @@ static ULONG WINAPI ZoneMgrImpl_Release(IInternetZoneManager* iface) TRACE("(%p)->(ref before=%lu)\n",This, refCount + 1); - if(!refCount) + if(!refCount) { HeapFree(GetProcessHeap(), 0, This); - - URLMON_UnlockModule(); + URLMON_UnlockModule(); + } return refCount; } @@ -457,6 +455,8 @@ HRESULT ZoneMgrImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) ret->ref = 1; *ppobj = (IInternetZoneManager*)ret; + URLMON_LockModule(); + return S_OK; } diff --git a/reactos/lib/urlmon/umon.c b/reactos/lib/urlmon/umon.c index 249d85a8584..b4d7904f100 100644 --- a/reactos/lib/urlmon/umon.c +++ b/reactos/lib/urlmon/umon.c @@ -51,7 +51,7 @@ static const WCHAR BSCBHolder[] = { '_','B','S','C','B','_','H','o','l','d','e', typedef struct { const IBindingVtbl *lpVtbl; - ULONG ref; + LONG ref; LPWSTR URLName; @@ -291,7 +291,7 @@ typedef struct { const IMonikerVtbl* lpvtbl; /* VTable relative to the IMoniker interface.*/ - ULONG ref; /* reference counter for this object */ + LONG ref; /* reference counter for this object */ LPOLESTR URLName; /* URL string identified by this URLmoniker */ } URLMonikerImpl; @@ -340,8 +340,6 @@ static ULONG WINAPI URLMonikerImpl_AddRef(IMoniker* iface) TRACE("(%p)->(ref before=%lu)\n",This, refCount - 1); - URLMON_LockModule(); - return refCount; } @@ -359,9 +357,9 @@ static ULONG WINAPI URLMonikerImpl_Release(IMoniker* iface) if (!refCount) { HeapFree(GetProcessHeap(),0,This->URLName); HeapFree(GetProcessHeap(),0,This); - } - URLMON_UnlockModule(); + URLMON_UnlockModule(); + } return refCount; } @@ -600,7 +598,7 @@ static HRESULT WINAPI URLMonikerImpl_BindToStorage(IMoniker* iface, if(SUCCEEDED(hres)) { WCHAR *urlcopy, *tmpwc; URL_COMPONENTSW url; - WCHAR *host, *path, *user, *pass; + WCHAR *host, *path, *partial_path, *user, *pass; DWORD lensz = sizeof(bind->expected_size); DWORD dwService = 0; BOOL bSuccess; @@ -638,7 +636,7 @@ static HRESULT WINAPI URLMonikerImpl_BindToStorage(IMoniker* iface, memset(&url, 0, sizeof(url)); url.dwStructSize = sizeof(url); url.dwSchemeLength = url.dwHostNameLength = url.dwUrlPathLength = url.dwUserNameLength = url.dwPasswordLength = 1; - InternetCrackUrlW(urlcopy, 0, 0, &url); + InternetCrackUrlW(urlcopy, 0, ICU_ESCAPE, &url); host = HeapAlloc(GetProcessHeap(), 0, (url.dwHostNameLength + 1) * sizeof(WCHAR)); memcpy(host, url.lpszHostName, url.dwHostNameLength * sizeof(WCHAR)); host[url.dwHostNameLength] = '\0'; @@ -799,9 +797,9 @@ static HRESULT WINAPI URLMonikerImpl_BindToStorage(IMoniker* iface, break; case INTERNET_SCHEME_FILE: - path = bind->URLName + 5; /* Skip the "file:" part */ - if ((path[0] != '/' && path[0] != '\\') || - (path[1] != '/' && path[1] != '\\')) + partial_path = bind->URLName + 5; /* Skip the "file:" part */ + if ((partial_path[0] != '/' && partial_path[0] != '\\') || + (partial_path[1] != '/' && partial_path[1] != '\\')) { hres = E_FAIL; } @@ -809,10 +807,10 @@ static HRESULT WINAPI URLMonikerImpl_BindToStorage(IMoniker* iface, { HANDLE h; - path += 2; - if (path[0] == '/' || path[0] == '\\') - ++path; - h = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); + partial_path += 2; + if (partial_path[0] == '/' || partial_path[0] == '\\') + ++partial_path; + h = CreateFileW(partial_path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); if (h == (HANDLE) HFILE_ERROR) { hres = HRESULT_FROM_WIN32(GetLastError()); @@ -1136,7 +1134,7 @@ static const IMonikerVtbl VT_URLMonikerImpl = static HRESULT URLMonikerImpl_Construct(URLMonikerImpl* This, LPCOLESTR lpszLeftURLName, LPCOLESTR lpszURLName) { HRESULT hres; - DWORD sizeStr; + DWORD sizeStr = INTERNET_MAX_URL_LENGTH; TRACE("(%p,%s,%s)\n",This,debugstr_w(lpszLeftURLName),debugstr_w(lpszURLName)); memset(This, 0, sizeof(*This)); @@ -1170,6 +1168,8 @@ static HRESULT URLMonikerImpl_Construct(URLMonikerImpl* This, LPCOLESTR lpszLeft else strcpyW(This->URLName,lpszURLName); + URLMON_LockModule(); + return S_OK; } @@ -1255,11 +1255,12 @@ HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker ** return E_OUTOFMEMORY; if(pmkContext) { - CLSID clsid; IBindCtx* bind; - IMoniker_GetClassID(pmkContext, &clsid); - if(IsEqualCLSID(&clsid, &CLSID_StdURLMoniker) && SUCCEEDED(CreateBindCtx(0, &bind))) { - URLMonikerImpl_GetDisplayName(pmkContext, bind, NULL, &lefturl); + DWORD dwMksys = 0; + IMoniker_IsSystemMoniker(pmkContext, &dwMksys); + if(dwMksys == MKSYS_URLMONIKER && SUCCEEDED(CreateBindCtx(0, &bind))) { + IMoniker_GetDisplayName(pmkContext, bind, NULL, &lefturl); + TRACE("lefturl = %s\n", debugstr_w(lefturl)); IBindCtx_Release(bind); } } diff --git a/reactos/lib/urlmon/umstream.c b/reactos/lib/urlmon/umstream.c index da9e8f2cc65..f9073175424 100644 --- a/reactos/lib/urlmon/umstream.c +++ b/reactos/lib/urlmon/umstream.c @@ -253,7 +253,8 @@ static HRESULT WINAPI IStream_fnSeek ( IStream * iface, DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition) { - DWORD pos, newposlo, newposhi; + DWORD pos, newposlo; + LONG newposhi; IUMCacheStream *This = (IUMCacheStream *)iface; @@ -262,7 +263,7 @@ static HRESULT WINAPI IStream_fnSeek ( IStream * iface, pos = dlibMove.QuadPart; /* FIXME: truncates */ newposhi = 0; newposlo = SetFilePointer( This->handle, pos, &newposhi, dwOrigin ); - if( newposlo == INVALID_SET_FILE_POINTER ) + if( newposlo == INVALID_SET_FILE_POINTER && GetLastError()) return E_FAIL; if (plibNewPosition) diff --git a/reactos/lib/urlmon/urlmon.inf b/reactos/lib/urlmon/urlmon.inf new file mode 100644 index 00000000000..d87c8ae0053 --- /dev/null +++ b/reactos/lib/urlmon/urlmon.inf @@ -0,0 +1,29 @@ +[version] +Signature="$CHICAGO$" + + +[RegisterDll] +AddReg=Protocols.Reg + + +[UnregisterDll] +DelReg=Protocols.Reg + + +[Protocols.Reg] +HKCR,"PROTOCOLS\Handler\cdl",,,"CDL: Asynchronous Pluggable Protocol Handler" +HKCR,"PROTOCOLS\Handler\cdl","CLSID",,"%CLSID_CdlProtocol%" +HKCR,"PROTOCOLS\Handler\file",,,"file:, local: Asynchronous Pluggable Protocol Handler" +HKCR,"PROTOCOLS\Handler\file","CLSID",,"%CLSID_FileProtocol%" +HKCR,"PROTOCOLS\Handler\local",,,"file:, local: Asynchronous Pluggable Protocol Handler" +HKCR,"PROTOCOLS\Handler\local","CLSID",,"%CLSID_FileProtocol%" +HKCR,"PROTOCOLS\Handler\ftp",,,"ftp: Asynchronous Pluggable Protocol Handler" +HKCR,"PROTOCOLS\Handler\ftp","CLSID",,"%CLSID_FtpProtocol%" +HKCR,"PROTOCOLS\Handler\gopher",,,"gopher: Asynchronous Pluggable Protocol Handler" +HKCR,"PROTOCOLS\Handler\gopher","CLSID",,"%CLSID_GopherProtocol%" +HKCR,"PROTOCOLS\Handler\http",,,"http: Asynchronous Pluggable Protocol Handler" +HKCR,"PROTOCOLS\Handler\http","CLSID",,"%CLSID_HttpProtocol%" +HKCR,"PROTOCOLS\Handler\https",,,"https: Asynchronous Pluggable Protocol Handler" +HKCR,"PROTOCOLS\Handler\https","CLSID",,"%CLSID_HttpsProtocol%" +HKCR,"PROTOCOLS\Handler\mk",,,"mk: Asynchronous Pluggable Protocol Handler" +HKCR,"PROTOCOLS\Handler\mk","CLSID",,"%CLSID_MkProtocol%" diff --git a/reactos/lib/urlmon/urlmon.xml b/reactos/lib/urlmon/urlmon.xml index 5ead31106fd..41bc4aeef18 100644 --- a/reactos/lib/urlmon/urlmon.xml +++ b/reactos/lib/urlmon/urlmon.xml @@ -23,5 +23,6 @@ umon.c umstream.c urlmon_main.c + rsrc.rc urlmon.spec diff --git a/reactos/lib/urlmon/urlmon_main.c b/reactos/lib/urlmon/urlmon_main.c index 342505b19c5..b3dcc15851b 100644 --- a/reactos/lib/urlmon/urlmon_main.c +++ b/reactos/lib/urlmon/urlmon_main.c @@ -89,7 +89,7 @@ HRESULT WINAPI URLMON_DllCanUnloadNow(void) typedef struct { IClassFactory ITF_IClassFactory; - DWORD ref; + LONG ref; HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj); } IClassFactoryImpl; @@ -125,8 +125,6 @@ CF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) static ULONG WINAPI CF_AddRef(LPCLASSFACTORY iface) { IClassFactoryImpl *This = (IClassFactoryImpl *)iface; - URLMON_LockModule(); - return InterlockedIncrement(&This->ref); } @@ -136,10 +134,10 @@ static ULONG WINAPI CF_Release(LPCLASSFACTORY iface) ULONG ref = InterlockedDecrement(&This->ref); - if (ref == 0) - HeapFree(GetProcessHeap(), 0, This); - - URLMON_UnlockModule(); + if (ref == 0) { + HeapFree(GetProcessHeap(), 0, This); + URLMON_UnlockModule(); + } return ref; } @@ -229,10 +227,12 @@ DWORD WINAPI URLMON_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) factory->ITF_IClassFactory.lpVtbl = &CF_Vtbl; factory->ref = 1; - factory->pfnCreateInstance = object_creation[i].pfnCreateInstance; *ppv = &(factory->ITF_IClassFactory); + + URLMON_LockModule(); + return S_OK; } diff --git a/reactos/lib/urlmon/urlmon_main.h b/reactos/lib/urlmon/urlmon_main.h index e1ce8734333..3c912f78c8f 100644 --- a/reactos/lib/urlmon/urlmon_main.h +++ b/reactos/lib/urlmon/urlmon_main.h @@ -40,7 +40,7 @@ static inline void URLMON_UnlockModule(void) { InterlockedDecrement( &URLMON_ref typedef struct { const IStreamVtbl *lpVtbl; - DWORD ref; + LONG ref; HANDLE handle; BOOL closed; WCHAR *pszFileName; @@ -50,4 +50,13 @@ typedef struct HRESULT UMCreateStreamOnCacheFile(LPCWSTR pszURL, DWORD dwSize, LPWSTR pszFileName, HANDLE *phfile, IUMCacheStream **ppstr); void UMCloseCacheFileStream(IUMCacheStream *pstr); +DEFINE_GUID(CLSID_CdlProtocol, 0x3dd53d40, 0x7b8b, 0x11D0, 0xb0,0x13, 0x00,0xaa,0x00,0x59,0xce,0x02); +DEFINE_GUID(CLSID_FileProtocol, 0x79EAC9E7, 0xBAF9, 0x11CE, 0x8C,0x82, 0x00,0xAA,0x00,0x4B,0xA9,0x0B); +DEFINE_GUID(CLSID_FtpProtocol, 0x79EAC9E3, 0xBAF9, 0x11CE, 0x8C,0x82, 0x00,0xAA,0x00,0x4B,0xA9,0x0B); +DEFINE_GUID(CLSID_GopherProtocol, 0x79EAC9E4, 0xBAF9, 0x11CE, 0x8C,0x82, 0x00,0xAA,0x00,0x4B,0xA9,0x0B); +DEFINE_GUID(CLSID_HttpProtocol, 0x79EAC9E2, 0xBAF9, 0x11CE, 0x8C,0x82, 0x00,0xAA,0x00,0x4B,0xA9,0x0B); +DEFINE_GUID(CLSID_HttpsProtocol, 0x79EAC9E5, 0xBAF9, 0x11CE, 0x8C,0x82, 0x00,0xAA,0x00,0x4B,0xA9,0x0B); +DEFINE_GUID(CLSID_MkProtocol, 0x79EAC9E6, 0xBAF9, 0x11CE, 0x8C,0x82, 0x00,0xAA,0x00,0x4B,0xA9,0x0B); + + #endif /* __WINE_URLMON_MAIN_H */ diff --git a/reactos/w32api/include/advpub.h b/reactos/w32api/include/advpub.h new file mode 100644 index 00000000000..8fc68be3d05 --- /dev/null +++ b/reactos/w32api/include/advpub.h @@ -0,0 +1,77 @@ +/* + * Copyright 2004 Huw D M Davies + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __WINE_ADVPUB_H +#define __WINE_ADVPUB_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _CabInfo { + PSTR pszCab; + PSTR pszInf; + PSTR pszSection; + char szSrcPath[MAX_PATH]; + DWORD dwFlags; +} CABINFO, *PCABINFO; + +typedef struct _StrEntry { + LPSTR pszName; + LPSTR pszValue; +} STRENTRY, *LPSTRENTRY; + +typedef const STRENTRY CSTRENTRY; +typedef CSTRENTRY *LPCSTRENTRY; + +typedef struct _StrTable { + DWORD cEntries; + LPSTRENTRY pse; +} STRTABLE, *LPSTRTABLE; + +typedef const STRTABLE CSTRTABLE; +typedef CSTRTABLE *LPCSTRTABLE; + +/* Flags for RunSetupCommand */ +#define RSC_FLAG_INF 0x00000001 +#define RSC_FLAG_SKIPDISKSPACECHECK 0x00000002 +#define RSC_FLAG_QUIET 0x00000004 +#define RSC_FLAG_NGCONV 0x00000008 +#define RSC_FLAG_UPDHLPDLLS 0x00000010 +#define RSC_FLAG_DELAYREGISTEROCX 0x00000200 +#define RSC_FLAG_SETUPAPI 0x00000400 + +/* Flags for DelNode */ +#define ADN_DEL_IF_EMPTY 0x00000001 +#define ADN_DONT_DEL_SUBDIRS 0x00000002 +#define ADN_DONT_DEL_DIR 0x00000004 + +HRESULT WINAPI RunSetupCommand(HWND hWnd, + LPCSTR szCmdName, LPCSTR szInfSection, LPCSTR szDir, LPCSTR lpszTitle, + HANDLE *phEXE, DWORD dwFlags, LPVOID pvReserved); +HRESULT WINAPI DelNode(LPCSTR pszFileOrDirName, DWORD dwFlags); +DWORD WINAPI NeedRebootInit(VOID); +BOOL WINAPI NeedReboot(DWORD dwRebootCheck); +HRESULT WINAPI RegInstall(HMODULE hm, LPCSTR pszSection, LPCSTRTABLE pstTable); +HRESULT WINAPI GetVersionFromFile(LPSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion); +HRESULT WINAPI GetVersionFromFileEx(LPSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion); + +#ifdef __cplusplus +} +#endif + +#endif /* __WINE_ADVPUB_H */