Snmp extension agent in VC++/C# - c#

I am new to C++/VC++ and SNMP. I am trying to implement Snmp extension agent which would send custom information for OIDs defined by me. I followed this link and got the Snmp extension agent working as expected. The application in the link is developed in native C++.
I would like to have the dll developed in VC++/C#. I compiled the application in C++/cli and deployed the dll, but Snmp service stopped picking up my dll. What am I missing?

Related

UWP / Desktop-Bridge communication using (Packaged) COM

I'm currently developing a UWP application that now needs access to APIs that are normally not accessible by apps in an AppContainer.
As I'm not (yet) able to migrate to WinUI3, I want to try using DesktopBridge to do the otherwise restricted work.
As both processes have to communicate with each other, I thought of COM as it should make things relatively seamless once everything has been set up.
According to this page this should be possible using "Packaged Com".
I now have...
An Out-of-Process Com Server (c# net5.0) that is accessible by non-packaged win32 apps (e.g., PowerShell) but not my own UWP App.
The UWP App with the main logic and UI.
A Packaging Project, which creates a package out of both projects.
(Manifest)
The code is on GitHub: Repo.
Does someone have an idea how to solve this problem or got an alternative for IPC?
PS: Tutorials I used
Packaged Com
Out-Of-Proc COM in c#
Packaging / DesktopBridge
So if I understand you correctly, you want to communicate between a UWP app and a Win32 app, and these two apps are packaged inside a Windows Application Package Project. Please let me know if it is not correct.
For your scenario, since the two apps are packaged together with desktop bridge, I'd suggest you use the App Service. App service could be used not only between UWP apps but also between the UWP app and desktop app.
These are the detailed steps:
You need to declare the AppService connection in the Manifest file of the package project.
You need to call the App service API in the win32 application.
You need to handle the connection in the App.xaml.cs in the UWP app
You could check the detailed code and sample from Stefan Wick's blog - UWP with Desktop Extension – Part 3.

Unity3d Android/Windows app integration with a library

I have a Windows application built using unity3d. The same source code is also used to build an android app. And for this app to access a remote database, I created a Restful service available as a .dll
My question is, is there a way my unity3d based android app use this .dll? I read about ELF32 formats. Not sure how to generate one.
I have the source code for the .dll and ideally I would like a common library to be used/called by both my windows/android app. But am not sure about a common format. Any ideas ?

How to deploy a C# winform application with google.apis reference calls?

I created a little desktop application to manage g-suite users in our school. The thing is that it only works on my pc.
On another (client) pc, I installed the application with a Setup-file (yes i 'think' all dependencies are included), but the application crashes on start:
event : CLR20r3
System.IO.FileNotFoundException
No details about what file is missing (otherwise I wouldn't be posting here)
When i remove all of the google api calls, the program is showing up correctly, so I'm pretty sure the google-api-runtime is missing on the client PC.
Reminds me of a missing client runtime, but i cannot find what I should install on the client PC.
There is no sort of Google-api-client-runtime-installer on the net (like there are clients for database-connections) that would make deployment easier.
Any help will be appreciated with (eternal) recognition :)

What is the preferred way to register a .tlb on a build machine?

I have a .net solution with a C# project and a C++ project. The C++ project is an automation server (.exe). The C# project references an ActiveX interface produced by the C++ project (.tlb or registered interface on the machine). This works great on a development machine as I am registering the .tlb using regtlibv12.exe in a post build event in the C++ project. On the build machine, this fails because the service that runs the builds does not have rights to update the registry.
Is it typical to have the service that runs automated builds run as an administrator? Is there another preferred way to do this?
I also read that regtlibv12.exe is not always installed. Is there another way that is preferred to register a .tlb?
In a C# project just check if C++ application (automation server) is running and run it if not.
Then automation server (.exe) will register all available CLSID's in a system
I found no other way to register the type library in the build process other than using regtlibv12.exe. I had to make sure the automated build service is an administrator and everything works.

How to run c# app having dll files on linux

My c# apps developed on windows run nicely on ubuntu, but the ones having dll files don't. Is there a work around or i have to recompile the code on linux
Interop.SpeechLib.dll is part of Microsoft's Speech API (SAPI).
That doesn't exist on Linux, so you'll have to find an alternative API to call there.
You won't necessarily have to maintain two separate code bases, though. You could execute a run-time check for the host platform/environment, and call the appropriate API for that environment.

Categories

Resources