45#define SC_HSC_A_MAGIC 0xACABFEED
55#define SC_HSC_W_MAGIC 0x0CABFEED
75 ERR(
"load cabinet dll failed.\n");
114 ERR(
"_O_WRONLY & _O_RDWR in oflag?\n");
132 switch( pmode & 0x70 ) {
147 ERR(
"<-- -1 (Unhandled pmode 0x%x)\n", pmode);
152 WARN(
"unsupported oflag 0x%04x\n",oflag);
155 sa.lpSecurityDescriptor =
NULL;
176 if ((! rslt) || ((
cb > 0) && (num_read == 0))) {
193 && (num_written ==
cb)) {
219 if (seektype < 0 || seektype > 2)
231#define SIZEOF_MYSTERIO (MAX_PATH*3)
247 TRACE(
"(fdint == %d, pfdin == ^%p)\n", fdint, pfdin);
252 ERR(
"pv %p is not an SC_HSC_A.\n", (pfdin) ? pfdin->
pv :
NULL);
258 TRACE(
"Cabinet info notification\n");
264 WARN(
"SPFILENOTIFY_CABINETINFO undocumented: guess implementation.\n");
273 TRACE(
"Partial file notification\n");
277 TRACE(
"Copy file notification\n");
293 TRACE(
" Callback specified filename: %s\n",
debugstr_a(fici.FullTargetName));
294 if (!fici.FullTargetName[0]) {
295 WARN(
" Empty return string causing abort.\n");
302 TRACE(
" Callback skipped file.\n");
306 TRACE(
"Close file notification\n");
315 WARN(
"Should set file date/time/attribs (and execute files?)\n");
317 WARN(
"_close failed.\n");
325 TRACE(
"Next cabinet notification\n");
331 ci.CabinetFile = pfdin->
psz1;
332 ci.CabinetPath = pfdin->
psz3;
333 ci.DiskName = pfdin->
psz2;
334 ci.SetId = pfdin->
setID;
350 FIXME(
"Unknown notification type %d.\n", fdint);
373 TRACE(
"(fdint == %d, pfdin == ^%p)\n", fdint, pfdin);
378 ERR(
"pv %p is not an SC_HSC_W.\n", (pfdin) ? pfdin->
pv :
NULL);
384 TRACE(
"Cabinet info notification\n");
390 WARN(
"SPFILENOTIFY_CABINETINFO undocumented: guess implementation.\n");
405 TRACE(
"Partial file notification\n");
409 TRACE(
"Copy file notification\n");
428 TRACE(
" Callback specified filename: %s\n",
debugstr_w(fici.FullTargetName));
429 if (fici.FullTargetName[0]) {
436 WARN(
"Empty buffer string caused abort.\n");
443 TRACE(
" Callback skipped file.\n");
447 TRACE(
"Close file notification\n");
458 WARN(
"_close failed.\n");
466 TRACE(
"Next cabinet notification\n");
480 ci.CabinetPath =
buf;
485 ci.SetId = pfdin->
setID;
494 if ((
len > 255) || (
len <= 1))
502 FIXME(
"Unknown notification type %d.\n", fdint);
520 TRACE(
"(CabinetFile == %s, Reserved == %u, MsgHandler == ^%p, Context == ^%p)\n",
532 fpnsize =
strlen(CabinetFile);
548 strcpy(pszCabinet, CabinetFile);
549 pszCabPath[0] =
'\0';
567 sc_FDIDestroy(my_hsc.
hfdi);
586 TRACE(
"(CabinetFile == %s, Reserved == %u, MsgHandler == ^%p, Context == ^%p)\n",
612 pszCabPath[0] =
'\0';
619 TRACE(
"path: %s, cabfile: %s\n",
632 sc_FDIDestroy(my_hsc.
hfdi);
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
static struct sockaddr_in sa
#define ERROR_INVALID_PARAMETER
#define DLL_PROCESS_ATTACH
#define DLL_PROCESS_DETACH
#define INVALID_SET_FILE_POINTER
struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES
#define ReadFile(a, b, c, d, e)
#define GetProcAddress(x, y)
#define CreateFileA(a, b, c, d, e, f, g)
#define HeapFree(x, y, z)
#define FILE_ATTRIBUTE_NORMAL
#define WideCharToMultiByte
#define MultiByteToWideChar
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
DWORD WINAPI GetFullPathNameA(IN LPCSTR lpFileName, IN DWORD nBufferLength, OUT LPSTR lpBuffer, OUT LPSTR *lpFilePart)
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
BOOL WINAPI GetVersionExW(IN LPOSVERSIONINFOW lpVersionInformation)
void WINAPI SetupCloseLog(void)
static INT_PTR CDECL sc_FNNOTIFY_W(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin)
struct SC_HSC_A * PSC_HSC_A
static void *CDECL sc_cb_alloc(ULONG cb)
struct SC_HSC_W * PSC_HSC_W
BOOL WINAPI SetupIterateCabinetW(PCWSTR CabinetFile, DWORD Reserved, PSP_FILE_CALLBACK_W MsgHandler, PVOID Context)
static char char PFNFDINOTIFY
static HINSTANCE CABINET_hInstance
BOOL WINAPI SetupIterateCabinetA(PCSTR CabinetFile, DWORD Reserved, PSP_FILE_CALLBACK_A MsgHandler, PVOID Context)
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
static char char PFNFDIDECRYPT
static void CDECL sc_cb_free(void *pv)
static INT_PTR CDECL sc_cb_open(char *pszFile, int oflag, int pmode)
static int CDECL sc_cb_close(INT_PTR hf)
static BOOL LoadCABINETDll(void)
OSVERSIONINFOEXW OsVersionInfo
static UINT CDECL sc_cb_write(INT_PTR hf, void *pv, UINT cb)
static UINT CDECL sc_cb_read(INT_PTR hf, void *pv, UINT cb)
static LONG CDECL sc_cb_lseek(INT_PTR hf, LONG dist, int seektype)
static INT_PTR CDECL sc_FNNOTIFY_A(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin)
void *(__cdecl * PFNALLOC)(ULONG cb)
UINT(CALLBACK * PSP_FILE_CALLBACK_W)(IN PVOID Context, IN UINT Notification, IN UINT_PTR Param1, IN UINT_PTR Param2)
GLenum GLuint GLenum GLsizei const GLchar * buf
static IN DWORD IN LPVOID lpvReserved
double __cdecl erf(double)
#define TRUNCATE_EXISTING
static HMODULE MODULEINFO DWORD cb
static ULONG POBJECT_ATTRIBUTES PIO_STATUS_BLOCK ULONG sharing
unsigned __int3264 UINT_PTR
#define SPFILENOTIFY_CABINETINFO
#define SPFILENOTIFY_NEEDNEWCABINET
UINT(CALLBACK * PSP_FILE_CALLBACK_A)(PVOID, UINT, UINT_PTR, UINT_PTR)
#define SPFILENOTIFY_FILEEXTRACTED
#define SPFILENOTIFY_FILEINCABINET
CHAR most_recent_cabinet_name[MAX_PATH]
PSP_FILE_CALLBACK_A msghandler
CHAR most_recent_target[MAX_PATH]
PSP_FILE_CALLBACK_W msghandler
WCHAR most_recent_cabinet_name[MAX_PATH]
WCHAR most_recent_target[MAX_PATH]
CHAR FullTargetName[MAX_PATH]
WCHAR FullTargetName[MAX_PATH]
ULONG dwOSVersionInfoSize
DWORD WINAPI GetLastError(void)
_Reserved_ PVOID Reserved
#define ERROR_PATH_NOT_FOUND
#define ERROR_BAD_PATHNAME