CreateWindowEx fails with error 1407 CLASS_NOT_REGISTERED for the second instance of ActiveX - activex

Hi
I'm working on some legacy code - ATL ActiveX used as "installer" downloads files from the server for later installation.
There is a "progress bar window" that works fine.
The problem is when I start another instance of the ActiveX in the same process (Windows XP IE7), the progress bar is not installed for the second instance.
::CreateWindowEx(0L, PROGRESS_CLASS, EMPTY_STRING, WS_CHILD | WS_VISIBLE, X, (2*Y)-m_nProgHeight, nWidth - 2*X, m_nProgHeight, m_hWnd, NULL, _Module.GetModuleInstance(), NULL);
So I'm getting error 1407 CLASS_NOT_REGISTERED.
The only place where I find some code related to the registration is in DLLMain (this is also my concern)) For attach case:
WNDCLASS wc;
memset(&wc,0,sizeof(wc));
::GetClassInfo(hInstance, "#32770", &wc);
wc.lpszClassName = "XXXXXWindow";
RegisterClass(&wc);
Thank you

OK, what I found is:
- When IE started it loads two comctl32.dll - version 5.xxx and version 6.xxxxx.
Some how after the first instance of activeX finished it's run (deployment) I see that only version 6.xxxx of comctl32.dll left loaded.
Adding InitCommonControlsEx() did not helped, since for the second run the dll was already unloaded, that actually caused the crash of IE.
When I added explicitly LoadLibrary(comctl32.dll) it solved the issue.
If anyone knows what could cause the unload of version 5.xxxx please comment here.
Thank you.

Related

Rejecting re-init on previously failed class error when loading a Class with dalvikvm

I am trying to use Terminal IDE on Lollipop 5.1.1. Using a Samsung E7 device, a mod version of Terminal IDE is provided by someone on XDA
here:
http://forum.xda-developers.com/showthread.php?t=1340852&page=7
I tried to use javac script in that mod but it gave an unsatisfied link error, saying that:
$ javac
java.lang.UnsatisfiedLinkError: org.apache.harmony.security.fortress.Services
at org.apache.harmony.security.fortress.Engine.getServices(Engine.java:158)
at org.apache.harmony.security.fortress.Engine.getInstance(Engine.java:137)
at java.security.cert.CertificateFactory.getInstance(CertificateFactory.java:90)
at
org.apache.harmony.security.utils.JarUtils.verifySignature(JarUtils.java:83)
at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:294)
at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:268)
at java.util.jar.JarFile.getInputStream(JarFile.java:380)
at libcore.net.url.JarURLConnectionImpl.getInputStream(JarURLConnectionImpl.java:222)
at java.net.URL.openStream(URL.java:470)
at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:444)
at java.util.ResourceBundle.handleGetBundle(ResourceBundle.java:515)
at java.util.ResourceBundle.handleGetBundle(ResourceBundle.java:542)
at java.util.ResourceBundle.handleGetBundle(ResourceBundle.java:542)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:228)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:139)
at com.sun.tools.javac.main.JavaCompiler.version(JavaCompiler.java:112)
at com.sun.tools.javac.main.JavaCompiler.version(JavaCompiler.java:97)
at com.sun.tools.javac.main.Main.bugMessage(Main.java:434)
at com.sun.tools.javac.main.Main.compile(Main.java:421)
at com.sun.tools.javac.main.Main.compile(Main.java:308)
at com.sun.tools.javac.main.Main.compile(Main.java:299)
at com.sun.tools.javac.Main.compile(Main.java:82)
at com.spartacusrex.spartacuside.external.javac.main(javac.java:13)
$
It is strange that there is a UnsatisfiedLinkError , because it doesn't say that VM cannot find xyz.so library or cannot find xyz method.
I tried using logcat command right after using Terminal IDE's javac script on Device, the odd thing I found from there is :
I/art ( 6558) : rejecting re-init on previously-failed class java.lang.Class<org.apache.harmony.security.fortress.Services>
I couldn't understand why this happened,
The javac script uses android's dalvikvm command to load
com.spartacusrex.spartacuside.external.javac
class. People have faced this rejecting re-init issue on sdk version 20+ but it's not clear to me why this info message uccurs and how to solve it.
I copied /system/lib/libjavacrypto.so to Terminal IDE's ~/system/lib folder and now javac and dx tools are working.
It seems like Google messed up with things in /system/lib which resulted in errors.
Answering so someone else might find it useful.

123 ERROR_INVALID_NAME after activate Wave audio liverecorder

I am using the wave audio component in my project and I run into a problem that I am unable to resolve.
I am using Delphi XE 5 and my operating system is Windows 8. When I am trying to the run the project and active the liveaudio recorder on Windows 7, I got this: error Exception EOSError in module Chatproject.exe at 00029633. System Error. Code: 123. The filename, directory name, or volume label syntax is incorrect. But its working normal on Windows 8,. I tried to debug and figure out the problem I got this error message when I am activating the recorder
Update of the question :
i debugged each of sendtocl , sendbuffer ,buffer^, buffersize and here is result in the image ,, but i have no idea how to fix sendbuffer and buffer^ and sendtocl
http://i.stack.imgur.com/5sZ05.jpg
You have four references to sendtocl:
#56: sendtocl: TIdUDPClient;
#235: if sendtocl.active then
#236: sendtocl.SendBuffer(RawToBytes(Buffer^, Buffersize))
#260: sendtocl.Broadcast(usertype.Text, 12000);
It should be getting created when the form is created, assuming it's a component dropped on the form. But for whatever reason, it isn't instantiated at some point.
This is consistent with the exception message you're getting.
The ERROR_INVALID_NAME is probably pointing to an invalid URI, path, or filename -- it's entirely possible that it's valid in Win 8 but not Win 7. So when you try to invoke .Active, it fails. But why sendtocl woudl be set to NIL doesn't make sense. Mabye the exception is on the SendBuffer method?
As Ken suggests, you just need to go in with the debugger and figure out what's going on. I'm not sure there's much more us "out here" can do for you other than comment on how the code appears.

Emacs css-mode not loading

I'm not sure why, but on my Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.8.4) css-mode is not loading and with M-x css-mode gives this error in Messages:
Symbol's function definition is void: apropos-macrop
or
File mode specification error: (void-function apropos-macrop)
my css file (ending in .css) is in Fundamental. I just tried it on a 23.1.1 and CSS mode comes up and works fine.
Update: Traced problem to my autoloads. i.e., comment out autoloads
;(load "~/modes/autoloads" 'install)
and the problem goes away. I'm not sure what to hack with an autoloads file. Any way to "step" through an autoloads? Here's my autoloads: http://gmcongo.org/temp/autoloads
In Emacs 24.4 and the bleeding edge versions leading to it (like 24.3.50+), apropos-macrop has been replaced by macrop. In css-mode.el, replace the call to apropos-macrop with a call to macrop and the error goes away.
Building upon the existing correct answer, you can create an alias in your ~/.emacs instead of editing css-mode (if for example, it came in a package with your distribution):
;; For css-mode, temporarily.
(defalias 'apropos-macrop 'macrop)

jcvl not working due to jcl requirements

I am trying to manually install JCL and jvcl for delphi xe2.
I have installed JCL as directed and it seems to have installed with no issues.
Now I try to load the JVCL package 16 , it opens delphi and starts to load libarys, When it gets to the Jedi code Library MPL1.1 i start to get errors like below
Error reading form frmJucolorProviderDesigner
-class tjvcontextprovider not found
Ingnore Cancel Ingnore all
this is not the only one i get quite a few ill post a few more in case it helps
Error reading form JvStandardActions
-tjvSendMailAction not found
-tjvwebaction not found
Error reading form jvCheckItemsEditor
-tjvCheckListBox not found
Error reading form JvControlActoinsDM
-tjvControlcollapseAction not found
-TjvControlexpandAction not found
-TjvControlExportAction not found
-tjvControlOptimizeColumnsAction not found
-TjvControlCustomizeColumnsAction not found
-TjvControlPrintAction not found
Error reading form jvSpeedBarEditorMain
-jvFormStorage not found
-AppRegistryStorage not found
ect... I can add rest if you need.
But each - is its own dialog box with [ignore][cancel][ignore all]
Now after I press Ignore 50 times it will finally load the project, when i try to build all the projects for JVCl package it says required package jcl not found.
in library path i have
..jcl\source\common
..jcl\source\windows
..jcl\source\include
in browsing path i have
..jcl\source\common
..jcl\source\vcl
..jcl\source\windows
and in DCU debug path i have
..jcl\lib\d16\win32\debug
after adding
..jcl\lib\d16\win32, which contains the 32 bit jcl.dcp
The solution is to change the uses to use a fully qualified name:
uses
TypInfo,
{$IFDEF JvInterpreter_OLEAUTO}
OleConst, ActiveX,
{$IFDEF VER230} system.win.ComObj, {$ELSE} ComObj, {$ENDIF}
Now it compiles without error.
Try to add the following to your Search Path(HKCU\Software\Embarcadero\BDS\x.x\Library\Win32), of course including the correct path prefix:
..jcl\source;
..jcl\source\common;
..jcl\source\include;
..jcl\source\vcl;
..jcl\source\windows;
..jvcl\common;
..jvcl\run;
You might also be interested in the following link:
http://andy.jgknet.de/blog/2013/05/how-to-install-jcl-and-jvcl-for-xe4/

TIdHash128 Missing From Delphi XE3?

I am having a problem with Delphi XE3's Indy10. I cannot locate the class TIdHash128.
Indy's documentation states this should be found in IdHash.pas but this is not the case on my PC. Oddly enough the comment at the top of IdHash.pas reads "Rev 1.10 7/24/04 12:54:32 PM RLebeau Compiler fix for TIdHash128.HashValue()" despite having no definition for TIdHash128 in the file. I have also done a search through the source files but no TIdHash128 was found.
Is this supposed to be missing from XE3's version of Indy10?

Resources