LightScribe/LabelFlash support identification

vbimport

#1

Hi,

Do anybody know how to identify if CD/DVD-Writer supports LightScribe and/or LabelFlash ?

Oleg.


#2

[QUOTE=olegto;2080018]Hi,

Do anybody know how to identify if CD/DVD-Writer supports LightScribe and/or LabelFlash ?

Oleg.[/QUOTE]:slight_smile: Looking up the specification in the catalog or manufacturer’s website? :slight_smile:

Ops, I think you mean programmatically, hmm correct me if I’m wrong, but unfortunately those are custom commands. :frowning:


#3

Yes, I need identify LightScribe/LabelFlash support from my programm (C/C++ Win32).


#4

Programs like Everest, Astra32, PC Wizard 2008 shows this information. One of the possibility is to make a database with device and it’s capability, but it is to hard to make. I think Everest use this but others … no.


#5

[QUOTE=olegto;2080018]
Do anybody know how to identify if CD/DVD-Writer supports LightScribe and/or LabelFlash ?
[/QUOTE]

I guess you can forget Labelflash. It looks for me like it will vanish sooner or later from the market. Here in Germany it is hard to find Labelflash media. Only Fuji offers Labelflash Media. Lightscribe is available from different companies / brands.

You could chekc the Lightscribe API if there is a function to check if the current drive supports LS. for example if you have a LS capable drive but the LS host software is not installed you cant use it. Therefore I’d check the Lightscribe COM API. It should be published at Lightscribe.com.


#6

[B]Labelflash[/B]
I send email to Yamaha, I asked about SDK or somthing, replay:

[I]Dear Oleg[/I]

[I]Sorry, we have no SDK for Labelflash.[/I]

[I]Thank you.[/I]
[I]Labelflash Licensing/ Yamaha Japan[/I]

I send another email them with questin is there any way to get it ? :slight_smile:

[B]LightScribe[/B]
There is 3 functions in SDK:
LSPRINTLAUNCHER_EXPORT int launchPrintOptions(const wchar_t* options);
LSPRINTLAUNCHER_EXPORT int launchPrint(const wchar_t* options);
[I][U]LSPRINTLAUNCHER_EXPORT bool haveLSDrive();[/U][/I]

[I]/** Function to check whether there is a LightScribe drive in the PC

  • Returns true if there is one or more LightScribe enabled drives, false otherwise. */[/I]

The last one is what i need, BUT this is a stupidest way i have seen.
Whay i can’t quary exact drive ? Stupid HP DAs.


#7

The LSCAPI.DLL is a COM interface. You can check if this may help you more: The other DLLs in the Lightscribe setup directory seems to be dependend of each other or have C++ exports and are not easy usable.

[I]// Generated .IDL file (by the OLE/COM Object Viewer)
//
// typelib filename: LSCAPI.dll

[
uuid(411B3D71-D252-41B0-8235-800DF3DEF1FF),
version(1.0),
helpstring(“LSCAPI 1.0 Type Library”),
custom(DE77BA64-517C-11D1-A2DA-0000F8773CE9, 100663662),
custom(DE77BA63-517C-11D1-A2DA-0000F8773CE9, 1204063480),
custom(DE77BA65-517C-11D1-A2DA-0000F8773CE9, “Created by MIDL version 6.00.0366 at Tue Feb 26 14:04:39 2008
”)

]
library LSCAPILib
{
// TLib : // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046}
importlib(“STDOLE2.TLB”);

// Forward declare all types defined in this typelib
interface ILSDiscPrinter;
interface ILSDiscPrintSession;
interface ILSDiscPrintProgressEvents;
interface ILSEnumDiscPrinters;
interface ILSDiscPrintMgr;
interface ILSDiscPrintMgrDiagnostics;
interface ILSDiscPrintSessionTest;
interface ILSPrivateTesting;

typedef enum {
    windows_bitmap = 0
} ImageType;

typedef enum {
    draw_default = 0,
    draw_fit_height_to_label = 1,
    draw_fit_width_to_label = 2,
    draw_fit_smallest_to_label = 4
} DrawOptions;

typedef struct tagSize {

long x;

long y;
} Size;

typedef enum {
    label_monochrome = 1,
    label_color = 2
} DeviceCapabilitiesEnum;

typedef enum {
    quality_best = 0,
    quality_normal = 1,
    quality_draft = 2
} PrintQuality;

typedef enum {
    label_mode_full = 0,
    label_mode_title = 1,
    label_mode_content = 2
} LabelMode;

typedef enum {
    label_unknown = 0,
    label_12cm_circle = 1,
    label_8cm_circle = 2
} DiscShapeAndSize;

typedef enum {
    media_recognized = 0,
    media_generic = 1
} MediaOptimizationLevel;

typedef struct tagColorRGB {

unsigned char red;

unsigned char green;

unsigned char blue;
} ColorRGB;

typedef struct tagMediaInformation {

int mediaPresent;

int mediaOrientedForLabeling;

short manufacturer;

long innerRadius;

long outerRadius;

ColorRGB foreground;

ColorRGB background;

DiscShapeAndSize shapeAndSize;
} MediaInformation;

[
  odl,
  uuid(5EBF23F2-1E21-4E63-882C-D4846BAF6B34),
  helpstring("ILSDiscPrinter Interface"),
  oleautomation
]
interface ILSDiscPrinter : IUnknown {
    HRESULT _stdcall Validate();
    HRESULT _stdcall GetPrinterVendorName([out, retval] BSTR* vendorName);
    HRESULT _stdcall GetPrinterProductName([out, retval] BSTR* productName);
    HRESULT _stdcall GetPrinterDisplayName([out, retval] BSTR* printerDisplayName);
    HRESULT _stdcall GetPrinterPath([out, retval] BSTR* printerPath);
    HRESULT _stdcall GetPrinterCapabilities([out, retval] DeviceCapabilitiesEnum* capabilities);
    HRESULT _stdcall GetDriveInnerRadius([out, retval] long* innerRadius);
    HRESULT _stdcall GetDriveOuterRadius([out, retval] long* outerRadius);
    HRESULT _stdcall GetCurrentMedia(
                    [in] MediaOptimizationLevel optimizationLevel, 
                    [out, retval] MediaInformation* pMedia);
    HRESULT _stdcall OpenPrintSession([out] ILSDiscPrintSession** ppSession);
    HRESULT _stdcall GetPrintResolution(
                    [in] PrintQuality quality, 
                    [in] MediaOptimizationLevel optimizationLevel, 
                    [out, retval] unsigned long* resolution);
    HRESULT _stdcall GetLabelRegionOuterRadius(
                    [in] LabelMode mode, 
                    [in] MediaOptimizationLevel optimizationLevel, 
                    [out, retval] long* outerRadius);
    HRESULT _stdcall GetLabelRegionInnerRadius(
                    [in] LabelMode mode, 
                    [in] MediaOptimizationLevel optimizationLevel, 
                    [out, retval] long* innerRadius);
    HRESULT _stdcall OpenDriveTray();
    HRESULT _stdcall CloseDriveTray();
    HRESULT _stdcall LockDriveTray();
    HRESULT _stdcall UnlockDriveTray();
    HRESULT _stdcall AddExclusiveUse();
    HRESULT _stdcall ReleaseExclusiveUse();
};

[
  odl,
  uuid(9661AADE-8468-43C7-BCC4-7E1687F3D2EB),
  oleautomation
]
interface ILSDiscPrintSession : IUnknown {
    HRESULT _stdcall PrintDisc(
                    [in] ImageType ImageType, 
                    [in] LabelMode LabelMode, 
                    [in] DrawOptions DrawOptions, 
                    [in] PrintQuality quality, 
                    [in] MediaOptimizationLevel optimizationLevel, 
                    [in] unsigned char* header, 
                    [in] int headerLength, 
                    [in] unsigned char* image, 
                    [in] int imageLength);
    HRESULT _stdcall PrintPreview(
                    [in] ImageType ImageType, 
                    [in] LabelMode LabelMode, 
                    [in] DrawOptions DrawOptions, 
                    [in] PrintQuality quality, 
                    [in] MediaOptimizationLevel optimizationLevel, 
                    [in] unsigned char* header, 
                    [in] int headerLength, 
                    [in] unsigned char* image, 
                    [in] int imageLength, 
                    [in] BSTR previewFile, 
                    [in] ImageType previewImageType, 
                    [in] Size* previewSize, 
                    [in] VARIANT_BOOL ignoreMedia);
    HRESULT _stdcall SetProgressCallback([in] ILSDiscPrintProgressEvents* pEvents);
    HRESULT _stdcall ReleaseProgressCallback();
    HRESULT _stdcall Close();
};

[
  odl,
  uuid(E785F58A-5FC7-4E65-8FDE-E4799C44E269),
  oleautomation
]
interface ILSDiscPrintProgressEvents : IUnknown {
    HRESULT _stdcall NotifyPreparePrintProgress(
                    [in] int current, 
                    [in] int final);
    HRESULT _stdcall NotifyPrintProgress(
                    [in] int areaPrinted, 
                    [in] int totalArea);
    HRESULT _stdcall NotifyPrintComplete([in] HRESULT status);
    HRESULT _stdcall QueryCancel([out, retval] VARIANT_BOOL* bCancel);
    HRESULT _stdcall ReportLabelTimeEstimate(
                    [in] long seconds, 
                    [out, retval] VARIANT_BOOL* bCancel);
};

[
  odl,
  uuid(47A7B1CB-6970-495D-946B-DFA83F70FE77),
  helpstring("ILSEnumDiscPrinters Interface"),
  oleautomation
]
interface ILSEnumDiscPrinters : IUnknown {
    HRESULT _stdcall Count([out, retval] unsigned long* Count);
    HRESULT _stdcall Item(
                    [in] unsigned long index, 
                    [out] ILSDiscPrinter** discPrinter);
};

[
  odl,
  uuid(39658004-A44E-4F68-8F79-E1BCA9E84C0C),
  helpstring("ILSDiscPrintMgr Interface"),
  oleautomation
]
interface ILSDiscPrintMgr : IUnknown {
    HRESULT _stdcall EnumDiscPrinters([out] ILSEnumDiscPrinters** ppEnumDiscPrinters);
    HRESULT _stdcall GetUpdateShellCommand([out, retval] BSTR* shellCommand);
};

[
  odl,
  uuid(728B6248-E5D0-4D39-819A-9E2D3257CE5C),
  helpstring("ILSDiscPrintMgrDiagnostics Interface"),
  oleautomation
]
interface ILSDiscPrintMgrDiagnostics : IUnknown {
    HRESULT _stdcall EnableDebugOutput([in] VARIANT_BOOL enabled);
    HRESULT _stdcall GetDiagnosticsInfo([out, retval] BSTR* diagnosticsXML);
    HRESULT _stdcall AreAllNeededComponentsPresent([out, retval] VARIANT_BOOL* present);
};

[
  odl,
  uuid(0923A5B6-DF36-4C5A-ACA3-464CB1B75A0E),
  helpstring("ILSDiscPrintSessionTest Interface"),
  oleautomation
]
interface ILSDiscPrintSessionTest : IUnknown {
    HRESULT _stdcall SetSavePrintFile([in] BSTR filename);
};

[
  odl,
  uuid(2CBA00CD-67F9-4067-8F18-885B41F71F15),
  oleautomation
]
interface ILSPrivateTesting : IUnknown {
    HRESULT _stdcall GetAddressOfMarshalledData(
                    [in] unsigned char* header, 
                    [in] int headerLength, 
                    [out] unsigned long* address);
    HRESULT _stdcall ThrowStormException([in] unsigned long statusCode);
    HRESULT _stdcall ThrowUncaughtStdException();
    HRESULT _stdcall TriggerPointerFault();
    HRESULT _stdcall EnableStormLoading([in] VARIANT_BOOL enabled);
};

[
  uuid(5197646C-00EA-4307-A067-61319EBBE499),
  helpstring("DiscPrintMgr Class")
]
coclass DiscPrintMgr {
    [default] interface ILSDiscPrintMgr;
    interface ILSDiscPrintMgrDiagnostics;
    interface ILSPrivateTesting;
};

};
[/I]


#8

Another very interesting thing to dig up is to find a way to READ BACK the labelflash (or lightscribe) image data FROM a disc.


#9

Easy that is. Just use a flatbed scanner.

Michael