exe doesn't work

Hi,

Think I got a serious issue.... I made a win32 app (in xe2, windows7) and installed the exe on a xp.
Immediately it stops working...
Is there something extra needed on the box before it is working?
Any help is welcome
Geert

Oh, and I'm sure it has something to do with the ATDiagram. I just created a new app with only an atdiagram on it

Geert

Now this is plain weird. I just made a same app in delphi 2007 (with virtual box xp). When installing on the box, this one works.

Ok, how to get it working from my compilation of xe2?

This is the error message: Exception EInvalidPointer in module ... at 00005065

Invalid pointer operation

I don't see this problem here. I just compiled the Diagram simple demo in XE2, it runs in both Windows 7 and XP.

Remember XP doesn't have Direct2D, maybe you are forcing your application to use it?

to be clear, this is what I did...

Create new vcl form application and put an Tatdiagram on it.
Compile...That's it.
Working when compiling it with delphi 2007 - XP
Does not work when compiling it with delphi xe2 - win7
Is there something that is different in compilation between two delphi versions?
Geert

I did the same test here, same results - everything works fine. My guess is it might be something wrong with your XP machine. Do you have another one that you could try? In Diagram Studio, we have this piece of code:

 
  if TDirect2DCanvas.Supported then
    result := dglDirect2D
 
can you maybe check if in your XP application a call to TDirect2DCanvas.Supported returns true or false?
Alternatively, in the OnCreate even of your form, try using different graphic libraries to see if any works:
 
atDiagram1.GraphicLib := dglGDIPlus;
or
atDiagram1.GraphicLib := dglGDI;
 
 

Direct2d not supported!

That's the problem. Now how to solve this? Just disabling the ifdef line?
Geert

That is not the problem. It's expected that Direct2D is not supported in XP. That's the reason of the line, so that if it's not supported (XP) it uses a different library. Have you checked my other suggestions (test a different XP, use dglGDI as graphic library

yes, doesn't work

xp machine is at the client. I tested it at 2 different xp machines with same result, it hangs

Geert

I'm running out of ideas, it just works here. Maybe you could send me your exe so I can try to run it here?

Can you just try building a direct2d application without diagram and see if it works also?

sure thing, I will send it to the support, but it works on my windows 7 not on xp (3 machines now)

Hi,

I found out where the problem is... I installed XE2 on the machine and its giving me an error when initializing the printer:
FprinterIndex := IndexOf(DefaultPrinterName);

The actual error is in the defaultprintername function where the copy(defprintername,...) isn't working
Will send out a mail to support as well
Geert

I sent you a patch through e-mail