Fred wrote:porfirio: i don't plan to include the activex for several reasons:
1) bug fixes. what if a security hole is found in the mozilla engine ? as the activex is a separate package you can easily update it and all apps based on it will be fixed.
2) maintainance. it will be an hell to follow all the release and include them in PB.
Ii don't think than the activex redistribution and installation is a problem, as it's relatively small (4,7 mb) and got a blind install (almost nothing to do).
Your right and ppl can include it in their install pacage with inno setup ot nsis i think with that they can instal the activex
Or ppl just put it as a 3ª party software
Mabe you could do something to check if ppl have it and if not use ie
I have simply copied the library from the Mozilla ActiveX folder, uninstalled it, then in my purebasic program simply registered the require variable - mozctlx.dll
When the program ended, i then unregistered the variable.
Works pretty well, although including the whole files will increase your program by 4 mbs
;
;RegSVR32 Sample
Procedure RegSVR32(File$,Flag)
hLib = LoadLibrary_(File$) ;Load the DLL into memory
If hLib =0
ProcedureReturn 0
EndIf
If Flag=1
RegProcName.s = "DllRegisterServer"
Else
RegProcName.s = "DllUnregisterServer"
EndIf
; Find And store the DLL entry point, i.e. obtain the address
; of the “DllRegisterServer” or "DllUnregisterServer" function
; (to register or deregister the server’s components in the registry)
lpDLLEntryPoint = GetProcAddress_(hLib, RegProcName) ;Find Procedure in DLL
If lpDLLEntryPoint = 0
FreeLibrary_(hLib)
ProcedureReturn -1 ;This is not a ActiveX
EndIf
;Create a thread To execute within the virtual address space of the calling process
hThread = CreateThread_(0, 0,lpDLLEntryPoint, 0, 0, lpThreadID)
If hThread = 0
FreeLibrary_(hLib)
ProcedureReturn -2 ;failed threading
EndIf
;Use WaitForSingleObject To check the Return state (i) when the specified object is in
;the signaled state Or (ii) when the time-out interval elapses. This function can be
; used To test Process And Thread.
mResult = WaitForSingleObject_(hThread, 10000)
If mResult <> 0
FreeLibrary_(hLib)
lpExitCode = GetExitCodeThread_(hThread, lpExitCode)
ExitThread_(lpExitCode)
ProcedureReturn -3 ;failed threading
EndIf
;We don't call the dangerous Terminate Thread(); after the last handle to an object
;is closed, the object is removed from the system.
CloseHandle_(hThread)
FreeLibrary_(hLib)
ProcedureReturn 1 ;failed threading
EndProcedure
Fred wrote:Cool if it works for you. About the library, the compiler scan the whole directory and load the pb files which are in it, so even if you rename it will load it.
BTW, we will just add a flag to the current WebGadget() to enable mozilla use.
Has this been done ?
If so, the help doesn't have the flags and still states that IE is required......