Home
Help
Search
Login
Register
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 23, 2012, 08:38:09 am
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Host Engineering Forum
>
General Category
>
Ethernet SDK
>
Updated VC Samples
Pages: [
1
]
« previous
next »
Print
Author
Topic: Updated VC Samples (Read 1423 times)
JMB
Jr. Member
Posts: 11
Updated VC Samples
«
on:
August 12, 2011, 02:31:49 pm »
Hi All,
I've attached a very straightforward update of the Visual C EtherCCM sample. I did the following things:
- updated the project to Visual Studio 2008
- replaced the timeGetTime() function with a version that doesn't require the multimedia library
- removed some of the unnecessary Win32 parts
- switched to using version 3 of the HEI library
- changed some of the integer data types to match their usage and eliminate a few compiler warnings
- added a bit of error reporting to the main() method (specific return codes)
I've tested this against an H4-ECOM and an H2-ECOM100 that I have on my corporate network in both Debug and Release builds and it appears to function correctly. If anyone has any comments, (constructive)criticisms or finds any problems - let me know.
I intend to do the same thing with the other samples over the next little while but I don't have access to any ERM/EBC/etc hardware to test against so someone else will have to try them out.
Thanks,
Jacob
Logged
Jacob Berghofer
Robotics and Automation Engineering Technologist
E-One Moli Energy (Canada) Ltd, Maple Ridge, B.C.
chrisatwan
Full Member
Posts: 30
Re: Updated VC Samples
«
Reply #1 on:
August 12, 2011, 10:25:34 pm »
Jacob,
I have a complete setup in my office so I can test any code you need help with.
Thanks,
Christopher
Logged
chrisatwan
Full Member
Posts: 30
Re: Updated VC Samples
«
Reply #2 on:
August 13, 2011, 09:38:03 am »
Jacob,
I am taking my lumps with Visual C. I am getting a hei32_3 not found when trying to execute EtherCMM.exe
It builds fine.
Thanks,
Christopher
Logged
BobO
Host Moderator
Posts: 1149
Yes Pinky, we *are* going to control the world!
Re: Updated VC Samples
«
Reply #3 on:
August 13, 2011, 10:35:21 am »
It's looking for ether32_3.dll, the file that actually does all of the work. It just needs to be somewhere that Windows normally loads DLLs from...which could be the directory you are running etherccm.exe from or the Windows directory.
Logged
BobO
The Constitution does not guarantee us freedom from being offended...but we can choose not to be, and life gets so much easier.
chrisatwan
Full Member
Posts: 30
Re: Updated VC Samples
«
Reply #4 on:
August 14, 2011, 12:42:56 pm »
I was incorrect about error before, the program is looking for hei32_2.dll and not hei32_3.dll
Any thoughts on this?
Thanks,
Christopher
Logged
JMB
Jr. Member
Posts: 11
Re: Updated VC Samples
«
Reply #5 on:
August 15, 2011, 02:21:04 pm »
That seems odd since I set up both the Debug and Release builds to link against hei32_3.lib so it should only want hei32_3.dll. Either way, set up post-build events with this command line:
copy "$(ProjectDir)\Lib\hei32_2.dll" "$(ProjectDir)\$(OutDir)\"
copy "$(ProjectDir)\Lib\hei32_3.dll" "$(ProjectDir)\$(OutDir)\"
This should copy both .dlls into the same directory as the final executable on a successful build.
Jacob
Logged
Jacob Berghofer
Robotics and Automation Engineering Technologist
E-One Moli Energy (Canada) Ltd, Maple Ridge, B.C.
chrisatwan
Full Member
Posts: 30
Re: Updated VC Samples
«
Reply #6 on:
August 15, 2011, 04:14:42 pm »
Jacob,
I retraced my steps and it is working fine now. I had the change:
WORD Protocol = HEIP_IPX;
to
WORD Protocol = HEIP_IP;
Which solved my next problem. I am going to play with this along with trying to get my VB6 dll working. I am able to find the ECOM but unable to write or read from it with the dll.
Thanks,
Christopher
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> MX Technology Preview
=> General Discussion
=> CTRIO
=> DirectSOFT
=> DNLoader
=> DSData
=> EBCs and EBC100s
=> ECOMs and ECOM100s
=> EDRV
=> ERM
=> Ethernet SDK
=> MB-GATEWAY
=> NetEdit
=> Profibus
=> WinPLC
Loading...