K8055 under Windows 7, only giving errors

I run C# 2008 Express project without any problems on Windows 7 x64.

It seems that C# automatically uses x86 mode in this old project.

The K8055D.DLL is put to Windows folder.
It seems to be the only place where the C# can find it…

I am having same problem HRESULT: 0x800700B using program I wrote in Visual Basic 2008 on a 64 bit computer. My program works ok on a 32 bit computer. Also get the same problem trying to run the Velleman Visual basic demo program on 64 bit computer. It does this without the K8055 connected, I detect if the K8055 is there by looking fot its address and if it is not there I run program in a different mode. I can’t see aywhere that I can send you files here but it is the Demo program for visual Basic and the latest DLL that I could find to download.

Please see this thread for a solution: viewtopic.php?f=3&t=4005

The right place for all the 32-bit DLL files (e.g. K8055D.DLL) in 64-bit environment is the Windows’ subfolder SysWOW64.
You may also put the K8055D.DLL to the Visual Basic 2008 project’s subfolder \bin\x86\Debug.

Have downloaded the Zip file from box.net/shared/euf9bd2rc4 and when I debug it in VB 2008 it works ok.
Only differences I have found so far have been 2 lines added
Private Declare Function SearchDevices Lib “k8055d.dll” () As Integer
Private Declare Function SetCurrentDevice Lib “k8055d.dll” (ByVal CardAddress As Integer) As Integer
However if I comment out those lines it still works.
To my understanding that would prove that the DLL is ok and there is a problem in the compiling of the original test program. At this stage I have found no difference in the settings but I will keep investigating.
If I can’t find a problem with the settings, then whilst this program works ok it doesn’t solve the problem with my program.
Is there any explanation of what the differences are between the programs in box.net/shared/euf9bd2rc4 and the ones supplied previously.

If you get this error message with the older version:
“[color=#800040]An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)”[/color]

If not done - then you have to do this:

[color=#0000BF]Select Tools / Options / Projects and Solutions / General
Select ‘Show advanced build configurations’

Then select the menu option: Build / Configuration Manager
In the column ‘Platform’ select <new…>
To the ‘New platform’ select x86

Now go to menu Project / Properties… There under the Compile and Debug tabs there should be ‘Active (x86)

Now you can compile the K8055 demo.[/color]

This procedure is done with the latest demo version you downloaded.

Think I have been there and done most of that.
I don’t know if maybe Visual Basic remember how it was compiled origonally and doesn’t change something but I will keep working on it.
I will recheck that I have done what you say there but I am fairly sure I have.
I have started going through the listings that Visual Basic makes and trying each of them between the test that works and the test that doesn’t work and checking the x86 entries and the AnyCPU entries in them to try to find which one is the problem.
At least that has given me a good and a bad to do some comparisms.

Have overcome the problem I think. Just changing to x86 in Build/ConfigurationManager didn’t fix it.
I had transferred the files from a 32 bit computer.
Using the K8055 test programs, one that worked and one that didn’t I copied files between them to find the problem.
The bad one was one I had transferred from a 32 bit computer.
The problem was in the VBProj file.
From memory somewhere along the way I had changed the Compile properties path to bin\x86\debug\

Comparing the VBProj file in Notepad I found there were not as many entries in the bad VBProj file.
To fix the bad one i went to Build/Configurationmanager and changed the platform to Itanium and then did a build.
I then changed the configuration back to x86 and did build.

At one stage I actually changed platform to Itanuim and then used notepad to change the Itanium entries back to x86 but I think what is described above is the fix.

The bad one was one that I had transferred from a 32 bit computer.

[quote]To fix the bad one i went to Build/Configurationmanager and changed the platform to Itanium and then did a build.
I then changed the configuration back to x86 and did build.[/quote]

This is valuable information for other users encountering similar problem.
Thank you!

The Visual Basic 2010 Express will not cause this kind of problems as easily.
In the Visual Studio 2010 the x86 mode is set as default.

Here the “official” instructions how to optimize a Visual Studio application for a specific CPU type:
msdn.microsoft.com/en-us/library/5b4eyb0k.aspx

Here is a blog which explained this topic in depth: blogs.msdn.com/b/rmbyers/archive … worth.aspx

It took a while but we got there and hope it is useful to other. I did forget to mention it is Visual Basic 2008 Express that I am using.

Indeed, this was quite a tricky case…
In the Visual Basic 2008 Express the default is “Any CPU”.
This causes problems in 64-bit environment if a 32-bit DLL is used.

In Visual Basic 2010 Express the default is x86.

I am a bit confused, but thats not hard to do.
What I put in early post is how I fixed the first one that I was able to fix.
I had several versions of my project which I had transferred to a 64 bit computer from a 32 bit computer.
I was able to fix the subsequent ones by just changing the platform to x86 and then do build. I guess it is best to try just changing to x86 then doing build and if that doesn’t work then change it to Itanium and build then back to x86 and build.

Hi,
I have posted another topic but i think the must is to post here :slight_smile:

So my problem seems to be diiferent.
Before a work under XP and server 2003 and my projet work great.
after installed seven 32bit i don’t know why, but the card not responding correctly, no erro, no message.
When i connect to the card that’s return a device but no data.
The led 8 at the start said that all is ok when i plug
i try the same thing under windows server 2003 and it’s works.

The card is found but seven like HID.

Anybody can help me please with simple sample and simple help, beaucoup if you explain to mutch i will not understand ^^ sorry

Thanks
Best regards.

Have you downloaded the latest DLL from this page:
velleman.eu/distributor/supp … 8055&type=

[color=#008000]Software DLL (Rev 3.0.2)
supports Windows Vista, VC++ version and executable examples [/color]

Put the new DLL to Windows’ System32 folder.
Here is a link to download a Visual Basic 2008 Express project. It should run under Windows 7.
box.net/shared/euf9bd2rc4

Here you can download a simple test program. The ZIP package contains the latest DLL and K8055_Demo.EXE. Just extract the files to a folder and run the .exe.
box.net/shared/vzerxocytp

Sorry for the delay,
I will test your demo this night when i come back home and i will inform you
Thanks