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
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.
> 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.
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.
"Vaishali Kedar" <firstname.lastname@example.org> wrote in message
> 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
> 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.