Start a Conversation

Unsolved

This post is more than 5 years old

5037

March 3rd, 2011 11:00

Crash on selecting A920

 

 

 

 

 

 

 

 

The following code crashes if SetDllDirectory API is used before calling Device Capabilities. Does Dell plan to fix the way the driver is installed to plug the security hole? 

----- Sample code to duplicate the crash ---------

void

 

testMem()

{

 

 

char ltmp[2+1][1024];

memset(ltmp, 0x0,

sizeof(ltmp));

char szDriverDir[MAX_PATH] = {0};

DWORD dwBufLen = 0;

SetDllDirectory(

""); //comment this line to remove the crash.

GetPrinterDriverDirectory(NULL, NULL, 1, (LPBYTE)szDriverDir,

sizeof szDriverDir, &dwBufLen);

DWORD ret = DeviceCapabilities("Dell AIO Printer A920", "LPT1", DC_BINNAMES, (LPSTR) ltmp, NULL);

MessageBox(0,ltmp[0],

"BinName",0); // if everything goes fine binNname "Automatic" is expected in messagebox.

}

 

Thanks

9 Legend

 • 

30.3K Posts

March 3rd, 2011 12:00

 Rojer_Qn,

 

Did your computer come with Windows 7 64-bit or did you upgrade and install?

 

Make and model of your computer and operating system is helpful.

 

How did you install the printer?

 

 

Rick

5 Posts

March 3rd, 2011 12:00

I have a Win 7 - 32 bit Enterprise and I can see the crash.

Though there are other users who have reported the issue on 64 bit systems too.

 

thanks

9 Legend

 • 

30.3K Posts

March 3rd, 2011 12:00

 Rojer_Qn,

 

This is on the Printer screen?

 

If this is on your computer screen, make and model of your computer and operating systemn is helpful. 32-bit or 64-bit?

 

 

Rick

5 Posts

March 3rd, 2011 12:00

Also the crash is only seen with the code as shown above. If I access the printer directly it works fine. If I comment the SetDllDirectory call it works fine.

5 Posts

March 3rd, 2011 14:00

Hi Rick,

 

Yes, the computer came with Win 7 enterprise 32 bit installed. Its a W500 lenovo laptop. I installed the printer by downloading the driver from dell website and installing it using have disk option.

 

Then again if you try running the code you would surely see the crash as its an issue with the way Dell installs the binaries.

 

Thanks

9 Legend

 • 

30.3K Posts

March 3rd, 2011 15:00

 Rojer_Qn,

 

Make a system restore point. That way you can come back to this state, if you have problems.

 

Run Delete Print Jobs to removce any stuck print jobs in the queue.

 

Disconnect the printer.

 

Download and run the patch(printer cleanup urility) until it promtps you to restart your computer.

 

Restart your computer. Make sure the printer is removed. Manual Printer Driver Removal

 

Download the Vista 32-bit drivers. Install the Vista 32-bit drivers in the Vista Compatibility mode. You'll get a message, the printer is not connected. Connect the printer at this time(powered on)

 

Links to the patch/drivers can be found at...

 

 Dell A920 All-In-One Inkjet Printer owners thread (W7)

 

 

Rick

5 Posts

March 4th, 2011 13:00

Hi Rick,

 

Thanks for the reply but wanted to stress again that the problem is due to a security hole. If I plug the hole as given in the sample code then the code crashes. I can make things work just that I cant make them  work the right way i.e. the way Microsoft has suggested.

 

I am  trying to get in touch with the corporate technical support.

 

Thanks.

 

9 Legend

 • 

30.3K Posts

March 4th, 2011 16:00

 Rojer_Qn,

 

The people at Dell are off until Monday, except Dell's Technical Support. Not known if they can help or not.

 

 

Rick

No Events found!

Top