Back to index

lightning-sunbird  0.9+nobinonly
extra.h
Go to the documentation of this file.
00001 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is Mozilla Communicator client code, released
00016  * March 31, 1998.
00017  *
00018  * The Initial Developer of the Original Code is
00019  * Netscape Communications Corporation.
00020  * Portions created by the Initial Developer are Copyright (C) 1998
00021  * the Initial Developer. All Rights Reserved.
00022  *
00023  * Contributor(s):
00024  *   Sean Su <ssu@netscape.com>
00025  *
00026  * Alternatively, the contents of this file may be used under the terms of
00027  * either of the GNU General Public License Version 2 or later (the "GPL"),
00028  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00029  * in which case the provisions of the GPL or the LGPL are applicable instead
00030  * of those above. If you wish to allow use of your version of this file only
00031  * under the terms of either the GPL or the LGPL, and not to allow others to
00032  * use your version of this file under the terms of the MPL, indicate your
00033  * decision by deleting the provisions above and replace them with the notice
00034  * and other provisions required by the GPL or the LGPL. If you do not delete
00035  * the provisions above, a recipient may use your version of this file under
00036  * the terms of any one of the MPL, the GPL or the LGPL.
00037  *
00038  * ***** END LICENSE BLOCK ***** */
00039 
00040 #ifndef _EXTRA_H_
00041 #define _EXTRA_H_
00042 
00043 #define INCL_PM
00044 #define INCL_DOS
00045 #define INCL_DOSERRORS
00046 #include <os2.h>
00047 
00048 typedef long HRESULT;
00049 
00050 typedef struct diskSpaceNode dsN;
00051 struct diskSpaceNode
00052 {
00053   unsigned long long       ullSpaceRequired;
00054   PSZ             szPath;
00055   dsN             *Next;
00056   dsN             *Prev;
00057 };
00058 
00059 typedef struct structVer
00060 {
00061   unsigned long long ullMajor;
00062   unsigned long long ullMinor;
00063   unsigned long long ullRelease;
00064   unsigned long long ullBuild;
00065 } verBlock;
00066 
00067 BOOL              InitApplication(HMODULE hInstance);
00068 BOOL              InitInstance(HMODULE hInstance, ULONG dwCmdShow);
00069 void              PrintError(PSZ   szMsg, ULONG dwErrorCodeSH);
00070 void              FreeMemory(void **vPointer);
00071 void              *NS_GlobalAlloc(ULONG dwMaxBuf);
00072 HRESULT           Initialize(HMODULE hInstance, PSZ szAppName);
00073 HRESULT           NS_LoadStringAlloc(HMODULE hInstance, ULONG dwID, PSZ   *szStringBuf, ULONG dwStringBuf);
00074 HRESULT           NS_LoadString(HMODULE hInstance, ULONG dwID, PSZ   szStringBuf, ULONG dwStringBuf);
00075 HRESULT           WinSpawn(PSZ   szClientName, PSZ   szParameters, PSZ   szCurrentDir, BOOL bWait);
00076 HRESULT           ParseConfigIni(PSZ   lpszCmdLine);
00077 HRESULT           DecryptString(PSZ   szOutputStr, PSZ   szInputStr);
00078 HRESULT           DecryptVariable(PSZ   szVariable, ULONG dwVariableSize);
00079 //void              GetWinReg(HKEY hkRootKey, PSZ   szKey, PSZ   szName, PSZ   szReturnValue, ULONG dwSize);
00080 //void              SetWinReg(HKEY hkRootKey, PSZ   szKey, PSZ   szName, ULONG dwType, PSZ   szData, ULONG dwSize);
00081 //void              SetWinRegNumValue(HKEY hkRootKey, PSZ   szKey, PSZ   szName, ULONG dwData);
00082 HRESULT           InitUninstallGeneral(void);
00083 HRESULT           InitDlgUninstall(diU *diDialog);
00084 sil               *CreateSilNode();
00085 void              SilNodeInsert(sil *silHead, sil *silTemp);
00086 void              SilNodeDelete(sil *silTemp);
00087 void              DeInitialize(void);
00088 void              DeInitDlgUninstall(diU *diDialog);
00089 void              DetermineOSVersion(void);
00090 void              DeInitILomponents(void);
00091 void              DeInitUninstallGeneral(void);
00092 HRESULT           ParseUninstallIni(int argc, char *argv[]);
00093 void              ParsePath(PSZ   szInput, PSZ   szOutput, ULONG dwLength, ULONG dwType);
00094 void              RemoveBackSlash(PSZ   szInput);
00095 void              AppendBackSlash(PSZ   szInput, ULONG dwInputSize);
00096 void              RemoveSlash(PSZ   szInput);
00097 void              AppendSlash(PSZ   szInput, ULONG dwInputSize);
00098 HRESULT           FileExists(PSZ   szFile);
00099 BOOL              isFAT(char* szPath);
00100 HRESULT           CheckInstances();
00101 void              RemoveQuotes(PSZ   lpszSrc, PSZ   lpszDest, int iDestSize);
00102 PSZ               GetFirstNonSpace(PSZ   lpszString);
00103 ULONG             ParseCommandLine(int argc, char *argv[]);
00104 void              SetUninstallRunMode(PSZ   szMode);
00105 void              Delay(ULONG dwSeconds);
00106 HRESULT           GetAppPath();
00107 ULONG             CleanupAppList();
00108 //BOOL              ProcessAppItem(HKEY hkRootKey, PSZ   szAppItem);
00109 HRESULT           GetUninstallLogPath();
00110 
00111 HWND              FindWindow(PCSZ pszAtomString);
00112 
00113 #endif
00114