|
|
Printing Device
Hi,
The printing device class
CLASS PrintingDevice INHERIT VObject
PROTECT cDriver AS STRING
PROTECT cDevice AS STRING
PROTECT cPort AS STRING
PROTECT hPrinter AS PTR
PROTECT pDevMode AS _winDEVMODE
PROTECT lValid AS LOGIC
PROTECT iSize AS INT
//PP-030828 Strong typing
DECLARE METHOD __FillDevMode
uses
_winDEVMODE
STRUCT _WINDEVMODE ALIGN 1
MEMBER DIM dmDeviceName[CCHDEVICENAME] AS BYTE
MEMBER dmSpecVersion AS WORD
.
..
..
..
which uses a define CCHDEVICENAME that is 30 ch. I need it to be 50. What do
I need to do?
This is in GUI and does not allow me to change it.
Thanks,
Vaishali
|
|
0
|
|
|
|
Reply
|
Vaishali
|
3/25/2011 4:06:28 AM |
|
Vaishali
> which uses a define CCHDEVICENAME that is 30 ch. I need it to be 50. What
> do I need to do?
1: Re-define it. // Comment the original, may not work if it's part of a
structure where memory allocation is hard coded<g>
2: Only use the first 30 characters when selecting a printer
3: Use a shorter printer name
4: Ask yourself why a printer name needs to be that long
I recommend #3 & #4 above.
CYA
Steve
|
|
0
|
|
|
|
Reply
|
Stephen
|
3/25/2011 4:49:44 AM
|
|
Vaishali.
You can't, you shouldn't and you don't. This is a published API
structure and it isn't for you to go changing it. If you added a few
bytes to the structure for the name then all the other bytes following
it would be in the wrong spot. That is the whole point of a structure. A
predictable byte pattern in memory.
But you don't need to.
Just consult the first 30 chars.
In any event you should be using my printer enumeration classes that you
have now in your source code libraries. They are capable of dealing with
the full printer name.
Geoff
"Vaishali Kedar" <vaishali.kedar@gordynpalmer.com.au> wrote in message
news:4d8c14c7$1@dnews.tpgi.com.au:
> Hi,
>
> The printing device class
>
> CLASS PrintingDevice INHERIT VObject
> PROTECT cDriver AS STRING
> PROTECT cDevice AS STRING
> PROTECT cPort AS STRING
> PROTECT hPrinter AS PTR
> PROTECT pDevMode AS _winDEVMODE
> PROTECT lValid AS LOGIC
> PROTECT iSize AS INT
>
> //PP-030828 Strong typing
> DECLARE METHOD __FillDevMode
>
> uses
>
> _winDEVMODE
>
> STRUCT _WINDEVMODE ALIGN 1
> MEMBER DIM dmDeviceName[CCHDEVICENAME] AS BYTE
> MEMBER dmSpecVersion AS WORD
> .
> .
> .
> .
> which uses a define CCHDEVICENAME that is 30 ch. I need it to be 50. What do
> I need to do?
>
> This is in GUI and does not allow me to change it.
>
> Thanks,
> Vaishali
|
|
0
|
|
|
|
Reply
|
Geoff
|
3/26/2011 12:07:34 AM
|
|
Vaishali
Its also why you cannot have a PDF file name longer than 30 characters
created programatically by Ghost Script.
Richard
|
|
0
|
|
|
|
Reply
|
richard
|
3/26/2011 4:20:57 PM
|
|
|
3 Replies
135 Views
(page loaded in 0.075 seconds)
|
|
|
|
|
|
|
|
|