Page 2 of 3

Posted: Wed May 11, 2005 9:28 am
by porfirio
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

just a idea;)

Posted: Wed May 11, 2005 10:20 am
by nrasool
Hi there

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

A Short program can be downloaded here:
http://www.nadcom.co.uk/purebasic/mozillahtmlviewer.zip

Warning around 4.9Mb

Uses the following sourcecode for registering dll
viewtopic.php?t=3656

Kind Regards

Nadeem

Posted: Sat May 14, 2005 12:49 pm
by porfirio
File not found : register.pb

Posted: Sun May 15, 2005 12:10 pm
by nrasool
Whoops Sorry, create a new .pb file and called it register.pb

Copy and paste the following into this file

Code: Select all

; 
;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 
Save and Exit

Should work now

Posted: Sun May 15, 2005 12:20 pm
by porfirio
It work good but mabe you need more thing's
right click menu dont work.....

[edit]

Something interessant when your program end it uninstal the activex so i go try another program and it worked but with ie control and not with mozzila

That is cool we can distribute a program and if ppl dont have mozzila activex it work with ie ;)

Posted: Fri May 27, 2005 1:02 pm
by porfirio
So no more updates on this ??

Posted: Fri May 27, 2005 2:14 pm
by nrasool
Sorry, Haven't had a chance to take a look back into this. Just been busy with other projects at the moment.

Hmm... you could try as well, I have provided the whole source code. It may be another .ocx file needs to be registered.

Posted: Fri Jun 24, 2005 12:21 pm
by dontmailme
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......

Posted: Fri Jun 24, 2005 1:17 pm
by Num3
Well the webgadget already supports the flags, but i don't know which one to use o_O !!!

Ehehe

Posted: Sat Jun 25, 2005 5:20 pm
by dontmailme
*bump*

Fred? Beriko? anyone?

What is the #FLAG for using Mozilla/Firefox as the Webgadget engine ?

Pretty Please ;)

Posted: Sun Jun 26, 2005 4:34 pm
by MVXA
i think
1: using FireFox Gecko engine
0: using IE

Posted: Sun Jun 26, 2005 5:05 pm
by dontmailme
I did try that.... as it was the most obvious guess.... but it always used ie..... unless latest beta doesn't have the update ?!

Posted: Sun Jun 26, 2005 6:55 pm
by utopiomania
Hope we'll be able to use IE as usual even if this request is granted. ??

Posted: Thu Aug 04, 2005 1:22 pm
by Fred
It's now added, it will be the #PB_Web_Mozilla flag to use the mozilla engine instead of IE

Posted: Thu Aug 04, 2005 2:03 pm
by GeoTrail
Great Fred ;)