I
Iouri
I have tried the code posted by Microsoft here
http://support.microsoft.com/?scid=kb;EN-US;322090
It works fine in VS2003. But when I try the same code in VS2005
I am getting the following error
PInvokeStackImbalance was detected
Message: A call to PInvoke function
'WindowsApplication2!WindowsApplication2.RawPrinterHelper::OpenPrinter' has
unbalanced the stack. This is likely because the managed PInvoke signature
does not match the unmanaged target signature. Check that the calling
convention and parameters of the PInvoke signature match the target
unmanaged signature.
The error is generated in the line
If OpenPrinter(szPrinterName, hPrinter, 0) Then
..........
in the class RawPrinterHelper
in the Function SendBytesToPrinter
Can somebody explain to me why it works in 2003 and geneartes an error in
2005. And what can I do to make it work in 2005
Thank you
http://support.microsoft.com/?scid=kb;EN-US;322090
It works fine in VS2003. But when I try the same code in VS2005
I am getting the following error
PInvokeStackImbalance was detected
Message: A call to PInvoke function
'WindowsApplication2!WindowsApplication2.RawPrinterHelper::OpenPrinter' has
unbalanced the stack. This is likely because the managed PInvoke signature
does not match the unmanaged target signature. Check that the calling
convention and parameters of the PInvoke signature match the target
unmanaged signature.
The error is generated in the line
If OpenPrinter(szPrinterName, hPrinter, 0) Then
..........
in the class RawPrinterHelper
in the Function SendBytesToPrinter
Can somebody explain to me why it works in 2003 and geneartes an error in
2005. And what can I do to make it work in 2005
Thank you