TWAIN Sample Data Source - twain

I downloaded the code of TWAIN sample Data Source : twainds.source.2.1.3 and opened visual_studio TWAINDS_VS2008.sln.
When I start debugging, it shows 2 Errors. These are
"error PRJ0019: A tool returned an error code from "Rcc'ing c:...\TWAIN\TWAIN\twainds.source.2.1.3\Twain_DS_sample01\src\qtresources.qrc..." TWAINDS_Sample File
&
"error BK1506 : cannot open file '.\Debug32\CommonTWAIN.sbr': No such file or directory" BSCMAKE File
I checked this code on Windows 7 64 bit as well as on Windows 10 64 bit and got the same errors. I don’t know what to do to compile the TWAIN Sample Data Source?

It appears that the TWAIN DS uses QT. You have two options:
1) How do i use Qt in my Visual Studio 2015 projects? --> use QT in your project
OR
2) Remove all QT files from source header and resource sections and build.
With the 2nd option you probably will not be able to use the sample DS directly. you may have to replace them with your Win32 code which should be quite easy.
Please revert back in case of any discrepancies or queries.

Related

How to add an external library to QT?

I am trying to create a project assosiated with the SimConnect SDK.
I am new to QT, and in Visual Studio, I just had a SimConnect.h file, a .lib file, and a .dll file, and I managed to make it work. Now I am trying to create a C++ widget project, using the same SDK, but in QT.
I put the header file in my QT project's folder, where the other default code and header files are located, and then I went to the project and added them as existing files, as I read in Google. I'm having problems with the actual library.
I've been searching Google for a guide on how to add a library file to the project, I did some things I saw on the internet, like the LIBS line for example, but I probably did it wrong, even though it looked very simple.
I am not sure where to drop my dll/library files in the project directory, maybe the problem is I always put them in the wrong spot.
The furthest I got to, was an error message saying "Unresolved external symbol", and a red writing saying ".obj file not found" on every function I tried to use from the SimConnect functions, which probably means QT couldn't find my library/dll file.
I also tried to add the libraries from the "Add library" option in the project, but that didn't work too.
EDIT: it also warns "warning: LNK4272: library machine type 'X86' conflicts with target machine type 'x64'" maybe it has to do something with it.
(Posted on behalf of the OP).
Solved! My problem was my machine was set to 64bit, while the library was set to 32bit, so I downloaded the 32bit kit, and ran the project through that, and it worked!

Is there any basic tutorial on how to compile software from source under windows

I'm a beginner on open source world.
I can compile my own C++ code in VS 2015. but, I have little knowledge about compiling open source code. I can't even find a project file of that.
Anyway, I'd like to compile Sigil 0.9.4 version from source. My system is Windows 10 64 bit, and Qt 5.6.0 is installed. I've been looking for any basic guide for that but I haven't found yet.
I have downloaded a source code zip file from the link
https://github.com/Sigil-Ebook/Sigil/releases
And I have no idea what's the difference between Sigil-0.9.4-Code.zip and Source code (zip).
Which one should I download to compile?
Intuitively, I used 'importing project' in Qt but I get message 'no rule to make target all. stop'
Any instructions for that?
Thank you in advance!!!
For compilation you will need to use CMake. I recommend going through their web-site and read about it.
If you look at the source repository of the software you are trying to build (Sigil), you will see the root folder contains CMakeLists.txt. This is the file that will tell cmake program how to build and configure the software.
If you are planning to use Qt as your IDE, I recommend to download and install cmake first. Then make sure, Qt's toolchain is set up properly with the cmake. Then all you have to do is to open that CMakeLists.txt in Qt (see more details in the aforementioned link). Also, you can find plenty other tutorials on how to use cmake to compile your projects.
Hope this will help you get started.

Determine Version of .NET Software Running

This may be a stupid question and/or a futile effort -- you've been warned...
I have a ASP .NET application (with the VB parts compiled to a DLL). This application has been around a while and the person who wrote it apparently messed up the old source code repository system. He is no longer around and I'm not clear on whether the source code I was given was a re-write or an older version (or by some strange luck the actual version of the website running).
Being that part of this website is running as a DLL, what is the best way I can go about in determining if the version of the source code I have matches what is running? I'm unable to setup an IIS server to throw this on (licensing/server cost/time/etc).
Is there a better way than compiling the project and then finding some disassembler and doing a comparison?
Is there a better way than compiling the project and then finding some disassembler and doing a comparison?
That's what I've done in the past in your situation.
Open each compiled assembly using ILSpy, and use the option "File / Save Code" to generate source files.
Build the source code from your source code repository, and use ILSpy to generate source files.
Compare the results of 1 and 2.
Obviously this won't give you the whole picture - you'll also need to compare aspx files, config files, ..., but it's the only approach I know.

What is Interop.MSutil.dll

First of all i want to say that I'm still a beginner in ASP.NET development. I think this is a simple question but I cant find an answer anywhere. The following is my problem:
I have a big ASP.NET project develped in .NET 2.0 . Now I have to update thisProject to .NET 4.0. I think it worked quite well when I loaded and converted it to .NET 4.0 with VS2010 but there is this missing reference.
The missing reference is MSutil.dll and I don't have any clue what that reference is for an I cant find the dll anywhere either. In the cs code its used like this:
using LogQuery = MSUtil.LogQueryClassClass;
using IisW3cLogInputClass = MSUtil.COMIISW3CInputContextClassClass;
using LogRecordSet = MSUtil.ILogRecordset;
using LogRecord = MSUtil.ILogRecord;
Can anyone tell me...
what this reference is for?
where I can find/download it?
how I can include/install it in my solution?
This is used to read the IIS log files and parse them.
To get that DLL follow those steps:
Download the Log Parser package, here. (free download, small .msi file)
Install the Log Parser on the machine with the your project and Visual Studio.
Browse to the location of the installed program and you will see file called "LogParser.dll" in there. Copy the file to some easy location e.g. "C:\Temp" see below why.
Go to All Programs --> Microsoft Visual Studio 2010 --> Visual Studio Tools and right click "Visual Studio Command Prompt" then choose Run as administrator.
From within the console type:
tlbimp "C:\temp\LogParser.dll" /out:"C:\temp\Interop.MSUtil.dll"
That's it - after this you will have the lost Interop.MSUtil.dll back on your machine, copy it to your project location and add reference to it like you add to any other external DLL file.
Interop.MSutil.dll is a .NET interface to LogParser.dll, primarily used to parse IIS logs.
To use it, you will need LogParser 2.2 installed and LogParser.dll registered on your machine.
Interop.MSUtil is now available via nuget so you no longer have to create it yourself, but after installation you will have to manually add a reference to the DLL in your solution's packages folder.
After adding the reference, right-click it and set Embed Interop Types to false to avoid receiving an error that the classes cannot be embedded.
It seems is an Interop object.
An Interop object is a bridge between a .Net dll and a COM object
Perhaps this link helps you
http://www.fixdllexe.com/Interop.MSUtil.dll-149085.html

Use Manifest Tool (mt.exe) to Change "Version" of "Unmanaged Assembly"

Now that native code can have assemblies (e.g. "unmanaged assembly") for side-by-side cache usage, I'm interested in changing the version of a DLL after it is built (as part of an incremental build auto-versioning scheme). I think I'm close using this commmand:
mt -updateresource:MyNewlyBuiltThing.dll;#2 -identity:"MyNewlyBuiltThing, version=5.5.0.1"
That command gives me the following error:
mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file "MyNewlyBuiltThing.dll". Access is denied.
That command is executed from a command prompt with administrator privileges, and I have no anti-virus software on my development box (and the file does not have a read-only flag set).
Perhaps the problem is that I'm using the wrong name in the identity string. After all, when I load the embedded resource of the binary into Visual Studio, it shows a manifest that doesn't bother to mention its name - it only mentions the names of dependencies.
Anyway, I was just wondering if the mt.exe could be coaxed into giving me the post-build version-bumping of a non-managed assembly. Any insight of what I'm doing wrong? And if this is not possible, why?
If permissions issues have been ruled out:
Are you running on a FAT filesystem? There may be issues if not on NTFS. Also, several issues of this type are gone with the latest mt.exe, part of the "Microsoft Windows SDK for Windows 7 and .NET Framework 4", version 7.1 so you could try that.

Resources