Thread: ERROR_NOT_SUPPORTED in BiDiSpl.h using IBiDiSpl Interface

  1. #1
    Registered User
    Join Date
    Jun 2008

    ERROR_NOT_SUPPORTED in BiDiSpl.h using IBiDiSpl Interface


    I am trying to create some bidirectional communication with a printer, and I am having a little problem.

    I was originally working with a HP Color LaserJet 2820, which does not support bidirectional communication, so the error that I was getting (ERROR_NOT_SUPPORTED), makes sense.

    I've since switched to a Konica Minolta Magicolor 5450, which does support BiDi, yet I still get the same error. I would like to know if anyone has successfully implemented this interface with a bi-directional printer, or can assist me in doing so.

    My code so far is:
    The line with the error has a comment below it.

    System::String^ BiDiTest::GetToner(System::String^ PrinterName, System::String^ valueRequired) 
        IBidiSpl        * pIBidiSpl = NULL;  
        IBidiRequest    * pIReq = NULL; 
        HRESULT hr = 0; 
        //Convert System::String^ to LPCWSTR ---------------------- 
        const wchar_t* chars = 
        (const wchar_t*)(Marshal::StringToHGlobalUni(PrinterName)).ToPointer(); 
        LPCWSTR name = chars; 
        //  ---------------------------------------------------- 
            DWORD dwAccess = BIDI_ACCESS_USER; 
            BSTR request = CString(mySchema).AllocSysString(); 
            DWORD Erroc = GetLastError(); 
            hr = CoInitializeEx (NULL, COINIT_MULTITHREADED); 
            hr = CoCreateInstance(CLSID_BidiSpl, NULL, CLSCTX_INPROC_SERVER, IID_IBidiSpl, 
            hr = pIBidiSpl->BindDevice(name, dwAccess); 
            hr = CoCreateInstance(CLSID_BidiRequest, 
            hr = pIReq->SetSchema (L"\\Printer.Layout.InputBins.Tray2:Installed"); 
            LPWSTR   pszSchema = NULL; 
            DWORD    dwType = NULL; 
            BYTE     *pData = NULL; 
            ULONG    uSize = NULL; 
            bool bDuplexInstalled; 
            BSTR* response = NULL; 
            hr = pIBidiSpl->SendRecv(BIDI_ACTION_GET, pIReq);
               // This is where I get the error....
            hr = pIReq->GetOutputData (0, &pszSchema, &dwType, &pData, &uSize); 
            CoTaskMemFree (pData); 
            hr = pIBidiSpl->UnbindDevice (); 
        return PrinterName; 

    Thanks in advance.

  2. #2
    Registered User
    Join Date
    Apr 2008
    I think the author of the component you're calling would be able to help more. This is a general purpose C++ forum.

  3. #3
    Registered User
    Join Date
    Jun 2008
    I've talked to Microsoft (they're the author), no help there. I've posted on a plethora of forums across the web and no one has an answer.

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Who created the component? Ask them. If Microsoft did not create the component then I'm not surprised they did not help you.

  5. #5
    Registered User
    Join Date
    Jun 2008
    Microsoft created it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to get RSSI value, send to sensor, sensor receive package, repackage it?
    By techissue2008 in forum Networking/Device Communication
    Replies: 1
    Last Post: 03-04-2009, 10:13 AM
  2. Calling IRichEditOle interface methods
    By Niara in forum C Programming
    Replies: 2
    Last Post: 01-16-2009, 01:23 PM
  3. marshall interface needed?
    By George2 in forum Windows Programming
    Replies: 2
    Last Post: 04-06-2008, 07:15 PM
  4. game user interface
    By DavidP in forum Game Programming
    Replies: 3
    Last Post: 06-19-2004, 12:44 PM
  5. OOP in C
    By lyx in forum C Programming
    Replies: 4
    Last Post: 11-23-2003, 01:12 PM

Tags for this Thread