In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Processmessages causes error

Xailer English public forum
Responder
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

Processmessages causes error

Mensaje por Ingo Junge-Herrmann »

Hi all,
my apps built with Xailer 3.20 shows errors on Windows 10 in debug mode when Processmessages() is calling. They cöme from Xailers code because I don't call Processmessages in my Code. The app keeps still running.

Here some error messages shown in the debug-window:

windows\dwm\dwmapi\attribute.cpp(92)\dwmapi.dll!72CA3CF4: (caller: 72CF90ED) ReturnHr(11) tid(1708) 80070006 Das Handle ist ungültig.
internal\onecorecom\inc\combase\comcataloghelpers.hpp(64)\OLE32.DLL!76DA0DC1: (caller: 76E038CB) ReturnHr(1) tid(1708) 80040154 Klasse nicht registriert
com\ole32\ole232\stdimpl\olereg.cpp(750)\OLE32.DLL!76E0399C: (caller: 76DDE35E) ReturnHr(2) tid(1708) 80040154 Klasse nicht registriert

Is there a Workaround or a newer version of this function?

Regards
Ingo
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

Re: Processmessages causes error

Mensaje por Ingo Junge-Herrmann »

Hi Xailer team,
I tested it now with Xailer 5.12 (Demo). The same error Messages on Windows 10 32 bit and 64 bit. See my post before.
On Windows 7 aren't no error Messages.
It seems to be a Windows 10 Problem.

Can you fix it?

Regards

Ingo
Avatar de Usuario
Hurricane
Mensajes: 262
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

Re: Processmessages causes error

Mensaje por Hurricane »

hi Ingo,
1) Are you using OLE*, OCX** or DLL? Describe the purpose and make sure it is compatible with Windows 10 (32 or 64).
2) what is the executed code that generates the error?
3) Run your application, but first:
- close any open application
- Disable antivirus
- Run as administrator
What is the result?

Note: (* What is the string?) (** Is it registered in Windows?)
Ingo Junge-Herrmann escribió: my apps built with Xailer 3.20 shows errors on Windows 10 in debug mode when Processmessages() is calling. They cöme from Xailers code because I don't call Processmessages in my Code. The app keeps still running.

Here some error messages shown in the debug-window:

windows\dwm\dwmapi\attribute.cpp(92)\dwmapi.dll!72CA3CF4: (caller: 72CF90ED) ReturnHr(11) tid(1708) 80070006 Das Handle ist ungültig.
internal\onecorecom\inc\combase\comcataloghelpers.hpp(64)\OLE32.DLL!76DA0DC1: (caller: 76E038CB) ReturnHr(1) tid(1708) 80040154 Klasse nicht registriert
com\ole32\ole232\stdimpl\olereg.cpp(750)\OLE32.DLL!76E0399C: (caller: 76DDE35E) ReturnHr(2) tid(1708) 80040154 Klasse nicht registriert
Developments | Trainings | Projects
Site | E-mail | Messenger | YouTube
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

Re: Processmessages causes error

Mensaje por Ingo Junge-Herrmann »

Hurrycane,

yes I'm using Ocx as ActiveX and WORD and Outlook as OleObjects with the functions "CreatObject" or "GetActiveObject" of Xailer's WinOle.prg.
I deactivated the ProcessMessages-Calls in my Code. The errors still exist.
It's curious I have no errors if runnig the App in debug-mode on Windows 7.

Now I'm debugging the code step by step hopeing find all the causes.

Nevertheless thanx for your reply.
Regards
Ingo
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

Re: Processmessages causes error

Mensaje por Ingo Junge-Herrmann »

Hurricane,
I'm using a modified class TForm.

The line RETURN ::Super:Create( oParent ) causes the error

windows\dwm\dwmapi\attribute.cpp(92)\dwmapi.dll!73003CF4: (caller: 73064839) ReturnHr(1) tid(242c) 80070006 Das Handle ist ungültig.

Here the Code of the class

CLASS TForm FROM XForm
DATA cName INIT NIL
METHOD SaveIni()
METHOD RestIni()
METHOD WMKeyDown( nKey, nFlags )
METHOD Create( oParent )
ENDCLASS

//--------------------------------------------------------------------------

METHOD Create( oParent ) CLASS TForm
::nClrPane := 0xFDECE8
::nClrPaneEnd := 0xFFC6C6
::nGradient := grVERTICAL
RETURN ::Super:Create( oParent ) <----- this line causes the error

//------------------------------------------------------------------------------

METHOD SaveIni(lMinimize) CLASS TForm
LOCAL c
DEFAULT ::cName TO ::cText, lMinimize TO .F.
IF !EMPTY(::cName)
c:=::SaveState()
IF lMinimize .OR. !UPPER(RIGHT(c,1))=="M"
SetEntry("WINDOWS33",::cName,c)
ENDIF
ENDIF
RETURN NIL

//------------------------------------------------------------------------------

METHOD RestIni(lNoMinimize) CLASS TForm
local cState:=""
local cLast
local cLeft,cTop,cHW,cR
IF !EMPTY(::cName)
IF !EMPTY(cState:=GetEntry("WINDOWS33",::cName,""))
IF IsLower(cLast := RIGHT(cState,1))
cState := Substr(cState,1,LEN(cState)-1)+UPPER(cLast)
ENDIF
::RestoreState(cState)
ENDIF
ENDIF
RETURN NIL

//--------------------------------------------------------------------------

METHOD WMKeyDown( nKey, nFlags ) CLASS TForm
LOCAL uRet
IF ( uRet := ::OnKeyDown( nKey, nFlags ) ) != Nil
RETURN uRet
ENDIF

IF nKey == VK_F12

WITH OBJECT oCapture := TCaptureBitmap():New(self)
:Capture( )
:Hardcopy( .T.,::cText, .T.)
END
RETURN 0
ENDIF

RETURN ::Super:WMKeyDown( nKey, nFlags )

Any idea?

Regards

Ingo
Avatar de Usuario
Hurricane
Mensajes: 262
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

Re: Processmessages causes error

Mensaje por Hurricane »

hi Ingo,

What is the string to start with OLE?
What version of the application (communicated via OLE) in Windows 7 and Windows 10? Example: Microsoft Word 2007 (Win7) and Microsoft Word 2016 (Win10)

The ideal is to always create a small example simulating the problem.
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

Re: Processmessages causes error

Mensaje por Ingo Junge-Herrmann »

Hi Hurricane,

Office versions are 32-bit 2007 and 2010
the calls are
CreateObject( "Word.Application" )
CreateObject( "Outlook.Application" )

Both calls doesn't cause any error.

The error messages are only on Windows 10. On Windows 7 no error occures.
Therefore I think this have only to do with Windows 10 and 64-bit machines.

Don't worry I can live with it. The doesn't crash.

Nevertheless many thanks.
Regards
Ingo
Avatar de Usuario
Hurricane
Mensajes: 262
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

Re: Processmessages causes error

Mensaje por Hurricane »

What is the version and edition of your Windows 10? Example 1607 and PRO
Have you tried on another computer with Windows 10 (with different version)? Surely you need to install the Xailer Demo

I found topics from programmers from another programming language, with problem similar to you in Windows 10.
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

Re: Processmessages causes error

Mensaje por Ingo Junge-Herrmann »

the Windows 10 Version on both machines is 1803 (Build 17134,112).

Hurricane I also read the posts of other developers. It's obviously a Windows 10 problem. Microsoft itself is silent.
Despite the error messages in IDE debug mode my app is still running fine.

Regards
Ingo
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5706
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Re: Processmessages causes error

Mensaje por jfgimenez »

Ingo,

those messages are not errors nor warnings from Xailer itself. They usually are messages from the windows' developers that have been left there, instead of remove them.

When Xailer executes a program, it is run in debugger mode, therefore it captures every message sent with OutputDebugString() from any piece of software that runs in the same process. Those pieces of software can be any driver (printer, video, ...), any dll attached to the program, and of course... windows itself. And that is the problem. Windows' developers have left many many messages there, along all windows code. The newer windows version, the more messages there are.

It's like if you left a lot of LogDebug() or OutputDebugString() in your program. If the user runs your program alone, all goes fine. But if the user runs your program from a debugger, he will see all those messages. And if you never delete those calls, then the user will see more and more messages in every new release of your program.

However, Xailer 5.1 has a button in the debugger window to filter out those messages. When it's pushed, only messages sent from your program and from Xailer are shown. Every other message is hidden.
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Responder