Questions tagged [interopservices]
84 questions
0
votes
2 answers
COM Exception in Application
I'm trying to upgrade an internal application, the infrastructure will be moving from 2008 to windows server 2012. The application builds presentations from model templates.
I keep getting the attached COM Exception which looks to be associated with…

user3008705
- 39
- 1
- 6
0
votes
0 answers
InteropServices trigger on message c#
long time reader, first time poster here :)
I'm currently trying to learn how to use interops, and was wondering if i could somehow setup a program (program A) that adds an additional option to a popup-menu in another program (program B).
Edit:…

Nodosano
- 1
- 1
0
votes
2 answers
How to reference .inl and .h files in C#
Update 1:
I am wondering whether I can reference to a .lib file, but it seems that I cannot.
If this is true, and I have no source code of the C++ project, How can I use its methods?
Btw, I'm using FastCV library.
I come across a situation that I…

Franva
- 6,565
- 23
- 79
- 144
0
votes
2 answers
Xml.Serializer illegal cast exception in C++ ActiveX control hosted in C# .Net 4.0 Application
I have a C# .Net 4.0 Application hosting a C++ ActiveX control utilizing a C++ DLL with CLR enabled. The DLL has the main function of loading the parameters for the OCX and uses XML.Serializer for this purpose.
This stack is working fine when all…

Jefraim
- 193
- 9
0
votes
0 answers
Calling Unmanaged C++ code with array of structure in C#
The following is my C++ declaration of the function:
unsigned moduleDescription (unsigned modulnumber, char * const name, t_c_pindescription * const p_inputs, t_c_pindescription * const p_outputs, t_c_pindescription * const p_intern);
The following…
0
votes
1 answer
how to use WtsApi32.dll in lock/Unlock session handler in windows service?
I want to detect and close any program (for example: Notepad.exe) by using a windows service. Below code is good choose in a console application.
class Program
{
private static SessionSwitchEventHandler sseh;
static void Main(string[] args)
…

loki
- 2,926
- 8
- 62
- 115
0
votes
1 answer
Create word documents in C#
I am trying to create word documents using Microsoft office interops. The document should contain a picture and some table content below. But when i add the content it doesn't get added the way I require.
I have provided the sample code…

user1417294
- 314
- 1
- 3
- 15
0
votes
2 answers
Marshal.Copy vs ReadProcessMemory / WriteProcessMemory win32 api - in the same process
I am wondering if someone can outline the main differences, pro-s and con-s of using ReadProcessMemory/WriteProcessMemory over Marshal.Copy in Windows .NET (C#/VB.net) applications to read from / write to the application's process' memory (not…

Fit Dev
- 3,413
- 3
- 30
- 54
-1
votes
1 answer
Win API NTFS OpenFileByID throwing AccessViolationException
The OpenFileByID line in test() is giving me System.AccessViolationException Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
I am trying to replicate this code example (see the answer), which…

Wes
- 1,183
- 3
- 23
- 51