473,651 Members | 2,644 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Printing problem W98 - Knowledge Base Article - 322090

Hi,

I'm trying to implement Knowledge Base Article - 322090 into my code to be
able to send data directly to a pos printer. This works fine under win XP,
but when I try the same printer under W98 it fails to print. The openprinter
function fails, but when I try to get the error with getlasterror it just
states that the last command completed succesfully.

The printer is correctly connected, if I print from notepad or so, it works,
and if i send data to lpt1 from dos it also prints.

Anyone have any clue on what might be going on?

Thanks,
Kristof
Nov 20 '05 #1
3 1980
* "Kristof Nachtergaele" <ik**@nie.com > scripsit:
I'm trying to implement Knowledge Base Article - 322090 into my code to be
able to send data directly to a pos printer. This works fine under win XP,
but when I try the same printer under W98 it fails to print. The openprinter
function fails, but when I try to get the error with getlasterror it just
states that the last command completed succesfully.

The printer is correctly connected, if I print from notepad or so, it works,
and if i send data to lpt1 from dos it also prints.


Use this method to get the error number:

<http://msdn.microsoft. com/library/en-us/cpref/html/frlrfsystemrunt imeinteropservi cesmarshalclass getlastwin32err ortopic.asp>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
I've got the error number now, it's 120 and the associated message is that
"this function is only valid in Win32 mode" (translated from dutch)

Any clues to what might be happening here ?
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:bn******** ****@ID-208219.news.uni-berlin.de...
* "Kristof Nachtergaele" <ik**@nie.com > scripsit:
I'm trying to implement Knowledge Base Article - 322090 into my code to be able to send data directly to a pos printer. This works fine under win XP, but when I try the same printer under W98 it fails to print. The openprinter function fails, but when I try to get the error with getlasterror it just states that the last command completed succesfully.

The printer is correctly connected, if I print from notepad or so, it works, and if i send data to lpt1 from dos it also prints.
Use this method to get the error number:

<http://msdn.microsoft.com/library/en...mruntimeintero
pservicesmarsha lclassgetlastwi n32errortopic.a sp>
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #3
"Kristof Nachtergaele" <ik**@nie.com > schrieb
I've got the error number now, it's 120 and the associated message is
that "this function is only valid in Win32 mode" (translated from
dutch)

Any clues to what might be happening here ?

In my MSDN library version, error 120 is:

"This function is not supported on this system."
--
Armin

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2285
by: Bryan Z | last post by:
I was wondering how do you print just part of a webform in asp.net -- like just printing the contents of a textbox or label. I know that it will involve javascript, but I cannot get the javascript function to work. Basically, this is the scenario --- A simple web page with a search form. User enters search value, and a datagrid displays what the search returns with a template column to link to the details of each record found. ...
0
1549
by: Sushil Srivastava | last post by:
Hi Guys, I have developed a utility that provide a smart MSDN knowledge base search both off-line and on-line. I have describe more in detail below why I decided to write this utility (one reason is just for fun). Please let me know if you need this utility. Thanks Sushil
8
1828
by: Sai Kit Tong | last post by:
In the article, the description for "Modiy DLL That Contains Consumers That Use Managed Code and DLL Exports or Managed Entry Points" suggests the creation of the class ManagedWrapper. If I need to build multiple mixed mode dll's used by a consumer application, do I have to implement multiple ManagedWrapper's (each embedded in indiviudal DLL project) and call all of them in my consumer application?
2
1561
by: Blue Streak | last post by:
Hello, I am trying to develop an interface to view an internal knowledge base. One feature I would like to add is a "Generate E-Mail" button which would automatically open an e-mail message a populate it with the title and the article from the knowledge base. Each KBase item contains a title and article where the article contains HTML formatting. So far, I have used a client-side JavaScript block to perform this task along with an HTML...
6
1169
by: Rand | last post by:
Hello anyone, Situation: I want to print 1 or x mailing continuous form labels 1" X 3.5" then change to a different name and print again. Everything works fine except for problem below. Problem: Unwanted form feed after printing.
1
2445
by: marcvill | last post by:
I need to send printer specific escape codes a printer for a POS register. Can anyone tell me how to send these codes to a printer using VB .NET and the Win32 spooler functions? I have looked at the MS article 322090 on how to do this but the supplied code doesn't work for the second button. Please let me know if there are any other resources on Windows printing. It would be greatly apreciated. Thanks for any and all help.
4
1160
by: notregister | last post by:
Hi, i am currently do a project that send a printjob to a few printers which are connected to a PC by an ethernet hub. How can i send a print job thru the hub to all the printers connected to the hub using VB. NET??
4
5636
by: sukhsinghin | last post by:
Hi, I am trying to print a invoice form with data from dataset using vb.net and printer is dot matrix. Invoice is a continues paper with pre-printed headers like First Name, Last Name, SSN# etc. and after each header their are some blank block like for SSN# 9 small box. I hv to print each digit in seprate box. When I tried using following code it print 1st and 2nd digit on correct place but for the next one goes between two box ColPosX...
3
5240
by: Ivica Muruzovic | last post by:
Is there any source code for printing text file directly to dot-matrix printer without involving windows (like in DOS mode)
0
8349
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8795
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8460
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4281
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1906
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.