PDA

View Full Version : windows 8.1 and registering OCX



NewsArchive
01-11-2014, 10:29 AM
Hello,


I cannot get clarion code to register an OCX although I get a return of
"success"
I cannot get SB (latest) to register an OCX - no error sent when I
install
I cannot register the OCX manualy by dropping it on regsvr32.exe and I
get an errorcode of ??? <g>

0x80040200

I googled this and an asnwer is to create a BAT file an run as admin
(like the SB installer which is AsAdmin) BUT there is NO right click to
run as .....

JP is lost ....

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
01-11-2014, 10:29 AM
Hi JP,

> I cannot register the OCX manualy by dropping it on regsvr32.exe and I get an
> errorcode of ??? <g>

64Bit OS maybe?
Are you using the right regsvr32.exe (ie one in

%systemroot%\SysWoW64

Graham

NewsArchive
01-11-2014, 10:29 AM
Hi Graham,

yes Sir (that one)

JP

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
01-11-2014, 10:30 AM
JP,

>
> JP is lost ....
>

Well, the temporary workaround for that specific OCX issue (reported on
MSDN) was to create a .BAT <g>. But it only works around a OCX
self-registration function bug.

It's very well possible gthat your OCX is not Win81 compliant or requires
specific dependency files. "Self-registration" means that the file
registers itself. If it does not register itself then there is a bug in the
self-registration procedure (assuming that all required dependencies are
available when the self-registration process is started; for example, all
required C++ runtimes, etc.).

Friedrich

NewsArchive
01-11-2014, 10:30 AM
Fredrich,

Bonne Année 2014 <g>

Oh! Well - then 'the' test is ti try the CJ installer to see if 'that'
works ?

Your first sentence seems to show there _is_ a known problem sometimes
- did I miss read you ?

JP

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
01-11-2014, 10:31 AM
Hi JP,

>
> Bonne Année 2014 <g>
>

Happy New Year :-)

> Oh! Well - then 'the' test is ti try the CJ installer to see if 'that'
> works ?
>
> Your first sentence seems to show there _is_ a known problem sometimes -
> did I miss read you ?

No, there is no OCX registration problem in Windows 8.1 (or any other
previous Windows version). If the OCX does not register itself then there
is an issue with this specific OCX. In most cases, it is a bug in the
DLLRegisterServer API (which handles all the self-registration stuff). Or a
required dependency file is missing (or not accessible).

Friedrich

NewsArchive
01-11-2014, 10:31 AM
Can I privately send you these ocx for a test at your end please ?

here in all vm's all works well in all OS's except this 8.1 ent 64 bit
(no other 8.1 test bench here) ?

As their installer works it seems to indicate a pb in my code or SB
script ?

Merci

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
01-11-2014, 10:32 AM
Hi JP,

If it only fails on Windows 8.1, then it is very unlikely that it is caused
by your code or the script. IMO, it's a missing dependency or the OLE
initialization issue.

Friedrich

NewsArchive
01-11-2014, 10:32 AM
I tested the OLE initializing tip as you mentioned and no change
BUT
testing more before I bother you by email (next week as now it is late
for us in Europe) <g>

Enjoy the sunday

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
01-11-2014, 10:33 AM
'Their' installer works and registers all properly so I must be doing
something wrong

and DMC works well also after using their installer ...

is something changed between 7/8 and 8.1 in this aspect ?

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
01-11-2014, 10:33 AM
Hi JP,

> 'Their' installer works and registers all properly so I must be doing
> something wrong

Perhaps they register an additional dependency file?

> and DMC works well also after using their installer ...
>
> is something changed between 7/8 and 8.1 in this aspect ?

No. The "self-registration" is handled from within the OCX, not the
installer.

Friedrich

NewsArchive
01-11-2014, 10:34 AM
BTW, one common OCX development failure is that the OCX requires an
initialized OLE32 before attempting to register the DLL. The main problem
is that DLLRegisterServer returns SUCCESS and so you can't find out what the
real problem is.

See attached screenshot. Perhaps this can help.

Friedrich

NewsArchive
01-11-2014, 10:35 AM
Hummm

This is maybe why I get a success return from clarion code and from SB
installer ....

let me check this

Merci

JP

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
01-12-2014, 03:32 AM
Hi JP,

If it is not OLE then it's a missing dependency. If not a missing
dependency, then it's a bug in the OCX <g>.

Friedrich

NewsArchive
01-12-2014, 03:33 AM
I think it could be the path used to install to
I used a sub folder of the install folder and ...
tomorrow morning more tests

Merci

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
01-12-2014, 03:34 AM
The "static scan" menu choice when right-clicking the OCX in
Setupbuilder should help with this, maybe.

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
01-12-2014, 03:34 AM
> The "static scan" menu choice when right-clicking the OCX in
> Setupbuilder should help with this, maybe.

Yes, good idea!

Friedrich

NewsArchive
01-12-2014, 03:34 AM
BUT as I am using vars it does not work .....

install path
%INSTALL_DATA_PATH%\cgf_import\lib
source path
C:\Program Files (x86)\Codejock Software\ActiveX\Xtreme SuitePro
ActiveX [CJ_VERSION_VAR]\Bin
ocx
Codejock.CommandBars.[CJ_VERSION_VAR].ocx

.....

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
01-12-2014, 03:35 AM
Dependency Walker?

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
01-12-2014, 03:35 AM
I think it might be a path pb
I was using sub under dmc path and maybe the ocx is "built" to be
registered only from under program files and 8.1 is more strict than
8...

tomorrow more tests

Thnaks Jeff

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
01-12-2014, 03:35 AM
>
> BUT as I am using vars it does not work .....
>

Then use Project | Task Automation | Perform Static Scan...

Friedrich

NewsArchive
01-12-2014, 03:36 AM
I had badly placed the ole32.dll code
trying again .....

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
01-12-2014, 03:36 AM
JP is totaly "lost"

I reviewed my SB code to check for REG existing entries
If found and if file exists then no installation
If found and NO file exists then install and register

If NO reg entry found I "build" the path from the CJ installer and
check for file exists

If found then NO installation
If not found then no installation

all this works fine

I added in SB script (properly placed around the register pending
operation line the tip from Fredrich on ole32.dll initialize and
uninitialize

In SB I use TWO paths : the 'original one in program files' and I also
copy the ocx for DMC in a sub folder

In DMC code if the return of a CJ ole creation is 'no ole automation' I
catch it and stop normal processing and send the user to an "clarion
registering" with this kind of code
(using the sub DMC path "copy")
pRegFile = CLIP(GLO:LibPath) & CLIP(CodeJock_OcxFile_CB)
vsDebug.Write(vsDebug::ProcedureName & 'Register All Ocx ***** REGISTER
OLE [' & CLIP(pRegFile) & eMyCloseBracket)
pCreateResult = CALL(CLIP(pRegFile),'DllRegisterServer')
IF pCreateResult
vsDebug.Write(vsDebug::ProcedureName & 'Register All Ocx *****
ERROR **** [' & CLIP(pCreateResult) & eMyCloseBracket)
ELSE
UNLOAD(CLIP(pRegFile))
vsDebug.Write(vsDebug::ProcedureName & 'Register All Ocx *****
SUCCESS ****')
END

and I do get a "success" return

when the user restarts dmc :
windows7 - NO GO (even after a reboot)
windows8 - OK (after a DMC registration on my sub path - ie SB
registration does not seem to work on the regular 'program files path')
windows8.1 - NO GO
windows2012 - OK after a DMC registration
windows2008R2 - OK after a DMC registration
windowsXP - OK after a DMC registration

I did check in my vm's all registries beofre saving to a snapshot of a
"clean" os (codejock wise)

always using the same SB installer for all these checks so it is not a
corrupted OCX

the only check I did not perfomr is on dependency walker as Jeff
suggested which on my dev machine shows a requirement to gdiplus.dll on
top of all windows dll's and comctl32.dll from some winsxs folder ....

totaly lost!

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
01-12-2014, 06:58 AM
> SB registration does not seem to work on the regular 'program files
> path')

Please remember that it is NOT a SetupBuilder registration!!! OCX files
register itself (their own code writes all the registry entries, etc.). In
other words, if the registration process fails then it is always caused by
an issue in the self-registration process.

Friedrich

NewsArchive
01-13-2014, 12:36 AM
Created a CodeJock setup to install/register the OCX files and your DMC
product works fine here on a clean Windows 7 and Windows 8.1.

Friedrich

NewsArchive
01-13-2014, 12:36 AM
Yes I saw this and your answer also
---------------
why don't you use the automatic "Register as OCX" option in the file
properties?
---------------
because I never thought of it :(
because I thought the regositer all pending ocx was good enough

we learn every day

and of course just checking that option and commenting out the queue
all ocx solves all!!!!

MERCI

JP

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com