473,770 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple Application

Hello,

I am trying to write a simple application that will look at a hardware
address lets say &HA400 or &H378 approximately 1000 times per second.

Every 100th time though I need to write out the value to the registry
(any place will work).

Is ms Vc++ appropriate for this kind of application? If not, can
someone point me to the right newsgroup? If so, does anyone have any
examples or hardware drivers or registry writing?

Thanks In Advance,

Terry

Nov 17 '05 #1
3 1723
"TerryW @vbssys.com>" <prog<NOSPAM> wrote in message
news:g9******** *************** *********@4ax.c om...
I am trying to write a simple application that will look at a hardware
address lets say &HA400 or &H378 approximately 1000 times per second.

Every 100th time though I need to write out the value to the registry
(any place will work).

Is ms Vc++ appropriate for this kind of application? If not, can
someone point me to the right newsgroup? If so, does anyone have any
examples or hardware drivers or registry writing?


You don't specify the target platform. That's a key bit of information
required to answer the question.

All of the 32 bit Windows operating systems restrict access by 32 bit
applications to the machine's I/O ports to device drivers so that only they
are allowed such low-level access. '95, ''98 and Millennium may permit
access by 16 bit programs as a concession to DOS compatibility.

So, yes, if you are willing to write a device driver you can use VC++. I
believe that the device driver kit (DDK) includes a copy of the compiler. In
any event this link

http://www.microsoft.com/whdc/devtools/ddk/default.mspx

explains how to get the DDK. Alternatively, you can invest in a toolkit with
its own driver for access to the ports. You might want to ask for
suggestions in a device driver group.

As for the '9x platforms, well the recent editions (last 6 or 8 years or so)
of MS compilers do NOT provide the ability to build 16 bit applications. You
could not use them to craft a 16 bit hack. Of course, you could use the 32
bit DDK for the target '9x platform to do the job.

Regards,
Will


Nov 17 '05 #2
Thanks for your post Will,

The target is 32bit windows operating system.
I have seen an example from another source that looks like this...

hdriver = CreateFile("\\\ \.\\hwinterface ", GENERIC_READ | GENERIC
WRITE,0,NULL,OP EN_EXISTING, FILE_ATTRIBUTE_ NORMAL,NULL);

subsequently,

error = DeviceIoControl (hdriver, IOCTL_WRITE_POR T_UCHAR, &Buffer,
3,NULL,0,&Bytes Returned,NULL);

Do you think that something like this will work?

I am really curious what \\\\.\\hwinterf ace does.

Thanks in advance,
Terry
On Mon, 25 Apr 2005 12:47:49 -0400, "William DePalo [MVP VC++]"
<wi***********@ mvps.org> wrote:
"TerryW @vbssys.com>" <prog<NOSPAM> wrote in message
news:g9******* *************** **********@4ax. com...
I am trying to write a simple application that will look at a hardware
address lets say &HA400 or &H378 approximately 1000 times per second.

Every 100th time though I need to write out the value to the registry
(any place will work).

Is ms Vc++ appropriate for this kind of application? If not, can
someone point me to the right newsgroup? If so, does anyone have any
examples or hardware drivers or registry writing?


You don't specify the target platform. That's a key bit of information
required to answer the question.

All of the 32 bit Windows operating systems restrict access by 32 bit
applications to the machine's I/O ports to device drivers so that only they
are allowed such low-level access. '95, ''98 and Millennium may permit
access by 16 bit programs as a concession to DOS compatibility.

So, yes, if you are willing to write a device driver you can use VC++. I
believe that the device driver kit (DDK) includes a copy of the compiler. In
any event this link

http://www.microsoft.com/whdc/devtools/ddk/default.mspx

explains how to get the DDK. Alternatively, you can invest in a toolkit with
its own driver for access to the ports. You might want to ask for
suggestions in a device driver group.

As for the '9x platforms, well the recent editions (last 6 or 8 years or so)
of MS compilers do NOT provide the ability to build 16 bit applications. You
could not use them to craft a 16 bit hack. Of course, you could use the 32
bit DDK for the target '9x platform to do the job.

Regards,
Will



Nov 17 '05 #3
"TerryW @vbssys.com>" <prog<NOSPAM> wrote in message
news:nj******** *************** *********@4ax.c om...
Thanks for your post Will,
You are welcome.
The target is 32bit windows operating system.
I have seen an example from another source that looks like this...

hdriver = CreateFile("\\\ \.\\hwinterface ", GENERIC_READ | GENERIC
WRITE,0,NULL,OP EN_EXISTING, FILE_ATTRIBUTE_ NORMAL,NULL);

subsequently,

error = DeviceIoControl (hdriver, IOCTL_WRITE_POR T_UCHAR, &Buffer,
3,NULL,0,&Bytes Returned,NULL);

Do you think that something like this will work?
I could be wrong but I think that this along the lines of the "toolkit"
option that I mentioned. In other words, a third party provides a device
driver which does the low level port I/O (which by the way needs to be
installed by an administrator) and a high level interface for you to call
via CreateFile() and DeviceIOControl ().
I am really curious what \\\\.\\hwinterf ace does.


A quick google search of microsoft.com for IOCTL_WRITE_POR T_UCHAR came up
empty. I did get a hit on a third party site. I think you will need to
contact the them.

Regards,
Will
Nov 17 '05 #4

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

Similar topics

4
4155
by: Paul Moore | last post by:
I hit a problem yesterday with my mail connection. In a desparate attempt to understand what was going on, I wanted to log the connection traffic. After a bit of searching, I found a post on c.l.p from Andrew Bennetts explaining how to run a port forwarder in 2 lines using Twisted. $ mktap portforward -p 8000 -h remote -d 20 $ twistd -f portforward.tap This looked brilliant - all I needed to do was add logging. A quick
3
1476
by: Miguel | last post by:
I have a simple c++ program I just wrote with VC 6.0. I want to run this program on another machine, but it just locks up. What do I need to do to run the .exe file that is created in the debug folder on a different system? thanks
3
2096
by: ben | last post by:
All, What I have: I have written a VB.net application that uses Access DBs and Make 100s of Excel documents from the data. What I need: I need a Simple ASP.NET Page that will basically pass a string into a function of the Existing Windows Application. The app does not run all the time so when
5
1804
by: Logickle | last post by:
Hi, all. I'm working on an application which requires communicating session info between separate web apps running on the same web server. The out of process server method sounded ideal, and very simple to implement as far as I could tell. So I re-configured my apps' web.config and machine.config files from InProc to StateServer, and confirmed that's the mode used by both web apps. To keep it simple, I created two basic ASP.NET apps...
7
2289
by: abcd | last post by:
I am trying to set up client machine and investigatging which .net components are missing to run aspx page. I have a simple aspx page which just has "hello world" printed.... When I request that page like http://machinename/dir1/hellp.aspx instead of running that page it starts downloding ...whats missing here ....why the aspx engine not running the page....
10
2377
by: serge calderara | last post by:
Dear all, I need to build a web application which will contains articles (long or short) I was wondering on what is the correct way to retrive those article on web page. In orther words, when there is such information to be displayed are they coming from imported files, database ? Where and how this type of information is stored ? What is the way to retrieve such information in order to display it in page ?
4
7090
by: bob lambert | last post by:
Help I am trying to deploy to another pc a vb.net std 2002 windows form application. I am confused. I created a project - windows form I built form, compiled and debugged. I created a deployment project (myproj installer) I added my windows app to the installer under myproj installer properties, I set bootstrapper
0
1750
by: csharpnb | last post by:
Hi all, I've been studying C#/.NET 2.0 for a couple of hours a week for the past couple of weeks. I feel the need to build a somewhat simple Windows application that would accomplish a somewhat simple task, in order to put my knowledge to test, and brush it up further. Besides, this application, if successfully built, could find its use in my everyday work too, which helps keep me motivated. I'd appreciate some ideas on how to design...
0
1421
by: JohnLucas | last post by:
Hi all, I have just started working with the XML::Simple module to parse an XML file. I'm trying to pull some values from the file that I need in another program. The problem is that the XML file is "nested" and I can't get the correct values out of the file. This is part of my xml file: <?xml version="1.0" encoding="ISO-8859-1"?> <Root>
6
28872
kenobewan
by: kenobewan | last post by:
Congratulations! You are one of the few who realise that over 80% of errors are simple and easy to fix. It is important to realise this as it can save a lot of time. Time that could be wasted making unnecessary changes, that in turn can cause further problems. Programming is a humbling experience. An experience that causes one to reflect on human error. One major cause of these errors is syntax, syntax, syntax. We tend not to notice when we...
0
9454
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,...
1
10038
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
9910
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
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
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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
3
2850
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.