Questions tagged [interopservices]
84 questions
36
votes
6 answers
Could not load file or assembly 'System.Runtime.InteropServices.RuntimeInformation
I am getting this error whenever I try and run a webjob project with application insight and entity framework.
System.IO.FileLoadException: 'Could not load file or assembly
'System.Runtime.InteropServices.RuntimeInformation, Version=0.0.0.0,
…

Andrew
- 2,571
- 2
- 31
- 56
16
votes
0 answers
Modifying a C struct in VB.NET
I'm trying to use someone else's DLL coded in C in my VB.NET application.
My VB.NET application sends some callbacks pointers to the DLL and DLL then calls back to functions inside my VB.NET application.
The DLL is calling a function inside VB.NET…

Messias
- 161
- 3
5
votes
1 answer
Pass function pointer into a DLL from PowerShell
Problem
I have a DLL with the following function exported.
extern void Finalize(void (*WriteEntry)(const char* entry));
I am using P-Invoke to call into the DLL from PowerShell.
In PowerShell scripts, I have a function WriteEntry defined, which I…

brandon_busby
- 122
- 11
5
votes
2 answers
What is IExpando and where is it used?
I was browsing the types in mscorlib using reflector (like you do...) and came across the IExpando interface, in the System.Runtime.InteropServices.Expando namespace.
I did a search in reflector and even checked out MSDN, it seems that no types in…

fletcher
- 13,380
- 9
- 52
- 69
5
votes
1 answer
VBA array of User-Defined objects from a C# DLL
Background information:
I'm building a SCADA system, which runs on VBA and I seek some of the powers of C#. I build a DLL library in C# and got basic data to flow between the DLL and VBA.
[ComVisible(true),…

Rasmus Plats
- 51
- 5
5
votes
2 answers
How do I use an unregistered dll from c#?
I have a custom dll (not registered) that I need to access via c#. How do I do this without registering the DLL?
Edit: It is a C++ dll.

cabgef
- 1,398
- 3
- 19
- 35
5
votes
1 answer
Windows Service fails to start interactive process on user log on with WTSQueryUserToken for some versions of Windows
Following this link, I have implemented WTSQueryUserToken in my C# solution and called the CreateProcessAsUserWrapper.LaunchChildProcess("app_path") method from the OnStart of my Windows Service which is made to run as "LocalSystem". It is able to…

TrueD
- 75
- 2
- 10
4
votes
1 answer
Interfacing with C/C++ routine in C# causes rip
I have a vendor's API call, which I want to use in my C# Windows Forms application. The problem is that no matter what P/Invoke I try, I get a crash on the line stating that the call has unbalanced the stack. I tried working with the vendor, but…

Sarah Weinberger
- 15,041
- 25
- 83
- 130
3
votes
1 answer
How to run bundled javascript files in blazor web assembly?
I have kept the bundled script files in wwwroot folder of blazor_wasm app.
I added the file using script tags in index.html