Hi Semi;colon,
I'm a bit further now. I've got the plugin working again (for me). The next question after I've tidied the code up a bit will be what to do with it.
First things first, though. This is what I did to build the service.
Prerequisites
1. Visual Studio Express 2013.
2. If you want to catch the debug trace messages, you will need something like Debug View.
Sources
Gather the source files from various places, and modify them if necessary, as follows:
1. AlternateMcrIrService.cpp
1a. Change
to
1b. Add the following 2 lines to the end of the list of includes:
Code: Select all
#include <initguid.h>
#include "MceIrGuids.h"
1b. Find and delete the following 5 lines:
Code: Select all
#ifdef _WIN64
typedef __int64 PtrSize;
#else
typedef int __w64 PtrSize; // Add __w64 keyword
#endif
2. MceIrMessages.mc from the first post in the old thread
viewtopic.php?f=2&t=1789#p9748
3 Create MceTypes.h. containing:
Code: Select all
#ifndef __MCE_TYPES_H_INCLUDED__
#define __MCE_TYPES_H_INCLUDED__
#ifdef _WIN64
typedef __int64 PtrSize;
#else
typedef int __w64 PtrSize;
#endif
#endif
4. Create MceIrGuids.h containing:
Code: Select all
#ifndef __MCE_IR_GUIDS_H_INCLUDED__
#define __MCE_IR_GUIDS_H_INCLUDED__
DEFINE_GUID(GUID_CLASS_IRBUS, 0x7951772d, 0xcd50, 0x49b7, 0xb1, 0x03, 0x2b, 0xaa, 0xc4, 0x94, 0xfc, 0x57);
#endif
Configure Visual Studio
1. Create a project AlternateMceIrService. Add the above source files.
2. Right click on the project in Solution Explorer and open the projectÔÇÖs Property Pages. If there is no x64 option in ÔÇÿPlatform:ÔÇÖ, add it in the ÔÇÿConfiguration Manager...ÔÇÖ.
My nondefault settings under ÔÇÿConfiguration PropertiesÔÇÖ are as follows. Change the paths to suit.
3. Configuration Properties \ General ; Configuration: All Configurations ; Platform: Win32
Target Name
$(ProjectName)_x86
4. Configuration Properties \ General ; Configuration: All Configurations ; Platform: x64
Target Name
$(ProjectName)_x64
5. Configuration Properties \ C/C++ \ All Options
(This is for if you want statically linked libraries ÔÇô otherwise leave at default)
Configuration: Release ; Platform: All Platforms
Runtime Library
Multi-threaded (/MT)
Configuration Debug ; Platform: All Platforms
Runtime Library
Multi-threaded Debug (/MTd)
6. Right click on MceIrMessages.mc in the Solution Explorer and open the fileÔÇÖs Property Page.
Configuration Properties \ General ; Configuration: All Configurations ; Platform: All Platforms
Excluded From Build
No
Item Type
Custom Build Tool
7. Still the in MceIrMessages.mc Property Page, click Apply. Then go to
Configuration Properties \ Custom Build Tool \ General ; Configuration: All Configurations ; Platform: All Platforms
Command Line
mc %(FullPath)
Description
Compiling Messages...
Outputs
%(Filename).rc;%(Filename).h;MSG0409.bin
(There is an explanation of this step on
http://stackoverflow.com/questions/3026 ... in-vc-2010.)
Building
Be aware that MceIrMessages.h and MceIrMessages.rc are built automatically. Until the first build SVC_ERROR and SVC_INFO will therefore be undefined. Add these two files to the project once they have been created and rebuild the project.
I found only a few minor compile errors (possibly uninitialized variables) the first time around. These were trivial to fix.
ThatÔÇÖs it!
Richard