First of all, I'm working on Win7 64-bit with Visual Studio C++ 2010 (the 2010 shouldn't really be different from any other VC++ after .NET, right?)
Anyways, I've very new at this and from what I understand, to speak to the parallel port on a low-level (a.k.a, to send specific bits to it on command), I need a kernal-mode driver that gives me functions to call to do that. This is where your wonderful kernal-mode driver comes in. My first question is real basic, the driver itself is the .dll file: inpout32.dll, right?
If I'm on a 64-bit OS, but I'm writing 32-bit applications, can I use inpout32.dll and not inpout64.dll?
Also, if I understood correctly, to "install" the driver so that I can call the functions in my program:
- I had to download inpout32.dll, inpout32.h, inpout32.lib, and InstallDriver.exe.
- I run the InstallDriver.exe (I got a successful installation message).
- I put the inpout32.h header file in my program code directory and #include it.
Code: Select all
bool bDLoad = IsInpOutDriverOpen();
if (bDLoad==true) chkDriver->Checked=1;
Form1.h(201): error C3861: 'IsInpOutDriverOpen': identifier not found
and then a bunch of syntax errors identical to those mentioned in the pinned topic InpOut32.h has syntax errrors.
From reading that topic, and reading up on Microsoft's MSDN, it looks like I'm missing a bunch of typedefs that define what USHORT, UCHAR, etc. mean.
For example, Microsoft says that UCHAR is:
Code: Select all
typedef unsigned char UCHAR, *PUCHAR;
As a quick "band-aid", I was able to manually typedef all of the data types (ULONG, PBYTE, BOOL, etc.) and the compiler likes it now.
It still, however, does not address the first compile error:
Form1.h(201): error C3861: 'IsInpOutDriverOpen': identifier not found
which sounds like it does not know where the functions declared in inpout32.h are actually defined. Where are the functions actually defined?
Sorry for the super-long post with a large number of questions,
Satiagraha