[URL]
[reactos.git] / reactos / dll / win32 / url / url_main.c
index 69b46ea..79eaca1 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
 #include <stdarg.h>
-#include "windef.h"
-#include "winbase.h"
-#include "winreg.h"
-#include "winerror.h"
-#include "shellapi.h"
-#include "shlwapi.h"
-#include "intshcut.h"
-#include "winuser.h"
-#include "commctrl.h"
-#include "prsht.h"
-#include "wine/debug.h"
+#include <windef.h>
+#include <winbase.h>
+#include <winreg.h>
+//#include "winerror.h"
+#include <shellapi.h>
+#include <shlwapi.h>
+//#include "intshcut.h"
+#include <winuser.h>
+//#include "commctrl.h"
+#include <prsht.h>
+#include <wine/debug.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(url);
 
@@ -88,8 +92,7 @@ BOOL WINAPI InetIsOffline(DWORD flags)
  * int nShowCmd - How to display the operation.
  */
 
-HRESULT WINAPI FileProtocolHandlerA(HWND hWnd, HINSTANCE hInst, LPCSTR pszUrl,
-        int nShowCmd)
+void WINAPI FileProtocolHandlerA(HWND hWnd, HINSTANCE hInst, LPCSTR pszUrl, int nShowCmd)
 {
     CHAR pszPath[MAX_PATH];
     DWORD size = MAX_PATH;
@@ -97,12 +100,16 @@ HRESULT WINAPI FileProtocolHandlerA(HWND hWnd, HINSTANCE hInst, LPCSTR pszUrl,
 
     TRACE("(%p, %s, %d)\n",hWnd,debugstr_a(pszUrl),nShowCmd);
 
-    if(createpath != S_OK)
-        return E_FAIL;
-
-    ShellExecuteA(hWnd,NULL,pszPath,NULL,NULL,nShowCmd);
+    ShellExecuteA(hWnd, NULL, createpath==S_OK ? pszPath : pszUrl, NULL, NULL, nShowCmd);
+}
 
-    return S_OK;
+/***********************************************************************
+ * OpenURLA    (URL.@)
+ *
+ */
+void WINAPI OpenURLA(HWND hwnd, HINSTANCE inst, LPCSTR cmdline, INT show)
+{
+    FIXME("(%p, %p, %s, %d): stub!\n", hwnd, inst, debugstr_a(cmdline), show);
 }
 
 /***********************************************************************