K8000 parallel port address

Hello,

I have a new pc with a motherboard with NO parallel ports onboard so I bought a sweex card with a netmos chipset on it.

Now is the address of the card: D080 - D087 / D000 - D007 and I cannot change this in the windows settings to the default parallel port address.

In the selecti2cPrinterport function I cannot change this address either to the address of the card. How do I resolve this, is there a work around ?

thanks in advance…

You can use the DLL procedure SetI2CprinterPortAddress.
If you do not have the latest DLL that supports SetI2CprinterPortAddress call I’ll send it to you by e-mail.

In Visual Basic VB6.0: SetI2CprinterPortAddress &hD080
In Delphi: SetI2CprinterPortAddress($D080);
In C: SetI2CprinterPortAddress(0xD080);

oke and do I need to declare this function like this:

Private Declare Sub SetI2CprinterPortAddress Lib “k8d.dll” ()

and then

SetI2CprinterPortAddress(&hD080)

If you are using VB 6.0 (or earlier version) then declare:

Private Declare Sub SetI2CprinterPortAddress Lib "k8d.dll" (ByVal address As Long)

And call:

SetI2CprinterPortAddress &hD080

No parentheses.

I’ll send you the new k8d.dll and k8e.exe.
Copy those to Windows SYSTEM32 folder and to your application folder.

PLease email me those files in a zip container or rar file.

Thanks.

I got the files and declared the function but now when I start the program I get an error:

[quote]PInvokeStackImbalance was detected
Message: A call to PInvoke function ‘SetI2CprinterPortAddress’ 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. [/quote]

I am programming in vs2005.

PS

I am not able to debug this in vs2005, but when I build the prog. and start te program by the main exe then it works :-S

Hi,

I found the solution to the above problem

The declaration as you mentioned should not be:

Private Declare Sub SetI2CprinterPortAddress Lib "k8d.dll" (ByVal address As Long)

But should be

Private Declare Sub SetI2CprinterPortAddress Lib "k8d.dll" (ByVal address As Integer)

The address must be a Integer not a Long and now it works perfectly, thanks for your help.

Nice that you got your K8000 working!
Indeed, in Visual Basic 2005 and VB.NET all “As Long” of VB 6.0 code must be changed to “As Integer”.

[quote=“VEL255”]You can use the DLL procedure SetI2CprinterPortAddress.
If you do not have the latest DLL that supports SetI2CprinterPortAddress call I’ll send it to you by e-mail.

In Visual Basic VB6.0: SetI2CprinterPortAddress &hD080
In Delphi: SetI2CprinterPortAddress($D080);
In C: SetI2CprinterPortAddress(0xD080);[/quote]

Hello, I do not have the latest file k8d.dll. Can you send me, thank you.
I have the same problem, I am unable to communicate with my K8000 interface PCI port / /.

Skipy70@orange.fr

You can download it from: box.net/shared/1txhmu1by6

Please replace both the k8d.dll and k8e.exe in the Windows\System32 folder and in your application folder with the new ones.
There is also documentation in the zip package how to use the new function SetI2CprinterPortAddress.