Microsoft Printer issue

Wade Lin <[email protected]>

Hi all,

After examining the code, please follow the given action plan and provide the information we need for further investigation.

Q1. What is the target platform? From the provided sample application, it seems to be ARMV4I.
Q2. What are the differences of printed results between using PrintDlg() and your application? A picture with description would be nice.
Q3. Have you tried passing NULL to the CreateDC()’s 4th parameter? What is the result?
Q4. Could you simplify the code in the PrintDemoMessage() so that it only select one object into the printer DC and check if it prints correctly? Could you add some predicate to the function’s return value and call GetLastError() for any failure?

Since we don’t have your driver nor your printer hardware, please follow the steps to help us trace the call stack and provide the output to us so that we could continue to analyze the problem:
1. Connect the development machine (on which Visual Studio 2005 is installed) and the target CE device through ActiveSync.
2. Open the application project in Visual Studio.
3. Select “Tools”->”Connect to Device…” from the main menu bar.
4. Choose “Windows CE” in the “Platform” dropdown list.
5. From the “Devices” list box, choose the target CE device and press the “Connect” button.
6. If the connection fails, you could follow the steps to adjust connection settings:
a. Select “Tools”->”Options” from the main menu bar.
b. In the left pane, select “Device Tools”->”Devices”.
c. In the right pane, select “Windows CE” in the “Show devices for platform” dropdown list.
d. In the “Devices” list box, select your Windows CE device and press the “Properties…” button.
e. Press the “Configure…” button.
f. Select “Use specific IP address” radio button and input an IP belonging to the CE device.
g. Click “Ok” button three times to close the dialogs.
7. You could either start debugging the program with “Debug”->”Start Debugging” (or press F5) or attach to the running application with “Debug”->”Attach to Process…”.

If you have the Platform Builder OS design, and the Kernel Debugger (kd.dll) is included in the image (you could check in the project property pages, Build Options->Enable Kernel Debugger (no IMGNODEBUGGER = 1), which by default is checked in debug build, and unchecked in release build), you could use the Platform Builder to debug the application which will provide the kernel call stack as well:
1. Select “Target”->”Connectivity Options…”.
2. Select “Kernel Service Map” in the left pane.
3. In the right pane, select “CE Device” in the “Target Device” dropdown list.
4. Select “KdStub” in the “Debugger” dropdown list.
5. Choose appropriate settings for the “Download’ and “Transport” dropdown list.
6. Click “Apply” and then the “Close” button to close the dialog.
7. Select “Target”->”Attach Device” in the main menu bar.
8. Open the application source code in the Visual Studio and set breakpoint as needed.
9. Select “Target”->”Run Programs…” in the main menu bar.
10. Choose the application from to run and debug.

Please feel free to let me or Jonathan know if there are any questions on the action plan.

Thanks,
Wade Lin | Support Engineer | APGC CSS – Microsoft Taiwan

你可能感兴趣的:(windows,css,Microsoft,OS,F#)