I want to apply dll to my aspx (with code behind), I didn't create a project, just opening the aspx and cs file using visual studio 2012
http://www.microsoft.com/en-us/download/details.aspx?id=8422
Microsoft Developer Support OLE File Property Reader (the dsofile.dll)
I'm trying to read the file properties by using this dll.
What is the easiest and fastest way to import this dll without using add reference in visual studio?
i put the dsofile.dll under the bin folder, and use "using DSOfile", but the dll not been found.
It says here:
The Dsofile.dll sample file is an in-process ActiveX component for
programmers that use Microsoft Visual Basic .NET or the Microsoft .NET
Framework.
These articles will tell you what to do:
Calling COM Components from .NET Clients
C# 4.0, the Dynamic Keyword and COM
Related
It's my first post here, so I hope I do anything right.
I'm working for a company that is developing a .NET Core application inside Windows, using c# and VS 2019. The version I'm using of .NET Core is 3.1. Visual studio is updated to the latest version (14.5).
We've already written all the UI, and we were wondering if there is any way to generate, from a resx file, the associated localization DLL.
This could be useful, for the translator along Europe to localize the application and test the result inside the application.
I was searching for a way to do that (generate dll from resx) for several days, without being able to correctly find a way to successfully generate this dll from the resx file generated by VS.
Whats I've tried so far:
Using Resgen and al.exe with several parameters and a combination of them. I got the result that the dll was generated but not loaded from the application
Using csc.exe with the input the resx file to be translated. I got as result a dll that was not loaded from the application
Try different version of dotnet SDK, calling "dotnet csc.dll" from the SDK folders, without being able to generate a valid dll loaded from the application
My question now is, is there any way to generate not from inside VS a temporary dll that can be loaded from translator machine to test the application or, the only way is to have the resx file from him and then generate from developer machine the dll and give back to the translator in order to be properly tested?
If not, is there a way to generate the resx built dll from VS Community without having all the source code (as you can imagine, we don't want to redistribute our source)?
Any other ideas on how we can solve this problem?
Another idea that came up to our mind is to create a separate resource project, and distribute that to our translator. I think I'll try this path during the afternoon if no other useful ideas come up from here.
Thanks in advance for any reply to this post.
You can use two methods
1) RegGen + Assembly Linker
Use ResGen.exe to compile the localized .resx files into .resources
Then use AL.exe to link the satellite assembly file
or
2) Use Visual Studio.
Just add the localized .resx file into your csproj file. Next time you build, Visual Studio also builds the satellite assemblies.
Before you can create the satellites you need to have the localized .resx files. Use a localization tool to create them. For example Soluling.
I'm not that advanced with C# and need some assistance compiling a code. Honestly it's first time I'm doing that. I have a code that is aimed to automatically block rdp bruteforce.
Here is acode I'm trying to compile: https://pastebin.com/CJEapWyi
I've got problems interacting with firewall api.
In the internet people say I have to add reference to FirewallAPI.dll and I'm compiling code using following CLI:
c:\Windows\Microsoft.NET\Framework\v4.0.30319>csc.exe /r:"c:\windows\system32\FirewallApi.dll" c:\Users\Administrator\Documents\rdpbrute.cs
and it says:
error CS0006: Metadata file 'FirewallApi.dll' could not be found
Is there any way to compile a program that interacts with firewall using this compiler or I have to install visual studio?
Thanks for your time.
Instead of referencing c:\windows\system32\FirewallApi.dll you should first create COM interop library Interop.FirewallApi.dll and then add reference to it.
Interop library can be created with use of tlbimp.exe tool that is part of Visual Studio installation. A more simple approach is to use Add reference feature inside of VS (just select c:\windows\system32\FirewallApi.dll and interop library will be created automatically).
So you have to install VS as you suggested.
I am using C# Winforms and when I add a reference to the project for Microsoft.Interop.Office.Excel v12.0.0.0, it automatically adds a COM reference to C:\Program Files\Microsoft Office\Office14\EXCEL.exe.
This .exe isn't found on any other machines, and as such, it won't work on other devices. Is there a way to import that file, or make it not reference to that file?
Any microsoft office tools like Microsoft.Office.Interof.Excel are part of Microsoft Primary Interop Assemblies called PIA, which can be downloaded separately and installed on production machine.
All version of PIAs can be downloaded from msdn. e.g. Office PIA
Msdn Pia link
Or you can copy them to Library Folder in your solution and reference these assembly from Library folder local to your solution.
I have been trying to monitor video memory for a highly performance intensive program.
So I used the NVIDIA CUDA libraries in a C++ Visual Studio Application to collect the data I need.
Unfortunately I need a package that can be used with Ruby, C# and the Software Testing tools my company has.
So I decided to compile a C++ DLL and import it into a C# Visual Studio Project for testing.
I was able to compile the DLL but importing it into my Visual C# Program has been an issue.
I right Click on References -> Add Reference. Then I click on the Browse tab and browse to the location of my DLL; "TestProgram.dll" and I click "OK"
Then I get the following Error message "A reference to C:.... could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."
What I have tried so far:
1. Importing the DLL from several different locations on my system.
2. Moving the DLL into my Solution Explorer and importing it
3. Using the "Invoke" method: [DllImport("PathToMyDll")]
4. Using the "Invoke" method with just my dll name.
5. Typing 'using' path to my DLL
6. Exporting the dll as a .lib file instead
What am I doing wrong? I thought that if I exported a DLL using Visual Studio 2010 then surely that same DLL could be Added into a Visual Studio 2010 project.
Well, is it a valid Assembly or COM component? Just because it's a C++ DLL doesn't mean it can be used with just a reference, in fact, most can't. It needs to be a managed DLL or a COM object. If it's none of those, then you have to invoke unmanaged code from a managed assembly. That means defining each function in a stub.
More info here: how to call a C++ dll exported function from c#
Be aware, you also have to deal with 64/32 bit issues, since if the DLL is compiled for 32 bit, you can't use it in a 64 bit application.
I found the solution to this problem. CUDA creates a Windows Console Application project. So the solution was to just use that instead of a DLL.
This worked well because Ruby, Test Complete and Visual C# can read the output from a basic .exe console program (with some work).
The compiled exe is simple. All I need to do is pass in an integer as an argument when I launch the program and the program will get the data I need from my NVIDIA card.
The challenge now will be finding a good way to interface with the .exe.
I created a C# dll using Visual Studio 2010.
I'm able to register it using regasm. I also used [ComVisible(true)] for my class.
The issue is, I'm not able to access this dll from VBScript.
I remeber there was a setting in the Project | Properties screen.
What is that setting? Or is there another way?
see this excellent post on creating COM components using Visual C#.NET
http://blog.stevedoria.net/20051008/creating-com-components-using-visual-csharp-dot-net