InstallShield: error C8101: 'Name' : must specify DLL for this function - installshield

While building after upgrading from InstallShield 5.x to InstallShield 2016, I see the below errors & warnings:
error C8101: 'QueryServiceStatus' : must specify DLL for this function
error C8101: 'OpenSCManagerA' : must specify DLL for this function
error C8101: 'CloseServiceHandle' : must specify DLL for this function
error C8101: 'CreateServiceA' : must specify DLL for this function
error C8101: 'QueryServiceStatus' : must specify DLL for this function
Please let me know how to overcome them.
Thanks in advance!

Check for the custom action named "QueryServiceStatus" in Installshield. The source folder for the dll might changed in upgrade process.

Related

visual c++ 6.0 - rebuild all throw error C2259

The project was created using Visual C++ 6.0 and I'm new to using Visual C++. Now in my project, I set up Visual C++ on Windows 10, but when rebuild all below error C2259 throw. Please help me how to fix this error C2259. Thanks in advance.
D:\VS98\VC98\ATL\INCLUDE\atlcom.h(1827) : error C2259: 'CComObject' : cannot instantiate abstract class due to following members:
D:\VS98\VC98\ATL\INCLUDE\atlcom.h(1823) : while compiling class-template member function 'long __stdcall ATL::CComCreator<class ATL::CComObject >::CreateInstance(void *,const struct _GUID &,void ** )'
At last, found the issue. One of the method definitions is different.
To resolve,
Check the function declarations and definitions prototypes in the .cpp,.h and .idl files. Also, check if they are same in all the 3 files.
.idl file we usually miss out on modifying since the search result doesn't show the method.

NuGet - choose references to add on install

I want to pack/publish a NuGet package. (private) using a .nuspec file :
\build
\netstandard1.4
\MyProject.dll
\MyProject.Unmanaged.dll
\net462
\MyProject.dll
\MyProject.Unmanaged.dll
In this package, I have a dll that I want to reference in my project, and another that I can't reference, but that is still required.
When I add the package to a project, the dll are automatically referenced, so I get an error : "Failed to add reference to 'MyProject.Unmanaged'.
Please make sure that the file is accessible, and that it is a valid assembly or COM component.
Is there a way to choose which dll must be automatically referenced or not ?
See the chapter "Explicit assembly references" : https://learn.microsoft.com/en-us/nuget/schema/nuspec

Getting an error when trying to call LocalReport.Render("EXCELOPENXML")

I have installed DocumentFormat.OpenXml (ver 2.5.5631.0) from nugetpackage manager in VS2010. I can see the reference to the DLL. I have created a package folder. But when I am trying to execute method:
public override void Render(LocalReport report)
{
this.SetUpParameters(report);
byte[] renderedReport = report.Render("EXCELOPENXML");
this.target.UpdateRenderedReportContent(renderedReport);
}
I am getting this error:
Specified argument was out of the range of valid values. Parameter name: format
When I am using
report.Render("EXCEL");
I am not getting any error. I have to use EXCELOPENXML to generate xlsx excel.
What version of Microsoft.ReportViewer.WinForms are you referencing? If it's less than 11.0, that's probably your problem.
Incidentally, Visual Studio (2013) declined to show me version 11.0 as an option from the Add Reference dialog. I don't understand why. I had to browse to the the assembly in the GAC:
C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WinForms\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WinForms.DLL
Once you do that, run the following method. You should see EXCELOPENXML as an option now.
new LocalReport().ListRenderingExtensions();

How to use tlb files in a native C++ project

I have a tlb files that contains some function declaration that I need to use.
If I use
#import "type_library.tlb"
I can correclty reference the function from my code:
tlb_namespace::required_function();
But when I compile the project the linker says that tlb_namespace::required_function is an unresolved external symbol.
How can I succesfully build this kind of project?
EDIT:
I have used the same type library in a Dummy VBA access project. I have added the reference to the type library and I have noticed that some of the function contained in the type library are correctly called. But some of them are not. VBA says It can't locate their entry point in the related dll.
Can this explain the unresolved external symbol when building c++ app?
I have also noticed that the failing function are declared in the tlb like this:
UPPER_function_name
but in the dll are declared like this:
Upper_function_name
Can this be the issue?
Is it possible to solve this kind of error directly modifying the binary tlb file or dll?
Use IDE to view TLB information.
Use this help : How to: View Type Library Information
At IDE : View-> Object Browser, click "..." Edit Custom Component Set, browse your TLB file and Add to view information.
Confirm namespace used for.
use the namespace to resolve the linker error:
example:
#import "<>" raw_interfaces_only
using namespace <>
this will resolve the problem

Error while compiling a library in C#

I am trying to compile a class(sqlAccess) declared as public with few methods related to database connection in it. I am getting the following error ...
Error 1 Friend access was granted to 'SqlAccess, PublicKey=00c8', but the output assembly is named 'SQLAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Try adding a reference to 'SqlAccess, PublicKey=00c8' or changing the output assembly name to match. c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll SQLAccess
What could be the reason? is there already a method of that name? I am new to programming so am unable to understand this clearly. Thank you.
This worked for me:
Open the Properties|Signing Tab. Ensure that you have "Sign the Assembly" checked and the strong name key file referenced. Save and compile the Project/Solution.
(cited from MSDN)
.NET seems to get grumpy if you give your assembly/project a name that isn't unique. In your case, SqlAccess must already exist in .NET or a referenced assembly.
The fix is to rename your assembly.
Similar issue:
Weird error in C#
That's because SqlAccess assembly has a reference which granted internal access to SqlAccess. It must be something like this [you will find it in AssemblyInfo.cs] :
[assembly: InternalsVisibleTo("Name of assembly goes here, PublicKey=")]
During compile time when compiler can not find assembly with specific PublicKey, you will get the error such as 'Friend access was granted to...'.
In order to resolve this problem one solution is to remove above attribute from source assembly, or add new public key and change it in source assembly.
Reason behind this should be either you have reinstall/update that particular dll within your solution and but old dll was not deleted properly from your solution and system.
That's why, it got worked when you change the Assembly name (from sqlAccess to sqlAccessXYZ)
I changed the Assembly name to sqlAccessXYZ and now its working, the problem is with the name. Not sure what exactly the problem, for now the issue is resolved. Thanks.

Resources