Click here to Skip to main content
15,884,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting this error for SetPrinter method in winspool.drv while running my application in windows 10 machine. This issue found after upgrading to 4.6.1 .net frame work.

VB.NET
Public Declare Function SetPrinter Lib "winspool.drv" Alias "SetPrinterA" _
   (ByVal hPrinter As IntPtr, _
    ByVal Level As Integer, _
    ByVal pPrinter As IntPtr, _
    ByVal Command As Integer) _
    As Long



But this works fine on Windows 7 machines.

What I have tried:

This issue found after upgrading to 4.6.1 .net frame work.
Posted
Updated 12-Jul-16 20:01pm
v3
Comments
Bernhard Hiller 12-Jul-16 3:50am    
Did you check for 32bit vs. 64bit issues?

1 solution

I got this issue resolved by changing the target CPU as x86.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900