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
Ingo Junge-Herrmann
Posts: 335
Joined: Mon Jul 02, 2007 7:17 pm

Processmessages causes error

Postby Ingo Junge-Herrmann » Tue Jun 26, 2018 5:29 am

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
Posts: 335
Joined: Mon Jul 02, 2007 7:17 pm

Re: Processmessages causes error

Postby Ingo Junge-Herrmann » Tue Jun 26, 2018 7:49 am

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
User avatar
Hurricane
Posts: 90
Joined: Tue Mar 24, 2015 10:21 am
Location: Brasil
Contact:

Re: Processmessages causes error

Postby Hurricane » Tue Jun 26, 2018 4:36 pm

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 wrote: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
{Delphi, Lazarus, PHP}, ADVPL, SQL, FastReport
Xailer, Fivewin, Hwgui, Minigui, Harbour, Clipper, Corebuilder
Contact: Freelance, Training | Facebook Xailer | Projects
Ingo Junge-Herrmann
Posts: 335
Joined: Mon Jul 02, 2007 7:17 pm

Re: Processmessages causes error

Postby Ingo Junge-Herrmann » Wed Jun 27, 2018 8:47 am

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
Posts: 335
Joined: Mon Jul 02, 2007 7:17 pm

Re: Processmessages causes error

Postby Ingo Junge-Herrmann » Wed Jun 27, 2018 9:54 am

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
User avatar
Hurricane
Posts: 90
Joined: Tue Mar 24, 2015 10:21 am
Location: Brasil
Contact:

Re: Processmessages causes error

Postby Hurricane » Wed Jun 27, 2018 7:35 pm

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
Posts: 335
Joined: Mon Jul 02, 2007 7:17 pm

Re: Processmessages causes error

Postby Ingo Junge-Herrmann » Thu Jun 28, 2018 12:37 pm

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
User avatar
Hurricane
Posts: 90
Joined: Tue Mar 24, 2015 10:21 am
Location: Brasil
Contact:

Re: Processmessages causes error

Postby Hurricane » Fri Jun 29, 2018 6:00 pm

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
Posts: 335
Joined: Mon Jul 02, 2007 7:17 pm

Re: Processmessages causes error

Postby Ingo Junge-Herrmann » Sat Jun 30, 2018 4:57 pm

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
User avatar
jfgimenez
Site Admin
Posts: 5569
Joined: Mon Apr 06, 2015 8:48 pm
Contact:

Re: Processmessages causes error

Postby jfgimenez » Sun Jul 01, 2018 8:51 pm

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

Return to “English”

cron