Funny you should mention that!!

I am just looking at DeviceCapabilties now (one of the reasons for asking
the PChar question) and I found that for some reason, sometimes the
DeviceCapabilties function fails (i.e. returns -1). If you call it again
after failing (which should be fine from what I can tell) in Delphi you go
straight to the CPU window (it doesn't crash (usually, i.e. sometimes it
does), just goes to the CPU window)..

I have now found that what I was trying to do has already been done by
Report Builder (which we use), so I just use their functions... haven't
looked into it... but when returning info about a printer... for the ones
that my code returns a -1 for, the Report Builder code works but it just
takes a second or 2 longer... interesting... (off the topic of PChars
though... sorry!)

Regards
Colin



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Jason L. Coley
Sent: Monday, 9 October 2000 3:56 pm
To: Multiple recipients of list delphi
Subject: RE: RE: Re: RE: [DUG]: Creating PChars


I'd love to know exactly what the problem was, so i could say, hey get
this ***.dll and fix their problems that way. The code that generally
gave the errors was when using DeviceCapabilities to find printer Info,
maybe it was just bad print drivers (this of course would not be
un-common)?

-----Original Message-----
From: Carl Reynolds [mailto:[EMAIL PROTECTED]]
Sent: Monday, 9 October 2000 4:47 p.m.
To: Multiple recipients of list delphi
Subject: RE: Re: RE: [DUG]: Creating PChars


Yes, well GetMem is a very fundamental procedure.  I mean, the VCL is
full
of calls to GetMem - Delphi would really fall apart without it (no
dynamic
array usage would be safe, for example).  Obviously you have to watch
your
step when using it, but if I'd had the number of problems that (I infer)
you've had with it, then I'd suspect that that there was a corrupt
version
of borlandmm.dll being propagated around.  Might that be a possibility?

Cheers,
Carl

>From: Jason L. Coley [mailto:[EMAIL PROTECTED]]
>Well I guess you have me there, although i'd like to know exactly why a
>procedure will die on one machine and not another, when both machines
>supposedly have the same operating system fixes etc?
>And the culprit is always the GetMem and FreeMem. What else are you
>supposed to do other than simply not use the commands. 
>Why have an application generate errors using a supposedly straight
>forward procedure like Getmem, if you can avoid it?
------------------------------------------------------------------------
---
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

######################################################################
Attention:
The information in this email and in any attachments is confidential.  
If you are not the intended recipient then please do not distribute, 
copy or use this information. Please notify us immediately by return 
email and then delete the message from your computer.
Any views or opinions presented are solely those of the author.
######################################################################

winmail.dat

Reply via email to