-
Apr 18th, 2024, 10:15 AM
#1
Thread Starter
Hyperactive Member
-
Apr 18th, 2024, 10:27 AM
#2
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
Why would like to have a single OCX?
If you want a single monolith OCX then you need to the source code of all OCX components and build a new one.
But more simple is to just place all needed OCX files in a subfolder of your application.
-
Apr 18th, 2024, 10:51 AM
#3
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
 Originally Posted by Couin
Some minor question, is it possible to :
- Create one OCX file, including several OCX files ?
- Extracte each OCX file (in view to recreate one OCX file from ctl/ctx files of each extracter OCX files) ?
- That's usually how it's done. Why would anyone compile a single user-control to a separate OCX file?
- Very much default modus operandi too. Here is a snippet from a manifest of ours:
Code:
<file name="PosCm15.ocx">
<typelib tlbid="{6EBAAAAB-DAFA-4DBC-AB7E-C1698FD4D9B3}" version="1.0" flags="control,hasdiskimage" helpdir="" />
<comClass clsid="{473FAF53-3940-4E14-B962-544AF8851A28}" tlbid="{6EBAAAAB-DAFA-4DBC-AB7E-C1698FD4D9B3}" progid="PosCommon15.ctxDivider" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,nouiactivate,setclientsitefirst" />
<comClass clsid="{26772CA7-CEBA-4483-B25C-4498EAFD3123}" tlbid="{6EBAAAAB-DAFA-4DBC-AB7E-C1698FD4D9B3}" progid="PosCommon15.ctxFooter" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,actslikebutton,alignable,simpleframe,setclientsitefirst" />
<comClass clsid="{F8B88B91-9B5D-46EB-A83F-A391419CE941}" tlbid="{6EBAAAAB-DAFA-4DBC-AB7E-C1698FD4D9B3}" progid="PosCommon15.ctxHeading" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,nouiactivate,alignable,setclientsitefirst" />
<comClass clsid="{1FB8D077-FD42-4264-BDA6-0B2E6ACA4CBF}" tlbid="{6EBAAAAB-DAFA-4DBC-AB7E-C1698FD4D9B3}" progid="PosCommon15.ctxNineButton" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,actslikebutton,setclientsitefirst" />
<comClass clsid="{7C440095-FF4F-4C1D-A4F4-821F62A29076}" tlbid="{6EBAAAAB-DAFA-4DBC-AB7E-C1698FD4D9B3}" progid="PosCommon15.ctxFlexContainer" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst" />
<comClass clsid="{CDA3B189-1A76-44C0-8F26-E157158C5686}" tlbid="{6EBAAAAB-DAFA-4DBC-AB7E-C1698FD4D9B3}" progid="PosCommon15.ctxTouchKeyboard" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,nouiactivate,setclientsitefirst" />
<comClass clsid="{0A05CFC4-D5DB-41DE-B8C7-6C30CAF776FD}" tlbid="{6EBAAAAB-DAFA-4DBC-AB7E-C1698FD4D9B3}" progid="PosCommon15.cVncServer" threadingModel="Apartment" />
...
</file>
It bundles several user-controls in an OCX incl. support classes which are under the same typelib. Notice the miscStatusContent attribute on user-controls. This is an important one for user-controls and often missed in tutorials on reg-free COM here but might prevent user-controls from properly activating in your application e.g. showing redrawing problems.
cheers,
</wqw>
-
Apr 18th, 2024, 11:00 AM
#4
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
 Originally Posted by Couin
Some minor question, is it possible to :
- Create one OCX file, including several OCX files ?
No. You can create one ocx file containing several controls (several UserControls), but not several ocx files.
 Originally Posted by Couin
- Extracte each OCX file (in view to recreate one OCX file from ctl/ctx files of each extracter OCX files) ?
Impossible. OCX files are compiled programs, very much like an exe file or a dll file. It is not possible to get the source code from the ocx file.
Ctl/ctx file are source code.
Again, there is no way to get the source code from compiled files. For example your customers are not able to get the code of your program from the exe you send to them.
 Originally Posted by Couin
The goal is having for exeample "myapp.ocx" and that's all
Thanks

What's the big problem in having a few ocx files and not only one? It is more or less the same.
-
Apr 20th, 2024, 10:21 AM
#5
Thread Starter
Hyperactive Member
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
Hi friends
Thanks for answer.
At least, it's clear lol
The goal was just to get 1 files instead of 7, that's why I was talking about minor question 
I have not the source of all controls (I have just 2 of 7 lol).
So I will keep like I did.
@wqweto: whet do you mean about the your manifest ?
Mine is like that :
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<!-- Make My Manifest 0.12.308 -->
<assemblyIdentity name="MyApp.exe" processorArchitecture="X86" type="win32" version="1.0.0.0" />
<file name="comdlg32.ocx">
<typelib tlbid="{F9043C88-F6F2-101A-A3C9-08002B2F49FB}" version="1.2" flags="control" helpdir="" />
<comClass clsid="{F9043C85-F6F2-101A-A3C9-08002B2F49FB}" tlbid="{F9043C88-F6F2-101A-A3C9-08002B2F49FB}" threadingModel="Apartment" progid="MSComDlg.CommonDialog.1" description="Microsoft Common Dialog Control 6.0 (SP6)" />
</file>
<file name="MSCOMCT2.OCX">
<typelib tlbid="{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}" version="2.0" flags="control" helpdir="" />
<comClass clsid="{603C7E80-87C2-11D1-8BE3-0000F8754DA1}" tlbid="{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}" threadingModel="Apartment" progid="MSComCtl2.UpDown.2" description="UpDown Control" />
</file>
...
</assembly>
-
Apr 20th, 2024, 11:54 AM
#6
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
Put a subfolder in your manifest then all looks suddenly cleaner.
E.g.
Code:
<file name="Dependencies\comdlg32.ocx">
Last edited by Krool; Apr 20th, 2024 at 12:02 PM.
-
Apr 20th, 2024, 12:14 PM
#7
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
wqweto,
Interesting!
Never used the MiscStatus* attributes and never found something odd in the usage of my ocx'es. I use them always via manifest.
What is it really about?
I found this upon google.
The 'miscStatus*' is a multi-valued attribute of the <comClass> element Manifest Maker fully supports this attribute and writes them to the manifest, if the ActiveX puts them in its own registration. Manifests with this attribute will be rejected on Windows XP prior to SP2 (or SP1+843524). Applications will fail with message:
This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem
EDIT: Anyhow. I updated the manifest for VBCCR17.OCX and VBFLXGRD17.OCX using your UMMM. Thanks
Last edited by Krool; Apr 20th, 2024 at 01:09 PM.
-
Apr 20th, 2024, 01:26 PM
#8
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
These attributes are "shadowing" the same named entries (bitmasks) from user-control's registration in registry. Not sure exactly how these are used by control containers, obviously each one can heed the flags (e.g. MFC/ATL, VB6) or totally ignore their values (e.g. MS Access). Seems some old OLE era stuff, most probably unused or under-used (one flag only), enough to prevent your user control from getting focus with mouse click on VB6 forms for instance or other obscure misbehavior.
cheers,
</wqw>
-
Apr 20th, 2024, 01:37 PM
#9
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
Some hosts, such as MS Access use the value given at runtime from IOleObject::GetMiscStatus (https://learn.microsoft.com/en-us/wi...-getmiscstatus), rather than the value stored in the registry.
-
Apr 21st, 2024, 10:00 AM
#10
Lively Member
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
Enigma Virtual Box will help you!
-
Apr 24th, 2024, 09:11 PM
#11
Thread Starter
Hyperactive Member
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
 Originally Posted by Krool
Put a subfolder in your manifest then all looks suddenly cleaner.
E.g.
Code:
<file name="Dependencies\comdlg32.ocx">
Hi Krool,
This if effectivly what I did 
 Originally Posted by TomCatChina
Enigma Virtual Box will help you!
Hi TomCatChina,
Thanks for the tip. I testyed and looks embeding well files I want, but too bad, the ouput exe is detected as HEUR/APC virus by Avira
Tested with another exe (without any relation with App I work) where I added just one font file (wingding.ttf), same thing 
Without adding fil to original exe, he output exe looks not seen as virus.
I know it's false positive, but I wouldn't have to ask to a lot of users allow the file in theuir AV software.
-
Apr 25th, 2024, 01:57 AM
#12
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
You do realize that Avira is pretty "bottom of the barrel" when it comes to antivirus software...
-
Apr 25th, 2024, 05:40 AM
#13
Lively Member
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
 Originally Posted by Couin
Hi TomCatChina,
Thanks for the tip. I testyed and looks embeding well files I want, but too bad, the ouput exe is detected as HEUR/APC virus by Avira
Tested with another exe (without any relation with App I work) where I added just one font file (wingding.ttf), same thing
Without adding fil to original exe, he output exe looks not seen as virus.
I know it's false positive, but I wouldn't have to ask to a lot of users allow the file in theuir AV software.
Sorry, unfortunately the fact that packaged software and virus programs use the same API hijacking techniques makes it difficult to distinguish between them, and perhaps this way of working is not suitable for commercial software environments.
-
Apr 25th, 2024, 10:08 AM
#14
Thread Starter
Hyperactive Member
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
 Originally Posted by VanGoghGaming
You do realize that Avira is pretty "bottom of the barrel" when it comes to antivirus software...
Unfortunately, it's not the only one I already notice false positiv with some others A
If the software was just for me, it's not a problem to autorize the exe, but a lot of people won't know how to do, and it would also alter the trust of users for this software 
 Originally Posted by TomCatChina
Sorry, unfortunately the fact that packaged software and virus programs use the same API hijacking techniques makes it difficult to distinguish between them, and perhaps this way of working is not suitable for commercial software environments. 
It's too bad, I tried with other exe files, and each has been seen as infected (false positive). With some digging on the forum it looks that is not only avira, they recommend to sent the app to AV editor so they fix it... Not possible for me to test all AV and send them each time I build a version, would takes too much time
-
Apr 25th, 2024, 10:45 AM
#15
Lively Member
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
Actually by using manifest , you can reduce the OCX files to 0. Save all the OCX files as resources in the exe file, your software project will have only one exe file, and then use the resource data to generate the ocx files on the hard disk in Sub main! The end user doesn't need to care if these ocx exist or not.
-
Apr 25th, 2024, 02:47 PM
#16
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
 Originally Posted by TomCatChina
Save all the OCX files as resources in the exe file, your software project will have only one exe file
His Avira would explode if he did that!
-
Apr 25th, 2024, 03:29 PM
#17
Lively Member
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
 Originally Posted by VanGoghGaming
His Avira would explode if he did that! 
This is possible, The AI era has arrived!
-
Apr 26th, 2024, 09:14 AM
#18
Thread Starter
Hyperactive Member
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
-
Apr 26th, 2024, 10:58 AM
#19
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
 Originally Posted by Couin
In simple steps:
Make a folder for all the ocx and dll. I myself call it "Bin".
Make a manifest (embed in the exe) and perform a SxS installation.
The above means that the ocx and dll does not need to be registered in Windows.
Use an installer program. I use Inno Setup. Configure it to create the folder and to copy the ocx and dll files (remember: without registering).
About fonts: they need to be registered.
Otherwise you need to install them privately for your program every time it runs.
-
Apr 26th, 2024, 11:39 AM
#20
Thread Starter
Hyperactive Member
-
Apr 26th, 2024, 11:52 AM
#21
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
 Originally Posted by Couin
About fonts, I found to run the app with fonts without having to register them (I join a small exemple, based on an existing project I found I don't no longer where  ).
Yes, it install them privately.
 Originally Posted by Eduardo-
Otherwise you need to install them privately for your program every time it runs.
-
Apr 26th, 2024, 12:03 PM
#22
Thread Starter
Hyperactive Member
Re: Merge several OCX files ? (or extract them to get ctl/ctx and recompile another O
Yes, nothing is installed on the OS
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|