/*    
	Shell.c	2.13
    	Copyright 1997 Willows Software, Inc. 

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 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
Library General Public License for more details.

You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB.  If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA.


For more information about the Willows Twin Libraries.

	http://www.willows.com	

To send email to the maintainer of the Willows Twin Libraries.

	mailto:twin@willows.com 

 */

#include <string.h>

#include "windows.h"
#include "windowsx.h"
/*
#include "shellapi.h"
*/
#define __SHELLAPI_H__
#include "Willows.h"

#include "Log.h"
#include "kerndef.h"
#include "KrnAtoms.h"

HICON WINAPI
ExtractIcon(HINSTANCE hInst, LPCSTR lpszExeFileName, UINT nIconIndex)
{
    LOGSTR((LF_SHELL,"ExtractIcon: STUB hinst %x file %s index %x\n",
	hInst,lpszExeFileName,nIconIndex));
    return (HICON)0;
}

HINSTANCE WINAPI
ShellExecute(HWND hWnd, LPCSTR lpOperation, LPCSTR lpFile,
		LPCSTR lpParameters, LPCSTR lpDirectory, int nShowCmd)
{
    LOGSTR((LF_SHELL,
	"ShellExecute: STUB hwnd %x op %x file %s parm %x dir %s show %d\n",
	hWnd,lpOperation,lpFile,lpParameters,lpDirectory,nShowCmd));
    return WinExec(lpFile,nShowCmd);
}

HINSTANCE WINAPI
FindExecutable(LPCSTR lpszFile, LPCSTR lpszDir, LPSTR lpResult)
{
    LOGSTR((LF_SHELL,"FindExecutable: file %s dir %s\n",
	lpszFile,lpszDir));
   /* later, add a search for the application to match file if not .exe */
    strcpy(lpResult,lpszFile);
    return (HINSTANCE) 33;
}

void WINAPI
RegisterShellHook(HWND hWnd, int foo)
{
    LOGSTR((LF_SHELL,"RegisterShellHook: STUB hWnd %x foo %x\n",hWnd,foo));
}

/* (WIN32) File Security *************************************************** */
   
BOOL    WINAPI
GetFileSecurity(LPCSTR lpszFile,
        SECURITY_INFORMATION si, PSECURITY_DESCRIPTOR psd,
        DWORD dw, LPDWORD lp)
{
        APISTR((LF_API, "GetFileSecurity: (API) file %s\n", lpszFile));
        return (TRUE);
}       
   
BOOL    WINAPI
SetFileSecurity(LPCSTR lpszFile,
        SECURITY_INFORMATION si, PSECURITY_DESCRIPTOR psd)
{   
        APISTR((LF_API, "SetFileSecurity: (API) file %s\n", lpszFile));
        return (TRUE);
}
        

